treewide: config/home-manager/services -> modules/hm/services

This commit is contained in:
Anthony Rodriguez 2025-01-14 20:06:31 +01:00
parent b808281674
commit 376024d4a5
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
13 changed files with 89 additions and 78 deletions

View file

@ -1,9 +0,0 @@
{inputs, ...}: {
imports = [inputs.nix-flatpak.homeManagerModules.nix-flatpak];
services.flatpak.packages = [
{
flatpakref = "https://sober.vinegarhq.org/sober.flatpakref";
sha256 = "1pj8y1xhiwgbnhrr3yr3ybpfis9slrl73i0b1lc9q89vhip6ym2l";
}
];
}

View file

@ -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";
};
};
}

View file

@ -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 "";
}

View file

@ -1,5 +0,0 @@
_: {
services.syncthing = {
enable = true;
};
}

View file

@ -1,3 +0,0 @@
{
services.udiskie.enable = true;
}

View file

@ -20,9 +20,6 @@
users.${config.local.systemVars.username}.imports = [ users.${config.local.systemVars.username}.imports = [
../modules/hm ../modules/hm
"${self}/config/home-manager" "${self}/config/home-manager"
"${self}/config/home-manager/services/udiskie.nix"
"${self}/config/home-manager/services/syncthing.nix"
]; ];
extraSpecialArgs = specialArgs; extraSpecialArgs = specialArgs;
@ -33,18 +30,7 @@
graphical = [ graphical = [
({config, ...}: { ({config, ...}: {
home-manager.users.${config.local.systemVars.username}.imports = [ 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/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 ./solaire
] ]
++ base ++ base
++ graphical ++ graphical;
++ gaming;
}; };
anastacia = mkSystem { anastacia = mkSystem {

View file

@ -1,3 +1,6 @@
{ {
imports = [./programs]; imports = [
./programs
./services
];
} }

View file

@ -0,0 +1,8 @@
{
imports = [
./gammastep.nix
./syncthing.nix
./swaync
./udiskie.nix
];
}

View file

@ -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";
};
};
};
}

View file

@ -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 "";
};
}

View file

@ -0,0 +1,11 @@
{
lib,
osConfig,
...
}: {
config = lib.mkIf osConfig.local.profiles.desktop.enable {
services.syncthing = {
enable = true;
};
};
}

View file

@ -0,0 +1,9 @@
{
lib,
osConfig,
...
}: {
config = lib.mkIf osConfig.local.profiles.desktop.enable {
services.udiskie.enable = true;
};
}