diff --git a/lib/colors.nix b/conf/colors.nix similarity index 100% rename from lib/colors.nix rename to conf/colors.nix diff --git a/lib/default.nix b/conf/default.nix similarity index 93% rename from lib/default.nix rename to conf/default.nix index 7d957ce..83af081 100644 --- a/lib/default.nix +++ b/conf/default.nix @@ -4,7 +4,7 @@ _module.args = { inherit inputs self; flake = self; - lib' = { + conf = { colors = import ./colors.nix; network = import ./network.nix; }; diff --git a/lib/network.nix b/conf/network.nix similarity index 100% rename from lib/network.nix rename to conf/network.nix diff --git a/flake.nix b/flake.nix index 9cbf37a..444e758 100644 --- a/flake.nix +++ b/flake.nix @@ -51,7 +51,7 @@ ./hosts ./home ./pkgs - ./lib + ./conf ]; perSystem = { system, pkgs, ... }: diff --git a/home/natto/dunst.nix b/home/natto/dunst.nix index 75ea6b6..7388048 100644 --- a/home/natto/dunst.nix +++ b/home/natto/dunst.nix @@ -1,10 +1,10 @@ -{ config, lib', ... }: +{ config, conf, ... }: { services = { dunst = { enable = true; iconTheme = with config.gtk.iconTheme; { inherit name package; }; - settings = with lib'.colors.hex; { + settings = with conf.colors.hex; { global = { mouse_left_click = "close_current"; mouse_right_click = "do_action"; diff --git a/home/natto/programs.nix b/home/natto/programs.nix index 7b55a8a..cbb0a3e 100644 --- a/home/natto/programs.nix +++ b/home/natto/programs.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib', ... }: +{ pkgs, config, conf, ... }: { programs = { firefox = { @@ -34,7 +34,7 @@ font-bold = "Fira Mono:style=Bold:pixelsize=18"; }; scrollback.lines = 4000; - colors = with lib'.colors.default; { + colors = with conf.colors.default; { inherit foreground background; regular0 = surface1; regular1 = red; diff --git a/home/natto/wayland.nix b/home/natto/wayland.nix index 6e47aea..115f787 100644 --- a/home/natto/wayland.nix +++ b/home/natto/wayland.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib', inputs, ... }: +{ pkgs, config, conf, inputs, ... }: { wayland = { windowManager = { @@ -14,7 +14,7 @@ + (with config.home.pointerCursor; '' exec-once=hyprctl setcursor ${name} ${toString size} '') - + (with lib'.colors.argb { a = "ee"; };'' + + (with conf.colors.argb { a = "ee"; };'' general { col.active_border = 0x${mauve} 0x${flamingo} 135deg col.inactive_border = 0x${surface0} @@ -25,7 +25,7 @@ }; home.file.tofi = { - source = pkgs.writeText "tofi-config" (pkgs.lib.generators.toKeyValue { } (with lib'.colors.default; { + source = pkgs.writeText "tofi-config" (pkgs.lib.generators.toKeyValue { } (with conf.colors.default; { # https://github.com/philj56/tofi/blob/master/themes/fullscreen width = "100%"; height = "100%"; diff --git a/hosts/hina/default.nix b/hosts/hina/default.nix index a5c99a8..2c2c939 100644 --- a/hosts/hina/default.nix +++ b/hosts/hina/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib', ... }: +{ config, pkgs, conf, ... }: { imports = [ ./networking.nix @@ -14,7 +14,7 @@ shell = pkgs.zsh; home = "/home/spin"; extraGroups = [ "wheel" ]; - openssh.authorizedKeys.keys = lib'.network.commonSSHKeys; + openssh.authorizedKeys.keys = conf.network.commonSSHKeys; }; programs.zsh.enable = true; diff --git a/hosts/hina/networking.nix b/hosts/hina/networking.nix index d420e04..db2686e 100644 --- a/hosts/hina/networking.nix +++ b/hosts/hina/networking.nix @@ -1,4 +1,4 @@ -{ lib, config, lib', pkgs, ... }: +{ lib, config, conf, pkgs, ... }: { networking = { useDHCP = false; @@ -17,7 +17,7 @@ }; }; - wireguard.interfaces.wg0 = with lib'.network.addresses.wireguard.ips; { + wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; { ips = [ hina ]; listenPort = 17840; privateKeyFile = "/var/secrets/wg.key"; @@ -26,7 +26,7 @@ #Oracle VM1 publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM="; allowedIPs = [ remilia ]; - endpoint = "${lib'.network.addresses.domain.natto}:17840"; + endpoint = "${conf.network.addresses.domain.natto}:17840"; persistentKeepalive = 25; } ]; diff --git a/hosts/hina/services.nix b/hosts/hina/services.nix index 0908e44..2d552f7 100644 --- a/hosts/hina/services.nix +++ b/hosts/hina/services.nix @@ -1,6 +1,6 @@ -{ config, pkgs, lib, lib', ... }: +{ config, pkgs, lib, conf, ... }: let - domain = lib'.network.addresses.domain.natto; + domain = conf.network.addresses.domain.natto; in { services = { @@ -20,7 +20,7 @@ in nginx = { enable = true; - virtualHosts = with lib'.network.addresses.wireguard.ips; { + virtualHosts = with conf.network.addresses.wireguard.ips; { "znc.${domain}" = { enableACME = true; forceSSL = true; diff --git a/hosts/marisa/default.nix b/hosts/marisa/default.nix index 2ff525e..c78728a 100644 --- a/hosts/marisa/default.nix +++ b/hosts/marisa/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib', ... }: +{ config, pkgs, conf, ... }: { imports = [ ./networking.nix @@ -12,7 +12,7 @@ shell = pkgs.zsh; home = "/home/spark"; extraGroups = [ "wheel" ]; - openssh.authorizedKeys.keys = lib'.network.commonSSHKeys; + openssh.authorizedKeys.keys = conf.network.commonSSHKeys; }; programs.zsh.enable = true; diff --git a/hosts/marisa/networking.nix b/hosts/marisa/networking.nix index 864d4b3..d26dcd5 100644 --- a/hosts/marisa/networking.nix +++ b/hosts/marisa/networking.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib', ... }: +{ config, pkgs, conf, ... }: { networking = { hostName = "marisa"; @@ -37,7 +37,7 @@ }]; }; }; - wireguard.interfaces.wg0 = with lib'.network.addresses.wireguard.ips; { + wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; { ips = [ marisa ]; listenPort = 17840; privateKeyFile = "/var/secrets/wg.key"; @@ -46,7 +46,7 @@ #Oracle VM1 publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM="; allowedIPs = [ remilia ]; - endpoint = "${lib'.network.addresses.domain.natto}:17840"; + endpoint = "${conf.network.addresses.domain.natto}:17840"; persistentKeepalive = 25; } ]; diff --git a/hosts/marisa/services/filehost.nix b/hosts/marisa/services/filehost.nix index d0db3e9..4ec6025 100644 --- a/hosts/marisa/services/filehost.nix +++ b/hosts/marisa/services/filehost.nix @@ -1,4 +1,4 @@ -{ config, pkgs, inputs, lib', ... }: +{ config, pkgs, inputs, conf, ... }: { systemd.services.filehost = { enable = true; @@ -7,7 +7,7 @@ Type = "simple"; Environment = [ "TITLE=nattofiles" - "USER_URL=https://f.${lib'.network.addresses.domain.natto}" + "USER_URL=https://f.${conf.network.addresses.domain.natto}" "ROCKET_LIMITS={file=\"512MB\",data-form=\"512MB\"}" "ROCKET_LOG_LEVEL=debug" "ROCKET_ADDRESS=0.0.0.0" diff --git a/hosts/marisa/services/gitea.nix b/hosts/marisa/services/gitea.nix index eff240a..e821673 100644 --- a/hosts/marisa/services/gitea.nix +++ b/hosts/marisa/services/gitea.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib', ... }: +{ config, pkgs, conf, ... }: { services = { gitea = rec { @@ -13,7 +13,7 @@ mailerPasswordFile = "/var/secrets/giteamailer.pass"; settings = let - domain = lib'.network.addresses.domain.natto; + domain = conf.network.addresses.domain.natto; in { server = rec { diff --git a/hosts/okina/networking.nix b/hosts/okina/networking.nix index 8744a8d..563d281 100644 --- a/hosts/okina/networking.nix +++ b/hosts/okina/networking.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib', lib, ... }: +{ config, pkgs, conf, lib, ... }: { networking = { diff --git a/hosts/remilia/default.nix b/hosts/remilia/default.nix index 903c815..4319a1f 100644 --- a/hosts/remilia/default.nix +++ b/hosts/remilia/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib', ... }: +{ config, pkgs, conf, ... }: { imports = [ ./networking.nix @@ -15,7 +15,7 @@ shell = pkgs.zsh; home = "/home/bat"; extraGroups = [ "wheel" ]; - openssh.authorizedKeys.keys = lib'.network.commonSSHKeys; + openssh.authorizedKeys.keys = conf.network.commonSSHKeys; }; programs.zsh.enable = true; diff --git a/hosts/remilia/mailserver.nix b/hosts/remilia/mailserver.nix index 43c62d0..2f7c22f 100644 --- a/hosts/remilia/mailserver.nix +++ b/hosts/remilia/mailserver.nix @@ -1,7 +1,7 @@ -{ config, pkgs, lib', network, ... }: +{ config, pkgs, conf, network, ... }: { mailserver = - let domain = lib'.network.addresses.domain.natto; in + let domain = conf.network.addresses.domain.natto; in rec { enable = true; fqdn = "mail.${domain}"; diff --git a/hosts/remilia/networking.nix b/hosts/remilia/networking.nix index 2ae5a6b..7bca0f1 100644 --- a/hosts/remilia/networking.nix +++ b/hosts/remilia/networking.nix @@ -1,4 +1,4 @@ -{ lib, config, lib', pkgs, ... }: +{ lib, config, conf, pkgs, ... }: { networking = { useDHCP = false; @@ -27,7 +27,7 @@ useDHCP = true; }; }; - nat = with lib'.network.addresses.wireguard.ips; { + nat = with conf.network.addresses.wireguard.ips; { enable = true; externalInterface = "ens3"; internalInterfaces = [ "wg0" ]; @@ -46,7 +46,7 @@ } ]; }; - wireguard.interfaces = with lib'.network.addresses.wireguard; { + wireguard.interfaces = with conf.network.addresses.wireguard; { wg0 = { ips = [ ips.remilia ]; listenPort = 17840; diff --git a/hosts/remilia/services.nix b/hosts/remilia/services.nix index 9636265..51dc854 100644 --- a/hosts/remilia/services.nix +++ b/hosts/remilia/services.nix @@ -1,6 +1,6 @@ -{ config, pkgs, lib, lib', ... }: +{ config, pkgs, lib, conf, ... }: let - domain = lib'.network.addresses.domain.natto; + domain = conf.network.addresses.domain.natto; in { services = { @@ -37,7 +37,7 @@ in }; }; in - with lib'.network.addresses.wireguard.ips; { + with conf.network.addresses.wireguard.ips; { "${domain}" = { addSSL = true; enableACME = true; diff --git a/hosts/satori/networking.nix b/hosts/satori/networking.nix index 7d82dd2..eebc091 100644 --- a/hosts/satori/networking.nix +++ b/hosts/satori/networking.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib', ... }: +{ config, pkgs, conf, ... }: { networking = { @@ -15,7 +15,7 @@ trustedInterfaces = [ "docker0" ]; }; - wireguard.interfaces.wg0 = with lib'.network.addresses.wireguard.ips; { + wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; { ips = [ satori ]; listenPort = 17840; privateKeyFile = "/var/secrets/wg.key"; @@ -23,7 +23,7 @@ #Oracle VM1 publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM="; allowedIPs = [ remilia ]; - endpoint = "${lib'.network.addresses.domain.natto}:17840"; + endpoint = "${conf.network.addresses.domain.natto}:17840"; persistentKeepalive = 25; }]; };