feat: add module for media consumption packages
This commit is contained in:
parent
190e3dfa73
commit
e0c1e40f27
5 changed files with 50 additions and 7 deletions
|
@ -10,8 +10,9 @@
|
|||
cat = "bat";
|
||||
sd = ''cd "$(dirname "$HOME/$(env --chdir ~ fzf)")"'';
|
||||
mkdir = "mkdir --parent";
|
||||
cp = "cp -i";
|
||||
mv = "mv -i";
|
||||
cp = "cp -vi";
|
||||
mv = "mv -vi";
|
||||
rm = "rm -v";
|
||||
};
|
||||
functions = {
|
||||
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
|
||||
|
|
|
@ -86,5 +86,7 @@
|
|||
pop-icon-theme
|
||||
];
|
||||
|
||||
media.enableAll = true;
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
loupe
|
||||
seahorse
|
||||
gimp
|
||||
vlc
|
||||
pavucontrol
|
||||
thunderbird
|
||||
keepassxc
|
||||
|
@ -49,13 +48,12 @@
|
|||
protonmail-bridge-gui
|
||||
varia
|
||||
signal-desktop
|
||||
calibre
|
||||
tagger
|
||||
soundconverter
|
||||
foliate
|
||||
kid3
|
||||
prismlauncher
|
||||
|
||||
kid3
|
||||
soundconverter
|
||||
|
||||
# proprietary
|
||||
obsidian
|
||||
|
||||
|
|
41
options/media.nix
Normal file
41
options/media.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.media;
|
||||
mkMedia = defPackages: {
|
||||
enable = lib.mkOption { default = cfg.enableAll; };
|
||||
packages = lib.mkOption { default = defPackages; };
|
||||
};
|
||||
in
|
||||
{
|
||||
options.media = {
|
||||
enableAll = lib.mkEnableOption "";
|
||||
audio = mkMedia [
|
||||
pkgs.feishin
|
||||
pkgs.lollypop
|
||||
];
|
||||
video = mkMedia [
|
||||
pkgs.vlc
|
||||
];
|
||||
ebook = mkMedia [
|
||||
pkgs.calibre
|
||||
pkgs.foliate
|
||||
];
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = lib.flatten (
|
||||
lib.map (opt: opt.packages) (
|
||||
lib.filter (opt: opt.enable) [
|
||||
cfg.audio
|
||||
cfg.video
|
||||
cfg.ebook
|
||||
]
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
|
@ -27,6 +27,7 @@
|
|||
"${self}/hosts/${hostname}/configuration.nix"
|
||||
"${self}/options"
|
||||
"${self}/options/pulseview.nix"
|
||||
"${self}/options/media.nix"
|
||||
{ networking.hostName = hostname; }
|
||||
] ++ extraModules;
|
||||
specialArgs = {
|
||||
|
|
Loading…
Add table
Reference in a new issue