From e5fa034eede009d7be3029991da06d19de6deb1e Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 16 Jan 2025 12:50:27 +0300 Subject: [PATCH] Const: Move to module. --- config/AutoUpdateSigned.nix | 2 +- home/Android.nix | 6 +++--- home/NixOs.nix | 2 +- host/x86_64-linux/home/Const.nix | 2 +- host/x86_64-linux/home/Network.nix | 2 +- host/x86_64-linux/home/nginx/Camera.nix | 2 +- host/x86_64-linux/home/nginx/Change.nix | 2 +- host/x86_64-linux/home/nginx/Cups.nix | 2 +- host/x86_64-linux/home/nginx/Davis.nix | 2 +- host/x86_64-linux/home/nginx/Deluge.nix | 2 +- host/x86_64-linux/home/nginx/Forgejo.nix | 2 +- host/x86_64-linux/home/nginx/Hass.nix | 2 +- host/x86_64-linux/home/nginx/Homer.nix | 2 +- host/x86_64-linux/home/nginx/Invidious.nix | 2 +- host/x86_64-linux/home/nginx/Jellyfin.nix | 2 +- host/x86_64-linux/home/nginx/Kavita.nix | 2 +- host/x86_64-linux/home/nginx/Mailserver.nix | 2 +- host/x86_64-linux/home/nginx/Paperless.nix | 2 +- host/x86_64-linux/home/nginx/Printer.nix | 2 +- host/x86_64-linux/home/nginx/Privatebin.nix | 2 +- host/x86_64-linux/home/nginx/Resume.nix | 2 +- host/x86_64-linux/home/nginx/Router.nix | 2 +- host/x86_64-linux/home/nginx/SearX.nix | 2 +- host/x86_64-linux/home/nginx/Share.nix | 2 +- host/x86_64-linux/home/nginx/Sync.nix | 2 +- host/x86_64-linux/home/nginx/Tandoor.nix | 2 +- host/x86_64-linux/home/nginx/UptimeKuma.nix | 2 +- host/x86_64-linux/home/nginx/Valutwarden.nix | 2 +- option/Const.nix | 2 +- system/Locale.nix | 2 +- system/State.nix | 2 +- 31 files changed, 33 insertions(+), 33 deletions(-) diff --git a/config/AutoUpdateSigned.nix b/config/AutoUpdateSigned.nix index 835cc26..f766a4e 100644 --- a/config/AutoUpdateSigned.nix +++ b/config/AutoUpdateSigned.nix @@ -39,7 +39,7 @@ in script = '' pushd /tmp rm -rf ./nixos - git clone --depth=1 --single-branch --branch=main ${config.const.url} ./nixos + git clone --depth=1 --single-branch --branch=main ${config.module.const.url} ./nixos pushd ./nixos git verify-commit HEAD && git fsck || { echo "Verification failed." diff --git a/home/Android.nix b/home/Android.nix index 58c52e8..61105c9 100644 --- a/home/Android.nix +++ b/home/Android.nix @@ -27,8 +27,8 @@ in config = lib.mkIf cfg.enable { environment.packages = package.core; nix.extraOptions = "experimental-features = nix-command flakes pipe-operators"; - system.stateVersion = config.const.droidStateVersion; - time.timeZone = config.const.timeZone; + system.stateVersion = config.module.const.droidStateVersion; + time.timeZone = config.module.const.timeZone; terminal = { inherit (android) font colors; }; home-manager.config = stylix // { programs = with programs; core; @@ -36,7 +36,7 @@ in home = { inherit (env) sessionVariables; inherit file; - stateVersion = config.const.droidStateVersion; + stateVersion = config.module.const.droidStateVersion; }; }; }; diff --git a/home/NixOs.nix b/home/NixOs.nix index b34b5ab..ad818b8 100644 --- a/home/NixOs.nix +++ b/home/NixOs.nix @@ -39,7 +39,7 @@ in programs = with program; core // desktop; xdg = import ./xdg { inherit (user) homeDirectory; }; home = { - inherit (config.const) stateVersion; + inherit (config.module.const) stateVersion; inherit (env) sessionVariables; inherit (user) username homeDirectory; inherit file; diff --git a/host/x86_64-linux/home/Const.nix b/host/x86_64-linux/home/Const.nix index d09bce4..554d817 100644 --- a/host/x86_64-linux/home/Const.nix +++ b/host/x86_64-linux/home/Const.nix @@ -1,6 +1,6 @@ { ... }: { - config.const.host = { + config.module.const.host = { nginx = { domain = "voronind.com"; sslCertificate = "/etc/letsencrypt/live/voronind.com/fullchain.pem"; diff --git a/host/x86_64-linux/home/Network.nix b/host/x86_64-linux/home/Network.nix index a741c5a..23bf3c0 100644 --- a/host/x86_64-linux/home/Network.nix +++ b/host/x86_64-linux/home/Network.nix @@ -120,7 +120,7 @@ in PoolOffset = 100; PoolSize = 150; ServerAddress = "${internal}/24"; - Timezone = config.const.timeZone; + Timezone = config.module.const.timeZone; UplinkInterface = wan; }; }; diff --git a/host/x86_64-linux/home/nginx/Camera.nix b/host/x86_64-linux/home/nginx/Camera.nix index 16bda92..d23cb56 100644 --- a/host/x86_64-linux/home/nginx/Camera.nix +++ b/host/x86_64-linux/home/nginx/Camera.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "camera.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Change.nix b/host/x86_64-linux/home/nginx/Change.nix index 28efda1..2e1939e 100644 --- a/host/x86_64-linux/home/nginx/Change.nix +++ b/host/x86_64-linux/home/nginx/Change.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "change.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Cups.nix b/host/x86_64-linux/home/nginx/Cups.nix index 063f1b3..03955c6 100644 --- a/host/x86_64-linux/home/nginx/Cups.nix +++ b/host/x86_64-linux/home/nginx/Cups.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "print.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Davis.nix b/host/x86_64-linux/home/nginx/Davis.nix index 5dce35a..dfb5702 100644 --- a/host/x86_64-linux/home/nginx/Davis.nix +++ b/host/x86_64-linux/home/nginx/Davis.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "dav.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Deluge.nix b/host/x86_64-linux/home/nginx/Deluge.nix index 9df0784..67a05e9 100644 --- a/host/x86_64-linux/home/nginx/Deluge.nix +++ b/host/x86_64-linux/home/nginx/Deluge.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "download.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Forgejo.nix b/host/x86_64-linux/home/nginx/Forgejo.nix index a0702c8..26e5fc4 100644 --- a/host/x86_64-linux/home/nginx/Forgejo.nix +++ b/host/x86_64-linux/home/nginx/Forgejo.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "git.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Hass.nix b/host/x86_64-linux/home/nginx/Hass.nix index da42c8c..0fa73eb 100644 --- a/host/x86_64-linux/home/nginx/Hass.nix +++ b/host/x86_64-linux/home/nginx/Hass.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "iot.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Homer.nix b/host/x86_64-linux/home/nginx/Homer.nix index 4462bb1..a8902f9 100644 --- a/host/x86_64-linux/home/nginx/Homer.nix +++ b/host/x86_64-linux/home/nginx/Homer.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "home.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Invidious.nix b/host/x86_64-linux/home/nginx/Invidious.nix index 924ac44..1b3e750 100644 --- a/host/x86_64-linux/home/nginx/Invidious.nix +++ b/host/x86_64-linux/home/nginx/Invidious.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "yt.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Jellyfin.nix b/host/x86_64-linux/home/nginx/Jellyfin.nix index 0b228cd..d0d1456 100644 --- a/host/x86_64-linux/home/nginx/Jellyfin.nix +++ b/host/x86_64-linux/home/nginx/Jellyfin.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "watch.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Kavita.nix b/host/x86_64-linux/home/nginx/Kavita.nix index be04630..31c5ab0 100644 --- a/host/x86_64-linux/home/nginx/Kavita.nix +++ b/host/x86_64-linux/home/nginx/Kavita.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "read.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Mailserver.nix b/host/x86_64-linux/home/nginx/Mailserver.nix index b559e39..d549263 100644 --- a/host/x86_64-linux/home/nginx/Mailserver.nix +++ b/host/x86_64-linux/home/nginx/Mailserver.nix @@ -1,6 +1,6 @@ { config, lib, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "mail.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Paperless.nix b/host/x86_64-linux/home/nginx/Paperless.nix index 5f0d843..be261be 100644 --- a/host/x86_64-linux/home/nginx/Paperless.nix +++ b/host/x86_64-linux/home/nginx/Paperless.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "paper.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Printer.nix b/host/x86_64-linux/home/nginx/Printer.nix index 4446c53..54ae20c 100644 --- a/host/x86_64-linux/home/nginx/Printer.nix +++ b/host/x86_64-linux/home/nginx/Printer.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "printer.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Privatebin.nix b/host/x86_64-linux/home/nginx/Privatebin.nix index 93a10b2..515a1ec 100644 --- a/host/x86_64-linux/home/nginx/Privatebin.nix +++ b/host/x86_64-linux/home/nginx/Privatebin.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "paste.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Resume.nix b/host/x86_64-linux/home/nginx/Resume.nix index 2ab94e8..67f987c 100644 --- a/host/x86_64-linux/home/nginx/Resume.nix +++ b/host/x86_64-linux/home/nginx/Resume.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "resume.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Router.nix b/host/x86_64-linux/home/nginx/Router.nix index 6dfbb25..e09ca89 100644 --- a/host/x86_64-linux/home/nginx/Router.nix +++ b/host/x86_64-linux/home/nginx/Router.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "router.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/SearX.nix b/host/x86_64-linux/home/nginx/SearX.nix index 4cb29a6..847fbc1 100644 --- a/host/x86_64-linux/home/nginx/SearX.nix +++ b/host/x86_64-linux/home/nginx/SearX.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "search.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Share.nix b/host/x86_64-linux/home/nginx/Share.nix index 43e74b1..0ec42a5 100644 --- a/host/x86_64-linux/home/nginx/Share.nix +++ b/host/x86_64-linux/home/nginx/Share.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; root = "/storage/hot/share"; index = '' autoindex on; diff --git a/host/x86_64-linux/home/nginx/Sync.nix b/host/x86_64-linux/home/nginx/Sync.nix index 78d63db..e68cea2 100644 --- a/host/x86_64-linux/home/nginx/Sync.nix +++ b/host/x86_64-linux/home/nginx/Sync.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "sync.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Tandoor.nix b/host/x86_64-linux/home/nginx/Tandoor.nix index 5e5dee1..eab988e 100644 --- a/host/x86_64-linux/home/nginx/Tandoor.nix +++ b/host/x86_64-linux/home/nginx/Tandoor.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "craft.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/UptimeKuma.nix b/host/x86_64-linux/home/nginx/UptimeKuma.nix index e813a24..c900ec5 100644 --- a/host/x86_64-linux/home/nginx/UptimeKuma.nix +++ b/host/x86_64-linux/home/nginx/UptimeKuma.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "status.${cfg.domain}" = { diff --git a/host/x86_64-linux/home/nginx/Valutwarden.nix b/host/x86_64-linux/home/nginx/Valutwarden.nix index 0fbbad0..fbfd6e8 100644 --- a/host/x86_64-linux/home/nginx/Valutwarden.nix +++ b/host/x86_64-linux/home/nginx/Valutwarden.nix @@ -1,6 +1,6 @@ { config, ... }: let - cfg = config.const.host.nginx; + cfg = config.module.const.host.nginx; in { "pass.${cfg.domain}" = { diff --git a/option/Const.nix b/option/Const.nix index b0cde6c..6449ba2 100644 --- a/option/Const.nix +++ b/option/Const.nix @@ -1,6 +1,6 @@ { lib, ... }: { - options.const = { + options.module.const = { droidStateVersion = lib.mkOption { default = "24.05"; type = lib.types.str; diff --git a/system/Locale.nix b/system/Locale.nix index 259afad..e08d17c 100644 --- a/system/Locale.nix +++ b/system/Locale.nix @@ -1,6 +1,6 @@ { config, ... }: { - time.timeZone = config.const.timeZone; + time.timeZone = config.module.const.timeZone; i18n = { defaultLocale = "en_US.UTF-8"; extraLocaleSettings = { diff --git a/system/State.nix b/system/State.nix index 80d89f1..c976f41 100644 --- a/system/State.nix +++ b/system/State.nix @@ -1,5 +1,5 @@ { config, ... }: { # Specify current release version. - system.stateVersion = config.const.stateVersion; + system.stateVersion = config.module.const.stateVersion; }