diff options
Diffstat (limited to '')
-rw-r--r-- | configurations/default.nix | 29 | ||||
-rw-r--r-- | configurations/eonwe/default.nix | 25 | ||||
-rw-r--r-- | configurations/ilmare/default.nix | 15 | ||||
-rw-r--r-- | configurations/iso/default.nix | 7 | ||||
-rw-r--r-- | configurations/manwe/default.nix | 9 | ||||
-rw-r--r-- | configurations/manwe/mailserver/default.nix | 21 | ||||
-rw-r--r-- | configurations/manwe/webserver.nix | 7 | ||||
-rw-r--r-- | configurations/test-headful/default.nix | 7 | ||||
-rw-r--r-- | configurations/test-headless/default.nix | 9 | ||||
-rw-r--r-- | configurations/tulkas/default.nix | 9 | ||||
-rw-r--r-- | configurations/varda/default.nix | 3 |
11 files changed, 73 insertions, 68 deletions
diff --git a/configurations/default.nix b/configurations/default.nix index 312ca9f..4d60b8e 100644 --- a/configurations/default.nix +++ b/configurations/default.nix @@ -1,26 +1,27 @@ { inputs, lib, ... }: -with lib; let mkConfiguration = name: { modules ? [ ], configuration ? ./${name}, - this ? my.configurations.${name}, + this ? lib.my.configurations.${name}, }: - nameValuePair name (nixosSystem { - inherit (this) system; - modules = - modules - ++ attrValues inputs.self.nixosModules - ++ attrValues inputs.nix-topology.nixosModules - ++ optional (configuration != null) (import configuration); - specialArgs = { - inherit inputs lib this; - }; - }); + lib.nameValuePair name ( + lib.nixosSystem { + inherit (this) system; + modules = + modules + ++ lib.attrValues inputs.self.nixosModules + ++ lib.attrValues inputs.nix-topology.nixosModules + ++ lib.optional (configuration != null) (import configuration); + specialArgs = { + inherit inputs lib this; + }; + } + ); in -mapAttrs' mkConfiguration ( +lib.mapAttrs' mkConfiguration ( let mkTest = this: { modules = with inputs; [ diff --git a/configurations/eonwe/default.nix b/configurations/eonwe/default.nix index a5cf7e9..d6bc46c 100644 --- a/configurations/eonwe/default.nix +++ b/configurations/eonwe/default.nix @@ -4,15 +4,14 @@ pkgs, ... }: -with lib; { - imports = attrValues (modulesIn ./.); + imports = lib.modulesIn ./. |> lib.attrValues; nixfiles.modules = { ark.enable = true; wireguard.client.enable = true; - wireguard-ng.client.enable = false; + # wireguard-ng.client.enable = false; syncthing.enable = true; @@ -42,12 +41,12 @@ with lib; ]; programs = { - beets.settings.directory = mkForce "/mnt/udata/music"; + beets.settings.directory = lib.mkForce "/mnt/udata/music"; mpv = { profiles = let - mapShaders = map (args: toString (pkgs.fetchurl args)); + mapShaders = map (x: x |> pkgs.fetchurl |> toString); cfl-prediction = mapShaders [ { url = "https://raw.githubusercontent.com/Artoriuz/glsl-chroma-from-luma-prediction/9fdd0bc68cd8ae42a8072a7d5d098f118daa4293/CfL_Prediction.glsl"; @@ -105,7 +104,7 @@ with lib; vf = "format=colorlevels=full:colormatrix=auto"; video-output-levels = "full"; - glsl-shaders-append = map (text: toString (pkgs.writeText "shader.hook" text)) [ + glsl-shaders-append = map (x: x |> pkgs.writeText "shader.hook" |> toString) [ '' //!HOOK LUMA //!BIND HOOKED @@ -143,7 +142,7 @@ with lib; }; services = { - mpd.musicDirectory = mkForce "/mnt/udata/music"; + mpd.musicDirectory = lib.mkForce "/mnt/udata/music"; xsettingsd.settings."Xft/DPI" = "93"; }; @@ -161,17 +160,17 @@ with lib; enable = true; notifications.mail = { enable = true; - sender = "smartd@${my.domain.shire}"; - recipient = "smartd@${my.domain.shire}"; + sender = "root@${lib.my.domain.shire}"; + recipient = "root@${lib.my.domain.shire}"; }; }; openssh.settings = { - KbdInteractiveAuthentication = mkForce true; - PasswordAuthentication = mkForce true; + KbdInteractiveAuthentication = lib.mkForce true; + PasswordAuthentication = lib.mkForce true; }; - udev.packages = with pkgs; [ vial ]; + udev.packages = [ pkgs.vial ]; xserver.wacom.enable = true; }; @@ -264,7 +263,7 @@ with lib; # [1]: https://github.com/ryantm/agenix/issues/45#issuecomment-847852593 # [1]: https://github.com/nix-community/impermanence/issues/22 # [1]: https://github.com/NixOS/nixpkgs/pull/86967#pullrequestreview-667929259 - "/home/${my.username}".neededForBoot = true; + "/home/${lib.my.username}".neededForBoot = true; "/mnt/ydata/music" = { device = "yavanna.shire.net:/export/music"; diff --git a/configurations/ilmare/default.nix b/configurations/ilmare/default.nix index 6ced115..e9dbf7c 100644 --- a/configurations/ilmare/default.nix +++ b/configurations/ilmare/default.nix @@ -1,6 +1,6 @@ { lib, ... }: { - imports = lib.attrValues (lib.modulesIn ./.); + imports = lib.modulesIn ./. |> lib.attrValues; nixfiles.modules = { wireguard.client.enable = true; @@ -11,6 +11,19 @@ bluetooth.enable = true; }; + hm.programs.plasma = { + input.mice = [ + { + name = "TPPS\\/2 Elan TrackPoint"; + vendorId = "2"; + productId = "a"; + acceleration = 0.250; + accelerationProfile = "none"; + } + ]; + configFile.kwinrc."Xwayland"."Scale" = 1.2; + }; + hardware.trackpoint = { enable = true; speed = 500; diff --git a/configurations/iso/default.nix b/configurations/iso/default.nix index 7277e88..b23157d 100644 --- a/configurations/iso/default.nix +++ b/configurations/iso/default.nix @@ -1,7 +1,6 @@ { lib, ... }: -with lib; { - secrets = mkForce { }; + secrets = lib.mkForce { }; nixfiles.modules = { common.networking.onlyDefault = true; @@ -16,11 +15,11 @@ with lib; }; }; - hm.programs.git.signing.signByDefault = mkForce false; + hm.programs.git.signing.signByDefault = lib.mkForce false; programs.mtr.enable = true; - services.getty.autologinUser = mkForce my.username; + services.getty.autologinUser = lib.mkForce lib.my.username; nixpkgs.config.allowBroken = true; } diff --git a/configurations/manwe/default.nix b/configurations/manwe/default.nix index 89b111a..326cfa6 100644 --- a/configurations/manwe/default.nix +++ b/configurations/manwe/default.nix @@ -3,9 +3,8 @@ lib, ... }: -with lib; { - imports = attrValues (modulesIn ./.); + imports = lib.modulesIn ./. |> lib.attrValues; # Something is broken there. Not sure why it affects me tho. disabledModules = [ "services/networking/wireguard-networkd.nix" ]; @@ -28,11 +27,11 @@ with lib; git.server = { enable = true; - domain = "git.${my.domain.azahi}"; + domain = "git.${lib.my.domain.azahi}"; }; matrix.dendrite = { enable = true; - domain = my.domain.azahi; + domain = lib.my.domain.azahi; }; murmur.enable = true; radicale.enable = true; @@ -40,7 +39,7 @@ with lib; shadowsocks.enable = true; soju = { enable = true; - domain = my.domain.azahi; + domain = lib.my.domain.azahi; }; vaultwarden.enable = true; ntfy.enable = true; diff --git a/configurations/manwe/mailserver/default.nix b/configurations/manwe/mailserver/default.nix index cc8b41d..5160604 100644 --- a/configurations/manwe/mailserver/default.nix +++ b/configurations/manwe/mailserver/default.nix @@ -4,9 +4,8 @@ lib, ... }: -with lib; { - imports = [ inputs.mailserver.nixosModule ] ++ attrValues (modulesIn ./.); + imports = [ inputs.mailserver.nixosModule ] ++ (lib.modulesIn ./. |> lib.attrValues); ark.directories = with config.mailserver; [ "/var/lib/dovecot" @@ -20,25 +19,25 @@ with lib; secrets = with config.mailserver; { dkim-key-azahi-cc = { file = "${inputs.self}/secrets/dkim-key-azahi-cc"; - path = "${dkimKeyDirectory}/${my.domain.azahi}.${dkimSelector}.key"; + path = "${dkimKeyDirectory}/${lib.my.domain.azahi}.${dkimSelector}.key"; owner = config.services.opendkim.user; inherit (config.services.opendkim) group; }; dkim-key-rohan-net = { file = "${inputs.self}/secrets/dkim-key-rohan-net"; - path = "${dkimKeyDirectory}/${my.domain.rohan}.${dkimSelector}.key"; + path = "${dkimKeyDirectory}/${lib.my.domain.rohan}.${dkimSelector}.key"; owner = config.services.opendkim.user; inherit (config.services.opendkim) group; }; dkim-key-gondor-net = { file = "${inputs.self}/secrets/dkim-key-gondor-net"; - path = "${dkimKeyDirectory}/${my.domain.gondor}.${dkimSelector}.key"; + path = "${dkimKeyDirectory}/${lib.my.domain.gondor}.${dkimSelector}.key"; owner = config.services.opendkim.user; inherit (config.services.opendkim) group; }; dkim-key-shire-net = { file = "${inputs.self}/secrets/dkim-key-shire-net"; - path = "${dkimKeyDirectory}/${my.domain.shire}.${dkimSelector}.key"; + path = "${dkimKeyDirectory}/${lib.my.domain.shire}.${dkimSelector}.key"; owner = config.services.opendkim.user; inherit (config.services.opendkim) group; }; @@ -51,7 +50,7 @@ with lib; mailserver = let - cert = config.certs.${my.domain.shire}; + cert = config.certs.${lib.my.domain.shire}; in { enable = true; @@ -65,7 +64,7 @@ with lib; enableSubmission = false; fqdn = config.networking.domain; - domains = with my.domain; [ + domains = with lib.my.domain; [ azahi gondor rohan @@ -103,11 +102,11 @@ with lib; dovecot2.sieve.extensions = [ "fileinto" ]; # https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/241 - redis.servers.rspamd.enable = mkForce false; + redis.servers.rspamd.enable = lib.mkForce false; }; systemd.services.rspamd = { - requires = mkForce [ "redis-default.service" ]; - after = mkForce [ "redis-default.service" ]; + requires = lib.mkForce [ "redis-default.service" ]; + after = lib.mkForce [ "redis-default.service" ]; }; } diff --git a/configurations/manwe/webserver.nix b/configurations/manwe/webserver.nix index 051ddba..6f6061e 100644 --- a/configurations/manwe/webserver.nix +++ b/configurations/manwe/webserver.nix @@ -5,12 +5,11 @@ libPlausible, ... }: -with lib; { nixfiles.modules.nginx = { enable = true; virtualHosts = - with my.domain; + with lib.my.domain; { ${shire}.locations."/".return = "301 https://www.youtube.com/watch?v=dQw4w9WgXcQ"; "git.${shire}".locations."/".return = "301 https://git.${azahi}"; @@ -31,11 +30,11 @@ with lib; frodo = "301 https://frodo."; in { - ${gondor}.locations."/".return = concatStrings [ + ${gondor}.locations."/".return = lib.concatStrings [ frodo gondor ]; - ${rohan}.locations."/".return = concatStrings [ + ${rohan}.locations."/".return = lib.concatStrings [ frodo rohan ]; diff --git a/configurations/test-headful/default.nix b/configurations/test-headful/default.nix index 79a1536..ce8aba5 100644 --- a/configurations/test-headful/default.nix +++ b/configurations/test-headful/default.nix @@ -1,5 +1,4 @@ { lib, ... }: -with lib; { nixfiles.modules = { dwm.enable = false; @@ -10,10 +9,10 @@ with lib; fileSystems."/".device = "/dev/null"; documentation = { - enable = mkForce false; + enable = lib.mkForce false; man = { - enable = mkForce false; - man-db.enable = mkForce false; + enable = lib.mkForce false; + man-db.enable = lib.mkForce false; }; }; } diff --git a/configurations/test-headless/default.nix b/configurations/test-headless/default.nix index ef3d223..622cf0e 100644 --- a/configurations/test-headless/default.nix +++ b/configurations/test-headless/default.nix @@ -1,14 +1,13 @@ { lib, ... }: -with lib; { nixfiles.modules = { - endlessh-go.enable = mkForce false; - node-exporter.enable = mkForce false; - promtail.enable = mkForce false; + endlessh-go.enable = lib.mkForce false; + node-exporter.enable = lib.mkForce false; + promtail.enable = lib.mkForce false; }; boot.loader.systemd-boot.enable = true; fileSystems."/".device = "/dev/null"; - documentation.enable = mkForce false; + documentation.enable = lib.mkForce false; } diff --git a/configurations/tulkas/default.nix b/configurations/tulkas/default.nix index 5946ea8..0ca1279 100644 --- a/configurations/tulkas/default.nix +++ b/configurations/tulkas/default.nix @@ -1,14 +1,13 @@ { lib, this, ... }: -with lib; { - imports = attrValues (modulesIn ./.); + imports = lib.modulesIn ./. |> lib.attrValues; nixfiles.modules = { wireguard.client.enable = true; - wireguard-ng.server.enable = true; + # wireguard-ng.server.enable = true; - unbound-ng.enable = true; - unbound-ng.domain = "shire.local"; + # unbound-ng.enable = true; + # unbound-ng.domain = "shire.local"; }; services.qemuGuest.enable = true; diff --git a/configurations/varda/default.nix b/configurations/varda/default.nix index c12c811..8b511d3 100644 --- a/configurations/varda/default.nix +++ b/configurations/varda/default.nix @@ -1,7 +1,6 @@ { lib, ... }: -with lib; { - imports = attrValues (modulesIn ./.); + imports = lib.modulesIn ./. |> lib.attrValues; nixfiles.modules = { wireguard.client.enable = true; |