diff --git a/modules/home/de/hyprland/default.nix b/modules/home/de/hyprland/default.nix index 3bd9e4b..972ac3f 100644 --- a/modules/home/de/hyprland/default.nix +++ b/modules/home/de/hyprland/default.nix @@ -1,12 +1,13 @@ { config, + osConfig, pkgs, lib, ... -}@moduleArgs: +}: { options.custom.de.hyprland.enable = lib.mkEnableOption "" // { - default = moduleArgs.osConfig.custom.de.hyprland.enable or false; + default = osConfig.custom.de.hyprland.enable; }; config = lib.mkIf config.custom.de.hyprland.enable { diff --git a/modules/home/programs/hyprlock.nix b/modules/home/programs/hyprlock.nix index 2a95d0f..a27fcae 100644 --- a/modules/home/programs/hyprlock.nix +++ b/modules/home/programs/hyprlock.nix @@ -1,9 +1,10 @@ { config, + osConfig, pkgs-unstable, lib, ... -}@moduleArgs: +}: let cfg = config.custom.programs.hyprlock; in @@ -11,7 +12,7 @@ in options.custom.programs.hyprlock = { enable = lib.mkEnableOption ""; fprintAuth = lib.mkEnableOption "" // { - default = moduleArgs.osConfig.services.fprintd.enable or false; + default = osConfig.services.fprintd.enable; }; }; diff --git a/modules/home/programs/ssh.nix b/modules/home/programs/ssh.nix index a82fd05..0592d04 100644 --- a/modules/home/programs/ssh.nix +++ b/modules/home/programs/ssh.nix @@ -1,22 +1,16 @@ { config, + osConfig, self, lib, ... -}@moduleArgs: -let - cfg = config.custom.programs.ssh; -in +}: { options.custom.programs.ssh = { enable = lib.mkEnableOption ""; - hostName = lib.mkOption { - type = lib.types.nonEmptyStr; - default = moduleArgs.osConfig.networking.hostName or ""; - }; publicKeyPath = lib.mkOption { type = lib.types.path; - default = "${self}/users/${config.home.username}/@${cfg.hostName}/keys/ssh.pub"; + default = "${self}/users/${config.home.username}/@${osConfig.networking.hostName}/keys/ssh.pub"; }; }; diff --git a/modules/home/services/syncthing.nix b/modules/home/services/syncthing.nix index 013af90..2ee4464 100644 --- a/modules/home/services/syncthing.nix +++ b/modules/home/services/syncthing.nix @@ -1,7 +1,12 @@ -{ config, lib, ... }@moduleArgs: +{ + config, + osConfig, + lib, + ... +}: { options.custom.services.syncthing.enable = lib.mkEnableOption "" // { - default = moduleArgs.osConfig.custom.services.syncthing.enable or false; + default = osConfig.custom.services.syncthing.enable; }; config = lib.mkIf config.custom.services.syncthing.enable { diff --git a/modules/home/sops.nix b/modules/home/sops.nix index 665087f..37d2c8f 100644 --- a/modules/home/sops.nix +++ b/modules/home/sops.nix @@ -1,10 +1,11 @@ { config, + osConfig, inputs, self, lib, ... -}@moduleArgs: +}: let cfg = config.custom.sops; in @@ -13,18 +14,16 @@ in options.custom.sops = { enable = lib.mkEnableOption ""; - hostName = lib.mkOption { - type = lib.types.nonEmptyStr; - default = moduleArgs.osConfig.networking.hostName or ""; - }; agePublicKey = lib.mkOption { type = lib.types.nonEmptyStr; default = - "${self}/users/${config.home.username}/@${cfg.hostName}/keys/age.pub" |> lib.readFile |> lib.trim; + "${self}/users/${config.home.username}/@${osConfig.networking.hostName}/keys/age.pub" + |> lib.readFile + |> lib.trim; }; secretsFile = lib.mkOption { type = lib.types.path; - default = "${self}/users/${config.home.username}/@${cfg.hostName}/secrets.json"; + default = "${self}/users/${config.home.username}/@${osConfig.networking.hostName}/secrets.json"; }; secrets = lib.mkOption { type = lib.types.anything;