From 91a99a631ce85ef42af687e703788355346c93bc Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Thu, 10 Feb 2022 10:37:09 +0000 Subject: [PATCH] run statix --- flake.lock | 18 +++++++++--------- home/base/ssh.nix | 2 +- home/gui/environments/sway/sway.nix | 9 +++------ home/gui/environments/sway/waybar-bottom.nix | 2 +- home/gui/environments/sway/zsh-autostart.nix | 2 +- hosts/hetzner-vm/services/invidious.nix | 2 +- hosts/hetzner-vm/services/nginx.nix | 2 +- hosts/hetzner-vm/services/quassel.nix | 2 +- hosts/hetzner-vm/services/restic.nix | 6 +++--- hosts/hetzner-vm/services/storage-sftp.nix | 2 +- hosts/raspberry/services/router.nix | 4 ++-- modules/home/keep.nix | 2 +- modules/nixos/keep.nix | 2 +- profiles/base/boot.nix | 2 +- profiles/connectivity/bluetooth/bluetooth.nix | 2 +- profiles/connectivity/ios/default.nix | 2 +- profiles/gui/environments/kde/default.nix | 3 +++ profiles/sound/pipewire/default.nix | 2 +- profiles/sound/pulseaudio/pulse-48000.nix | 2 +- .../pulseaudio/pulse-recv-native-localhost.nix | 2 +- profiles/sound/pulseaudio/pulse-recv-rtp.nix | 2 +- profiles/tailscale/tailscale.nix | 2 +- profiles/tor/tor.nix | 2 +- tree.nix | 10 ++++------ 24 files changed, 42 insertions(+), 44 deletions(-) create mode 100644 profiles/gui/environments/kde/default.nix diff --git a/flake.lock b/flake.lock index 361bd0c..7f1d730 100644 --- a/flake.lock +++ b/flake.lock @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1644255659, - "narHash": "sha256-VuPFOttrBRTOJqPY5yboxVdk1xZjSSlOSDDbBCMKioo=", + "lastModified": 1644346464, + "narHash": "sha256-hS8hwbr/PflMIfTWTmB7Xo5jIrsWhSAqtz5XXxPa0zQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "1ca6293c8fb1dbe13c48fe518440c288256cd562", + "rev": "e2aa1f598674aa9c06f28f5db60b89f37f1e961b", "type": "github" }, "original": { @@ -83,11 +83,11 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1644320655, - "narHash": "sha256-Xi/I1Ms/eyup4ch1rxT9s+gurDLMCnk6HeKgeTKJOnE=", + "lastModified": 1644329428, + "narHash": "sha256-psoRS7PQe4hMO72BBvSKy2PJWzNZkJp2zV0LKXGZfSM=", "owner": "ChaotiCryptidz", "repo": "musicutil", - "rev": "676e66dde66505d4410675e60fa274b672254d55", + "rev": "86f4865ac74572d43026b19551420f8d0de2b5bb", "type": "gitlab" }, "original": { @@ -98,11 +98,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1644193945, - "narHash": "sha256-FqPyne57rnbvFfgL5OacS1w85/2NAZo59jqhhhcobek=", + "lastModified": 1644359234, + "narHash": "sha256-u/sBnRgrFrn9W8gZMS6vN3ZnJsoTvbws968TpqwlDJQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fbd030fb2d8dc9fedcb45e57cbce5e9e064bfb6c", + "rev": "c5051e2b5fe9fab43a64f0e0d06b62c81a890b90", "type": "github" }, "original": { diff --git a/home/base/ssh.nix b/home/base/ssh.nix index 0796f59..18f90cc 100644 --- a/home/base/ssh.nix +++ b/home/base/ssh.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { programs.ssh.enable = true; programs.ssh.matchBlocks = { "lappy" = { diff --git a/home/gui/environments/sway/sway.nix b/home/gui/environments/sway/sway.nix index 3c94f32..029d515 100644 --- a/home/gui/environments/sway/sway.nix +++ b/home/gui/environments/sway/sway.nix @@ -58,9 +58,7 @@ { command = "${pkgs.waybar}/bin/waybar"; } ]; - output = { - "*" = { bg = "~/.local/share/wallpaper.jpg fill"; }; - }; + output = { "*" = { bg = "~/.local/share/wallpaper.jpg fill"; }; }; input = { "*" = { xkb_layout = "gb"; }; }; fonts = { @@ -120,10 +118,9 @@ "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; - "XF86AudioMute" = - "exec ${pactl}pactl set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMicMute" = - "exec ${pactl} set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle"; + "exec ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle"; "XF86MonBrightnessDown" = "exec sudo xbacklight -time 1 -dec +5"; "XF86MonBrightnessUp" = "exec sudo xbacklight -time 1 -inc +5"; "Print" = diff --git a/home/gui/environments/sway/waybar-bottom.nix b/home/gui/environments/sway/waybar-bottom.nix index 341053d..8878e4b 100644 --- a/home/gui/environments/sway/waybar-bottom.nix +++ b/home/gui/environments/sway/waybar-bottom.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { programs.waybar = { enable = true; settings = [{ diff --git a/home/gui/environments/sway/zsh-autostart.nix b/home/gui/environments/sway/zsh-autostart.nix index c39fcbb..5e6106f 100644 --- a/home/gui/environments/sway/zsh-autostart.nix +++ b/home/gui/environments/sway/zsh-autostart.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { programs.zsh.profileExtra = '' # If running from tty1 start sway if [ "$(tty)" = "/dev/tty1" ]; then diff --git a/hosts/hetzner-vm/services/invidious.nix b/hosts/hetzner-vm/services/invidious.nix index 14d1752..08ceb16 100644 --- a/hosts/hetzner-vm/services/invidious.nix +++ b/hosts/hetzner-vm/services/invidious.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { services.invidious = { enable = true; port = 3000; diff --git a/hosts/hetzner-vm/services/nginx.nix b/hosts/hetzner-vm/services/nginx.nix index 5926827..b3b80f6 100644 --- a/hosts/hetzner-vm/services/nginx.nix +++ b/hosts/hetzner-vm/services/nginx.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { security.acme = { defaults = { email = "chaoticryptidz@owo.monster"; }; acceptTerms = true; diff --git a/hosts/hetzner-vm/services/quassel.nix b/hosts/hetzner-vm/services/quassel.nix index 51ac4d4..b77653a 100644 --- a/hosts/hetzner-vm/services/quassel.nix +++ b/hosts/hetzner-vm/services/quassel.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { services.quassel = { enable = true; interfaces = [ "0.0.0.0" ]; diff --git a/hosts/hetzner-vm/services/restic.nix b/hosts/hetzner-vm/services/restic.nix index 493359b..b1d9f61 100644 --- a/hosts/hetzner-vm/services/restic.nix +++ b/hosts/hetzner-vm/services/restic.nix @@ -1,4 +1,4 @@ -{ ... }: +_: let backupUser = "root"; backupPaths = [ "/var/lib/postgresql" "/var/lib/vault" "/var/lib/acme" ]; @@ -10,7 +10,7 @@ in { services.restic.backups.hetzner-vm = { user = backupUser; paths = backupPaths; - timerConfig = timerConfig; + inherit timerConfig; repository = "b2:Backups-HetznerVM:/"; passwordFile = "/secrets/restic-password"; environmentFile = "/secrets/restic-env"; @@ -18,7 +18,7 @@ in { services.restic.backups.cassie-hetzner-vm = { user = backupUser; paths = backupPaths; - timerConfig = timerConfig; + inherit timerConfig; repository = "b2:Cryptidz-Backup:HetznerVM"; passwordFile = "/secrets/restic-password-cassie"; environmentFile = "/secrets/restic-env-cassie"; diff --git a/hosts/hetzner-vm/services/storage-sftp.nix b/hosts/hetzner-vm/services/storage-sftp.nix index 7b96b62..92b673d 100644 --- a/hosts/hetzner-vm/services/storage-sftp.nix +++ b/hosts/hetzner-vm/services/storage-sftp.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { services.vsftpd = { enable = true; extraConfig = '' diff --git a/hosts/raspberry/services/router.nix b/hosts/raspberry/services/router.nix index 02f4bb2..0a25d62 100644 --- a/hosts/raspberry/services/router.nix +++ b/hosts/raspberry/services/router.nix @@ -13,7 +13,7 @@ in { services.hostapd = { enable = true; interface = wifiInterface; - ssid = ssid; + inherit ssid; wpaPassphrase = password; }; @@ -33,7 +33,7 @@ in { networking.nat = { enable = true; internalIPs = [ "192.168.2.0/24" ]; - externalInterface = externalInterface; + inherit externalInterface; }; services.dnsmasq = { diff --git a/modules/home/keep.nix b/modules/home/keep.nix index c915eb0..958608a 100644 --- a/modules/home/keep.nix +++ b/modules/home/keep.nix @@ -1 +1 @@ -{ ... }: { } +_: { } diff --git a/modules/nixos/keep.nix b/modules/nixos/keep.nix index c915eb0..958608a 100644 --- a/modules/nixos/keep.nix +++ b/modules/nixos/keep.nix @@ -1 +1 @@ -{ ... }: { } +_: { } diff --git a/profiles/base/boot.nix b/profiles/base/boot.nix index 8154545..3e07500 100644 --- a/profiles/base/boot.nix +++ b/profiles/base/boot.nix @@ -1 +1 @@ -{ ... }: { boot.tmpOnTmpfs = true; } +_: { boot.tmpOnTmpfs = true; } diff --git a/profiles/connectivity/bluetooth/bluetooth.nix b/profiles/connectivity/bluetooth/bluetooth.nix index f3d21b1..e1d1446 100644 --- a/profiles/connectivity/bluetooth/bluetooth.nix +++ b/profiles/connectivity/bluetooth/bluetooth.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { hardware.bluetooth.enable = true; services.blueman.enable = true; } diff --git a/profiles/connectivity/ios/default.nix b/profiles/connectivity/ios/default.nix index 709b4c6..5ed343a 100644 --- a/profiles/connectivity/ios/default.nix +++ b/profiles/connectivity/ios/default.nix @@ -1 +1 @@ -{ ... }: { services.usbmuxd.enable = true; } +_: { services.usbmuxd.enable = true; } diff --git a/profiles/gui/environments/kde/default.nix b/profiles/gui/environments/kde/default.nix new file mode 100644 index 0000000..04e0ee9 --- /dev/null +++ b/profiles/gui/environments/kde/default.nix @@ -0,0 +1,3 @@ +_: { + +} diff --git a/profiles/sound/pipewire/default.nix b/profiles/sound/pipewire/default.nix index 2b59592..c7c001d 100644 --- a/profiles/sound/pipewire/default.nix +++ b/profiles/sound/pipewire/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { security.rtkit.enable = true; services.pipewire = { enable = true; diff --git a/profiles/sound/pulseaudio/pulse-48000.nix b/profiles/sound/pulseaudio/pulse-48000.nix index ae56d92..0180974 100644 --- a/profiles/sound/pulseaudio/pulse-48000.nix +++ b/profiles/sound/pulseaudio/pulse-48000.nix @@ -1,3 +1,3 @@ -{ ... }: { +_: { hardware.pulseaudio.daemon.config = { default-sample-rate = "48000"; }; } diff --git a/profiles/sound/pulseaudio/pulse-recv-native-localhost.nix b/profiles/sound/pulseaudio/pulse-recv-native-localhost.nix index 9e82750..6051d05 100644 --- a/profiles/sound/pulseaudio/pulse-recv-native-localhost.nix +++ b/profiles/sound/pulseaudio/pulse-recv-native-localhost.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { hardware.pulseaudio = { extraConfig = '' load-module module-native-protocol-tcp auth-anonymous=1 auth-ip-acl=127.0.0.1;192.168.1.0/24;100.115.10.34 diff --git a/profiles/sound/pulseaudio/pulse-recv-rtp.nix b/profiles/sound/pulseaudio/pulse-recv-rtp.nix index 9e80bc2..0195fbd 100644 --- a/profiles/sound/pulseaudio/pulse-recv-rtp.nix +++ b/profiles/sound/pulseaudio/pulse-recv-rtp.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { hardware.pulseaudio = { extraConfig = '' load-module module-rtp-recv latency_msec=5000 sap_address=0.0.0.0 diff --git a/profiles/tailscale/tailscale.nix b/profiles/tailscale/tailscale.nix index 65ba8ba..f7a7e45 100644 --- a/profiles/tailscale/tailscale.nix +++ b/profiles/tailscale/tailscale.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { services.tailscale.enable = true; networking.firewall.trustedInterfaces = [ "tailscale0" ]; } diff --git a/profiles/tor/tor.nix b/profiles/tor/tor.nix index 2c7d576..c234c6e 100644 --- a/profiles/tor/tor.nix +++ b/profiles/tor/tor.nix @@ -1,4 +1,4 @@ -{ ... }: { +_: { services.tor = { enable = true; client.enable = true; diff --git a/tree.nix b/tree.nix index 347024e..ffd1d8a 100644 --- a/tree.nix +++ b/tree.nix @@ -8,7 +8,7 @@ let realPath = toString path; dirContents = builtins.readDir path; isDirectory = entry: dirContents."${entry}" == "directory"; - isHidden = entry: hasPrefix "." entry; + isHidden = hasPrefix "."; isDir = entry: _: (isDirectory entry) && !(isHidden entry); directories = filterAttrs isDir dirContents; isNixFile = entry: _: @@ -16,9 +16,7 @@ let in result != null && builtins.length result > 0; nixFiles = filterAttrs isNixFile dirContents; getPath = entry: "${realPath}/${entry}"; - getPaths = entries: - mapAttrs' (n: v: nameValuePair (removeSuffix ".nix" n) (getPath n)) - entries; + getPaths = mapAttrs' (n: v: nameValuePair (removeSuffix ".nix" n) (getPath n)); nixFilePaths = getPaths nixFiles; dirPaths = getPaths directories; recursedPaths = mapAttrs (_: fullPath: @@ -87,7 +85,7 @@ let f (path ++ [ name ]) value; in mapAttrs g set; in recurse [ ] set; - getPathString = path: concatStringsSep "/" path; + getPathString = concatStringsSep "/"; getConfig = path: default: configTreeModule.${getPathString path} or default; revtail = path: sublist 0 (length path - 1) path; getConfigRecursive = path: @@ -103,7 +101,7 @@ let processFunctor = prev: prev // { __functor = self: - { ... }: { + _: { imports = attrValues (removeAttrs prev leafConfig.functor.excludes) ++ leafConfig.functor.external;