My NixOS config Part 3: Flake-Parts Crusaders nix.ladas552.me
hjem nix nixos impermanence flake-parts nvfetcher niri noctalia

trying to bring my VPS to life

Ladas552 effb2e36 a157bbba

+220 -33
+1
README.md
··· 25 - [NixOS-WSL](https://github.com/nix-community/NixOS-WSL) for Windows partition 26 - NixVM for testing, you shouldn't use it unless testing breaking changes 27 - NixIso for my portable NixOS image 28 ## Modular 29 I adopted [Dendritic layout](https://github.com/mightyiam/dendritic) for my config. 30 Making all files their own modules that I can import, and if module isn't imported, it doesn't exist. This way most of my config is fairy atomic and you can pop in and out modules as you wish.
··· 25 - [NixOS-WSL](https://github.com/nix-community/NixOS-WSL) for Windows partition 26 - NixVM for testing, you shouldn't use it unless testing breaking changes 27 - NixIso for my portable NixOS image 28 + - NixWool is my Hetzner cloud that runs [Tangled.sh](https://tangled.org/) knot 29 ## Modular 30 I adopted [Dendritic layout](https://github.com/mightyiam/dendritic) for my config. 31 Making all files their own modules that I can import, and if module isn't imported, it doesn't exist. This way most of my config is fairy atomic and you can pop in and out modules as you wish.
+15 -15
_sources/generated.json
··· 50 "pinned": false, 51 "src": { 52 "name": null, 53 - "sha256": "sha256-jFSLLDsHB/NiJqFmn8S+JpdM8iCy3Zgyq+8l4RkBecM=", 54 "type": "url", 55 - "url": "https://github.com/imputnet/helium-linux/releases/download/0.8.5.1/helium-0.8.5.1-x86_64.AppImage" 56 }, 57 - "version": "0.8.5.1" 58 }, 59 "impermanence": { 60 "cargoLock": null, ··· 141 }, 142 "nixos-hardware": { 143 "cargoLock": null, 144 - "date": "2026-02-12", 145 "extract": null, 146 "name": "nixos-hardware", 147 "passthru": null, ··· 151 "fetchSubmodules": false, 152 "leaveDotGit": false, 153 "name": null, 154 - "rev": "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b", 155 - "sha256": "sha256-nw5g+xl3veea+maxJ2/81tMEA/rPq9aF1H5XF35X+OE=", 156 "sparseCheckout": [], 157 "type": "git", 158 "url": "https://github.com/nixos/nixos-hardware" 159 }, 160 - "version": "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b" 161 }, 162 "nixos-wsl": { 163 "cargoLock": null, ··· 181 }, 182 "noctalia-dev": { 183 "cargoLock": null, 184 - "date": "2026-02-14", 185 "extract": null, 186 "name": "noctalia-dev", 187 "passthru": null, ··· 191 "fetchSubmodules": false, 192 "leaveDotGit": false, 193 "name": null, 194 - "rev": "a1329203910dcd8ef97fb5e4049c8f59b34f6c59", 195 - "sha256": "sha256-2AMnOoeXyoaIYp3/pFfDt5FOk9xnWL6lUWUFrRPzCJE=", 196 "sparseCheckout": [], 197 "type": "git", 198 "url": "https://github.com/noctalia-dev/noctalia-shell" 199 }, 200 - "version": "a1329203910dcd8ef97fb5e4049c8f59b34f6c59" 201 }, 202 "sops-nix": { 203 "cargoLock": null, 204 - "date": "2026-02-10", 205 "extract": null, 206 "name": "sops-nix", 207 "passthru": null, ··· 211 "fetchSubmodules": false, 212 "leaveDotGit": false, 213 "name": null, 214 - "rev": "8b89f44c2cc4581e402111d928869fe7ba9f7033", 215 - "sha256": "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc=", 216 "sparseCheckout": [], 217 "type": "git", 218 "url": "https://github.com/Mic92/sops-nix" 219 }, 220 - "version": "8b89f44c2cc4581e402111d928869fe7ba9f7033" 221 } 222 }
··· 50 "pinned": false, 51 "src": { 52 "name": null, 53 + "sha256": "sha256-0Kw8Ko41Gdz4xLn62riYAny99Hd0s7/75h8bz4LUuCE=", 54 "type": "url", 55 + "url": "https://github.com/imputnet/helium-linux/releases/download/0.9.1.1/helium-0.9.1.1-x86_64.AppImage" 56 }, 57 + "version": "0.9.1.1" 58 }, 59 "impermanence": { 60 "cargoLock": null, ··· 141 }, 142 "nixos-hardware": { 143 "cargoLock": null, 144 + "date": "2026-02-15", 145 "extract": null, 146 "name": "nixos-hardware", 147 "passthru": null, ··· 151 "fetchSubmodules": false, 152 "leaveDotGit": false, 153 "name": null, 154 + "rev": "531af1dbaee7cfdd7aed1e595ce418b7e2e99a80", 155 + "sha256": "sha256-ngIarpog/Hv5r9M1YyvsaaSUBCqtWqHl6pibq6n2ppo=", 156 "sparseCheckout": [], 157 "type": "git", 158 "url": "https://github.com/nixos/nixos-hardware" 159 }, 160 + "version": "531af1dbaee7cfdd7aed1e595ce418b7e2e99a80" 161 }, 162 "nixos-wsl": { 163 "cargoLock": null, ··· 181 }, 182 "noctalia-dev": { 183 "cargoLock": null, 184 + "date": "2026-02-15", 185 "extract": null, 186 "name": "noctalia-dev", 187 "passthru": null, ··· 191 "fetchSubmodules": false, 192 "leaveDotGit": false, 193 "name": null, 194 + "rev": "070c3b523c070d867a1715e8fbdcdbee0929a8cc", 195 + "sha256": "sha256-TzBAQwiGetyyLrRWPu783W6PHpI3glG4odt9HoGRIm4=", 196 "sparseCheckout": [], 197 "type": "git", 198 "url": "https://github.com/noctalia-dev/noctalia-shell" 199 }, 200 + "version": "070c3b523c070d867a1715e8fbdcdbee0929a8cc" 201 }, 202 "sops-nix": { 203 "cargoLock": null, 204 + "date": "2026-02-15", 205 "extract": null, 206 "name": "sops-nix", 207 "passthru": null, ··· 211 "fetchSubmodules": false, 212 "leaveDotGit": false, 213 "name": null, 214 + "rev": "2d0cf89b4404529778bc82de7e42b5754e0fe4fa", 215 + "sha256": "sha256-UFc4lfGBr+wJmwgDGJDn1cVD6DTr0/8TdronNUiyXlU=", 216 "sparseCheckout": [], 217 "type": "git", 218 "url": "https://github.com/Mic92/sops-nix" 219 }, 220 + "version": "2d0cf89b4404529778bc82de7e42b5754e0fe4fa" 221 } 222 }
+15 -15
_sources/generated.nix
··· 32 }; 33 helium = { 34 pname = "helium"; 35 - version = "0.8.5.1"; 36 src = fetchurl { 37 - url = "https://github.com/imputnet/helium-linux/releases/download/0.8.5.1/helium-0.8.5.1-x86_64.AppImage"; 38 - sha256 = "sha256-jFSLLDsHB/NiJqFmn8S+JpdM8iCy3Zgyq+8l4RkBecM="; 39 }; 40 }; 41 impermanence = { ··· 90 }; 91 nixos-hardware = { 92 pname = "nixos-hardware"; 93 - version = "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b"; 94 src = fetchgit { 95 url = "https://github.com/nixos/nixos-hardware"; 96 - rev = "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b"; 97 fetchSubmodules = false; 98 deepClone = false; 99 leaveDotGit = false; 100 sparseCheckout = [ ]; 101 - sha256 = "sha256-nw5g+xl3veea+maxJ2/81tMEA/rPq9aF1H5XF35X+OE="; 102 }; 103 - date = "2026-02-12"; 104 }; 105 nixos-wsl = { 106 pname = "nixos-wsl"; ··· 118 }; 119 noctalia-dev = { 120 pname = "noctalia-dev"; 121 - version = "a1329203910dcd8ef97fb5e4049c8f59b34f6c59"; 122 src = fetchgit { 123 url = "https://github.com/noctalia-dev/noctalia-shell"; 124 - rev = "a1329203910dcd8ef97fb5e4049c8f59b34f6c59"; 125 fetchSubmodules = false; 126 deepClone = false; 127 leaveDotGit = false; 128 sparseCheckout = [ ]; 129 - sha256 = "sha256-2AMnOoeXyoaIYp3/pFfDt5FOk9xnWL6lUWUFrRPzCJE="; 130 }; 131 - date = "2026-02-14"; 132 }; 133 sops-nix = { 134 pname = "sops-nix"; 135 - version = "8b89f44c2cc4581e402111d928869fe7ba9f7033"; 136 src = fetchgit { 137 url = "https://github.com/Mic92/sops-nix"; 138 - rev = "8b89f44c2cc4581e402111d928869fe7ba9f7033"; 139 fetchSubmodules = false; 140 deepClone = false; 141 leaveDotGit = false; 142 sparseCheckout = [ ]; 143 - sha256 = "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc="; 144 }; 145 - date = "2026-02-10"; 146 }; 147 }
··· 32 }; 33 helium = { 34 pname = "helium"; 35 + version = "0.9.1.1"; 36 src = fetchurl { 37 + url = "https://github.com/imputnet/helium-linux/releases/download/0.9.1.1/helium-0.9.1.1-x86_64.AppImage"; 38 + sha256 = "sha256-0Kw8Ko41Gdz4xLn62riYAny99Hd0s7/75h8bz4LUuCE="; 39 }; 40 }; 41 impermanence = { ··· 90 }; 91 nixos-hardware = { 92 pname = "nixos-hardware"; 93 + version = "531af1dbaee7cfdd7aed1e595ce418b7e2e99a80"; 94 src = fetchgit { 95 url = "https://github.com/nixos/nixos-hardware"; 96 + rev = "531af1dbaee7cfdd7aed1e595ce418b7e2e99a80"; 97 fetchSubmodules = false; 98 deepClone = false; 99 leaveDotGit = false; 100 sparseCheckout = [ ]; 101 + sha256 = "sha256-ngIarpog/Hv5r9M1YyvsaaSUBCqtWqHl6pibq6n2ppo="; 102 }; 103 + date = "2026-02-15"; 104 }; 105 nixos-wsl = { 106 pname = "nixos-wsl"; ··· 118 }; 119 noctalia-dev = { 120 pname = "noctalia-dev"; 121 + version = "070c3b523c070d867a1715e8fbdcdbee0929a8cc"; 122 src = fetchgit { 123 url = "https://github.com/noctalia-dev/noctalia-shell"; 124 + rev = "070c3b523c070d867a1715e8fbdcdbee0929a8cc"; 125 fetchSubmodules = false; 126 deepClone = false; 127 leaveDotGit = false; 128 sparseCheckout = [ ]; 129 + sha256 = "sha256-TzBAQwiGetyyLrRWPu783W6PHpI3glG4odt9HoGRIm4="; 130 }; 131 + date = "2026-02-15"; 132 }; 133 sops-nix = { 134 pname = "sops-nix"; 135 + version = "2d0cf89b4404529778bc82de7e42b5754e0fe4fa"; 136 src = fetchgit { 137 url = "https://github.com/Mic92/sops-nix"; 138 + rev = "2d0cf89b4404529778bc82de7e42b5754e0fe4fa"; 139 fetchSubmodules = false; 140 deepClone = false; 141 leaveDotGit = false; 142 sparseCheckout = [ ]; 143 + sha256 = "sha256-UFc4lfGBr+wJmwgDGJDn1cVD6DTr0/8TdronNUiyXlU="; 144 }; 145 + date = "2026-02-15"; 146 }; 147 }
+1 -1
modules/hjemModules/Terminals/git.nix
··· 11 init.defaultBranch = "master"; 12 gpg.format = "ssh"; 13 #it can't read it. permission error or something 14 - user.signingkey = "~/.ssh/NixToks.pub"; 15 # commit.gpgsign = true; 16 aliases = { 17 cm = "commit -m";
··· 11 init.defaultBranch = "master"; 12 gpg.format = "ssh"; 13 #it can't read it. permission error or something 14 + user.signingkey = "~/.ssh/NixToks"; 15 # commit.gpgsign = true; 16 aliases = { 17 cm = "commit -m";
+38
modules/hosts/NixWool/hardware-configuration.nix
···
··· 1 + { 2 + flake.modules.nixos.NixWool = 3 + { 4 + lib, 5 + modulesPath, 6 + ... 7 + }: 8 + { 9 + imports = [ 10 + (modulesPath + "/installer/scan/not-detected.nix") 11 + (modulesPath + "/profiles/qemu-guest.nix") 12 + ]; 13 + 14 + boot.initrd.availableKernelModules = [ 15 + "ahci" 16 + "virtio_pci" 17 + "sd_mod" 18 + "sr_mod" 19 + "xhci_pci" 20 + "virtio_scsi" 21 + ]; 22 + boot.initrd.kernelModules = [ ]; 23 + boot.kernelModules = [ "kvm-amd" ]; 24 + boot.extraModulePackages = [ ]; 25 + 26 + swapDevices = [ ]; 27 + 28 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 29 + # (the default) this is the recommended approach. When using systemd-networkd it's 30 + # still possible to use this option, but it's recommended to use it in conjunction 31 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 32 + networking.useDHCP = lib.mkDefault true; 33 + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; 34 + 35 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 36 + hardware.cpu.amd.updateMicrocode = true; 37 + }; 38 + }
+58
modules/hosts/NixWool/imports.nix
···
··· 1 + { config, ... }: 2 + let 3 + custom.meta = { 4 + hostname = "NixWool"; 5 + self = "/persist/home/${config.custom.meta.user}/Projects/my_repos/Flake-Ocean"; 6 + isTermux = false; 7 + norg = null; 8 + }; 9 + in 10 + { 11 + flake.modules.nixvim.NixWool.imports = [ { inherit custom; } ]; 12 + flake.modules.nvf.NixWool.imports = [ { inherit custom; } ]; 13 + flake.modules.nixos."hosts/NixWool".imports = 14 + with config.flake.modules.nixos; 15 + [ 16 + { inherit custom; } 17 + NixWool 18 + # Modules 19 + ## Games 20 + cache 21 + firewall 22 + general 23 + imp 24 + nh 25 + nix 26 + openssh 27 + sops 28 + tailscale 29 + zfs 30 + network-manager 31 + fish 32 + # Users 33 + root 34 + ladas552 35 + ] 36 + # Specific Home-Manager modules 37 + ++ [ 38 + { 39 + home-manager.users."${config.custom.meta.user}".imports = with config.flake.modules.homeManager; [ 40 + { inherit custom; } 41 + NixWool 42 + lf 43 + ]; 44 + } 45 + ] 46 + 47 + ++ [ 48 + { 49 + hjem.users."${config.custom.meta.user}".imports = with config.flake.modules.hjem; [ 50 + { inherit custom; } 51 + direnv 52 + git 53 + nvf 54 + fastfetch 55 + ]; 56 + } 57 + ]; 58 + }
+56
modules/hosts/NixWool/install.sh
···
··· 1 + # installation script for Hetzner VPS, I just loaded a standart nix iso in there 2 + # Stolen from @Jet https://github.com/Michael-C-Buckley/nixos/blob/master/modules/hosts/o1/tools/format.sh 3 + 4 + #!/usr/bin/env bash 5 + set -euo pipefail 6 + 7 + # ZFS Install Script for O1 (Oracle ARM instance) 8 + 9 + ZFS_OPTS="-o ashift=12 \ 10 + -O compression=zstd \ 11 + -O atime=off \ 12 + -O xattr=sa \ 13 + -O acltype=posixacl \ 14 + -O dnodesize=auto \ 15 + -O normalization=formD \ 16 + -O mountpoint=none" 17 + 18 + hostname="NixWool" 19 + 20 + read -rp "This will erase the drives, as you sure? [y/N]" confirm 21 + if [[ $confirm =~ ^[Yy]$ ]]; then 22 + echo "Proceeding..." 23 + else 24 + echo "Aborted." 25 + exit 1 26 + fi 27 + 28 + echo "Wiping drives..." 29 + # Wipe the NVMe 30 + wipefs -a /dev/sda 31 + sgdisk --zap-all /dev/sda 32 + 33 + echo "Formatting drives..." 34 + # Put boot on the NVMe then fill the rest with ZFS 35 + sgdisk -n1:1M:+512M -t1:EF00 -c1:"EFI System" /dev/sda 36 + sgdisk -n2:0:+4G -t2:8200 -c2:"Linux Swap" /dev/sda 37 + sgdisk -n3:0:0 -t3:BF01 -c3:"ZROOT" /dev/sda 38 + 39 + # Format the boot partition 40 + mkfs.vfat -F32 /dev/sda1 41 + 42 + # Create the pool on the drive, use reasonable settings 43 + echo "Creating zroot..." 44 + zpool create -f $ZFS_OPTS zroot /dev/sda3 45 + 46 + # Mount the drives and prepare for the install 47 + mkdir -p /mnt 48 + mkdir -p /mnt/{cache,nix,persist,tmp,boot} 49 + mount /dev/sda1 /mnt/boot 50 + 51 + # This create the zvols used in this cluster 52 + zfs create -o mountpoint=none zroot 53 + for zvol in "tmp" "nix" "cache" "persist"; do 54 + zfs create -o mountpoint=legacy zroot/$zvol 55 + mount -t zfs zroot/$zvol /mnt/$zvol 56 + done
+35
modules/hosts/NixWool/nixwool.nix
···
··· 1 + { 2 + flake.modules = { 3 + nixos.NixWool = 4 + { pkgs, lib, ... }: 5 + { 6 + # Standalone Packages 7 + environment.systemPackages = with pkgs; [ 8 + libqalculate 9 + lshw 10 + ]; 11 + 12 + # Environmental Variables 13 + environment.variables = { 14 + }; 15 + 16 + # ZFS needs it 17 + networking.hostId = "fcb8b0b0"; 18 + 19 + system.stateVersion = "26.05"; # Did you read the comment? 20 + 21 + # It's a 2 vCPU server 22 + nix.settings = { 23 + cores = lib.mkForce 1; 24 + max-jobs = lib.mkForce 1; 25 + }; 26 + 27 + custom.imp.home.directories = [ 28 + ]; 29 + }; 30 + homeManager.NixWool = { 31 + # Don't change 32 + home.stateVersion = "26.05"; # Please read the comment before changing. 33 + }; 34 + }; 35 + }
-1
nvfetcher.toml
··· 45 [nixos-hardware] 46 src.git = "https://github.com/nixos/nixos-hardware" 47 fetch.git = "https://github.com/nixos/nixos-hardware" 48 -
··· 45 [nixos-hardware] 46 src.git = "https://github.com/nixos/nixos-hardware" 47 fetch.git = "https://github.com/nixos/nixos-hardware"
+1 -1
pkgs/musnow.nix
··· 4 '' 5 #Dependencis 6 #fish,ffmpeg,mpd,mpc 7 - #get current's song url into 'crtl+v' clipvoard 8 ffprobe -loglevel error -show_entries format_tags=purl -of default=noprint_wrappers=1:nokey=1 ~/Music/(mpc -f %file% current) | wl-copy 9 '' 10
··· 4 '' 5 #Dependencis 6 #fish,ffmpeg,mpd,mpc 7 + #get current's song url into 'crtl+v' clipboard 8 ffprobe -loglevel error -show_entries format_tags=purl -of default=noprint_wrappers=1:nokey=1 ~/Music/(mpc -f %file% current) | wl-copy 9 '' 10