Hybrid cloud cluster monorepo with Ansible, K8s, NixOS, and Terraform. cute.haus
ansible terraform nix k8s
1

Configure Feed

Select the types of activity you want to include in your feed.

nix/nixos: merge autoUpgrade and flake-url with base

Aly Raffauf (Jun 10, 2026, 9:53 PM EDT) 4bb22020 328130dd

+181 -246
+11 -13
nix/hosts/eterna.nix
··· 8 8 in { 9 9 flake.nixosConfigurations.eterna = inputs.nixpkgs.lib.nixosSystem { 10 10 modules = with config.flake.modules.nixos; [ 11 - base 12 - fail2ban 13 - flake-url 14 - known-hosts 15 - locale-en-us 16 - njust 17 - recipes 18 - performance 19 - ssh-keys 20 - users 21 11 alloy 22 12 atbbs 23 - auto-upgrade 24 13 b2-mounts 25 14 backups 15 + base 26 16 btrfs 17 + cachefilesd 27 18 caddy 28 - cachefilesd 29 19 data-share 20 + fail2ban 30 21 intel-cpu 31 22 intel-gpu 32 23 k3s-node 24 + known-hosts 33 25 lanzaboote 26 + locale-en-us 34 27 media-share 35 28 nix-config 29 + njust 30 + performance 36 31 podman 37 32 prometheus-node 33 + recipes 34 + ssh-keys 38 35 swap 39 36 syncthing 40 37 tailscale 38 + users 41 39 vps 42 40 zram 43 41 ··· 73 71 74 72 system.stateVersion = "25.11"; 75 73 76 - myAutoUpgrade.dates = "05:00"; 74 + system.autoUpgrade.dates = "05:00"; 77 75 78 76 myBackups.jobs = { 79 77 syncthing-sync = {
+10 -12
nix/hosts/jubilife.nix
··· 9 9 in { 10 10 flake.nixosConfigurations.jubilife = inputs.nixpkgs.lib.nixosSystem { 11 11 modules = with config.flake.modules.nixos; [ 12 - base 13 - fail2ban 14 - flake-url 15 - known-hosts 16 - locale-en-us 17 - njust 18 - recipes 19 - performance 20 - ssh-keys 21 - users 22 12 alloy 23 13 amd-cpu 24 14 arr 25 - auto-upgrade 26 15 b2-mounts 27 16 backups 17 + base 28 18 btrfs 29 19 caddy 20 + fail2ban 30 21 forgejo-runner 31 22 intel-gpu 32 23 k3s-node 24 + known-hosts 33 25 lanzaboote 26 + locale-en-us 34 27 nix-config 28 + njust 29 + performance 35 30 plex 36 31 podman 37 32 prometheus-node 38 33 qbittorrent 34 + recipes 35 + ssh-keys 39 36 swap 40 37 syncthing 41 38 tailscale 42 39 tautulli 40 + users 43 41 vps 44 42 zram 45 43 ··· 118 116 myDisko.installDrive = "/dev/disk/by-id/nvme-PNY_CS2130_1TB_SSD_PNY211821050701050CC"; 119 117 120 118 myArr.dataDir = "/mnt/Data"; 121 - myAutoUpgrade.dates = "04:15"; 119 + system.autoUpgrade.dates = "04:15"; 122 120 123 121 myB2Mounts = { 124 122 cacheDir = "/mnt/Data/.rclone-cache";
+8 -10
nix/hosts/pastoria.nix
··· 6 6 }: { 7 7 flake.nixosConfigurations.pastoria = inputs.nixpkgs.lib.nixosSystem { 8 8 modules = with config.flake.modules.nixos; [ 9 + alloy 10 + backups 9 11 base 10 12 fail2ban 11 - flake-url 13 + k3s-node 12 14 known-hosts 13 15 locale-en-us 16 + nix-config 14 17 njust 15 - recipes 16 18 performance 17 - ssh-keys 18 - users 19 - alloy 20 - auto-upgrade 21 - backups 22 - k3s-node 23 - nix-config 24 19 podman 25 20 prometheus-node 21 + recipes 22 + ssh-keys 26 23 swap 27 24 tailscale 25 + users 28 26 vps 29 27 zram 30 28 ··· 46 44 nixpkgs.hostPlatform = "x86_64-linux"; 47 45 system.stateVersion = "26.05"; 48 46 myDisko.installDrive = "/dev/sda"; 49 - myAutoUpgrade.dates = "01:45"; 47 + system.autoUpgrade.dates = "01:45"; 50 48 51 49 myK3s = { 52 50 role = "server";
+10 -12
nix/hosts/snowpoint.nix
··· 6 6 }: { 7 7 flake.nixosConfigurations.snowpoint = inputs.nixpkgs.lib.nixosSystem { 8 8 modules = with config.flake.modules.nixos; [ 9 - base 10 - fail2ban 11 - flake-url 12 - known-hosts 13 - locale-en-us 14 - njust 15 - recipes 16 - performance 17 - ssh-keys 18 - users 19 9 alloy 20 - auto-upgrade 21 10 b2-mounts 22 11 backups 12 + base 23 13 cachefilesd 24 14 data-share 15 + fail2ban 25 16 k3s-node 17 + known-hosts 18 + locale-en-us 26 19 media-share 27 20 nix-config 21 + njust 22 + performance 28 23 plex 29 24 prometheus-node 25 + recipes 26 + ssh-keys 30 27 swap 31 28 syncthing 32 29 tailscale 30 + users 33 31 vps 34 32 35 33 inputs.disko.nixosModules.disko ··· 108 106 }; 109 107 myDisko.installDrive = "/dev/vda"; 110 108 111 - myAutoUpgrade.dates = "03:30"; 109 + system.autoUpgrade.dates = "03:30"; 112 110 113 111 myB2Mounts.cacheDir = "/mnt/Backblaze/.rclone-cache"; 114 112
+8 -10
nix/hosts/solaceon.nix
··· 6 6 }: { 7 7 flake.nixosConfigurations.solaceon = inputs.nixpkgs.lib.nixosSystem { 8 8 modules = with config.flake.modules.nixos; [ 9 + alloy 10 + backups 9 11 base 10 12 fail2ban 11 - flake-url 13 + k3s-node 12 14 known-hosts 13 15 locale-en-us 16 + nix-config 14 17 njust 15 - recipes 16 18 performance 17 - ssh-keys 18 - users 19 - alloy 20 - auto-upgrade 21 - backups 22 - k3s-node 23 - nix-config 24 19 podman 25 20 prometheus-node 21 + recipes 22 + ssh-keys 26 23 swap 27 24 tailscale 25 + users 28 26 vps 29 27 zram 30 28 ··· 67 65 time.timeZone = "America/New_York"; 68 66 myDisko.installDrive = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_62292463"; 69 67 70 - myAutoUpgrade.dates = "02:00"; 68 + system.autoUpgrade.dates = "02:00"; 71 69 72 70 myK3s = { 73 71 role = "server";
-1
nix/hosts/twinleaf.nix
··· 6 6 }: { 7 7 flake.nixosConfigurations.twinleaf = inputs.nixpkgs.lib.nixosSystem { 8 8 modules = with config.flake.modules.nixos; [ 9 - flake-url 10 9 iso 11 10 nix-config 12 11 njust
+67 -41
nix/nixos/base.nix
··· 1 1 {self, ...}: { 2 2 flake.modules.nixos.base = { 3 3 config, 4 + lib, 4 5 pkgs, 5 6 ... 6 7 }: { 7 - environment = { 8 - etc."nixos".source = self; 8 + options.myFlakeUrl = lib.mkOption { 9 + type = lib.types.str; 10 + default = "github:alyraffauf/cute.haus"; 11 + description = "Default flake URL for this NixOS configuration."; 12 + }; 9 13 10 - systemPackages = with pkgs; [ 11 - (inxi.override {withRecommends = true;}) 12 - helix 13 - lm_sensors 14 - python314 15 - rclone 16 - wget 17 - zellij 18 - ]; 14 + config = { 15 + environment = { 16 + etc."nixos".source = self; 19 17 20 - variables = { 21 - FLAKE = config.myFlakeUrl; 22 - NH_FLAKE = config.myFlakeUrl; 18 + systemPackages = with pkgs; [ 19 + (inxi.override {withRecommends = true;}) 20 + helix 21 + lm_sensors 22 + python314 23 + rclone 24 + wget 25 + zellij 26 + ]; 27 + 28 + variables = { 29 + FLAKE = config.myFlakeUrl; 30 + NH_FLAKE = config.myFlakeUrl; 31 + }; 23 32 }; 24 - }; 25 33 26 - hardware.enableAllFirmware = true; 34 + hardware.enableAllFirmware = true; 35 + networking.networkmanager.enable = true; 36 + security.sudo-rs.enable = true; 27 37 28 - programs = { 29 - direnv = { 30 - enable = true; 31 - nix-direnv.enable = true; 32 - silent = true; 33 - }; 38 + programs = { 39 + direnv = { 40 + enable = true; 41 + nix-direnv.enable = true; 42 + silent = true; 43 + }; 34 44 35 - git.enable = true; 36 - htop.enable = true; 37 - nh.enable = true; 38 - }; 45 + git.enable = true; 46 + htop.enable = true; 47 + nh.enable = true; 48 + }; 39 49 40 - networking.networkmanager.enable = true; 41 - security.sudo-rs.enable = true; 50 + services = { 51 + fstrim.enable = true; 42 52 43 - services = { 44 - fstrim.enable = true; 53 + openssh = { 54 + enable = true; 55 + openFirewall = true; 56 + settings.PasswordAuthentication = false; 57 + }; 45 58 46 - openssh = { 47 - enable = true; 48 - openFirewall = true; 49 - settings.PasswordAuthentication = false; 59 + timesyncd.enable = true; 50 60 }; 51 61 52 - timesyncd.enable = true; 53 - }; 62 + sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; 54 63 55 - sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; 64 + system = { 65 + autoUpgrade = { 66 + enable = true; 67 + allowReboot = true; 68 + flags = ["--accept-flake-config"]; 69 + flake = config.myFlakeUrl; 70 + operation = "switch"; 71 + dates = "02:00"; 72 + randomizedDelaySec = "0"; 73 + persistent = true; 74 + 75 + rebootWindow = { 76 + lower = "02:00"; 77 + upper = "06:00"; 78 + }; 79 + }; 56 80 57 - system.configurationRevision = self.rev or self.dirtyRev or null; 81 + configurationRevision = self.rev or self.dirtyRev or null; 82 + }; 58 83 59 - systemd = { 60 - coredump.enable = false; 61 - enableEmergencyMode = false; 84 + systemd = { 85 + coredump.enable = false; 86 + enableEmergencyMode = false; 87 + }; 62 88 }; 63 89 }; 64 90 }
-9
nix/nixos/flake-url.nix
··· 1 - { 2 - flake.modules.nixos.flake-url = {lib, ...}: { 3 - options.myFlakeUrl = lib.mkOption { 4 - type = lib.types.str; 5 - default = "github:alyraffauf/cute.haus"; 6 - description = "Default flake URL for this NixOS configuration."; 7 - }; 8 - }; 9 - }
-44
nix/nixos/profiles/autoUpgrade.nix
··· 1 - { 2 - flake.modules.nixos.auto-upgrade = { 3 - config, 4 - lib, 5 - ... 6 - }: { 7 - options.myAutoUpgrade = { 8 - operation = lib.mkOption { 9 - type = lib.types.str; 10 - default = "switch"; 11 - description = "Operation to perform on auto-upgrade. Can be 'boot', 'switch', or 'test'."; 12 - }; 13 - 14 - dates = lib.mkOption { 15 - type = lib.types.str; 16 - default = "02:00"; 17 - description = "systemd OnCalendar expression for when the upgrade fires."; 18 - }; 19 - 20 - randomizedDelaySec = lib.mkOption { 21 - type = lib.types.str; 22 - default = "0"; 23 - description = "Random delay added on top of `dates`."; 24 - }; 25 - }; 26 - 27 - config = { 28 - system.autoUpgrade = { 29 - inherit (config.myAutoUpgrade) operation dates randomizedDelaySec; 30 - 31 - enable = true; 32 - allowReboot = true; 33 - flags = ["--accept-flake-config"]; 34 - flake = config.myFlakeUrl; 35 - persistent = true; 36 - 37 - rebootWindow = { 38 - lower = "02:00"; 39 - upper = "06:00"; 40 - }; 41 - }; 42 - }; 43 - }; 44 - }
-29
nix/nixos/programs/njust.nix
··· 8 8 cfg = config.myNjust; 9 9 10 10 defaultRecipes = { 11 - system = '' 12 - # Show system info 13 - [group('system')] 14 - info: 15 - @echo "Hostname: $(hostname)" 16 - @echo "NixOS Version: $(nixos-version)" 17 - @echo "Kernel: $(uname -r)" 18 - @echo "Generation: $(sudo nix-env --list-generations -p /nix/var/nix/profiles/system | tail -1 | awk '{print $1}')" 19 - @echo "Revision: $(nixos-version --json | jq -r '.configurationRevision // "unknown"')" 20 - ''; 21 - 22 - updates = '' 23 - # Update everything 24 - [group('system')] 25 - update: update-nixos update-nix-profile 26 - 27 - # Update NixOS system 28 - [group('nix')] 29 - update-nixos action="switch": 30 - @echo "Updating NixOS..." 31 - sudo nixos-rebuild {{action}} --flake "${config.myFlakeUrl}" 32 - 33 - # Update Nix user profile 34 - [group('nix')] 35 - update-nix-profile: 36 - @echo "Updating Nix user profile..." 37 - nix profile upgrade --all 38 - ''; 39 - 40 11 secureboot = '' 41 12 # Check Secure Boot status 42 13 [group('secureboot')]
+67 -65
nix/nixos/services/plex.nix
··· 1 1 {inputs, ...}: { 2 - flake.modules.nixos.plex = { 3 - config, 4 - lib, 5 - ... 6 - }: { 7 - options.myPlex.dataDir = lib.mkOption { 8 - description = "Data directory to use."; 9 - default = "/var/lib"; 10 - type = lib.types.str; 11 - }; 2 + flake.modules.nixos = { 3 + plex = { 4 + config, 5 + lib, 6 + ... 7 + }: { 8 + options.myPlex.dataDir = lib.mkOption { 9 + description = "Data directory to use."; 10 + default = "/var/lib"; 11 + type = lib.types.str; 12 + }; 12 13 13 - config = { 14 - services.plex = { 15 - enable = true; 16 - dataDir = "${config.myPlex.dataDir}/plex"; 14 + config = { 15 + services.plex = { 16 + enable = true; 17 + dataDir = "${config.myPlex.dataDir}/plex"; 17 18 18 - extraPlugins = [ 19 - (builtins.path { 20 - name = "Audnexus.bundle"; 21 - path = inputs.audnexus; 22 - }) 23 - (builtins.path { 24 - name = "Hama.bundle"; 25 - path = inputs.hama; 26 - }) 27 - ]; 19 + extraPlugins = [ 20 + (builtins.path { 21 + name = "Audnexus.bundle"; 22 + path = inputs.audnexus; 23 + }) 24 + (builtins.path { 25 + name = "Hama.bundle"; 26 + path = inputs.hama; 27 + }) 28 + ]; 28 29 29 - extraScanners = [ 30 - (builtins.path { 31 - name = "Absolute-Series-Scanner"; 32 - path = inputs.absolute; 33 - }) 34 - ]; 30 + extraScanners = [ 31 + (builtins.path { 32 + name = "Absolute-Series-Scanner"; 33 + path = inputs.absolute; 34 + }) 35 + ]; 35 36 36 - openFirewall = true; 37 - }; 37 + openFirewall = true; 38 + }; 38 39 39 - systemd.services.plex.serviceConfig.TimeoutStopSec = 15; 40 + systemd.services.plex.serviceConfig.TimeoutStopSec = 15; 41 + }; 40 42 }; 41 - }; 42 43 43 - flake.modules.nixos.tautulli = { 44 - services.tautulli = { 45 - enable = true; 46 - openFirewall = true; 44 + tautulli = { 45 + services.tautulli = { 46 + enable = true; 47 + openFirewall = true; 48 + }; 47 49 }; 48 - }; 49 50 50 - flake.modules.nixos.backups = { 51 - config, 52 - lib, 53 - pkgs, 54 - ... 55 - }: let 56 - stop = service: "${pkgs.systemd}/bin/systemctl stop ${service}"; 57 - start = service: "${pkgs.systemd}/bin/systemctl start ${service}"; 58 - in { 59 - config.myBackups.jobs = lib.mkMerge [ 60 - (lib.mkIf config.services.plex.enable { 61 - plex = { 62 - backupCleanupCommand = start "plex"; 63 - backupPrepareCommand = stop "plex"; 64 - exclude = ["${config.services.plex.dataDir}/Plex Media Server/Plug-in Support/Databases"]; 65 - paths = [config.services.plex.dataDir]; 66 - }; 67 - }) 51 + backups = { 52 + config, 53 + lib, 54 + pkgs, 55 + ... 56 + }: let 57 + stop = service: "${pkgs.systemd}/bin/systemctl stop ${service}"; 58 + start = service: "${pkgs.systemd}/bin/systemctl start ${service}"; 59 + in { 60 + config.myBackups.jobs = lib.mkMerge [ 61 + (lib.mkIf config.services.plex.enable { 62 + plex = { 63 + backupCleanupCommand = start "plex"; 64 + backupPrepareCommand = stop "plex"; 65 + exclude = ["${config.services.plex.dataDir}/Plex Media Server/Plug-in Support/Databases"]; 66 + paths = [config.services.plex.dataDir]; 67 + }; 68 + }) 68 69 69 - (lib.mkIf config.services.tautulli.enable { 70 - tautulli = { 71 - backupCleanupCommand = start "tautulli"; 72 - backupPrepareCommand = stop "tautulli"; 73 - paths = [config.services.tautulli.dataDir]; 74 - }; 75 - }) 76 - ]; 70 + (lib.mkIf config.services.tautulli.enable { 71 + tautulli = { 72 + backupCleanupCommand = start "tautulli"; 73 + backupPrepareCommand = stop "tautulli"; 74 + paths = [config.services.tautulli.dataDir]; 75 + }; 76 + }) 77 + ]; 78 + }; 77 79 }; 78 80 }