From 06623cd93a685e4be3fba1dd1a0f158014aae202 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 27 May 2025 22:19:35 +0200 Subject: [PATCH] Rename the namespace of the system-modules --- hosts/alto/default.nix | 88 ++++++++++---------- hosts/cirrus/default.nix | 38 +++++---- hosts/fern/default.nix | 32 +++---- hosts/north/default.nix | 29 ++++--- modules/home/de/hyprland/default.nix | 2 +- modules/home/tailscale.nix | 2 +- modules/system/actualbudget/backups.nix | 6 +- modules/system/actualbudget/default.nix | 4 +- modules/system/bluetooth.nix | 4 +- modules/system/boot/loader/grub.nix | 4 +- modules/system/boot/loader/systemd-boot.nix | 4 +- modules/system/boot/silent.nix | 4 +- modules/system/crowdsec/default.nix | 4 +- modules/system/crowdsec/firewall-bouncer.nix | 4 +- modules/system/de/hyprland.nix | 4 +- modules/system/dm/tuigreet.nix | 4 +- modules/system/forgejo/default.nix | 4 +- modules/system/gc.nix | 4 +- modules/system/geoclue.nix | 4 +- modules/system/hedgedoc/backups.nix | 6 +- modules/system/hedgedoc/default.nix | 4 +- modules/system/nextcloud/backups.nix | 6 +- modules/system/nextcloud/default.nix | 4 +- modules/system/printing.nix | 4 +- modules/system/restic-backup.nix | 4 +- modules/system/sops.nix | 4 +- modules/system/sound.nix | 4 +- modules/system/steam.nix | 4 +- modules/system/syncthing/backups.nix | 6 +- modules/system/syncthing/default.nix | 8 +- modules/system/tailscale/caddy-serve.nix | 4 +- modules/system/tailscale/default.nix | 4 +- modules/system/virtualisation.nix | 4 +- modules/system/wlan.nix | 4 +- 34 files changed, 162 insertions(+), 153 deletions(-) diff --git a/hosts/alto/default.nix b/hosts/alto/default.nix index 1fe71db..72f96cc 100644 --- a/hosts/alto/default.nix +++ b/hosts/alto/default.nix @@ -1,61 +1,63 @@ { config, ... }: let - inherit (config) myConfig; - inherit (config.myConfig.tailscale) caddyServe; + inherit (config.custom) services; + inherit (config.custom.services.tailscale) caddyServe; in { system.stateVersion = "24.11"; - myConfig = { + custom = { boot.loader.systemdBoot.enable = true; sops.enable = true; - tailscale = { - enable = true; - ssh.enable = true; - exitNode.enable = true; + services = { + tailscale = { + enable = true; + ssh.enable = true; + exitNode.enable = true; - serve = { - isFunnel = true; - target = toString ./hedgedoc-redirect.html; - }; + serve = { + isFunnel = true; + target = toString ./hedgedoc-redirect.html; + }; - caddyServe = { - nextcloud = { - subdomain = "cloud"; - inherit (myConfig.nextcloud) port; - }; - actualbudget = { - subdomain = "budget"; - inherit (myConfig.actualbudget) port; - }; - forgejo = { - subdomain = "git"; - inherit (myConfig.forgejo) port; + caddyServe = { + nextcloud = { + subdomain = "cloud"; + inherit (services.nextcloud) port; + }; + actualbudget = { + subdomain = "budget"; + inherit (services.actualbudget) port; + }; + forgejo = { + subdomain = "git"; + inherit (services.forgejo) port; + }; }; }; - }; - nextcloud = { - enable = true; - inherit (caddyServe.nextcloud) subdomain; - backups.enable = true; - }; - actualbudget = { - enable = true; - inherit (caddyServe.actualbudget) subdomain; - backups.enable = true; - }; - forgejo = { - enable = true; - inherit (caddyServe.forgejo) subdomain; - }; + nextcloud = { + enable = true; + inherit (caddyServe.nextcloud) subdomain; + backups.enable = true; + }; + actualbudget = { + enable = true; + inherit (caddyServe.actualbudget) subdomain; + backups.enable = true; + }; + forgejo = { + enable = true; + inherit (caddyServe.forgejo) subdomain; + }; - syncthing = { - enable = true; - deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD"; - isServer = true; - backups.enable = true; + syncthing = { + enable = true; + deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD"; + isServer = true; + backups.enable = true; + }; }; }; } diff --git a/hosts/cirrus/default.nix b/hosts/cirrus/default.nix index 9a24169..aa92d6b 100644 --- a/hosts/cirrus/default.nix +++ b/hosts/cirrus/default.nix @@ -3,35 +3,37 @@ system.stateVersion = "24.11"; networking.domain = "sprouted.cloud"; - myConfig = { + custom = { boot.loader.grub.enable = true; sops.enable = true; - tailscale = { - enable = true; - ssh.enable = true; - }; + services = { + tailscale = { + enable = true; + ssh.enable = true; + }; - hedgedoc = { - enable = true; - subdomain = "docs"; - backups.enable = true; - }; + hedgedoc = { + enable = true; + subdomain = "docs"; + backups.enable = true; + }; - crowdsec = { - enable = true; - firewallBouncer.enable = true; - sources = [ - "iptables" - "caddy" - ]; + crowdsec = { + enable = true; + firewallBouncer.enable = true; + sources = [ + "iptables" + "caddy" + ]; + }; }; }; services.caddy = { enable = true; virtualHosts."docs.${config.networking.domain}".extraConfig = '' - reverse_proxy localhost:${toString config.myConfig.hedgedoc.port} + reverse_proxy localhost:${toString config.custom.services.hedgedoc.port} ''; }; diff --git a/hosts/fern/default.nix b/hosts/fern/default.nix index 72bcaa7..7bb0d32 100644 --- a/hosts/fern/default.nix +++ b/hosts/fern/default.nix @@ -14,7 +14,8 @@ } ); - myConfig = { + custom = { + sops.enable = true; boot = { loader.systemdBoot.enable = true; silent = true; @@ -23,21 +24,22 @@ dm.tuigreet.enable = true; de.hyprland.enable = true; - wlan.enable = true; - bluetooth.enable = true; - - sound.enable = true; virtualisation.enable = true; - sops.enable = true; - gc.enable = true; - geoclue.enable = true; - tailscale = { - enable = true; - ssh.enable = true; - }; - syncthing = { - enable = true; - deviceId = "Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP"; + + services = { + wlan.enable = true; + bluetooth.enable = true; + sound.enable = true; + gc.enable = true; + geoclue.enable = true; + tailscale = { + enable = true; + ssh.enable = true; + }; + syncthing = { + enable = true; + deviceId = "Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP"; + }; }; }; } diff --git a/hosts/north/default.nix b/hosts/north/default.nix index e538cae..be554dc 100644 --- a/hosts/north/default.nix +++ b/hosts/north/default.nix @@ -14,7 +14,8 @@ } ); - myConfig = { + custom = { + sops.enable = true; boot = { loader.systemdBoot.enable = true; silent = true; @@ -23,20 +24,22 @@ dm.tuigreet.enable = true; de.hyprland.enable = true; - sound.enable = true; virtualisation.enable = true; - sops.enable = true; - gc.enable = true; - geoclue.enable = true; - tailscale = { - enable = true; - ssh.enable = true; - }; - syncthing = { - enable = true; - deviceId = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7"; + + services = { + sound.enable = true; + gc.enable = true; + geoclue.enable = true; + tailscale = { + enable = true; + ssh.enable = true; + }; + syncthing = { + enable = true; + deviceId = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7"; + }; }; - steam.enable = true; + programs.steam.enable = true; }; } diff --git a/modules/home/de/hyprland/default.nix b/modules/home/de/hyprland/default.nix index 099b684..1b962a3 100644 --- a/modules/home/de/hyprland/default.nix +++ b/modules/home/de/hyprland/default.nix @@ -6,7 +6,7 @@ }@moduleArgs: { options.myConfig.de.hyprland.enable = lib.mkEnableOption "" // { - default = moduleArgs.osConfig.myConfig.de.hyprland.enable or false; + default = moduleArgs.osConfig.custom.de.hyprland.enable or false; }; config = lib.mkIf config.myConfig.de.hyprland.enable { diff --git a/modules/home/tailscale.nix b/modules/home/tailscale.nix index c87e9db..b9e802c 100644 --- a/modules/home/tailscale.nix +++ b/modules/home/tailscale.nix @@ -1,7 +1,7 @@ { config, lib, ... }@moduleArgs: { options.myConfig.tailscale.enable = lib.mkEnableOption "" // { - default = moduleArgs.osConfig.myConfig.tailscale.enable or false; + default = moduleArgs.osConfig.custom.services.tailscale.enable or false; }; config = lib.mkIf config.myConfig.tailscale.enable { diff --git a/modules/system/actualbudget/backups.nix b/modules/system/actualbudget/backups.nix index 1cb0415..092552a 100644 --- a/modules/system/actualbudget/backups.nix +++ b/modules/system/actualbudget/backups.nix @@ -8,9 +8,9 @@ let user = config.users.users.actual.name; in { - options.myConfig.actualbudget.backups.enable = lib.mkEnableOption ""; + options.custom.services.actualbudget.backups.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.actualbudget.backups.enable { + config = lib.mkIf config.custom.services.actualbudget.backups.enable { security.polkit = { enable = true; extraConfig = @@ -28,7 +28,7 @@ in ''; }; - myConfig.resticBackup.actual = { + custom.services.resticBackup.actual = { inherit user; healthchecks.enable = true; diff --git a/modules/system/actualbudget/default.nix b/modules/system/actualbudget/default.nix index 365b863..bfa1bc4 100644 --- a/modules/system/actualbudget/default.nix +++ b/modules/system/actualbudget/default.nix @@ -4,10 +4,10 @@ ... }: let - cfg = config.myConfig.actualbudget; + cfg = config.custom.services.actualbudget; in { - options.myConfig.actualbudget = { + options.custom.services.actualbudget = { enable = lib.mkEnableOption ""; subdomain = lib.mkOption { type = lib.types.nonEmptyStr; diff --git a/modules/system/bluetooth.nix b/modules/system/bluetooth.nix index b26d000..31d4f36 100644 --- a/modules/system/bluetooth.nix +++ b/modules/system/bluetooth.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.bluetooth.enable = lib.mkEnableOption ""; + options.custom.services.bluetooth.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.bluetooth.enable { + config = lib.mkIf config.custom.services.bluetooth.enable { hardware = { bluetooth = { enable = true; diff --git a/modules/system/boot/loader/grub.nix b/modules/system/boot/loader/grub.nix index 36f0252..4d12c06 100644 --- a/modules/system/boot/loader/grub.nix +++ b/modules/system/boot/loader/grub.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.boot.loader.grub.enable = lib.mkEnableOption ""; + options.custom.boot.loader.grub.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.boot.loader.grub.enable { + config = lib.mkIf config.custom.boot.loader.grub.enable { boot = { tmp.cleanOnBoot = true; loader.grub.enable = true; diff --git a/modules/system/boot/loader/systemd-boot.nix b/modules/system/boot/loader/systemd-boot.nix index 94498f8..e9e09e0 100644 --- a/modules/system/boot/loader/systemd-boot.nix +++ b/modules/system/boot/loader/systemd-boot.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.boot.loader.systemdBoot.enable = lib.mkEnableOption ""; + options.custom.boot.loader.systemdBoot.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.boot.loader.systemdBoot.enable { + config = lib.mkIf config.custom.boot.loader.systemdBoot.enable { boot = { tmp.cleanOnBoot = true; loader = { diff --git a/modules/system/boot/silent.nix b/modules/system/boot/silent.nix index 2b8976a..5fc0ae4 100644 --- a/modules/system/boot/silent.nix +++ b/modules/system/boot/silent.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.boot.silent = lib.mkEnableOption ""; + options.custom.boot.silent = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.boot.silent { + config = lib.mkIf config.custom.boot.silent { boot = { loader.timeout = 0; kernelParams = [ diff --git a/modules/system/crowdsec/default.nix b/modules/system/crowdsec/default.nix index 6197952..3195415 100644 --- a/modules/system/crowdsec/default.nix +++ b/modules/system/crowdsec/default.nix @@ -6,12 +6,12 @@ ... }: let - cfg = config.myConfig.crowdsec; + cfg = config.custom.services.crowdsec; in { imports = [ inputs.crowdsec.nixosModules.crowdsec ]; - options.myConfig.crowdsec = { + options.custom.services.crowdsec = { enable = lib.mkEnableOption ""; apiPort = lib.mkOption { type = lib.types.port; diff --git a/modules/system/crowdsec/firewall-bouncer.nix b/modules/system/crowdsec/firewall-bouncer.nix index 95f775a..5821350 100644 --- a/modules/system/crowdsec/firewall-bouncer.nix +++ b/modules/system/crowdsec/firewall-bouncer.nix @@ -6,12 +6,12 @@ ... }: let - cfg = config.myConfig.crowdsec; + cfg = config.custom.services.crowdsec; in { imports = [ inputs.crowdsec.nixosModules.crowdsec-firewall-bouncer ]; - options.myConfig.crowdsec.firewallBouncer.enable = lib.mkEnableOption ""; + options.custom.services.crowdsec.firewallBouncer.enable = lib.mkEnableOption ""; config = lib.mkIf cfg.firewallBouncer.enable { services.crowdsec-firewall-bouncer = { diff --git a/modules/system/de/hyprland.nix b/modules/system/de/hyprland.nix index cb9b1c2..313f04b 100644 --- a/modules/system/de/hyprland.nix +++ b/modules/system/de/hyprland.nix @@ -4,9 +4,9 @@ ... }: { - options.myConfig.de.hyprland.enable = lib.mkEnableOption ""; + options.custom.de.hyprland.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.de.hyprland.enable { + config = lib.mkIf config.custom.de.hyprland.enable { programs.hyprland.enable = true; environment.sessionVariables.NIXOS_OZONE_WL = "1"; diff --git a/modules/system/dm/tuigreet.nix b/modules/system/dm/tuigreet.nix index e216803..355d714 100644 --- a/modules/system/dm/tuigreet.nix +++ b/modules/system/dm/tuigreet.nix @@ -5,9 +5,9 @@ ... }: { - options.myConfig.dm.tuigreet.enable = lib.mkEnableOption ""; + options.custom.dm.tuigreet.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.dm.tuigreet.enable { + config = lib.mkIf config.custom.dm.tuigreet.enable { services.greetd = { enable = true; settings = { diff --git a/modules/system/forgejo/default.nix b/modules/system/forgejo/default.nix index 2bedbdc..e1aede8 100644 --- a/modules/system/forgejo/default.nix +++ b/modules/system/forgejo/default.nix @@ -4,12 +4,12 @@ ... }: let - cfg = config.myConfig.forgejo; + cfg = config.custom.services.forgejo; user = config.users.users.forgejo.name; in { - options.myConfig.forgejo = { + options.custom.services.forgejo = { enable = lib.mkEnableOption ""; subdomain = lib.mkOption { type = lib.types.nonEmptyStr; diff --git a/modules/system/gc.nix b/modules/system/gc.nix index 7fb9c65..29b09ac 100644 --- a/modules/system/gc.nix +++ b/modules/system/gc.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.gc.enable = lib.mkEnableOption ""; + options.custom.services.gc.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.gc.enable { + config = lib.mkIf config.custom.services.gc.enable { programs.nh = { enable = true; clean = { diff --git a/modules/system/geoclue.nix b/modules/system/geoclue.nix index 3b27c27..862b66f 100644 --- a/modules/system/geoclue.nix +++ b/modules/system/geoclue.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.geoclue.enable = lib.mkEnableOption ""; + options.custom.services.geoclue.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.geoclue.enable { + config = lib.mkIf config.custom.services.geoclue.enable { services.geoclue2 = { enable = true; diff --git a/modules/system/hedgedoc/backups.nix b/modules/system/hedgedoc/backups.nix index fbeeb76..55cedd7 100644 --- a/modules/system/hedgedoc/backups.nix +++ b/modules/system/hedgedoc/backups.nix @@ -8,9 +8,9 @@ let user = config.users.users.hedgedoc.name; in { - options.myConfig.hedgedoc.backups.enable = lib.mkEnableOption ""; + options.custom.services.hedgedoc.backups.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.hedgedoc.backups.enable { + config = lib.mkIf config.custom.services.hedgedoc.backups.enable { security.polkit = { enable = true; extraConfig = @@ -28,7 +28,7 @@ in ''; }; - myConfig.resticBackup.hedgedoc = { + custom.services.resticBackup.hedgedoc = { inherit user; healthchecks.enable = true; diff --git a/modules/system/hedgedoc/default.nix b/modules/system/hedgedoc/default.nix index f5fe510..d05b0bb 100644 --- a/modules/system/hedgedoc/default.nix +++ b/modules/system/hedgedoc/default.nix @@ -5,14 +5,14 @@ ... }: let - cfg = config.myConfig.hedgedoc; + cfg = config.custom.services.hedgedoc; user = config.users.users.hedgedoc.name; manage_users = "CMD_CONFIG_FILE=/run/hedgedoc/config.json NODE_ENV=production ${lib.getExe' pkgs.hedgedoc "manage_users"}"; in { - options.myConfig.hedgedoc = { + options.custom.services.hedgedoc = { enable = lib.mkEnableOption ""; subdomain = lib.mkOption { type = lib.types.nonEmptyStr; diff --git a/modules/system/nextcloud/backups.nix b/modules/system/nextcloud/backups.nix index 86b426c..92642f1 100644 --- a/modules/system/nextcloud/backups.nix +++ b/modules/system/nextcloud/backups.nix @@ -5,16 +5,16 @@ ... }: let - cfg = config.myConfig.nextcloud; + cfg = config.custom.services.nextcloud; dataDir = config.services.nextcloud.home; user = config.users.users.nextcloud.name; in { - options.myConfig.nextcloud.backups.enable = lib.mkEnableOption ""; + options.custom.services.nextcloud.backups.enable = lib.mkEnableOption ""; config = lib.mkIf cfg.backups.enable { - myConfig.resticBackup.nextcloud = { + custom.services.resticBackup.nextcloud = { inherit user; healthchecks.enable = true; diff --git a/modules/system/nextcloud/default.nix b/modules/system/nextcloud/default.nix index 69846c3..f696c9d 100644 --- a/modules/system/nextcloud/default.nix +++ b/modules/system/nextcloud/default.nix @@ -6,12 +6,12 @@ ... }: let - cfg = config.myConfig.nextcloud; + cfg = config.custom.services.nextcloud; user = config.users.users.nextcloud.name; in { - options.myConfig.nextcloud = { + options.custom.services.nextcloud = { enable = lib.mkEnableOption ""; subdomain = lib.mkOption { type = lib.types.nonEmptyStr; diff --git a/modules/system/printing.nix b/modules/system/printing.nix index 8818d38..44a4b36 100644 --- a/modules/system/printing.nix +++ b/modules/system/printing.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.printing.enable = lib.mkEnableOption ""; + options.custom.services.printing.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.printing.enable { + config = lib.mkIf config.custom.services.printing.enable { services = { printing.enable = true; avahi = { diff --git a/modules/system/restic-backup.nix b/modules/system/restic-backup.nix index b2b0d58..b3fae2c 100644 --- a/modules/system/restic-backup.nix +++ b/modules/system/restic-backup.nix @@ -5,12 +5,12 @@ ... }: let - backupServices = lib.filterAttrs (_: value: value.enable) config.myConfig.resticBackup; + backupServices = lib.filterAttrs (_: value: value.enable) config.custom.services.resticBackup; healthchecksEnable = (lib.filterAttrs (_: value: value.healthchecks.enable) backupServices) != { }; in { - options.myConfig.resticBackup = lib.mkOption { + options.custom.services.resticBackup = lib.mkOption { type = lib.types.attrsOf ( lib.types.submodule { options = { diff --git a/modules/system/sops.nix b/modules/system/sops.nix index 029aca4..3b90bfc 100644 --- a/modules/system/sops.nix +++ b/modules/system/sops.nix @@ -8,9 +8,9 @@ { imports = [ inputs.sops-nix.nixosModules.sops ]; - options.myConfig.sops.enable = lib.mkEnableOption ""; + options.custom.sops.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.sops.enable { + config = lib.mkIf config.custom.sops.enable { sops = { age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; defaultSopsFile = "${self}/hosts/${config.networking.hostName}/secrets.yaml"; diff --git a/modules/system/sound.nix b/modules/system/sound.nix index 2307520..b918985 100644 --- a/modules/system/sound.nix +++ b/modules/system/sound.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.sound.enable = lib.mkEnableOption ""; + options.custom.services.sound.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.sound.enable { + config = lib.mkIf config.custom.services.sound.enable { security.rtkit.enable = true; services = { pulseaudio.enable = false; diff --git a/modules/system/steam.nix b/modules/system/steam.nix index 6ed3618..b4e56ee 100644 --- a/modules/system/steam.nix +++ b/modules/system/steam.nix @@ -5,9 +5,9 @@ ... }: { - options.myConfig.steam.enable = lib.mkEnableOption ""; + options.custom.programs.steam.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.steam.enable { + config = lib.mkIf config.custom.programs.steam.enable { programs = { steam.enable = true; diff --git a/modules/system/syncthing/backups.nix b/modules/system/syncthing/backups.nix index 9c8c6fe..aef52da 100644 --- a/modules/system/syncthing/backups.nix +++ b/modules/system/syncthing/backups.nix @@ -5,12 +5,12 @@ ... }: let - cfg = config.myConfig.syncthing; + cfg = config.custom.services.syncthing; user = config.users.users.syncthing.name; in { - options.myConfig.syncthing.backups.enable = lib.mkEnableOption ""; + options.custom.services.syncthing.backups.enable = lib.mkEnableOption ""; config = lib.mkIf cfg.backups.enable { assertions = [ @@ -37,7 +37,7 @@ in ''; }; - myConfig.resticBackup.syncthing = { + custom.services.resticBackup.syncthing = { inherit user; healthchecks.enable = true; diff --git a/modules/system/syncthing/default.nix b/modules/system/syncthing/default.nix index 3271f39..b861eb5 100644 --- a/modules/system/syncthing/default.nix +++ b/modules/system/syncthing/default.nix @@ -5,10 +5,10 @@ ... }: let - cfg = config.myConfig.syncthing; + cfg = config.custom.services.syncthing; in { - options.myConfig.syncthing = { + options.custom.services.syncthing = { enable = lib.mkEnableOption ""; isServer = lib.mkEnableOption ""; deviceId = lib.mkOption { @@ -32,10 +32,10 @@ in devices = self.nixosConfigurations |> lib.filterAttrs (name: _: name != config.networking.hostName) - |> lib.filterAttrs (_: value: value.config.myConfig.syncthing.enable) + |> lib.filterAttrs (_: value: value.config.custom.services.syncthing.enable) |> lib.mapAttrs ( name: value: { - id = value.config.myConfig.syncthing.deviceId; + id = value.config.custom.services.syncthing.deviceId; addresses = [ "tcp://${name}.${value.config.networking.domain}:22000" ]; } ); diff --git a/modules/system/tailscale/caddy-serve.nix b/modules/system/tailscale/caddy-serve.nix index 91746e7..7d4dabc 100644 --- a/modules/system/tailscale/caddy-serve.nix +++ b/modules/system/tailscale/caddy-serve.nix @@ -5,7 +5,7 @@ ... }: let - nodes = config.myConfig.tailscale.caddyServe |> lib.filterAttrs (_: value: value.enable); + nodes = config.custom.services.tailscale.caddyServe |> lib.filterAttrs (_: value: value.enable); caddy-tailscale = pkgs.caddy.withPlugins { plugins = [ "github.com/tailscale/caddy-tailscale@v0.0.0-20250207163903-69a970c84556" ]; @@ -13,7 +13,7 @@ let }; in { - options.myConfig.tailscale.caddyServe = lib.mkOption { + options.custom.services.tailscale.caddyServe = lib.mkOption { type = lib.types.attrsOf ( lib.types.submodule ( { name, ... }: diff --git a/modules/system/tailscale/default.nix b/modules/system/tailscale/default.nix index 7235959..52897b6 100644 --- a/modules/system/tailscale/default.nix +++ b/modules/system/tailscale/default.nix @@ -5,10 +5,10 @@ ... }: let - cfg = config.myConfig.tailscale; + cfg = config.custom.services.tailscale; in { - options.myConfig.tailscale = { + options.custom.services.tailscale = { enable = lib.mkEnableOption ""; subdomain = lib.mkOption { type = lib.types.nonEmptyStr; diff --git a/modules/system/virtualisation.nix b/modules/system/virtualisation.nix index aa231b6..061b153 100644 --- a/modules/system/virtualisation.nix +++ b/modules/system/virtualisation.nix @@ -5,9 +5,9 @@ ... }: { - options.myConfig.virtualisation.enable = lib.mkEnableOption ""; + options.custom.virtualisation.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.virtualisation.enable { + config = lib.mkIf config.custom.virtualisation.enable { virtualisation.libvirtd.enable = true; programs.virt-manager.enable = true; diff --git a/modules/system/wlan.nix b/modules/system/wlan.nix index 94a94c9..061ff14 100644 --- a/modules/system/wlan.nix +++ b/modules/system/wlan.nix @@ -13,9 +13,9 @@ let ]; in { - options.myConfig.wlan.enable = lib.mkEnableOption ""; + options.custom.services.wlan.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.wlan.enable ( + config = lib.mkIf config.custom.services.wlan.enable ( lib.mkMerge [ { networking.wireless.iwd = {