diff --git a/config/home-manager/services/flatpak.nix b/config/home-manager/services/flatpak.nix deleted file mode 100644 index f7d04c0..0000000 --- a/config/home-manager/services/flatpak.nix +++ /dev/null @@ -1,9 +0,0 @@ -{inputs, ...}: { - imports = [inputs.nix-flatpak.homeManagerModules.nix-flatpak]; - services.flatpak.packages = [ - { - flatpakref = "https://sober.vinegarhq.org/sober.flatpakref"; - sha256 = "1pj8y1xhiwgbnhrr3yr3ybpfis9slrl73i0b1lc9q89vhip6ym2l"; - } - ]; -} diff --git a/config/home-manager/services/gammastep.nix b/config/home-manager/services/gammastep.nix deleted file mode 100644 index 68bd073..0000000 --- a/config/home-manager/services/gammastep.nix +++ /dev/null @@ -1,17 +0,0 @@ -{lib, ...}: { - services.gammastep = { - enable = true; - tray = true; - provider = "geoclue2"; - }; - - systemd.user.services.gammastep = { - Unit = { - PartOf = lib.mkForce []; - After = lib.mkForce ["graphical-session.target"]; - }; - Service = { - Slice = lib.mkForce "background-graphical.slice"; - }; - }; -} diff --git a/config/home-manager/services/swaync/default.nix b/config/home-manager/services/swaync/default.nix deleted file mode 100644 index 1028d2d..0000000 --- a/config/home-manager/services/swaync/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{lib, ...}: let - inherit (builtins) readFile; -in { - services.swaync = { - enable = true; - style = readFile ./style.css; - settings = { - positionX = "right"; - positionY = "top"; - layer = "overlay"; - control-center-layer = "top"; - layer-shell = true; - cssPriority = "application"; - control-center-margin-top = 0; - control-center-margin-bottom = 0; - control-center-margin-right = 0; - control-center-margin-left = 0; - notification-2fa-action = true; - notification-inline-replies = false; - notification-icon-size = 64; - notification-body-image-height = 100; - notification-body-image-width = 200; - }; - }; - # systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1"; - systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce ""; -} diff --git a/config/home-manager/services/syncthing.nix b/config/home-manager/services/syncthing.nix deleted file mode 100644 index fae0786..0000000 --- a/config/home-manager/services/syncthing.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - services.syncthing = { - enable = true; - }; -} diff --git a/config/home-manager/services/udiskie.nix b/config/home-manager/services/udiskie.nix deleted file mode 100644 index f3ea3b8..0000000 --- a/config/home-manager/services/udiskie.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - services.udiskie.enable = true; -} diff --git a/hosts/default.nix b/hosts/default.nix index e8d1de9..3c42986 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -20,9 +20,6 @@ users.${config.local.systemVars.username}.imports = [ ../modules/hm "${self}/config/home-manager" - - "${self}/config/home-manager/services/udiskie.nix" - "${self}/config/home-manager/services/syncthing.nix" ]; extraSpecialArgs = specialArgs; @@ -33,18 +30,7 @@ graphical = [ ({config, ...}: { home-manager.users.${config.local.systemVars.username}.imports = [ - "${self}/config/home-manager/services/swaync" - "${self}/config/home-manager/terminal/emulators/foot.nix" - "${self}/config/home-manager/services/gammastep.nix" - ]; - }) - ]; - - gaming = [ - ({config, ...}: { - home-manager.users.${config.local.systemVars.username}.imports = [ - "${self}/config/home-manager/services/flatpak.nix" ]; }) ]; @@ -65,8 +51,7 @@ in { ./solaire ] ++ base - ++ graphical - ++ gaming; + ++ graphical; }; anastacia = mkSystem { diff --git a/modules/hm/default.nix b/modules/hm/default.nix index 62a4bf4..a5aa301 100644 --- a/modules/hm/default.nix +++ b/modules/hm/default.nix @@ -1,3 +1,6 @@ { - imports = [./programs]; + imports = [ + ./programs + ./services + ]; } diff --git a/modules/hm/services/default.nix b/modules/hm/services/default.nix new file mode 100644 index 0000000..39128e4 --- /dev/null +++ b/modules/hm/services/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./gammastep.nix + ./syncthing.nix + ./swaync + ./udiskie.nix + ]; +} diff --git a/modules/hm/services/gammastep.nix b/modules/hm/services/gammastep.nix new file mode 100644 index 0000000..91c4ea6 --- /dev/null +++ b/modules/hm/services/gammastep.nix @@ -0,0 +1,23 @@ +{ + lib, + osConfig, + ... +}: { + config = lib.mkIf osConfig.local.profiles.laptop.enable { + services.gammastep = { + enable = true; + tray = true; + provider = "geoclue2"; + }; + + systemd.user.services.gammastep = { + Unit = { + PartOf = lib.mkForce []; + After = lib.mkForce ["graphical-session.target"]; + }; + Service = { + Slice = lib.mkForce "background-graphical.slice"; + }; + }; + }; +} diff --git a/modules/hm/services/swaync/default.nix b/modules/hm/services/swaync/default.nix new file mode 100644 index 0000000..f96130f --- /dev/null +++ b/modules/hm/services/swaync/default.nix @@ -0,0 +1,33 @@ +{ + lib, + osConfig, + ... +}: let + inherit (builtins) readFile; +in { + config = lib.mkIf osConfig.local.modules.hyprland.enable { + services.swaync = { + enable = true; + style = readFile ./style.css; + settings = { + positionX = "right"; + positionY = "top"; + layer = "overlay"; + control-center-layer = "top"; + layer-shell = true; + cssPriority = "application"; + control-center-margin-top = 0; + control-center-margin-bottom = 0; + control-center-margin-right = 0; + control-center-margin-left = 0; + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 64; + notification-body-image-height = 100; + notification-body-image-width = 200; + }; + }; + # systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1"; + systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce ""; + }; +} diff --git a/config/home-manager/services/swaync/style.css b/modules/hm/services/swaync/style.css similarity index 100% rename from config/home-manager/services/swaync/style.css rename to modules/hm/services/swaync/style.css diff --git a/modules/hm/services/syncthing.nix b/modules/hm/services/syncthing.nix new file mode 100644 index 0000000..d0cd12a --- /dev/null +++ b/modules/hm/services/syncthing.nix @@ -0,0 +1,11 @@ +{ + lib, + osConfig, + ... +}: { + config = lib.mkIf osConfig.local.profiles.desktop.enable { + services.syncthing = { + enable = true; + }; + }; +} diff --git a/modules/hm/services/udiskie.nix b/modules/hm/services/udiskie.nix new file mode 100644 index 0000000..cc2e2fb --- /dev/null +++ b/modules/hm/services/udiskie.nix @@ -0,0 +1,9 @@ +{ + lib, + osConfig, + ... +}: { + config = lib.mkIf osConfig.local.profiles.desktop.enable { + services.udiskie.enable = true; + }; +}