From de5e6fdd884329558086f4b46b92c32c87560e83 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sun, 30 Jul 2023 02:44:27 +0300 Subject: [PATCH] change a few things around --- hosts/sakotop/configuration.nix | 5 +--- modules/desktop/apps/transmission/daemon.nix | 27 +++++++++++++++++++ modules/desktop/apps/transmission/default.nix | 13 ++------- 3 files changed, 30 insertions(+), 15 deletions(-) create mode 100644 modules/desktop/apps/transmission/daemon.nix diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 4c1af7bc..141a21b4 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -29,10 +29,7 @@ nemo.enable = true; keepassxc.enable = true; nicotineplus.enable = true; - transmission = { - enable = true; - tui = true; - }; + transmission.enable = true; }; chat = { discord.enable = true; diff --git a/modules/desktop/apps/transmission/daemon.nix b/modules/desktop/apps/transmission/daemon.nix new file mode 100644 index 00000000..200317a1 --- /dev/null +++ b/modules/desktop/apps/transmission/daemon.nix @@ -0,0 +1,27 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.desktop.apps.transmission; +in +{ + options.modules.desktop.apps.transmission = { + daemon = mkEnableOption false; + }; + + config = mkIf cfg.daemon { + #TODO(sako):: figure out service + users.users.sako.packages = with pkgs; [ + transmission + ]; + + home-manager.users.sako = { pkgs, ...}: { + xdg.configFile = { + transmission-daemon = { + source = ../../../../config/transmission-daemon; + recursive = true; + }; + }; + }; + + }; +} diff --git a/modules/desktop/apps/transmission/default.nix b/modules/desktop/apps/transmission/default.nix index 5400c135..49b8f932 100644 --- a/modules/desktop/apps/transmission/default.nix +++ b/modules/desktop/apps/transmission/default.nix @@ -6,6 +6,7 @@ in { imports = [ ./remote-tui.nix + ./daemon.nix ]; options.modules.desktop.apps.transmission = { enable = mkEnableOption false; @@ -14,17 +15,7 @@ in config = mkIf cfg.enable { #TODO(sako):: figure out service users.users.sako.packages = with pkgs; [ - transmission + transmission-gtk ]; - - home-manager.users.sako = { pkgs, ...}: { - xdg.configFile = { - transmission-daemon = { - source = ../../../../config/transmission-daemon; - recursive = true; - }; - }; - }; - }; }