diff options
author | Karel Kočí <cynerd@email.cz> | 2023-02-06 20:44:14 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2023-02-06 20:44:14 +0100 |
commit | 8b96dd41971e008a6a2527fe10c6670d2248117e (patch) | |
tree | c7327ec26648e62279778696e38dc70415d16151 /nixos | |
parent | adc6902502aa03509d138e9220843bf4d6a1a390 (diff) | |
download | nixos-personal-8b96dd41971e008a6a2527fe10c6670d2248117e.tar.gz nixos-personal-8b96dd41971e008a6a2527fe10c6670d2248117e.tar.bz2 nixos-personal-8b96dd41971e008a6a2527fe10c6670d2248117e.zip |
Apply statix suggestions
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/configurations.nix | 9 | ||||
-rw-r--r-- | nixos/machine/lipwig.nix | 2 | ||||
-rw-r--r-- | nixos/machine/mrpump.nix | 2 | ||||
-rw-r--r-- | nixos/modules/develop.nix | 3 | ||||
-rw-r--r-- | nixos/modules/home-assistant.nix | 4 | ||||
-rw-r--r-- | nixos/modules/monitoring.nix | 2 | ||||
-rw-r--r-- | nixos/modules/syncthing.nix | 4 | ||||
-rw-r--r-- | nixos/routers/wifi-adm.nix | 4 | ||||
-rw-r--r-- | nixos/routers/wifi-spt.nix | 4 |
9 files changed, 15 insertions, 19 deletions
diff --git a/nixos/configurations.nix b/nixos/configurations.nix index 6151c0d..5dcb141 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -27,9 +27,8 @@ with nixpkgs.lib; let extra_modules ? [], }: hostname: { ${hostname} = nixpkgs.lib.nixosSystem { - system = system; + inherit system specialArgs; modules = (modules hostname) ++ extra_modules; - specialArgs = specialArgs; }; }; amd64System = genericSystem {}; @@ -82,7 +81,7 @@ with nixpkgs.lib; let vmSystem = system: hostSystem: genericSystem { - system = system; + inherit system; extra_modules = [ nixturris.nixosModules.turris-crossbuild { @@ -97,10 +96,8 @@ with nixpkgs.lib; let turrisSystem = board: hostname: { ${hostname} = nixturris.lib.nixturrisSystem { - nixpkgs = nixpkgs; - board = board; + inherit nixpkgs board specialArgs; modules = [self.nixosModules.defaultRouters] ++ modules hostname; - specialArgs = specialArgs; }; }; turrisMoxSystem = turrisSystem "mox"; diff --git a/nixos/machine/lipwig.nix b/nixos/machine/lipwig.nix index b109065..5483436 100644 --- a/nixos/machine/lipwig.nix +++ b/nixos/machine/lipwig.nix @@ -54,7 +54,7 @@ with lib; { }; services.fcgiwrap = { enable = true; - group = config.services.nginx.group; + inherit (config.services.nginx) group; }; security.acme = { acceptTerms = true; diff --git a/nixos/machine/mrpump.nix b/nixos/machine/mrpump.nix index 68de482..2d626fb 100644 --- a/nixos/machine/mrpump.nix +++ b/nixos/machine/mrpump.nix @@ -8,7 +8,7 @@ with builtins; with lib; { config = let localNix = import (self.inputs.nix.outPath + "/docker.nix") { - pkgs = pkgs; + inherit pkgs; name = "local/nix"; tag = "latest"; bundleNixpkgs = false; diff --git a/nixos/modules/develop.nix b/nixos/modules/develop.nix index 39a846e..e5b43b3 100644 --- a/nixos/modules/develop.nix +++ b/nixos/modules/develop.nix @@ -4,8 +4,7 @@ pkgs, ... }: -with lib; let -in { +with lib; { options = { cynerd.develop = mkOption { type = types.bool; diff --git a/nixos/modules/home-assistant.nix b/nixos/modules/home-assistant.nix index bf98609..0aac9be 100644 --- a/nixos/modules/home-assistant.nix +++ b/nixos/modules/home-assistant.nix @@ -76,11 +76,11 @@ in { consumer = data_type: topics: { tags = {source = "bigclown";}; servers = ["tcp://localhost:1883"]; - topics = topics; + inherit topics; username = "telegraf"; password = "$MQTT_PASSWORD"; data_format = "value"; - data_type = data_type; + inherit data_type; topic_parsing = [ { topic = "bigclown/node/+/+/+/+"; diff --git a/nixos/modules/monitoring.nix b/nixos/modules/monitoring.nix index 86a37e4..44d3cb5 100644 --- a/nixos/modules/monitoring.nix +++ b/nixos/modules/monitoring.nix @@ -6,7 +6,7 @@ }: with lib; let cnf = config.cynerd.monitoring; - hostName = config.networking.hostName; + inherit (config.networking) hostName; isHost = cnf.host == hostName; in { options.cynerd.monitoring = { diff --git a/nixos/modules/syncthing.nix b/nixos/modules/syncthing.nix index 716e5a3..263acbe 100644 --- a/nixos/modules/syncthing.nix +++ b/nixos/modules/syncthing.nix @@ -7,7 +7,7 @@ with builtins; with lib; let cnf = config.cynerd.syncthing; - hostName = config.networking.hostName; + inherit (config.networking) hostName; allDevices = [ "albert" "binky" @@ -29,7 +29,7 @@ with lib; let "ridcully" "spt-omnia" ]; - filterDevice = folders: filterAttrs (n: v: any (d: d == hostName) v.devices) folders; + filterDevice = filterAttrs (n: v: any (d: d == hostName) v.devices); in { options = { cynerd.syncthing = { diff --git a/nixos/routers/wifi-adm.nix b/nixos/routers/wifi-adm.nix index 339f4ef..353b551 100644 --- a/nixos/routers/wifi-adm.nix +++ b/nixos/routers/wifi-adm.nix @@ -35,7 +35,7 @@ in { interfaces = (optionalAttrs (cnf.ar9287.interface != null) { "${cnf.ar9287.interface}" = hostapd.qualcomAtherosAR9287 { - channel = cnf.ar9287.channel; + inherit (cnf.ar9287) channel; bssid = "@BSSID_AR9287_0@"; ssid = "TurrisAdamkovi"; wpa = 2; @@ -61,7 +61,7 @@ in { }) // (optionalAttrs (cnf.qca988x.interface != null) { "${cnf.qca988x.interface}" = hostapd.qualcomAtherosQCA988x { - channel = cnf.qca988x.channel; + inherit (cnf.qca988x) channel; bssid = "@BSSID_AR9287_0@"; ssid = "TurrisAdamkovi5"; wpa = 2; diff --git a/nixos/routers/wifi-spt.nix b/nixos/routers/wifi-spt.nix index 69e8376..39740a1 100644 --- a/nixos/routers/wifi-spt.nix +++ b/nixos/routers/wifi-spt.nix @@ -35,7 +35,7 @@ in { interfaces = (optionalAttrs (cnf.ar9287.interface != null) { "${cnf.ar9287.interface}" = hostapd.qualcomAtherosAR9287 { - channel = cnf.ar9287.channel; + inherit (cnf.ar9287) channel; bssid = "@BSSID_AR9287_0@"; ssid = "TurrisRules"; wpa = 2; @@ -54,7 +54,7 @@ in { }) // (optionalAttrs (cnf.qca988x.interface != null) { "${cnf.qca988x.interface}" = hostapd.qualcomAtherosQCA988x { - channel = cnf.qca988x.channel; + inherit (cnf.qca988x) channel; bssid = "@BSSID_QCA988X_0@"; ssid = "TurrisRules5"; wpa = 2; |