Add media-client and torrent roles

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2023-08-27 19:26:12 +03:00
parent 06d253b189
commit c2d197d7f0
No known key found for this signature in database
GPG key ID: 9F6DDABE11A2674D
6 changed files with 33 additions and 0 deletions

View file

@ -23,6 +23,8 @@ in {
gaming.enable = true; gaming.enable = true;
graphical.enable = true; graphical.enable = true;
latex.enable = true; latex.enable = true;
media-client.enable = true;
torrent.enable = true;
virtualisation.enable = true; virtualisation.enable = true;
yggdrasil-client.enable = true; yggdrasil-client.enable = true;
}; };

View file

@ -21,6 +21,8 @@ in {
gaming.enable = true; gaming.enable = true;
graphical.enable = true; graphical.enable = true;
latex.enable = false; latex.enable = false;
media-client.enable = true;
torrent.enable = true;
virtualisation.enable = true; virtualisation.enable = true;
yggdrasil-client.enable = true; yggdrasil-client.enable = true;
}; };

View file

@ -5,6 +5,8 @@
./gaming.nix ./gaming.nix
./graphical.nix ./graphical.nix
./latex.nix ./latex.nix
./media-client.nix # TODO: media-server
./torrent.nix
./virtualisation.nix ./virtualisation.nix
./yggdrasil-client.nix ./yggdrasil-client.nix
]; ];

View file

@ -17,6 +17,7 @@ in {
usbmuxd usbmuxd
keepassxc keepassxc
]; ];
# When adding pkgs prefer GTK over Qt, because Qt bad GTK good
services.greetd = { services.greetd = {
enable = true; enable = true;

13
roles/media-client.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, pkgs, lib, ... }:
let
cfg = config.my.roles.media-client;
in {
options.my.roles.media-client.enable = lib.mkEnableOption "Enable media players, downloaders, etc.";
config = lib.mkIf (cfg.enable){
environment.systemPackages = with pkgs; [
vlc
yt-dlp ffmpeg
];
};
}

13
roles/torrent.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, pkgs, lib, ... }:
let
cfg = config.my.roles.torrent;
in {
options.my.roles.torrent.enable = lib.mkEnableOption "Enable torrent support.";
# TODO: do something about systems without GUI (i don't use any at the moment)
config = lib.mkIf (cfg.enable) {
environment.systemPackages = with pkgs; [
(transmission.override {enableGTK3 = true;})
];
};
}