run statix

This commit is contained in:
ChaotiCryptidz 2022-02-10 10:37:09 +00:00
parent d23c1c8ca8
commit 91a99a631c
24 changed files with 42 additions and 44 deletions

View file

@ -61,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1644255659, "lastModified": 1644346464,
"narHash": "sha256-VuPFOttrBRTOJqPY5yboxVdk1xZjSSlOSDDbBCMKioo=", "narHash": "sha256-hS8hwbr/PflMIfTWTmB7Xo5jIrsWhSAqtz5XXxPa0zQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1ca6293c8fb1dbe13c48fe518440c288256cd562", "rev": "e2aa1f598674aa9c06f28f5db60b89f37f1e961b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -83,11 +83,11 @@
"utils": "utils_2" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1644320655, "lastModified": 1644329428,
"narHash": "sha256-Xi/I1Ms/eyup4ch1rxT9s+gurDLMCnk6HeKgeTKJOnE=", "narHash": "sha256-psoRS7PQe4hMO72BBvSKy2PJWzNZkJp2zV0LKXGZfSM=",
"owner": "ChaotiCryptidz", "owner": "ChaotiCryptidz",
"repo": "musicutil", "repo": "musicutil",
"rev": "676e66dde66505d4410675e60fa274b672254d55", "rev": "86f4865ac74572d43026b19551420f8d0de2b5bb",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -98,11 +98,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1644193945, "lastModified": 1644359234,
"narHash": "sha256-FqPyne57rnbvFfgL5OacS1w85/2NAZo59jqhhhcobek=", "narHash": "sha256-u/sBnRgrFrn9W8gZMS6vN3ZnJsoTvbws968TpqwlDJQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fbd030fb2d8dc9fedcb45e57cbce5e9e064bfb6c", "rev": "c5051e2b5fe9fab43a64f0e0d06b62c81a890b90",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
programs.ssh.enable = true; programs.ssh.enable = true;
programs.ssh.matchBlocks = { programs.ssh.matchBlocks = {
"lappy" = { "lappy" = {

View file

@ -58,9 +58,7 @@
{ command = "${pkgs.waybar}/bin/waybar"; } { command = "${pkgs.waybar}/bin/waybar"; }
]; ];
output = { output = { "*" = { bg = "~/.local/share/wallpaper.jpg fill"; }; };
"*" = { bg = "~/.local/share/wallpaper.jpg fill"; };
};
input = { "*" = { xkb_layout = "gb"; }; }; input = { "*" = { xkb_layout = "gb"; }; };
fonts = { fonts = {
@ -120,10 +118,9 @@
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "XF86AudioLowerVolume" =
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "XF86AudioMute" = "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
"exec ${pactl}pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "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"; "XF86MonBrightnessDown" = "exec sudo xbacklight -time 1 -dec +5";
"XF86MonBrightnessUp" = "exec sudo xbacklight -time 1 -inc +5"; "XF86MonBrightnessUp" = "exec sudo xbacklight -time 1 -inc +5";
"Print" = "Print" =

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
settings = [{ settings = [{

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
programs.zsh.profileExtra = '' programs.zsh.profileExtra = ''
# If running from tty1 start sway # If running from tty1 start sway
if [ "$(tty)" = "/dev/tty1" ]; then if [ "$(tty)" = "/dev/tty1" ]; then

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
services.invidious = { services.invidious = {
enable = true; enable = true;
port = 3000; port = 3000;

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
security.acme = { security.acme = {
defaults = { email = "chaoticryptidz@owo.monster"; }; defaults = { email = "chaoticryptidz@owo.monster"; };
acceptTerms = true; acceptTerms = true;

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
services.quassel = { services.quassel = {
enable = true; enable = true;
interfaces = [ "0.0.0.0" ]; interfaces = [ "0.0.0.0" ];

View file

@ -1,4 +1,4 @@
{ ... }: _:
let let
backupUser = "root"; backupUser = "root";
backupPaths = [ "/var/lib/postgresql" "/var/lib/vault" "/var/lib/acme" ]; backupPaths = [ "/var/lib/postgresql" "/var/lib/vault" "/var/lib/acme" ];
@ -10,7 +10,7 @@ in {
services.restic.backups.hetzner-vm = { services.restic.backups.hetzner-vm = {
user = backupUser; user = backupUser;
paths = backupPaths; paths = backupPaths;
timerConfig = timerConfig; inherit timerConfig;
repository = "b2:Backups-HetznerVM:/"; repository = "b2:Backups-HetznerVM:/";
passwordFile = "/secrets/restic-password"; passwordFile = "/secrets/restic-password";
environmentFile = "/secrets/restic-env"; environmentFile = "/secrets/restic-env";
@ -18,7 +18,7 @@ in {
services.restic.backups.cassie-hetzner-vm = { services.restic.backups.cassie-hetzner-vm = {
user = backupUser; user = backupUser;
paths = backupPaths; paths = backupPaths;
timerConfig = timerConfig; inherit timerConfig;
repository = "b2:Cryptidz-Backup:HetznerVM"; repository = "b2:Cryptidz-Backup:HetznerVM";
passwordFile = "/secrets/restic-password-cassie"; passwordFile = "/secrets/restic-password-cassie";
environmentFile = "/secrets/restic-env-cassie"; environmentFile = "/secrets/restic-env-cassie";

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
services.vsftpd = { services.vsftpd = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''

View file

@ -13,7 +13,7 @@ in {
services.hostapd = { services.hostapd = {
enable = true; enable = true;
interface = wifiInterface; interface = wifiInterface;
ssid = ssid; inherit ssid;
wpaPassphrase = password; wpaPassphrase = password;
}; };
@ -33,7 +33,7 @@ in {
networking.nat = { networking.nat = {
enable = true; enable = true;
internalIPs = [ "192.168.2.0/24" ]; internalIPs = [ "192.168.2.0/24" ];
externalInterface = externalInterface; inherit externalInterface;
}; };
services.dnsmasq = { services.dnsmasq = {

View file

@ -1 +1 @@
{ ... }: { } _: { }

View file

@ -1 +1 @@
{ ... }: { } _: { }

View file

@ -1 +1 @@
{ ... }: { boot.tmpOnTmpfs = true; } _: { boot.tmpOnTmpfs = true; }

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.blueman.enable = true; services.blueman.enable = true;
} }

View file

@ -1 +1 @@
{ ... }: { services.usbmuxd.enable = true; } _: { services.usbmuxd.enable = true; }

View file

@ -0,0 +1,3 @@
_: {
}

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;

View file

@ -1,3 +1,3 @@
{ ... }: { _: {
hardware.pulseaudio.daemon.config = { default-sample-rate = "48000"; }; hardware.pulseaudio.daemon.config = { default-sample-rate = "48000"; };
} }

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
hardware.pulseaudio = { hardware.pulseaudio = {
extraConfig = '' 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 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

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
hardware.pulseaudio = { hardware.pulseaudio = {
extraConfig = '' extraConfig = ''
load-module module-rtp-recv latency_msec=5000 sap_address=0.0.0.0 load-module module-rtp-recv latency_msec=5000 sap_address=0.0.0.0

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
services.tailscale.enable = true; services.tailscale.enable = true;
networking.firewall.trustedInterfaces = [ "tailscale0" ]; networking.firewall.trustedInterfaces = [ "tailscale0" ];
} }

View file

@ -1,4 +1,4 @@
{ ... }: { _: {
services.tor = { services.tor = {
enable = true; enable = true;
client.enable = true; client.enable = true;

View file

@ -8,7 +8,7 @@ let
realPath = toString path; realPath = toString path;
dirContents = builtins.readDir path; dirContents = builtins.readDir path;
isDirectory = entry: dirContents."${entry}" == "directory"; isDirectory = entry: dirContents."${entry}" == "directory";
isHidden = entry: hasPrefix "." entry; isHidden = hasPrefix ".";
isDir = entry: _: (isDirectory entry) && !(isHidden entry); isDir = entry: _: (isDirectory entry) && !(isHidden entry);
directories = filterAttrs isDir dirContents; directories = filterAttrs isDir dirContents;
isNixFile = entry: _: isNixFile = entry: _:
@ -16,9 +16,7 @@ let
in result != null && builtins.length result > 0; in result != null && builtins.length result > 0;
nixFiles = filterAttrs isNixFile dirContents; nixFiles = filterAttrs isNixFile dirContents;
getPath = entry: "${realPath}/${entry}"; getPath = entry: "${realPath}/${entry}";
getPaths = entries: getPaths = mapAttrs' (n: v: nameValuePair (removeSuffix ".nix" n) (getPath n));
mapAttrs' (n: v: nameValuePair (removeSuffix ".nix" n) (getPath n))
entries;
nixFilePaths = getPaths nixFiles; nixFilePaths = getPaths nixFiles;
dirPaths = getPaths directories; dirPaths = getPaths directories;
recursedPaths = mapAttrs (_: fullPath: recursedPaths = mapAttrs (_: fullPath:
@ -87,7 +85,7 @@ let
f (path ++ [ name ]) value; f (path ++ [ name ]) value;
in mapAttrs g set; in mapAttrs g set;
in recurse [ ] set; in recurse [ ] set;
getPathString = path: concatStringsSep "/" path; getPathString = concatStringsSep "/";
getConfig = path: default: configTreeModule.${getPathString path} or default; getConfig = path: default: configTreeModule.${getPathString path} or default;
revtail = path: sublist 0 (length path - 1) path; revtail = path: sublist 0 (length path - 1) path;
getConfigRecursive = path: getConfigRecursive = path:
@ -103,7 +101,7 @@ let
processFunctor = prev: processFunctor = prev:
prev // { prev // {
__functor = self: __functor = self:
{ ... }: { _: {
imports = imports =
attrValues (removeAttrs prev leafConfig.functor.excludes) attrValues (removeAttrs prev leafConfig.functor.excludes)
++ leafConfig.functor.external; ++ leafConfig.functor.external;