yep, more dotfiles

Compare changes

Choose any two refs to compare.

Changed files
+1462 -2249
apps
home-manager
hosts
lib
modules
nixos
pkgs
secrets
templates
blank
c
rust
rust-pkg
+1
.ignore
···
+
*.age
+3 -3
Justfile
···
home-switch profile *args:
home-manager switch --show-trace --flake .#{{profile}} {{args}}
-
switch-target profile host *args:
+
switch-target host *args:
nixos-rebuild switch \
-
--flake .#{{profile}} \
+
--flake .#{{host}} \
--target-host {{host}} \
-
--use-remote-sudo {{args}}
+
--sudo {{args}}
+1 -1
README.md
···
- `fragments`: Home Manager configuration fragments
- `options`: Home Manager configuration flags
- `profiles`: Base Home Manager configurations to build upon (e.g. `desktop`, `minimal`)
-
- `lib`: Additional custom lib and flake helpers
+
- `lib`: Additional custom lib and flake helpers
- `modules`: modules that fill a missing feature of NixOS or Home Manager
- `nixos`: NixOS related config
- `hardware/<hostname>.nix`: Device-specific settings like settings generated by `nixos-generate-config`
+1 -1
apps/flash-installer.nix
···
fi
echo "Flashing to $dev"
-
+
# Format selected disk
pv -tpreb "${isoPath}" | sudo dd bs=4M of="$dev" iflag=fullblock conv=notrunc,noerror oflag=sync
'';
+2 -1
configurations.nix
···
# Servers
"weird-row-server" = createSystem pkgs [
-
(system "weird-row-server" "server")
+
(host "weird-row-server")
(managedDiskLayout "ext4-hetzner" { device = "sda"; swapSize = 2; })
+
# TODO: should we keep a real user there?
(user "milomoisson" { description = "Milo Moisson"; profile = "server"; keys = keys.users; })
];
};
+183 -158
flake.lock
···
],
"nixpkgs": [
"nixpkgs"
-
]
+
],
+
"systems": "systems"
},
"locked": {
-
"lastModified": 1703089996,
-
"narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=",
+
"lastModified": 1762618334,
+
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
"owner": "ryantm",
"repo": "agenix",
-
"rev": "564595d0ad4be7277e07fa63b5a991b3c645655d",
+
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
"type": "github"
},
"original": {
"owner": "ryantm",
-
"ref": "0.15.0",
"repo": "agenix",
"type": "github"
}
···
"fromYaml": "fromYaml"
},
"locked": {
-
"lastModified": 1746562888,
-
"narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=",
+
"lastModified": 1755819240,
+
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens",
"repo": "base16.nix",
-
"rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89",
+
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github"
},
"original": {
···
"base16-helix": {
"flake": false,
"locked": {
-
"lastModified": 1748408240,
-
"narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
+
"lastModified": 1752979451,
+
"narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=",
"owner": "tinted-theming",
"repo": "base16-helix",
-
"rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
+
"rev": "27cf1e66e50abc622fb76a3019012dc07c678fac",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1673295039,
-
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
+
"lastModified": 1744478979,
+
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
"owner": "lnl7",
"repo": "nix-darwin",
-
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
+
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1736864502,
-
"narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=",
+
"lastModified": 1764627417,
+
"narHash": "sha256-D6xc3Rl8Ab6wucJWdvjNsGYGSxNjQHzRc2EZ6eeQ6l4=",
"owner": "nix-community",
"repo": "disko",
-
"rev": "0141aabed359f063de7413f80d906e1d98c0c123",
+
"rev": "5a88a6eceb8fd732b983e72b732f6f4b8269bef3",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "v1.11.0",
"repo": "disko",
"type": "github"
}
···
"firefox-gnome-theme": {
"flake": false,
"locked": {
-
"lastModified": 1748383148,
-
"narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=",
+
"lastModified": 1758112371,
+
"narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
-
"rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf",
+
"rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d",
"type": "github"
},
"original": {
···
"flake-compat": {
"flake": false,
"locked": {
-
"lastModified": 1747046372,
-
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
+
"lastModified": 1761588595,
+
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
"owner": "edolstra",
"repo": "flake-compat",
-
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
+
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
"type": "github"
},
"original": {
···
}
},
"flake-compat_2": {
+
"locked": {
+
"lastModified": 1761588595,
+
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
+
"type": "github"
+
},
+
"original": {
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"type": "github"
+
}
+
},
+
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1751685974,
···
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
-
"lanzaboote",
-
"nixpkgs"
-
]
-
},
-
"locked": {
-
"lastModified": 1754091436,
-
"narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=",
-
"owner": "hercules-ci",
-
"repo": "flake-parts",
-
"rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd",
-
"type": "github"
-
},
-
"original": {
-
"owner": "hercules-ci",
-
"repo": "flake-parts",
-
"type": "github"
-
}
-
},
-
"flake-parts_2": {
-
"inputs": {
-
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
-
"lastModified": 1749398372,
-
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
+
"lastModified": 1756770412,
+
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
-
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
+
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
···
},
"flake-utils": {
"inputs": {
-
"systems": "systems_2"
+
"systems": "systems_3"
},
"locked": {
"lastModified": 1694529238,
···
"rust-overlay": "rust-overlay"
},
"locked": {
-
"lastModified": 1747139554,
-
"narHash": "sha256-CpjdfdzyN0tAcBvtg9AQk+mDlNSb+NAZPUBpx/4VzvA=",
+
"lastModified": 1764804992,
+
"narHash": "sha256-6XIwDQwquGUfiwoTsukMyE6DcXW4Cx0fjE4cLTgQ7RM=",
"owner": "mrnossiom",
"repo": "git-leave",
-
"rev": "bf125663fa992097620ca034ec57ebd20ed50532",
+
"rev": "3c09ab6afafae76be08956cc7bf563f80e0f8394",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1709087332,
-
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+
"lastModified": 1762808025,
+
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
-
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
"type": "github"
},
"original": {
···
"inputs": {
"nixpkgs": [
"lanzaboote",
-
"pre-commit-hooks-nix",
+
"pre-commit",
"nixpkgs"
]
},
···
"gnome-shell": {
"flake": false,
"locked": {
-
"lastModified": 1744584021,
-
"narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=",
+
"host": "gitlab.gnome.org",
+
"lastModified": 1762869044,
+
"narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=",
"owner": "GNOME",
"repo": "gnome-shell",
-
"rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae",
-
"type": "github"
+
"rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad",
+
"type": "gitlab"
},
"original": {
+
"host": "gitlab.gnome.org",
"owner": "GNOME",
-
"ref": "48.1",
+
"ref": "gnome-49",
"repo": "gnome-shell",
-
"type": "github"
+
"type": "gitlab"
}
},
"gomod2nix": {
···
]
},
"locked": {
-
"lastModified": 1758463745,
-
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
+
"lastModified": 1764398914,
+
"narHash": "sha256-YPrpwlVQidzQlMh0OnquaJR+58rKe9YNnuRis293Ilo=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
+
"rev": "d0c5fdc48db6f19471b8adc954eca09194e68036",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "release-25.05",
+
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
···
"rust-overlay": "rust-overlay_2"
},
"locked": {
-
"lastModified": 1763289634,
-
"narHash": "sha256-NbaPpZFy3A14TIPGry09TGvO2u0/iu0lJE/Nmef6AiU=",
+
"lastModified": 1764455123,
+
"narHash": "sha256-ePlZ3OHBLTRlRa9zs2IeHNA8CuiMLyu5ZUzxoGI5Hp0=",
"owner": "pixilie",
"repo": "hypixel-bank-tracker",
-
"rev": "d8907749d733f7dd5d9e08f4c4b69c0f55bf1935",
+
"rev": "8e4e91b1a8fa264895fa40dda93c3363be33a958",
"type": "github"
},
"original": {
···
"lanzaboote": {
"inputs": {
"crane": "crane",
-
"flake-compat": "flake-compat",
-
"flake-parts": "flake-parts",
"nixpkgs": [
"unixpkgs"
],
-
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
+
"pre-commit": "pre-commit",
"rust-overlay": "rust-overlay_3"
},
"locked": {
-
"lastModified": 1762205063,
-
"narHash": "sha256-If6vQ+KvtKs3ARBO9G3l+4wFSCYtRBrwX1z+I+B61wQ=",
+
"lastModified": 1764622702,
+
"narHash": "sha256-HggOVvg2U3EwT44wPHEwFKromf9qR9rTqfV1i3q7rYs=",
"owner": "nix-community",
"repo": "lanzaboote",
-
"rev": "88b8a563ff5704f4e8d8e5118fb911fa2110ca05",
+
"rev": "6242b3b2b5e5afcf329027ed4eb5fa6e2eab10f1",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "v0.4.3",
"repo": "lanzaboote",
"type": "github"
}
···
"url": "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip"
}
},
+
"nix-alien": {
+
"inputs": {
+
"flake-compat": "flake-compat_2",
+
"nix-index-database": "nix-index-database",
+
"nixpkgs": [
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1764061716,
+
"narHash": "sha256-xKnIoMPv2kIsWhjRhJayqMWU2xkjeq2pyPmR1dLFPHs=",
+
"owner": "thiagokokada",
+
"repo": "nix-alien",
+
"rev": "9bc9c1ab671eb1b610f549e15bc0b750ab987409",
+
"type": "github"
+
},
+
"original": {
+
"owner": "thiagokokada",
+
"repo": "nix-alien",
+
"type": "github"
+
}
+
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
···
]
},
"locked": {
-
"lastModified": 1762912391,
-
"narHash": "sha256-4hpBE7bGd24SfD28rzMdUGXsLsNEYxCCrTipFdoqoNM=",
-
"owner": "LnL7",
+
"lastModified": 1764161084,
+
"narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=",
+
"owner": "nix-darwin",
"repo": "nix-darwin",
-
"rev": "d76299b2cd01837c4c271a7b5186e3d5d8ebd126",
+
"rev": "e95de00a471d07435e0527ff4db092c84998698e",
"type": "github"
},
"original": {
-
"owner": "LnL7",
-
"ref": "nix-darwin-25.05",
+
"owner": "nix-darwin",
+
"ref": "nix-darwin-25.11",
"repo": "nix-darwin",
"type": "github"
}
},
+
"nix-index-database": {
+
"inputs": {
+
"nixpkgs": [
+
"nix-alien",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1762660502,
+
"narHash": "sha256-C9F1C31ys0V7mnp4EcDy7L1cLZw/sCTEXqqTtGnvu08=",
+
"owner": "nix-community",
+
"repo": "nix-index-database",
+
"rev": "15c5451c63f4c612874a43846bfe3fa828b03eee",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "nix-index-database",
+
"type": "github"
+
}
+
},
"nixos-hardware": {
"locked": {
-
"lastModified": 1762847253,
-
"narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=",
+
"lastModified": 1764440730,
+
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
"owner": "nixos",
"repo": "nixos-hardware",
-
"rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9",
+
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
-
"lastModified": 1763049705,
-
"narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=",
+
"lastModified": 1764406085,
+
"narHash": "sha256-CYbMp8hwuOf4umokSNp+t1s4Hjd4vxXq4S5CD+xvgNs=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "3acb677ea67d4c6218f33de0db0955f116b7588c",
+
"rev": "9561691c9f450fad7c3526916e1c4f44be0d1192",
"type": "github"
},
"original": {
"owner": "nixos",
-
"ref": "nixos-25.05",
+
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
···
"nixpkgs": [
"stylix",
"nixpkgs"
-
],
-
"treefmt-nix": "treefmt-nix"
+
]
},
"locked": {
-
"lastModified": 1751320053,
-
"narHash": "sha256-3m6RMw0FbbaUUa01PNaMLoO7D99aBClmY5ed9V3vz+0=",
+
"lastModified": 1758998580,
+
"narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=",
"owner": "nix-community",
"repo": "NUR",
-
"rev": "cbde1735782f9c2bb2c63d5e05fba171a14a4670",
+
"rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728",
"type": "github"
},
"original": {
···
"type": "github"
}
},
-
"pre-commit-hooks-nix": {
+
"pre-commit": {
"inputs": {
-
"flake-compat": [
-
"lanzaboote",
-
"flake-compat"
-
],
+
"flake-compat": "flake-compat",
"gitignore": "gitignore_3",
"nixpkgs": [
"lanzaboote",
···
]
},
"locked": {
-
"lastModified": 1750779888,
-
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
+
"lastModified": 1763988335,
+
"narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
-
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
+
"rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce",
"type": "github"
},
"original": {
···
"home-manager": "home-manager",
"hypixel-bank-tracker": "hypixel-bank-tracker",
"lanzaboote": "lanzaboote",
+
"nix-alien": "nix-alien",
"nix-darwin": "nix-darwin",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
···
]
},
"locked": {
-
"lastModified": 1744599145,
-
"narHash": "sha256-yzaDPkJwZdUtRj/dzdOeB74yryWzpngYaD7BedqFKk8=",
+
"lastModified": 1764557621,
+
"narHash": "sha256-kX5PoY8hQZ80+amMQgOO9t8Tc1JZ70gYRnzaVD4AA+o=",
"owner": "oxalica",
"repo": "rust-overlay",
-
"rev": "fd6795d3d28f956de01a0458b6fa7baae5c793b4",
+
"rev": "93316876c2229460a5d6f5f052766cc4cef538ce",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1762737305,
-
"narHash": "sha256-5zN6jJ6KKBGiJeK3Q4+afZfJU7VyyUgehOAA3zYegTc=",
+
"lastModified": 1764205213,
+
"narHash": "sha256-VWKPkM4m5kGgJ0HY1WKfvlPkKka6tYwUR8snetAFTu8=",
"owner": "nix-community",
"repo": "srvos",
-
"rev": "c04379f95fca70b38cdd45a1a7affe6d4226912b",
+
"rev": "8b90cbaadae462563297a2d08870cccfd986ca28",
"type": "github"
},
"original": {
···
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
-
"flake-parts": "flake-parts_2",
+
"flake-parts": "flake-parts",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": "nur",
-
"systems": "systems",
+
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
···
"tinted-zed": "tinted-zed"
},
"locked": {
-
"lastModified": 1762295027,
-
"narHash": "sha256-5z5cGrp9F8g8iyQrM8WkB6pAwP4AaicljKZ15gx+X9Y=",
+
"lastModified": 1764193603,
+
"narHash": "sha256-guX30TWe8HRG2qPFiM9893F2uTw4B8D/xkE6Mq7MiYg=",
"owner": "nix-community",
"repo": "stylix",
-
"rev": "91b9a270523361268ba6a8772152fde31103869f",
+
"rev": "9bf8725a3d65b3ff0ba68ce13779657f5095e36b",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "release-25.05",
+
"ref": "release-25.11",
"repo": "stylix",
"type": "github"
}
···
"type": "github"
}
},
+
"systems_3": {
+
"locked": {
+
"lastModified": 1681028828,
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+
"owner": "nix-systems",
+
"repo": "default",
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-systems",
+
"repo": "default",
+
"type": "github"
+
}
+
},
"tangled": {
"inputs": {
"actor-typeahead-src": "actor-typeahead-src",
-
"flake-compat": "flake-compat_2",
+
"flake-compat": "flake-compat_3",
"gomod2nix": "gomod2nix",
"htmx-src": "htmx-src",
"htmx-ws-src": "htmx-ws-src",
···
"sqlite-lib-src": "sqlite-lib-src"
},
"locked": {
-
"lastModified": 1763089726,
-
"narHash": "sha256-lRTZLRcqWpVf6CzJmvg+ggp/YWWasT4u2lFKIiIopoM=",
+
"lastModified": 1764005195,
+
"narHash": "sha256-PzuWiW/nMxwQTX0i1bHwGazQF4ptLNI9OGwpmhDb9i0=",
"ref": "refs/heads/master",
-
"rev": "3eb9cefd98d13ab9864abb2e394fc41f89ffd923",
-
"revCount": 1660,
+
"rev": "7358ec6edfa4d17b8b8f543d99e83a4705901148",
+
"revCount": 1687,
"type": "git",
-
"url": "https://tangled.org/@tangled.org/core"
+
"url": "https://tangled.org/tangled.org/core"
},
"original": {
"type": "git",
-
"url": "https://tangled.org/@tangled.org/core"
+
"url": "https://tangled.org/tangled.org/core"
}
},
"tinted-foot": {
···
"tinted-schemes": {
"flake": false,
"locked": {
-
"lastModified": 1750770351,
-
"narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=",
+
"lastModified": 1757716333,
+
"narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=",
"owner": "tinted-theming",
"repo": "schemes",
-
"rev": "5a775c6ffd6e6125947b393872cde95867d85a2a",
+
"rev": "317a5e10c35825a6c905d912e480dfe8e71c7559",
"type": "github"
},
"original": {
···
"tinted-tmux": {
"flake": false,
"locked": {
-
"lastModified": 1751159871,
-
"narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=",
+
"lastModified": 1757811970,
+
"narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
-
"rev": "bded5e24407cec9d01bd47a317d15b9223a1546c",
+
"rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e",
"type": "github"
},
"original": {
···
"tinted-zed": {
"flake": false,
"locked": {
-
"lastModified": 1751158968,
-
"narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=",
+
"lastModified": 1757811247,
+
"narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=",
"owner": "tinted-theming",
"repo": "base16-zed",
-
"rev": "86a470d94204f7652b906ab0d378e4231a5b3384",
+
"rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e",
"type": "github"
},
"original": {
···
"type": "github"
},
-
"treefmt-nix": {
-
"inputs": {
-
"nixpkgs": [
-
"stylix",
-
"nur",
-
"nixpkgs"
-
]
-
},
-
"locked": {
-
"lastModified": 1733222881,
-
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
-
"owner": "numtide",
-
"repo": "treefmt-nix",
-
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
-
"type": "github"
-
},
-
"original": {
-
"owner": "numtide",
-
"repo": "treefmt-nix",
-
"type": "github"
-
}
-
},
"unixpkgs": {
"locked": {
-
"lastModified": 1762977756,
-
"narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=",
+
"lastModified": 1764950072,
+
"narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55",
+
"rev": "f61125a668a320878494449750330ca58b78c557",
"type": "github"
},
"original": {
···
},
"locked": {
-
"lastModified": 1763097615,
-
"narHash": "sha256-qxpsf2FVzXrN0WDWRgeBz7RJ5vjHNFDy8oLqbC6gU3Y=",
+
"lastModified": 1764414951,
+
"narHash": "sha256-pZ2m2JmTTMyqiKB8WSigsSvAeoShI6OSRhzBuRO9SVY=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
-
"rev": "479ca480bf531285e88006aa1c70fd3bb5529f3d",
+
"rev": "10d2aa53ada9b14f6df2f9877d6a057f0a2b262f",
"type": "github"
},
"original": {
+15 -12
flake.nix
···
description = "NixOS and Home Manager configuration for Milo's laptops";
inputs = {
-
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
unixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
-
home-manager.url = "github:nix-community/home-manager/release-25.05";
+
home-manager.url = "github:nix-community/home-manager/release-25.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
-
nix-darwin.url = "github:LnL7/nix-darwin/nix-darwin-25.05";
+
nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
-
stylix.url = "github:nix-community/stylix/release-25.05";
+
stylix.url = "github:nix-community/stylix/release-25.11";
stylix.inputs.nixpkgs.follows = "nixpkgs";
## Miscellaneous
-
agenix.url = "github:ryantm/agenix/0.15.0";
+
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.home-manager.follows = "home-manager";
-
disko.url = "github:nix-community/disko/v1.11.0";
+
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:nixos/nixos-hardware";
-
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.3";
+
lanzaboote.url = "github:nix-community/lanzaboote";
lanzaboote.inputs.nixpkgs.follows = "unixpkgs";
srvos.url = "github:nix-community/srvos";
···
hypixel-bank-tracker.url = "github:pixilie/hypixel-bank-tracker";
hypixel-bank-tracker.inputs.nixpkgs.follows = "nixpkgs";
-
tangled.url = "git+https://tangled.org/@tangled.org/core";
+
nix-alien.url = "github:thiagokokada/nix-alien";
+
nix-alien.inputs.nixpkgs.follows = "nixpkgs";
+
+
tangled.url = "git+https://tangled.org/tangled.org/core";
tangled.inputs.nixpkgs.follows = "unixpkgs";
wakatime-ls.url = "github:mrnossiom/wakatime-ls";
···
inherit (flake-lib) forAllSystems;
flake-lib = import ./lib/flake (nixpkgs // { inherit self; });
-
-
forAllPkgs = func: forAllSystems (system: func pkgs.${system});
# This should be the only constructed nixpkgs instances in this flake
-
pkgs = forAllSystems (system: (import nixpkgs {
+
allPkgs = forAllSystems (system: (import nixpkgs {
inherit system;
config.allowUnfreePredicate = import ./lib/unfree.nix { lib = nixpkgs.lib; };
overlays = [ outputs.overlays.all ];
}));
+
+
forAllPkgs = func: forAllSystems (system: func allPkgs.${system});
in
{
formatter = forAllPkgs (pkgs: pkgs.nixpkgs-fmt);
···
lib = forAllPkgs (import ./lib);
templates = import ./templates;
-
apps = forAllPkgs (import ./apps { pkgs-per-system = pkgs; });
+
apps = forAllPkgs (import ./apps { pkgs-per-system = allPkgs; });
devShells = forAllPkgs (import ./shells.nix);
overlays = import ./overlays (nixpkgs // { inherit self; });
packages = forAllPkgs (import ./pkgs);
+4
home-manager/fragments/firefox.nix
···
enable = false;
profileNames = [ "default" ];
};
+
stylix.targets.zen-browser = {
+
enable = false;
+
profileNames = [ "default" ];
+
};
programs.zen-browser = {
enable = true;
+57 -53
home-manager/fragments/git.nix
···
'';
config = lib.mkIf cfg.enable {
-
assertions = [
-
{ assertion = config.local.fragment.agenix.enable; message = "`git` fragment depends on `agenix` fragment"; }
-
];
-
home.sessionVariables = {
# Disable annoying warning message
GIT_DISCOVERY_ACROSS_FILESYSTEM = 0;
···
enable = true;
lfs.enable = true;
-
userName = "Milo Moisson";
-
# TODO: this email should be behind a secret or at least a config
-
userEmail = "milo@wiro.world";
-
signing.signByDefault = true;
signing.key = "~/.ssh/id_ed25519.pub";
···
"result"
];
-
aliases = {
-
b = "branch --all";
-
brm = "branch --delete";
+
settings = {
+
user = {
+
name = "Milo Moisson";
+
# TODO: this email should be behind a secret or at least a config
+
email = "milo@wiro.world";
+
};
-
ll = "log --graph --oneline --pretty=custom";
-
lla = "log --graph --oneline --pretty=custom --all";
-
last = "log -1 HEAD --stat";
+
alias = {
+
b = "branch --all";
+
brm = "branch --delete";
-
st = "status --short --branch";
+
ll = "log --graph --oneline --pretty=custom";
+
lla = "log --graph --oneline --pretty=custom --all";
+
last = "log -1 HEAD --stat";
-
cm = "commit --message";
-
oups = "commit --amend";
+
st = "status --short --branch";
-
ui = "!lazygit";
+
cm = "commit --message";
+
oups = "commit --amend";
-
rv = "remote --verbose";
+
ui = "!lazygit";
-
ri = "rebase --interactive";
-
ris = "!git ri $(git slc)";
-
rc = "rebase --continue";
-
rs = "rebase --skip";
-
ra = "rebase --abort";
+
rv = "remote --verbose";
-
# Select commit
-
slc = "!git log --oneline --pretty=custom | fzf | awk '{printf $1}'";
+
ri = "rebase --interactive";
+
ris = "!git ri $(git slc)";
+
rc = "rebase --continue";
+
rs = "rebase --skip";
+
ra = "rebase --abort";
-
a = "add";
-
al = "add --all";
-
ac = "add .";
-
ap = "add --patch";
+
# Select commit
+
slc = "!git log --oneline --pretty=custom | fzf | awk '{printf $1}'";
-
pu = "push";
-
put = "push --follow-tags";
-
puf = "push --force-with-lease";
-
pl = "pull";
+
a = "add";
+
al = "add --all";
+
ac = "add .";
+
ap = "add --patch";
-
f = "fetch";
+
pu = "push";
+
put = "push --follow-tags";
+
puf = "push --force-with-lease";
+
pl = "pull";
-
s = "switch";
-
sc = "switch --create";
+
f = "fetch";
-
ck = "checkout";
+
s = "switch";
+
sc = "switch --create";
-
cp = "cherry-pick";
+
ck = "checkout";
-
df = "diff";
-
dfs = "diff --staged";
-
dfc = "diff --cached";
+
cp = "cherry-pick";
+
+
df = "diff";
+
dfs = "diff --staged";
+
dfc = "diff --cached";
-
m = "merge";
+
m = "merge";
-
rms = "restore --staged";
-
res = "restore";
+
rms = "restore --staged";
+
res = "restore";
-
sh = "stash";
-
shl = "stash list";
-
sha = "stash apply";
-
shp = "stash pop";
-
};
+
sh = "stash";
+
shl = "stash list";
+
sha = "stash apply";
+
shp = "stash pop";
+
};
-
extraConfig = {
fetch.prune = true;
color.ui = true;
init.defaultBranch = "main";
···
"credentials \"https://github.com\"".helper = "!${lib.getExe pkgs.gh} auth git-credential";
# TODO: change to $PROJECTS env var?
-
leaveTool.defaultFolder = "~/Development";
+
leaveTool = {
+
defaultFolder = "${config.home.homeDirectory}/Development";
+
checks = [ "dirty" "ahead-branches" ];
+
};
};
};
···
showCommandLog = false;
border = "single";
};
+
git = {
-
paging.externalDiffCommand = "difft --color=always";
+
pagers = [
+
{ externalDiffCommand = "difft --color=always"; }
+
];
};
# to be declarative or not to be declarative?
-1
home-manager/fragments/helix.nix
···
};
extraPackages = with pkgs; [
-
ansible-language-server
clang-tools
gopls
kotlin-language-server
+2 -2
home-manager/fragments/jujutsu.nix
···
signing = {
behavior = "own";
backend = "ssh";
-
key = keys.milomoisson;
-
+
key = keys.milo-ed25519;
git.sign-on-push = true;
};
···
templates = {
log = "custom_log_compact";
+
git_push_bookmark = ''"push-" ++ change_id.short()'';
};
ui = {
+18 -14
home-manager/fragments/shell.nix
···
{ config
, lib
, pkgs
+
, upkgs
, lpkgs
, isDarwin
···
git_status.disabled = true;
nix_shell = {
-
format = "via [$symbol$state]($style) "; # Remove nix shell name
+
# remove nix shell name
+
format = "via [$symbol]($style)";
symbol = " ";
};
};
···
programs.direnv = {
enable = true;
silent = true;
+
nix-direnv.enable = true;
-
};
-
programs.nushell = {
-
enable = true;
-
-
extraConfig = ''
-
$env.config = {
-
show_banner: false,
-
}
+
stdlib = ''
+
use angrr
'';
};
+
# TODO: depend on osConfig
+
xdg.configFile."direnv/lib/angrr.sh".text = ''
+
use_angrr() {
+
layout_dir="$(direnv_layout_dir)"
+
log_status "angrr: touch GC roots $layout_dir"
+
RUST_LOG="''${ANGRR_DIRENV_LOG:-angrr=error}" ${lib.getExe upkgs.angrr} touch "$layout_dir" --silent
+
}
+
'';
programs.zoxide = {
enable = true;
···
# This is also a more pure version than using `__fish_ls_*` variables
# that depends on fish internal ls wrappers and can be overridden by
# bad configuration. (e.g. NixOS `environment.shellAliases` default)
-
ls = "${lib.getExe pkgs.eza} --color=auto --icons=auto --hyperlink";
+
ls = "${lib.getExe upkgs.lsr}";
pasters = "${lib.getExe pkgs.curl} --data-binary @- https://paste.rs/";
···
tp = "trash-put";
# Listing utilities
-
l = "ls -aF";
-
ll = "ls -lhaF";
-
tree = "ls -T";
+
l = "ls -A1";
+
ll = "ls -Al";
# Nix-related
ur = " unlink result";
···
'';
# Quickly explore a derivation (using registry syntax)
-
# e.g. `cdd nixpkgs#fontforge` or `cdd unixpkgs#fontforge`
+
# e.g. `cdd nixpkgs#fontforge` or `cdd unixpkgs#fontforge`
cdd = "cd (nix build --no-link --print-out-paths $argv | ${lib.getExe pkgs.fzf})";
} // lib.optionalAttrs (!flags.onlyCached) {
# Quickly get outta here to test something
+5 -1
home-manager/fragments/stylix.nix
···
cfg = config.local.fragment.stylix;
in
{
-
imports = [ stylix.homeModules.stylix ];
+
imports = [
+
stylix.homeModules.stylix
+
# issues a warning because we use `useGlobalPkgs`
+
{ config.stylix.overlays.enable = false; }
+
];
options.local.fragment.stylix.enable = lib.mkEnableOption ''
Stylix related
+9 -8
home-manager/fragments/sway.nix
···
-
{ self
-
, config
+
{ config
, lib
, pkgs
···
}:
let
-
inherit (self.outputs) homeManagerModules;
-
cfg = config.local.fragment.sway;
cfg-sway = config.wayland.windowManager.sway.config;
workspacesRange = lib.zipListsWith (key-idx: workspace-idx: { inherit key-idx workspace-idx; }) [ 1 2 3 4 5 6 7 8 9 0 ] (lib.range 1 10);
in
{
-
imports = [
-
homeManagerModules.wl-clip-persist
-
];
-
options.local.fragment.sway.enable = lib.mkEnableOption ''
Sway related
'';
···
repeat_rate = toString 30;
};
+
"type:touchpad" = {
+
dwt = "enabled";
+
tap = "enabled";
+
tap_button_map = "lrm";
+
};
+
# Split keyboard also acts as a mouse
# "type:touchpad" = { events = "disabled_on_external_mouse"; };
···
rm $tmpimg
''}";
+
+
"${modifier}+t" = ''input "type:touch" events toggle'';
"${modifier}+${cfg-sway.left}" = "focus left";
"${modifier}+${cfg-sway.down}" = "focus down";
+3 -2
home-manager/fragments/tools.nix
···
csvlens
delta
dogdns
-
du-dust
+
dust
encfs
fastfetch
fd
ffmpeg
file
fzf
+
gemini-cli
inetutils
jq
just
···
otree
ouch
parallel
+
perf
pv
restic
ripgrep
···
uni
unzip
vlock
-
wcurl
wormhole-rs
]) ++ lib.optionals (!flags.onlyCached) [ ];
+1 -1
home-manager/fragments/waybar.nix
···
.modules-right widget .module {
padding: 0 1rem;
-
color: @base07;
+
color: @base07;
}
/* Round first and last child of left, right and center modules. Disable rounding on the sides*/
+2
home-manager/fragments/xdg-mime.nix
···
{ assertion = lib.lists.count (drv: (drv.pname or "") == pkgs.nautilus.pname) config.home.packages > 0; message = "`xdg-mime` fragment depends on `nautilus` program"; }
];
+
xdg.enable = true;
+
xdg.mimeApps = {
enable = true;
+6 -1
home-manager/profiles/desktop.nix
···
transmission_4-gtk
wdisplays
wireshark
+
zulip
# Needed for libreoffice spellchecking
hunspell
···
programs.go = {
enable = true;
-
goPath = ".local/share/go";
+
env.GOPATH = "${config.home.homeDirectory}/.local/share/go";
};
programs.gpg = {
···
enableFishIntegration = false;
enableZshIntegration = false;
};
+
+
programs.ssh.enableDefaultConfig = false;
+
+
services.tailscale-systray.enable = true;
};
}
+163
hosts/weird-row-server/authelia.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
authelia-port = 3008;
+
authelia-hostname = "auth.wiro.world";
+
+
authelia-metrics-port = 9004;
+
headscale-hostname = "headscale.wiro.world";
+
grafana-hostname = "console.net.wiro.world";
+
miniflux-hostname = "news.wiro.world";
+
in
+
{
+
config = {
+
age.secrets.authelia-jwt-secret = { file = secrets/authelia-jwt-secret.age; owner = config.services.authelia.instances.main.user; };
+
age.secrets.authelia-issuer-private-key = { file = secrets/authelia-issuer-private-key.age; owner = config.services.authelia.instances.main.user; };
+
age.secrets.authelia-storage-key = { file = secrets/authelia-storage-key.age; owner = config.services.authelia.instances.main.user; };
+
age.secrets.authelia-ldap-password = { file = secrets/authelia-ldap-password.age; owner = config.services.authelia.instances.main.user; };
+
age.secrets.authelia-smtp-password = { file = secrets/authelia-smtp-password.age; owner = config.services.authelia.instances.main.user; };
+
services.authelia.instances.main = {
+
enable = true;
+
+
secrets = {
+
jwtSecretFile = config.age.secrets.authelia-jwt-secret.path;
+
oidcIssuerPrivateKeyFile = config.age.secrets.authelia-issuer-private-key.path;
+
storageEncryptionKeyFile = config.age.secrets.authelia-storage-key.path;
+
};
+
environmentVariables = {
+
AUTHELIA_AUTHENTICATION_BACKEND_LDAP_PASSWORD_FILE = config.age.secrets.authelia-ldap-password.path;
+
AUTHELIA_NOTIFIER_SMTP_PASSWORD_FILE = config.age.secrets.authelia-smtp-password.path;
+
};
+
settings = {
+
server.address = "localhost:${toString authelia-port}";
+
storage.local.path = "/var/lib/authelia-main/db.sqlite3";
+
telemetry.metrics = {
+
enabled = true;
+
address = "tcp://:${toString authelia-metrics-port}/metrics";
+
};
+
+
session = {
+
cookies = [{
+
domain = "wiro.world";
+
authelia_url = "https://${authelia-hostname}";
+
default_redirection_url = "https://wiro.world";
+
}];
+
};
+
+
authentication_backend.ldap = {
+
address = "ldap://localhost:3890";
+
timeout = "5m"; # replace with systemd dependency
+
+
user = "uid=authelia,ou=people,dc=wiro,dc=world";
+
# Set in `AUTHELIA_AUTHENTICATION_BACKEND_LDAP_PASSWORD_FILE`.
+
# password = "";
+
+
base_dn = "dc=wiro,dc=world";
+
users_filter = "(&(|({username_attribute}={input})({mail_attribute}={input}))(objectClass=person))";
+
additional_users_dn = "ou=people";
+
groups_filter = "(&(member={dn})(objectClass=groupOfNames))";
+
additional_groups_dn = "ou=groups";
+
+
attributes = {
+
username = "uid";
+
display_name = "cn";
+
given_name = "givenname";
+
family_name = "last_name";
+
mail = "mail";
+
picture = "avatar";
+
+
group_name = "cn";
+
};
+
};
+
+
access_control = {
+
default_policy = "deny";
+
# Rules are sequential and do not apply to OIDC
+
rules = [
+
{
+
domain = "headscale.wiro.world";
+
policy = "two_factor";
+
+
}
+
{
+
domain = "news.wiro.world";
+
policy = "one_factor";
+
+
subject = [ [ "group:miniflux" "oauth2:client:miniflux" ] ];
+
}
+
{
+
domain = "*.wiro.world";
+
policy = "two_factor";
+
}
+
];
+
};
+
+
identity_providers.oidc = {
+
enforce_pkce = "always";
+
+
authorization_policies =
+
let
+
mkStrictPolicy = policy: subject:
+
{ default_policy = "deny"; rules = [{ inherit policy subject; }]; };
+
in
+
{
+
headscale = mkStrictPolicy "two_factor" [ "group:headscale" ];
+
tailscale = mkStrictPolicy "two_factor" [ "group:headscale" ];
+
grafana = mkStrictPolicy "one_factor" [ "group:grafana" ];
+
miniflux = mkStrictPolicy "one_factor" [ "group:miniflux" ];
+
};
+
+
claims_policies.headscale = { id_token = [ "email" "name" "preferred_username" "picture" "groups" ]; };
+
+
clients = [
+
{
+
client_name = "Headscale";
+
client_id = "headscale";
+
client_secret = "$pbkdf2-sha256$310000$XY680D9gkSoWhD0UtYHNFg$ptWB3exOYCga6uq1N.oimuV3ILjK3F8lBWBpsBpibos";
+
redirect_uris = [ "https://${headscale-hostname}/oidc/callback" ];
+
authorization_policy = "headscale";
+
claims_policy = "headscale";
+
}
+
{
+
client_name = "Tailscale";
+
client_id = "tailscale";
+
client_secret = "$pbkdf2-sha256$310000$PcUaup9aWKI9ZLeCF6.avw$FpsTxkDaxcoQlBi8aIacegXpjEDiCI6nXcaHyZ2Sxyc";
+
redirect_uris = [ "https://login.tailscale.com/a/oauth_response" ];
+
authorization_policy = "tailscale";
+
}
+
{
+
client_name = "Grafana Console";
+
client_id = "grafana";
+
client_secret = "$pbkdf2-sha256$310000$UkwrqxTZodGMs9.Ca2cXAA$HCWFgQbFHGXZpuz.I3HHdkTZLUevRVGlhKEFaOlPmKs";
+
redirect_uris = [ "https://${grafana-hostname}/login/generic_oauth" ];
+
authorization_policy = "grafana";
+
}
+
{
+
client_name = "Miniflux";
+
client_id = "miniflux";
+
client_secret = "$pbkdf2-sha256$310000$uPqbWfCOBXDY6nV1vsx3uA$HOWG2hL.c/bs9Dwaee3b9DxjH7KFO.SaZMbasXV9Vdw";
+
redirect_uris = [ "https://${miniflux-hostname}/oauth2/oidc/callback" ];
+
authorization_policy = "miniflux";
+
}
+
];
+
};
+
+
notifier.smtp = {
+
address = "smtp://smtp.resend.com:2587";
+
username = "resend";
+
# Set in `AUTHELIA_NOTIFIER_SMTP_PASSWORD_FILE`.
+
# password = "";
+
sender = "authelia@wiro.world";
+
};
+
};
+
};
+
+
services.caddy = {
+
virtualHosts.${authelia-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString authelia-port}
+
'';
+
};
+
};
+
}
+143
hosts/weird-row-server/default.nix
···
+
{ self
+
, config
+
, pkgs
+
, ...
+
}:
+
+
let
+
inherit (self.inputs) srvos;
+
+
ext-if = "eth0";
+
external-ip = "91.99.55.74";
+
external-netmask = 27;
+
external-gw = "144.x.x.255";
+
external-ip6 = "2a01:4f8:c2c:76d2::1";
+
external-netmask6 = 64;
+
external-gw6 = "fe80::1";
+
+
website-hostname = "wiro.world";
+
+
static-hostname = "static.wiro.world";
+
in
+
{
+
imports = [
+
srvos.nixosModules.server
+
srvos.nixosModules.hardware-hetzner-cloud
+
srvos.nixosModules.mixins-terminfo
+
+
./authelia.nix
+
./goatcounter.nix
+
./grafana.nix
+
./headscale.nix
+
./hypixel-bank-tracker.nix
+
./lldap.nix
+
./miniflux.nix
+
./pds.nix
+
./tangled.nix
+
./thelounge.nix
+
./tuwunel.nix
+
./vaultwarden.nix
+
./warrior.nix
+
./webfinger.nix
+
];
+
+
config = {
+
boot.loader.grub.enable = true;
+
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" "ext4" ];
+
+
# Single network card is `eth0`
+
networking.usePredictableInterfaceNames = false;
+
+
networking.nameservers = [ "2001:4860:4860::8888" "2001:4860:4860::8844" ];
+
+
networking = {
+
interfaces.${ext-if} = {
+
ipv4.addresses = [{ address = external-ip; prefixLength = external-netmask; }];
+
ipv6.addresses = [{ address = external-ip6; prefixLength = external-netmask6; }];
+
};
+
defaultGateway = { interface = ext-if; address = external-gw; };
+
defaultGateway6 = { interface = ext-if; address = external-gw6; };
+
+
# Reflect firewall configuration on Hetzner
+
firewall.allowedTCPPorts = [ 22 80 443 ];
+
};
+
+
services.qemuGuest.enable = true;
+
+
services.openssh.enable = true;
+
+
# age.secrets.tailscale-authkey.file = secrets/tailscale-authkey.age;
+
services.tailscale = {
+
enable = true;
+
extraSetFlags = [ "--advertise-exit-node" ];
+
# authKeyFile = config.age.secrets.tailscale-authkey.path;
+
authKeyParameters = {
+
baseURL = "https://headscale.wiro.world";
+
ephemeral = true;
+
preauthorized = true;
+
};
+
};
+
+
security.sudo.wheelNeedsPassword = false;
+
+
local.fragment.nix.enable = true;
+
+
programs.fish.enable = true;
+
+
services.fail2ban = {
+
enable = true;
+
+
maxretry = 5;
+
ignoreIP = [ ];
+
+
bantime = "24h";
+
bantime-increment = {
+
enable = true;
+
multipliers = "1 2 4 8 16 32 64";
+
maxtime = "168h";
+
overalljails = true;
+
};
+
+
jails = { };
+
};
+
+
age.secrets.caddy-env.file = secrets/caddy-env.age;
+
services.caddy = {
+
enable = true;
+
package = pkgs.caddy.withPlugins {
+
plugins = [
+
"github.com/caddy-dns/hetzner/v2@v2.0.0-preview-1"
+
"github.com/tailscale/caddy-tailscale@v0.0.0-20251016213337-01d084e119cb"
+
];
+
hash = "sha256-muKwDYs5Jp4ib/psZxpp1Kyfsqz6wPz/lpHFGtx67uY=";
+
};
+
+
environmentFile = config.age.secrets.caddy-env.path;
+
+
globalConfig = ''
+
tailscale {
+
# this caddy instance already proxies headscale but needs to access headscale to start
+
# control_url https://headscale.wiro.world
+
control_url http://localhost:3006
+
+
ephemeral
+
}
+
'';
+
+
virtualHosts.${website-hostname}.extraConfig =
+
# TODO: host website on server with automatic deployment
+
''
+
reverse_proxy https://mrnossiom.github.io {
+
header_up Host {http.request.host}
+
}
+
'';
+
+
virtualHosts.${static-hostname}.extraConfig = ''
+
root /var/www/static
+
file_server browse
+
'';
+
};
+
+
# TODO: use bind to declare dns records declaratively
+
};
+
}
+25
hosts/weird-row-server/goatcounter.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
goatcounter-port = 3010;
+
goatcounter-hostname = "stats.wiro.world";
+
in
+
{
+
config = {
+
services.goatcounter = {
+
enable = true;
+
+
port = goatcounter-port;
+
proxy = true;
+
extraArgs = [ "-automigrate" ];
+
};
+
+
services.caddy = {
+
virtualHosts.${goatcounter-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString config.services.goatcounter.port}
+
'';
+
};
+
};
+
}
+85
hosts/weird-row-server/grafana.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
grafana-port = 3002;
+
grafana-hostname = "console.net.wiro.world";
+
+
prometheus-port = 9001;
+
prometheus-node-exporter-port = 9002;
+
caddy-metrics-port = 2019;
+
authelia-metrics-port = 9004;
+
headscale-metrics-port = 9003;
+
in
+
{
+
config = {
+
age.secrets.grafana-oidc-secret = { file = secrets/grafana-oidc-secret.age; owner = "grafana"; };
+
services.grafana = {
+
enable = true;
+
+
settings = {
+
server = {
+
http_port = grafana-port;
+
domain = grafana-hostname;
+
root_url = "https://${grafana-hostname}";
+
};
+
+
"auth.generic_oauth" = {
+
enable = true;
+
name = "Authelia";
+
icon = "signin";
+
+
client_id = "grafana";
+
client_secret_path = config.age.secrets.grafana-oidc-secret.path;
+
auto_login = true;
+
+
scopes = [ "openid" "profile" "email" "groups" ];
+
auth_url = "https://auth.wiro.world/api/oidc/authorization";
+
token_url = "https://auth.wiro.world/api/oidc/token";
+
api_url = "https://auth.wiro.world/api/oidc/userinfo";
+
use_pkce = true;
+
};
+
};
+
};
+
+
services.prometheus = {
+
enable = true;
+
port = prometheus-port;
+
+
exporters.node = {
+
enable = true;
+
port = prometheus-node-exporter-port;
+
};
+
+
scrapeConfigs = [
+
{
+
job_name = "caddy";
+
static_configs = [{ targets = [ "localhost:${toString caddy-metrics-port}" ]; }];
+
}
+
{
+
job_name = "node-exporter";
+
static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }];
+
}
+
{
+
job_name = "headscale";
+
static_configs = [{ targets = [ "localhost:${toString headscale-metrics-port}" ]; }];
+
}
+
{
+
job_name = "authelia";
+
static_configs = [{ targets = [ "localhost:${toString authelia-metrics-port}" ]; }];
+
}
+
];
+
};
+
+
services.caddy = {
+
globalConfig = ''
+
metrics { per_host }
+
'';
+
virtualHosts."http://${grafana-hostname}".extraConfig = ''
+
bind tailscale/console
+
reverse_proxy http://localhost:${toString grafana-port}
+
'';
+
};
+
};
+
}
+84
hosts/weird-row-server/headscale.nix
···
+
{ pkgs
+
, config
+
, ...
+
}:
+
+
let
+
json-format = pkgs.formats.json { };
+
+
headscale-port = 3006;
+
headscale-derp-port = 3478;
+
headscale-hostname = "headscale.wiro.world";
+
+
headscale-metrics-port = 9003;
+
in
+
{
+
config = {
+
networking.firewall.allowedUDPPorts = [ headscale-derp-port ];
+
+
age.secrets.headscale-oidc-secret = { file = secrets/headscale-oidc-secret.age; owner = config.services.headscale.user; };
+
services.headscale = {
+
enable = true;
+
+
port = headscale-port;
+
settings = {
+
server_url = "https://${headscale-hostname}";
+
metrics_listen_addr = "127.0.0.1:${toString headscale-metrics-port}";
+
+
policy.path = json-format.generate "policy.json" {
+
acls = [
+
{
+
action = "accept";
+
src = [ "autogroup:member" ];
+
dst = [ "autogroup:self:*" ];
+
}
+
];
+
ssh = [
+
{
+
action = "accept";
+
src = [ "autogroup:member" ];
+
dst = [ "autogroup:self" ];
+
# Adding root here is privilege escalation as a feature :)
+
users = [ "autogroup:nonroot" ];
+
}
+
];
+
};
+
+
# disable TLS
+
tls_cert_path = null;
+
tls_key_path = null;
+
+
dns = {
+
magic_dns = true;
+
base_domain = "net.wiro.world";
+
+
override_local_dns = true;
+
# Quad9 nameservers
+
nameservers.global = [ "9.9.9.9" "149.112.112.112" "2620:fe::fe" "2620:fe::9" ];
+
};
+
+
oidc = {
+
only_start_if_oidc_is_available = true;
+
issuer = "https://auth.wiro.world";
+
client_id = "headscale";
+
client_secret_path = config.age.secrets.headscale-oidc-secret.path;
+
scope = [ "openid" "profile" "email" "groups" ];
+
pkce.enabled = true;
+
};
+
+
derp.server = {
+
enable = true;
+
stun_listen_addr = "0.0.0.0:${toString headscale-derp-port}";
+
};
+
};
+
};
+
# headscale only starts if oidc is available
+
systemd.services.headscale.after = [ "authelia-main.service" ];
+
+
services.caddy = {
+
virtualHosts.${headscale-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString headscale-port}
+
'';
+
};
+
};
+
}
+42
hosts/weird-row-server/hypixel-bank-tracker.nix
···
+
{ self
+
, config
+
, ...
+
}:
+
+
let
+
inherit (self.inputs) hypixel-bank-tracker;
+
+
hbt-main-port = 3013;
+
hbt-banana-port = 3014;
+
in
+
{
+
imports = [ hypixel-bank-tracker.nixosModules.default ];
+
+
config = {
+
age.secrets.hypixel-bank-tracker-main.file = secrets/hypixel-bank-tracker-main.age;
+
services.hypixel-bank-tracker.instances.main = {
+
enable = true;
+
+
port = hbt-main-port;
+
environmentFile = config.age.secrets.hypixel-bank-tracker-main.path;
+
};
+
+
age.secrets.hypixel-bank-tracker-banana.file = secrets/hypixel-bank-tracker-banana.age;
+
services.hypixel-bank-tracker.instances.banana = {
+
enable = true;
+
+
port = hbt-banana-port;
+
environmentFile = config.age.secrets.hypixel-bank-tracker-banana.path;
+
};
+
+
services.caddy = {
+
virtualHosts."hypixel-bank-tracker.xyz".extraConfig = ''
+
reverse_proxy http://localhost:${toString config.services.hypixel-bank-tracker.instances.main.port}
+
'';
+
+
virtualHosts."banana.hypixel-bank-tracker.xyz".extraConfig = ''
+
reverse_proxy http://localhost:${toString config.services.hypixel-bank-tracker.instances.banana.port}
+
'';
+
};
+
};
+
}
+39
hosts/weird-row-server/lldap.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
lldap-port = 3007;
+
lldap-hostname = "ldap.net.wiro.world";
+
in
+
{
+
config = {
+
age.secrets.lldap-env.file = secrets/lldap-env.age;
+
users.users.lldap = { isSystemUser = true; group = "lldap"; };
+
users.groups.lldap = { };
+
age.secrets.lldap-user-pass = { file = secrets/lldap-user-pass.age; owner = "lldap"; };
+
services.lldap = {
+
enable = true;
+
+
silenceForceUserPassResetWarning = true;
+
+
settings = {
+
http_url = "https://${lldap-hostname}";
+
http_port = lldap-port;
+
+
ldap_user_pass_file = config.age.secrets.lldap-user-pass.path;
+
force_ldap_user_pass_reset = false;
+
+
ldap_base_dn = "dc=wiro,dc=world";
+
};
+
environmentFile = config.age.secrets.lldap-env.path;
+
};
+
+
services.caddy = {
+
virtualHosts."http://${lldap-hostname}".extraConfig = ''
+
bind tailscale/ldap
+
reverse_proxy http://localhost:${toString config.services.lldap.settings.http_port}
+
'';
+
};
+
};
+
}
+52
hosts/weird-row-server/miniflux.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
miniflux-port = 3012;
+
miniflux-hostname = "news.wiro.world";
+
in
+
{
+
config = {
+
users.users.miniflux = { isSystemUser = true; group = "miniflux"; };
+
users.groups.miniflux = { };
+
age.secrets.miniflux-oidc-secret = { file = secrets/miniflux-oidc-secret.age; owner = "miniflux"; };
+
services.miniflux = {
+
enable = true;
+
+
createDatabaseLocally = true;
+
config = {
+
BASE_URL = "https://${miniflux-hostname}/";
+
LISTEN_ADDR = "127.0.0.1:${toString miniflux-port}";
+
CREATE_ADMIN = 0;
+
+
METRICS_COLLECTOR = 1;
+
+
OAUTH2_PROVIDER = "oidc";
+
OAUTH2_OIDC_PROVIDER_NAME = "wiro.world SSO";
+
OAUTH2_CLIENT_ID = "miniflux";
+
OAUTH2_CLIENT_SECRET_FILE = config.age.secrets.miniflux-oidc-secret.path;
+
OAUTH2_REDIRECT_URL = "https://${miniflux-hostname}/oauth2/oidc/callback";
+
OAUTH2_OIDC_DISCOVERY_ENDPOINT = "https://auth.wiro.world";
+
OAUTH2_USER_CREATION = 1;
+
DISABLE_LOCAL_AUTH = 1;
+
+
RUN_MIGRATIONS = 1;
+
+
# NetNewsWire is a very good iOS oss client that integrates well
+
# https://b.j4.lc/2025/05/05/setting-up-netnewswire-with-miniflux/
+
};
+
};
+
+
services.prometheus.scrapeConfigs = [{
+
job_name = "miniflux";
+
static_configs = [{ targets = [ "localhost:${toString miniflux-port}" ]; }];
+
}];
+
+
services.caddy = {
+
virtualHosts.${miniflux-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString miniflux-port}
+
'';
+
};
+
};
+
}
+43
hosts/weird-row-server/pds.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
pds-port = 3001;
+
pds-hostname = "pds.wiro.world";
+
in
+
{
+
config = {
+
age.secrets.pds-env.file = secrets/pds-env.age;
+
services.bluesky-pds = {
+
enable = true;
+
+
settings = {
+
PDS_HOSTNAME = "pds.wiro.world";
+
PDS_PORT = pds-port;
+
# is in systemd /tmp subfolder
+
LOG_DESTINATION = "/tmp/pds.log";
+
};
+
+
environmentFiles = [
+
config.age.secrets.pds-env.path
+
];
+
};
+
+
services.caddy = {
+
globalConfig = ''
+
on_demand_tls {
+
ask http://localhost:${toString pds-port}/tls-check
+
}
+
'';
+
+
virtualHosts.${pds-hostname} = {
+
serverAliases = [ "*.${pds-hostname}" ];
+
extraConfig = ''
+
tls { on_demand }
+
reverse_proxy http://localhost:${toString config.services.bluesky-pds.settings.PDS_HOSTNAME}
+
'';
+
};
+
};
+
};
+
}
hosts/weird-row-server/secrets/authelia-issuer-private-key.age

This is a binary file and will not be displayed.

hosts/weird-row-server/secrets/authelia-jwt-secret.age

This is a binary file and will not be displayed.

hosts/weird-row-server/secrets/authelia-ldap-password.age

This is a binary file and will not be displayed.

+9
hosts/weird-row-server/secrets/authelia-smtp-password.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg 0duJYaUlZd2G3tYi7CuV+c7KNaqWusLoMpoILvaajgc
+
AnAlDVzRdeoXGXvyllhSNCoDQjZ+nucLGHCfPWR8IBQ
+
-> ssh-ed25519 SmMcWg oX82fe4sQmKyjJqv9AFRY6Bww43V/8myNRsN9/M8Sho
+
Et6ycO8hm2XV36X5q7iO+nJCtjkYoq6mDBEssrjt/70
+
-> ssh-ed25519 Q8rMFA /gU1tIVjqExV8NXB1gSDsWIXpVfxm3zPJX7xOAqeqWM
+
szrd67kHWslLO+jMCuDmzYR0LPVVzd7idgl3AKt+USU
+
--- ojxyQVhx4rX+x5gzEEx8KFiorwywqEEyTNWUJY39jIk
+
�������ş* l��1����= n�Ŏ��(� �Iamz~B����������� 鰦�.�.Z>�',p��
+11
hosts/weird-row-server/secrets/authelia-storage-key.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg PYC6LaFo/DTQlRMewqbVtS4lzVtKyuFZQSqCrQwwEyg
+
kj0sHy8IpnBsMBQy/XYtj2pLXlk6wprF3MxjFTOiZ6E
+
-> ssh-ed25519 SmMcWg rvlLGzf6D96Dh1lL8as2vjc3PB7G/86U8AR7/lAELT0
+
qcdOqVV6o+5OfJYj5pfZ62hOnrBQwY0DAeIJkLoyYss
+
-> ssh-ed25519 Q8rMFA eALgQVN5OA0EuYYEyEbFnju/Yii71e+xcs98LkXnyyo
+
Rbxu60qvXKdFaJ7lfs7LeYx37TIKYK2Gxw2QcxF3soA
+
--- ryt5q5lXn1Cyn4T6RSU1IR7dHZOTbyanaG6ZqeYYGBQ
+
�G���* \�ʕ�|���
+
�S�T���z�! �FIG͍��,��2Q��+�s�76Z�D`��Q�hM�],��E7�2<Q�
+
?ׯ�t��u\���xpe/rrR��L}��S��g�%�:�Oj����{T%h��D�~�+DЫ��W%� �ŗ�r�v$%m$
hosts/weird-row-server/secrets/caddy-env.age

This is a binary file and will not be displayed.

+27
hosts/weird-row-server/secrets/default.nix
···
+
keys:
+
let
+
inherit (keys) servers users;
+
deploy = servers ++ users;
+
in
+
{
+
# Defines `PDS_JWT_SECRET`, `PDS_ADMIN_PASSWORD`, `PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX`, `PDS_EMAIL_SMTP_URL`, `PDS_EMAIL_FROM_ADDRESS`.
+
"pds-env.age".publicKeys = deploy;
+
# Defines `LLDAP_JWT_SECRET`, `LLDAP_KEY_SEED`.
+
"lldap-env.age".publicKeys = deploy;
+
"lldap-user-pass.age".publicKeys = deploy;
+
"headscale-oidc-secret.age".publicKeys = deploy;
+
"grafana-oidc-secret.age".publicKeys = deploy;
+
"authelia-jwt-secret.age".publicKeys = deploy;
+
"authelia-issuer-private-key.age".publicKeys = deploy;
+
"authelia-storage-key.age".publicKeys = deploy;
+
"authelia-ldap-password.age".publicKeys = deploy;
+
"authelia-smtp-password.age".publicKeys = deploy;
+
"tuwunel-registration-tokens.age".publicKeys = deploy;
+
# Defines `SMTP_PASSWORD`
+
"vaultwarden-env.age".publicKeys = deploy;
+
"miniflux-oidc-secret.age".publicKeys = deploy;
+
# Defines `HYPIXEL_API_KEY`, `PROFILE_UUID`
+
"hypixel-bank-tracker-main.age".publicKeys = deploy;
+
"hypixel-bank-tracker-banana.age".publicKeys = deploy;
+
"caddy-env.age".publicKeys = deploy;
+
}
+9
hosts/weird-row-server/secrets/grafana-oidc-secret.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg 2+JZ3WMnTgnnNYmJqdqAtOsEIk9pAefHfwLcXZQpqlg
+
yE0R9b0mSzoT6mvoWUG829UmkgGkm6vg0i7WLORaTis
+
-> ssh-ed25519 SmMcWg c8goAmCIPQ5rsTwoOej9ndGc0uBpWILSn/wy6XJHK14
+
ArjlEl4hxi4N6Py1emxgxUFKvSXIwLWsy6HrWNqJUHw
+
-> ssh-ed25519 Q8rMFA t72V+A0n5Tnb0VqvBrzt3j75CbcfvQltodKMhF64SXY
+
V+Ynzd4tIUI8JPy9uyoi+frW6wJnQxDavHAqnp/lem8
+
--- mzRky/dA1MDArnDSSaGyZP9yAQgD2va4MfopbrdM0iU
+
��*�٪l����a5�QE£ uަ��"�;��3�l.!` �u� _+)$��d ��ˤ����ff�F��mѳc�a�EV��Nߧ��,�@����
hosts/weird-row-server/secrets/headscale-oidc-secret.age

This is a binary file and will not be displayed.

hosts/weird-row-server/secrets/hypixel-bank-tracker-banana.age

This is a binary file and will not be displayed.

+12
hosts/weird-row-server/secrets/hypixel-bank-tracker-main.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg B3wX5eWrSUivBKJzdiSOVvWEdGuZvGJHVDCCSFa29kw
+
F1H0QzBPS1FPvactH7z3OvR5wPdawkMzIj1awUmkrqA
+
-> ssh-ed25519 SmMcWg DtmTaO1Ox4y+AyZbOgaJU2PxMRdHloHECLOrvdI/g28
+
my6GKU1rxPyClyos0efuInWok5w3xwwoJ4p3M6roBIw
+
-> ssh-ed25519 Q8rMFA LKyAN4v78N/OcleCPuYpPlZ0se5Dmp4qiWynY4zTfDo
+
2lOqk3QF2lB/b7Md6yWq4R2jn+J3PiATIkrFUxgt104
+
-> OR`n;K-grease
+
lWGBER6K10zAcNHyiUMJAnJ84h1ppo5MJ5ztgw
+
--- abe4RLNH3d9h7UpWD3PRIBgHWagt8cU+AHIFbX1D9/E
+
�LJu���k؜��_��%��|�J]��KN��?]��tR�<�]�|���ߟ��¾FzU��������:�Y��TX����p,9v6q �7�~�y�]X���͇ǷR5՚>[������#�#�-
+
cM,1Ǜ"M��"'F�W�3o�
hosts/weird-row-server/secrets/lldap-env.age

This is a binary file and will not be displayed.

+11
hosts/weird-row-server/secrets/lldap-user-pass.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg rkX6nxV4pATfwzkzJtI08/Z0bvi0wYwnLJsppUAsz20
+
X+znUc5AKAunPqr1jdq10obvQBU+rqs/LmeQaZzI+F4
+
-> ssh-ed25519 SmMcWg xaZtLP6GOocdiMf3hgoujWigGgi7KxDUMGuPYNqS8WU
+
00Y+8L4QssKFqRlGB2e0yiv9SyoqbxeZ/lWL6DCLlpo
+
-> ssh-ed25519 Q8rMFA kHA5wVVhmpodSn3OcZuc78xttymjOoy9voa8GqIE+F8
+
a7HpZf6sjmxr49QoV9tXrATheu8u20JmKCEIkmAZdhA
+
-> U=6S`1*-grease \8na]onc
+
PP5XQ1vbpadHeiMBOkmEccTIAg
+
--- 1hkJN6ZLX8GJ8y0WuFcMEv66om+Phc0wYJFKCB8Amzg
+
�M� ��}ޘ*;f��y��]����2ef���}�d��� ���J�\��8�h��1�u� ������SHN��yS�D>W��x�J���yh������
+9
hosts/weird-row-server/secrets/miniflux-oidc-secret.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg E4UVPOuq5ZUSxGvIvr0Tod9PQRqDdqHu2Byv4fKi2io
+
FcdCyfLmRCmK5rmoLQ/m1KOJe9Etu9N/GHCM5lWCIPE
+
-> ssh-ed25519 SmMcWg wrKv3V6uSLnWQqIp65Rgi0qv7lQtyOXaxnahMo+s3EU
+
mXsJ1CbS3pzstf3xaWWF150+aXxW2kY2J5kAZWqtl+A
+
-> ssh-ed25519 Q8rMFA 91npFfTkw9Ur6aZp/pLzLUOIwwPJ9OA1peaZyTlROBU
+
12sib8HLjvgN06X6H0/AN4wMewQ8xup813DauZKQ+QY
+
--- /AGwAMAsPvvuRH6PPNrizBCsJedclYzdj6Kq4V3mx0o
+
zN��0�=�YP������rլ�!U�n;���n���/��}mCo�F��������ž!z���r������)u��o�3�>��>Z�f�񡤙1Ň ����
hosts/weird-row-server/secrets/pds-env.age

This is a binary file and will not be displayed.

+9
hosts/weird-row-server/secrets/tuwunel-registration-tokens.age
···
+
age-encryption.org/v1
+
-> ssh-ed25519 sMF1bg TVYRDtTe5khTJo0q8ShrR5o1WBrbK2htHjYCvi5QYAA
+
kx6Hke5RAZFfugR4aU28SRh4U8e4ymzeIY/+kYlAWhw
+
-> ssh-ed25519 SmMcWg AyJOM5lQHETeGiI/V5vUtu2vD6PqCZNnuTPvfnU90zE
+
9vM7/8JUbScHaeDWig16MgqtULryofSrRqhw2OMWfBs
+
-> ssh-ed25519 Q8rMFA TeUNtmHquyhhDrXf+zXY56oTGvzkhkaReIoBx5Yb+TE
+
DLfVy9cO1JrVln9CHV1ag66z2kIMrVzhcaIugLytojE
+
--- nr/3KZTVXNdemLdmp2bO2bjxKDHvcy3gezZKYN5Z1qI
+
�"��Z8��ԛ�GvJ�{��(�V9��1�N"��o���o����Х�oJ�~�1�!�}Egd�!�
hosts/weird-row-server/secrets/vaultwarden-env.age

This is a binary file and will not be displayed.

+54
hosts/weird-row-server/tangled.nix
···
+
{ self
+
, config
+
, ...
+
}:
+
+
let
+
inherit (self.inputs) tangled;
+
+
tangled-owner = "did:plc:xhgrjm4mcx3p5h3y6eino6ti";
+
tangled-knot-port = 3003;
+
tangled-knot-hostname = "knot.wiro.world";
+
tangled-spindle-port = 3004;
+
tangled-spindle-hostname = "spindle.wiro.world";
+
in
+
{
+
imports = [
+
tangled.nixosModules.knot
+
tangled.nixosModules.spindle
+
];
+
+
config = {
+
services.tangled.knot = {
+
enable = true;
+
openFirewall = true;
+
+
motd = "Welcome to @wiro.world's knot!\n";
+
server = {
+
listenAddr = "localhost:${toString tangled-knot-port}";
+
hostname = tangled-knot-hostname;
+
owner = tangled-owner;
+
};
+
};
+
+
services.tangled.spindle = {
+
enable = true;
+
+
server = {
+
listenAddr = "localhost:${toString tangled-spindle-port}";
+
hostname = tangled-spindle-hostname;
+
owner = tangled-owner;
+
};
+
};
+
+
services.caddy = {
+
virtualHosts.${tangled-knot-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString tangled-knot-port}
+
'';
+
+
virtualHosts.${tangled-spindle-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString tangled-spindle-port}
+
'';
+
};
+
};
+
}
+31
hosts/weird-row-server/thelounge.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
thelounge-port = 3005;
+
thelounge-hostname = "irc-lounge.net.wiro.world";
+
in
+
{
+
config = {
+
services.thelounge = {
+
enable = true;
+
port = thelounge-port;
+
public = false;
+
+
extraConfig = {
+
host = "127.0.0.1";
+
reverseProxy = true;
+
+
# TODO: use ldap, find a way to hide password
+
};
+
};
+
+
services.caddy = {
+
virtualHosts."http://${thelounge-hostname}".extraConfig = ''
+
bind tailscale/irc-lounge
+
reverse_proxy http://localhost:${toString config.services.thelounge.port}
+
'';
+
};
+
};
+
}
+45
hosts/weird-row-server/tuwunel.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
matrix-port = 3009;
+
matrix-hostname = "matrix.wiro.world";
+
+
website-hostname = "wiro.world";
+
in
+
{
+
config = {
+
age.secrets.tuwunel-registration-tokens = { file = secrets/tuwunel-registration-tokens.age; owner = config.services.matrix-tuwunel.user; };
+
services.matrix-tuwunel = {
+
enable = true;
+
+
settings.global = {
+
address = [ "127.0.0.1" ];
+
port = [ matrix-port ];
+
+
server_name = "wiro.world";
+
well_known = {
+
client = "https://matrix.wiro.world";
+
server = "matrix.wiro.world:443";
+
};
+
+
grant_admin_to_first_user = true;
+
new_user_displayname_suffix = "";
+
+
allow_registration = true;
+
registration_token_file = config.age.secrets.tuwunel-registration-tokens.path;
+
};
+
};
+
+
services.caddy = {
+
virtualHosts.${matrix-hostname}.extraConfig = ''
+
reverse_proxy /_matrix/* http://localhost:${toString matrix-port}
+
'';
+
+
virtualHosts.${website-hostname}.extraConfig = ''
+
reverse_proxy /.well-known/matrix/* http://localhost:${toString matrix-port}
+
'';
+
};
+
};
+
}
+38
hosts/weird-row-server/vaultwarden.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
vaultwarden-port = 3011;
+
vaultwarden-hostname = "vault.wiro.world";
+
in
+
{
+
config = {
+
age.secrets.vaultwarden-env.file = secrets/vaultwarden-env.age;
+
services.vaultwarden = {
+
enable = true;
+
+
environmentFile = config.age.secrets.vaultwarden-env.path;
+
config = {
+
ROCKET_PORT = vaultwarden-port;
+
DOMAIN = "https://${vaultwarden-hostname}";
+
SIGNUPS_ALLOWED = false;
+
ADMIN_TOKEN = "$argon2id$v=19$m=65540,t=3,p=4$YIe9wmrTsmjgZNPxe8m34O/d3XW3Fl/uZPPLQs79dAc$mjDVQSdBJqz2uBJuxtAvCIoHPzOnTDhNPuhER3dhHrY";
+
+
SMTP_HOST = "smtp.resend.com";
+
SMTP_PORT = 2465;
+
SMTP_SECURITY = "force_tls";
+
SMTP_USERNAME = "resend";
+
# SMTP_PASSWORD = ...; # Via secret env
+
SMTP_FROM = "bitwarden@wiro.world";
+
SMTP_FROM_NAME = "Bitwarden wiro.world";
+
};
+
};
+
+
services.caddy = {
+
virtualHosts.${vaultwarden-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString config.services.vaultwarden.config.ROCKET_PORT}
+
'';
+
};
+
};
+
}
+24
hosts/weird-row-server/warrior.nix
···
+
{ config
+
, ...
+
}:
+
+
let
+
warrior-port = 3015;
+
warrior-hostname = "warrior.net.wiro.world";
+
in
+
{
+
config = {
+
virtualisation.oci-containers.containers.archive-warrior = {
+
image = "atdr.meo.ws/archiveteam/warrior-dockerfile";
+
ports = [ "127.0.0.1:${toString warrior-port}:8001" ];
+
pull = "newer";
+
};
+
+
services.caddy = {
+
virtualHosts."http://${warrior-hostname}".extraConfig = ''
+
bind tailscale/warrior
+
reverse_proxy http://localhost:${toString warrior-port}
+
'';
+
};
+
};
+
}
+77
hosts/weird-row-server/webfinger.nix
···
+
{ pkgs
+
, config
+
, ...
+
}:
+
+
let
+
webfinger-dir = pkgs.writeTextDir ".well-known/webfinger" ''
+
{
+
"subject": "acct:milo@wiro.world",
+
"aliases": [
+
"mailto:milo@wiro.world",
+
"https://wiro.world/"
+
],
+
"links": [
+
{
+
"rel": "http://wiro.world/rel/avatar",
+
"href": "https://wiro.world/logo.jpg",
+
"type": "image/jpeg"
+
},
+
{
+
"rel": "http://webfinger.net/rel/profile-page",
+
"href": "https://wiro.world/",
+
"type": "text/html"
+
},
+
{
+
"rel": "http://openid.net/specs/connect/1.0/issuer",
+
"href": "https://auth.wiro.world"
+
}
+
]
+
}
+
'';
+
+
well-known-discord-dir = pkgs.writeTextDir ".well-known/discord" ''
+
dh=919234284ceb2aba439d15b9136073eb2308989b
+
'';
+
+
website-hostname = "wiro.world";
+
in
+
{
+
config = {
+
services.caddy = {
+
virtualHosts.${website-hostname}.extraConfig = ''
+
@webfinger {
+
path /.well-known/webfinger
+
method GET HEAD
+
query resource=acct:milo@wiro.world
+
query resource=mailto:milo@wiro.world
+
query resource=https://wiro.world
+
query resource=https://wiro.world/
+
}
+
route @webfinger {
+
header {
+
Content-Type "application/jrd+json"
+
Access-Control-Allow-Origin "*"
+
X-Robots-Tag "noindex"
+
}
+
root ${webfinger-dir}
+
file_server
+
}
+
'' +
+
''
+
@discord {
+
path /.well-known/discord
+
method GET HEAD
+
}
+
route @discord {
+
header {
+
Access-Control-Allow-Origin "*"
+
X-Robots-Tag "noindex"
+
}
+
root ${well-known-discord-dir}
+
file_server
+
}
+
'';
+
};
+
};
+
}
+12 -2
lib/flake/default.nix
···
# local packages set
lpkgs = import ../../pkgs pkgs;
# unstable nixpkgs set
-
upkgs = import unixpkgs { inherit (pkgs) system config; };
+
upkgs = import unixpkgs {
+
config = pkgs.config;
+
system = pkgs.stdenv.hostPlatform.system;
+
};
# indicates if system is darwin
isDarwin = pkgs.stdenv.isDarwin;
};
···
../../nixos/hardware/${hostName}.nix
../../nixos/profiles/${profile}.nix
];
-
networking.hostName = hostName;
+
config.networking.hostName = hostName;
+
};
+
host = hostName: {
+
imports = [
+
../../nixos/hardware/${hostName}.nix
+
../../hosts/${hostName}/default.nix
+
];
+
config.networking.hostName = hostName;
};
user = import ./user.nix;
managedDiskLayout = import ./managedDiskLayout.nix;
+1 -1
lib/flake/managedDiskLayout.nix
···
The recommended amount from RedHat is:
-
Amount of RAM Recommended swap space Recommended swap space
+
Amount of RAM Recommended swap space Recommended swap space
in the system if allowing for hibernation
—————————————— —————————————————————————— ———————————————————————————
⩽ 2 GB 2 times the amount of RAM 3 times the amount of RAM
+1
lib/flake/user.nix
···
} else {
home = "/home/${name}";
extraGroups = [
+
# TODO: remove or put under an condition
"wheel" # sudo access
"networkmanager" # needed for nm
];
+2 -3
modules/home-manager/default.nix
···
{
-
wakatime = import ./wakatime.nix;
-
wl-clip-persist = import ./wl-clip-persist.nix;
-
xcompose = import ./xcompose.nix;
+
wakatime = ./wakatime.nix;
+
xcompose = ./xcompose.nix;
}
-99
modules/home-manager/wl-clip-persist.nix
···
-
{ config
-
, lib
-
, pkgs
-
, ...
-
}:
-
-
let
-
cfg = config.services.wl-clip-persist;
-
in
-
{
-
options.services.wl-clip-persist = with lib; {
-
enable = mkEnableOption "";
-
-
package = mkPackageOption pkgs "wl-clip-persist" { };
-
-
clipboard = mkOption {
-
description = "The clipboard type to operate on";
-
default = "regular";
-
type = types.enum [ "regular" "primary" "both" ];
-
};
-
-
display = mkOption {
-
description = "The wayland display to operate on";
-
default = null;
-
type = types.nullOr types.str;
-
};
-
-
ignoreEventOnError = mkOption {
-
description = "Only handle selection events where no error occurred";
-
default = null;
-
type = types.nullOr types.bool;
-
};
-
-
allMimeTypeRegex = mkOption {
-
description = "Only handle selection events where all offered MIME types have a match for the regex";
-
default = null;
-
type = types.nullOr types.str;
-
};
-
-
interruptOldClipboardRequests = mkOption {
-
description = "Interrupt trying to send the old clipboard to other programs when the clipboard has been updated";
-
default = null;
-
type = types.nullOr types.bool;
-
};
-
-
selectionSizeLimit = mkOption {
-
description = "Only handle selection events whose total data size does not exceed the size limit";
-
default = null;
-
type = types.nullOr types.int;
-
};
-
-
readTimeout = mkOption {
-
description = "Timeout for trying to get the current clipboard";
-
default = 500;
-
type = types.int;
-
};
-
-
ignoreEventOnTimeout = mkOption {
-
description = "Only handle selection events where no timeout occurred";
-
default = null;
-
type = types.nullOr types.bool;
-
};
-
-
writeTimeout = mkOption {
-
description = "Timeout for trying to send the current clipboard to other programs";
-
default = 3000;
-
type = types.int;
-
};
-
};
-
-
config = lib.mkIf cfg.enable {
-
systemd.user.services.wl-clip-persist = {
-
Unit = {
-
Description = "wl-clip-persist system service";
-
PartOf = [ "graphical-session.target" ];
-
BindsTo = [ "graphical-session.target" ];
-
};
-
-
Service = {
-
Type = "simple";
-
ExecStart = "${lib.getExe cfg.package} ${lib.cli.toGNUCommandLineShell {} {
-
clipboard = cfg.clipboard;
-
display = cfg.display;
-
ignore-event-on-error = cfg.ignoreEventOnError;
-
all-mime-type-regex = cfg.allMimeTypeRegex;
-
interrupt-old-clipboard-requests = cfg.interruptOldClipboardRequests;
-
selection-size-limit = cfg.selectionSizeLimit;
-
read-timeout = cfg.readTimeout;
-
ignore-event-on-timeout = cfg.ignoreEventOnTimeout;
-
write-timeout = cfg.writeTimeout;
-
}}";
-
Restart = "on-failure";
-
TimeoutStopSec = 15;
-
};
-
-
Install.WantedBy = lib.mkDefault [ "graphical-session.target" ];
-
};
-
};
-
}
+1 -1
modules/home-manager/xcompose.nix
···
loadConfigInEnv = mkOption {
description = ''
Load the XCompose file by passing the `XCOMPOSEFILE` environment variable instead of linking to ~/.XCompose.
-
+
That is nice to avoid cluttering the HOME directory, it's preferable to disable it when experimenting
with your compose config to reload faster than having to reload your VM.
'';
-2
modules/nixos/default.nix
···
{
-
geoclue2 = ./geoclue2.nix;
-
headscale = ./headscale.nix;
logiops = ./logiops.nix;
}
-324
modules/nixos/geoclue2.nix
···
-
# Adapted from the original nixpkgs repo
-
#
-
# It supports static location fallback. This is a workaround waiting for an
-
# alternative to MLS (Mozilla Location Services).
-
-
# Target interface to manage the static file would be:
-
# static = {
-
# latitude = 48.8;
-
# longitude = 2.3;
-
# };
-
#
-
# I spent way too much time getting this to work with a submodule.
-
-
{ config
-
, lib
-
, pkgs
-
, ...
-
}:
-
-
let
-
package = pkgs.geoclue2.override { withDemoAgent = config.services.geoclue2.enableDemoAgent; };
-
-
cfg = config.services.geoclue2;
-
-
defaultWhitelist = [ "gnome-shell" "io.elementary.desktop.agent-geoclue2" ];
-
-
appConfigModule = lib.types.submodule ({ name, ... }: with lib; {
-
options = {
-
desktopID = mkOption {
-
type = types.str;
-
description = "Desktop ID of the application.";
-
};
-
-
isAllowed = mkOption {
-
type = types.bool;
-
description = ''
-
Whether the application will be allowed access to location information.
-
'';
-
};
-
-
isSystem = mkOption {
-
type = types.bool;
-
description = ''
-
Whether the application is a system component or not.
-
'';
-
};
-
-
users = mkOption {
-
type = types.listOf types.str;
-
default = [ ];
-
description = ''
-
List of UIDs of all users for which this application is allowed location
-
info access, Defaults to an empty string to allow it for all users.
-
'';
-
};
-
};
-
-
config.desktopID = mkDefault name;
-
});
-
-
# staticModule = types.submodule ({ name, ... }: {
-
# options = {
-
# latitude = mkOption {
-
# type = types.float;
-
# example = 40.6893129;
-
# };
-
-
# longitude = mkOption {
-
# type = types.float;
-
# example = -74.0445531;
-
# };
-
-
# altitude = mkOption {
-
# type = types.float;
-
# default = 0;
-
# example = 96;
-
# };
-
-
# accuracyRadius = mkOption {
-
# type = types.float;
-
# default = 0;
-
# example = 1.83;
-
# };
-
# };
-
# });
-
-
appConfigToINICompatible = _: { desktopID, isAllowed, isSystem, users, ... }: {
-
name = desktopID;
-
value = {
-
allowed = isAllowed;
-
system = isSystem;
-
users = lib.concatStringsSep ";" users;
-
};
-
};
-
-
in
-
{
-
disabledModules = [ "services/desktops/geoclue2.nix" ];
-
-
options.services.geoclue2 = with lib; {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = ''
-
Whether to enable GeoClue 2 daemon, a DBus service
-
that provides location information for accessing.
-
'';
-
};
-
-
enableDemoAgent = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to use the GeoClue demo agent. This should be
-
overridden by desktop environments that provide their own
-
agent.
-
'';
-
};
-
-
enableNmea = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to fetch location from NMEA sources on local network.
-
'';
-
};
-
-
enable3G = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to enable 3G source.
-
'';
-
};
-
-
enableCDMA = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to enable CDMA source.
-
'';
-
};
-
-
enableModemGPS = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to enable Modem-GPS source.
-
'';
-
};
-
-
enableWifi = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Whether to enable WiFi source.
-
'';
-
};
-
-
geoProviderUrl = mkOption {
-
type = types.str;
-
default = "https://location.services.mozilla.com/v1/geolocate?key=geoclue";
-
example = "https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_KEY";
-
description = ''
-
The url to the wifi GeoLocation Service.
-
'';
-
};
-
-
submitData = mkOption {
-
type = types.bool;
-
default = false;
-
description = ''
-
Whether to submit data to a GeoLocation Service.
-
'';
-
};
-
-
submissionUrl = mkOption {
-
type = types.str;
-
default = "https://location.services.mozilla.com/v1/submit?key=geoclue";
-
description = ''
-
The url to submit data to a GeoLocation Service.
-
'';
-
};
-
-
submissionNick = mkOption {
-
type = types.str;
-
default = "geoclue";
-
description = ''
-
A nickname to submit network data with.
-
Must be 2-32 characters long.
-
'';
-
};
-
-
appConfig = mkOption {
-
type = types.attrsOf appConfigModule;
-
default = { };
-
example = {
-
"com.github.app" = {
-
isAllowed = true;
-
isSystem = true;
-
users = [ "300" ];
-
};
-
};
-
description = ''
-
Specify extra settings per application.
-
'';
-
};
-
-
# static = mkOption {
-
# type = types.nullOr (types.attrsOf staticModule);
-
# default = null;
-
# description = ''
-
# Add a fallback location that will be overridden by other location services
-
# '';
-
# };
-
-
staticFile = mkOption {
-
type = types.nullOr (types.str);
-
default = null;
-
description = ''
-
Add a fallback location that will be overridden by other location services
-
'';
-
};
-
};
-
-
config = lib.mkIf cfg.enable {
-
environment.systemPackages = [ package ];
-
-
services.dbus.packages = [ package ];
-
-
systemd.packages = [ package ];
-
-
# we cannot use DynamicUser as we need the the geoclue user to exist for the
-
# dbus policy to work
-
users = {
-
users.geoclue = {
-
isSystemUser = true;
-
home = "/var/lib/geoclue";
-
group = "geoclue";
-
description = "Geoinformation service";
-
};
-
-
groups.geoclue = { };
-
};
-
-
systemd.services.geoclue = {
-
wants = lib.optionals cfg.enableWifi [ "network-online.target" ];
-
after = lib.optionals cfg.enableWifi [ "network-online.target" ];
-
# restart geoclue service when the configuration changes
-
restartTriggers = [
-
config.environment.etc."geoclue/geoclue.conf".source
-
];
-
serviceConfig.StateDirectory = "geoclue";
-
};
-
-
# this needs to run as a user service, since it's associated with the
-
# user who is making the requests
-
systemd.user.services = lib.mkIf cfg.enableDemoAgent {
-
geoclue-agent = {
-
description = "Geoclue agent";
-
# this should really be `partOf = [ "geoclue.service" ]`, but
-
# we can't be part of a system service, and the agent should
-
# be okay with the main service coming and going
-
wantedBy = [ "default.target" ];
-
wants = lib.optionals cfg.enableWifi [ "network-online.target" ];
-
after = lib.optionals cfg.enableWifi [ "network-online.target" ];
-
unitConfig.ConditionUser = "!@system";
-
serviceConfig = {
-
Type = "exec";
-
ExecStart = "${package}/libexec/geoclue-2.0/demos/agent";
-
Restart = "on-failure";
-
PrivateTmp = true;
-
};
-
};
-
};
-
-
services.geoclue2.appConfig = {
-
epiphany = { isAllowed = true; isSystem = false; };
-
firefox = { isAllowed = true; isSystem = false; };
-
};
-
-
environment.etc."geoclue/geoclue.conf".text =
-
lib.generators.toINI { } ({
-
agent = {
-
whitelist = lib.concatStringsSep ";"
-
(lib.optional cfg.enableDemoAgent "geoclue-demo-agent" ++ defaultWhitelist);
-
};
-
network-nmea = {
-
enable = cfg.enableNmea;
-
};
-
"3g" = {
-
enable = cfg.enable3G;
-
};
-
cdma = {
-
enable = cfg.enableCDMA;
-
};
-
modem-gps = {
-
enable = cfg.enableModemGPS;
-
};
-
wifi = {
-
enable = cfg.enableWifi;
-
url = cfg.geoProviderUrl;
-
submit-data = lib.boolToString cfg.submitData;
-
submission-url = cfg.submissionUrl;
-
submission-nick = cfg.submissionNick;
-
};
-
} // lib.mapAttrs' appConfigToINICompatible cfg.appConfig);
-
-
# environment.etc."geolocation" = mkIf (cfg.static != null) {
-
# text = ''
-
# ${toString cfg.static.latitude}
-
# ${toString cfg.static.longitude}
-
# ${toString cfg.static.altitude}
-
# ${toString cfg.static.accuracyRadius}
-
# '';
-
# };
-
-
environment.etc."geolocation" = lib.mkIf (cfg.staticFile != null) { text = cfg.staticFile; };
-
};
-
-
meta = with lib; {
-
maintainers = with maintainers; [ ] ++ teams.pantheon.members;
-
};
-
}
-673
modules/nixos/headscale.nix
···
-
{ config
-
, lib
-
, pkgs
-
, ...
-
}:
-
let
-
cfg = config.services.headscale;
-
-
dataDir = "/var/lib/headscale";
-
runDir = "/run/headscale";
-
-
cliConfig = {
-
# Turn off update checks since the origin of our package
-
# is nixpkgs and not Github.
-
disable_check_updates = true;
-
-
unix_socket = "${runDir}/headscale.sock";
-
};
-
-
settingsFormat = pkgs.formats.yaml { };
-
configFile = settingsFormat.generate "headscale.yaml" cfg.settings;
-
cliConfigFile = settingsFormat.generate "headscale.yaml" cliConfig;
-
-
assertRemovedOption = option: message: {
-
assertion = !lib.hasAttrByPath option cfg;
-
message =
-
"The option `services.headscale.${lib.options.showOption option}` was removed. " + message;
-
};
-
in
-
{
-
options = {
-
services.headscale = {
-
enable = lib.mkEnableOption "headscale, Open Source coordination server for Tailscale";
-
-
package = lib.mkPackageOption pkgs "headscale" { };
-
-
user = lib.mkOption {
-
default = "headscale";
-
type = lib.types.str;
-
description = ''
-
User account under which headscale runs.
-
-
::: {.note}
-
If left as the default value this user will automatically be created
-
on system activation, otherwise you are responsible for
-
ensuring the user exists before the headscale service starts.
-
:::
-
'';
-
};
-
-
group = lib.mkOption {
-
default = "headscale";
-
type = lib.types.str;
-
description = ''
-
Group under which headscale runs.
-
-
::: {.note}
-
If left as the default value this group will automatically be created
-
on system activation, otherwise you are responsible for
-
ensuring the user exists before the headscale service starts.
-
:::
-
'';
-
};
-
-
address = lib.mkOption {
-
type = lib.types.str;
-
default = "127.0.0.1";
-
description = ''
-
Listening address of headscale.
-
'';
-
example = "0.0.0.0";
-
};
-
-
port = lib.mkOption {
-
type = lib.types.port;
-
default = 8080;
-
description = ''
-
Listening port of headscale.
-
'';
-
example = 443;
-
};
-
-
settings = lib.mkOption {
-
description = ''
-
Overrides to {file}`config.yaml` as a Nix attribute set.
-
Check the [example config](https://github.com/juanfont/headscale/blob/main/config-example.yaml)
-
for possible options.
-
'';
-
type = lib.types.submodule {
-
freeformType = settingsFormat.type;
-
-
options = {
-
server_url = lib.mkOption {
-
type = lib.types.str;
-
default = "http://127.0.0.1:8080";
-
description = ''
-
The url clients will connect to.
-
'';
-
example = "https://myheadscale.example.com:443";
-
};
-
-
noise.private_key_path = lib.mkOption {
-
type = lib.types.path;
-
default = "${dataDir}/noise_private.key";
-
description = ''
-
Path to noise private key file, generated automatically if it does not exist.
-
'';
-
};
-
-
prefixes =
-
let
-
prefDesc = ''
-
Each prefix consists of either an IPv4 or IPv6 address,
-
and the associated prefix length, delimited by a slash.
-
It must be within IP ranges supported by the Tailscale
-
client - i.e., subnets of 100.64.0.0/10 and fd7a:115c:a1e0::/48.
-
'';
-
in
-
{
-
v4 = lib.mkOption {
-
type = lib.types.str;
-
default = "100.64.0.0/10";
-
description = prefDesc;
-
};
-
-
v6 = lib.mkOption {
-
type = lib.types.str;
-
default = "fd7a:115c:a1e0::/48";
-
description = prefDesc;
-
};
-
-
allocation = lib.mkOption {
-
type = lib.types.enum [
-
"sequential"
-
"random"
-
];
-
example = "random";
-
default = "sequential";
-
description = ''
-
Strategy used for allocation of IPs to nodes, available options:
-
- sequential (default): assigns the next free IP from the previous given IP.
-
- random: assigns the next free IP from a pseudo-random IP generator (crypto/rand).
-
'';
-
};
-
};
-
-
derp = {
-
urls = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ "https://controlplane.tailscale.com/derpmap/default" ];
-
description = ''
-
List of urls containing DERP maps.
-
See [How Tailscale works](https://tailscale.com/blog/how-tailscale-works/) for more information on DERP maps.
-
'';
-
};
-
-
paths = lib.mkOption {
-
type = lib.types.listOf lib.types.path;
-
default = [ ];
-
description = ''
-
List of file paths containing DERP maps.
-
See [How Tailscale works](https://tailscale.com/blog/how-tailscale-works/) for more information on DERP maps.
-
'';
-
};
-
-
auto_update_enable = lib.mkOption {
-
type = lib.types.bool;
-
default = true;
-
description = ''
-
Whether to automatically update DERP maps on a set frequency.
-
'';
-
example = false;
-
};
-
-
update_frequency = lib.mkOption {
-
type = lib.types.str;
-
default = "24h";
-
description = ''
-
Frequency to update DERP maps.
-
'';
-
example = "5m";
-
};
-
-
server.private_key_path = lib.mkOption {
-
type = lib.types.path;
-
default = "${dataDir}/derp_server_private.key";
-
description = ''
-
Path to derp private key file, generated automatically if it does not exist.
-
'';
-
};
-
};
-
-
ephemeral_node_inactivity_timeout = lib.mkOption {
-
type = lib.types.str;
-
default = "30m";
-
description = ''
-
Time before an inactive ephemeral node is deleted.
-
'';
-
example = "5m";
-
};
-
-
database = {
-
type = lib.mkOption {
-
type = lib.types.enum [
-
"sqlite"
-
"sqlite3"
-
"postgres"
-
];
-
example = "postgres";
-
default = "sqlite";
-
description = ''
-
Database engine to use.
-
Please note that using Postgres is highly discouraged as it is only supported for legacy reasons.
-
All new development, testing and optimisations are done with SQLite in mind.
-
'';
-
};
-
-
sqlite = {
-
path = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = "${dataDir}/db.sqlite";
-
description = "Path to the sqlite3 database file.";
-
};
-
-
write_ahead_log = lib.mkOption {
-
type = lib.types.bool;
-
default = true;
-
description = ''
-
Enable WAL mode for SQLite. This is recommended for production environments.
-
<https://www.sqlite.org/wal.html>
-
'';
-
example = true;
-
};
-
};
-
-
postgres = {
-
host = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = null;
-
example = "127.0.0.1";
-
description = "Database host address.";
-
};
-
-
port = lib.mkOption {
-
type = lib.types.nullOr lib.types.port;
-
default = null;
-
example = 3306;
-
description = "Database host port.";
-
};
-
-
name = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = null;
-
example = "headscale";
-
description = "Database name.";
-
};
-
-
user = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = null;
-
example = "headscale";
-
description = "Database user.";
-
};
-
-
password_file = lib.mkOption {
-
type = lib.types.nullOr lib.types.path;
-
default = null;
-
example = "/run/keys/headscale-dbpassword";
-
description = ''
-
A file containing the password corresponding to
-
{option}`database.user`.
-
'';
-
};
-
};
-
};
-
-
log = {
-
level = lib.mkOption {
-
type = lib.types.str;
-
default = "info";
-
description = ''
-
headscale log level.
-
'';
-
example = "debug";
-
};
-
-
format = lib.mkOption {
-
type = lib.types.str;
-
default = "text";
-
description = ''
-
headscale log format.
-
'';
-
example = "json";
-
};
-
};
-
-
dns = {
-
magic_dns = lib.mkOption {
-
type = lib.types.bool;
-
default = true;
-
description = ''
-
Whether to use [MagicDNS](https://tailscale.com/kb/1081/magicdns/).
-
'';
-
example = false;
-
};
-
-
base_domain = lib.mkOption {
-
type = lib.types.str;
-
default = "";
-
description = ''
-
Defines the base domain to create the hostnames for MagicDNS.
-
This domain must be different from the {option}`server_url`
-
domain.
-
{option}`base_domain` must be a FQDN, without the trailing dot.
-
The FQDN of the hosts will be `hostname.base_domain` (e.g.
-
`myhost.tailnet.example.com`).
-
'';
-
example = "tailnet.example.com";
-
};
-
-
nameservers = {
-
global = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ ];
-
description = ''
-
List of nameservers to pass to Tailscale clients.
-
'';
-
};
-
};
-
-
search_domains = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ ];
-
description = ''
-
Search domains to inject to Tailscale clients.
-
'';
-
example = [ "mydomain.internal" ];
-
};
-
};
-
-
oidc = {
-
issuer = lib.mkOption {
-
type = lib.types.str;
-
default = "";
-
description = ''
-
URL to OpenID issuer.
-
'';
-
example = "https://openid.example.com";
-
};
-
-
client_id = lib.mkOption {
-
type = lib.types.str;
-
default = "";
-
description = ''
-
OpenID Connect client ID.
-
'';
-
};
-
-
client_secret_path = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = null;
-
description = ''
-
Path to OpenID Connect client secret file. Expands environment variables in format ''${VAR}.
-
'';
-
};
-
-
scope = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [
-
"openid"
-
"profile"
-
"email"
-
];
-
description = ''
-
Scopes used in the OIDC flow.
-
'';
-
};
-
-
extra_params = lib.mkOption {
-
type = lib.types.attrsOf lib.types.str;
-
default = { };
-
description = ''
-
Custom query parameters to send with the Authorize Endpoint request.
-
'';
-
example = {
-
domain_hint = "example.com";
-
};
-
};
-
-
allowed_domains = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ ];
-
description = ''
-
Allowed principal domains. if an authenticated user's domain
-
is not in this list authentication request will be rejected.
-
'';
-
example = [ "example.com" ];
-
};
-
-
allowed_users = lib.mkOption {
-
type = lib.types.listOf lib.types.str;
-
default = [ ];
-
description = ''
-
Users allowed to authenticate even if not in allowedDomains.
-
'';
-
example = [ "alice@example.com" ];
-
};
-
};
-
-
tls_letsencrypt_hostname = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = "";
-
description = ''
-
Domain name to request a TLS certificate for.
-
'';
-
};
-
-
tls_letsencrypt_challenge_type = lib.mkOption {
-
type = lib.types.enum [
-
"TLS-ALPN-01"
-
"HTTP-01"
-
];
-
default = "HTTP-01";
-
description = ''
-
Type of ACME challenge to use, currently supported types:
-
`HTTP-01` or `TLS-ALPN-01`.
-
'';
-
};
-
-
tls_letsencrypt_listen = lib.mkOption {
-
type = lib.types.nullOr lib.types.str;
-
default = ":http";
-
description = ''
-
When HTTP-01 challenge is chosen, letsencrypt must set up a
-
verification endpoint, and it will be listening on:
-
`:http = port 80`.
-
'';
-
};
-
-
tls_cert_path = lib.mkOption {
-
type = lib.types.nullOr lib.types.path;
-
default = null;
-
description = ''
-
Path to already created certificate.
-
'';
-
};
-
-
tls_key_path = lib.mkOption {
-
type = lib.types.nullOr lib.types.path;
-
default = null;
-
description = ''
-
Path to key for already created certificate.
-
'';
-
};
-
-
policy = {
-
mode = lib.mkOption {
-
type = lib.types.enum [
-
"file"
-
"database"
-
];
-
default = "file";
-
description = ''
-
The mode can be "file" or "database" that defines
-
where the ACL policies are stored and read from.
-
'';
-
};
-
-
path = lib.mkOption {
-
type = lib.types.nullOr lib.types.path;
-
default = null;
-
description = ''
-
If the mode is set to "file", the path to a
-
HuJSON file containing ACL policies.
-
'';
-
};
-
};
-
};
-
};
-
};
-
};
-
};
-
-
imports = with lib; [
-
(mkRenamedOptionModule
-
[ "services" "headscale" "derp" "autoUpdate" ]
-
[ "services" "headscale" "settings" "derp" "auto_update_enable" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "derp" "paths" ]
-
[ "services" "headscale" "settings" "derp" "paths" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "derp" "updateFrequency" ]
-
[ "services" "headscale" "settings" "derp" "update_frequency" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "derp" "urls" ]
-
[ "services" "headscale" "settings" "derp" "urls" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "ephemeralNodeInactivityTimeout" ]
-
[ "services" "headscale" "settings" "ephemeral_node_inactivity_timeout" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "logLevel" ]
-
[ "services" "headscale" "settings" "log" "level" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "openIdConnect" "clientId" ]
-
[ "services" "headscale" "settings" "oidc" "client_id" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "openIdConnect" "clientSecretFile" ]
-
[ "services" "headscale" "settings" "oidc" "client_secret_path" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "openIdConnect" "issuer" ]
-
[ "services" "headscale" "settings" "oidc" "issuer" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "serverUrl" ]
-
[ "services" "headscale" "settings" "server_url" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "certFile" ]
-
[ "services" "headscale" "settings" "tls_cert_path" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "keyFile" ]
-
[ "services" "headscale" "settings" "tls_key_path" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "letsencrypt" "challengeType" ]
-
[ "services" "headscale" "settings" "tls_letsencrypt_challenge_type" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "letsencrypt" "hostname" ]
-
[ "services" "headscale" "settings" "tls_letsencrypt_hostname" ]
-
)
-
(mkRenamedOptionModule
-
[ "services" "headscale" "tls" "letsencrypt" "httpListen" ]
-
[ "services" "headscale" "settings" "tls_letsencrypt_listen" ]
-
)
-
-
(mkRemovedOptionModule [ "services" "headscale" "openIdConnect" "domainMap" ] ''
-
Headscale no longer uses domain_map. If you're using an old version of headscale you can still set this option via services.headscale.settings.oidc.domain_map.
-
'')
-
];
-
-
config = lib.mkIf cfg.enable {
-
assertions = [
-
{
-
assertion = with cfg.settings; dns.magic_dns -> dns.base_domain != "";
-
message = "dns.base_domain must be set when using MagicDNS";
-
}
-
(assertRemovedOption [ "settings" "acl_policy_path" ] "Use `policy.path` instead.")
-
(assertRemovedOption [ "settings" "db_host" ] "Use `database.postgres.host` instead.")
-
(assertRemovedOption [ "settings" "db_name" ] "Use `database.postgres.name` instead.")
-
(assertRemovedOption [
-
"settings"
-
"db_password_file"
-
] "Use `database.postgres.password_file` instead.")
-
(assertRemovedOption [ "settings" "db_path" ] "Use `database.sqlite.path` instead.")
-
(assertRemovedOption [ "settings" "db_port" ] "Use `database.postgres.port` instead.")
-
(assertRemovedOption [ "settings" "db_type" ] "Use `database.type` instead.")
-
(assertRemovedOption [ "settings" "db_user" ] "Use `database.postgres.user` instead.")
-
(assertRemovedOption [ "settings" "dns_config" ] "Use `dns` instead.")
-
(assertRemovedOption [ "settings" "dns_config" "domains" ] "Use `dns.search_domains` instead.")
-
(assertRemovedOption [
-
"settings"
-
"dns_config"
-
"nameservers"
-
] "Use `dns.nameservers.global` instead.")
-
];
-
-
services.headscale.settings = lib.mkMerge [
-
cliConfig
-
{
-
listen_addr = lib.mkDefault "${cfg.address}:${toString cfg.port}";
-
-
tls_letsencrypt_cache_dir = "${dataDir}/.cache";
-
}
-
];
-
-
environment = {
-
# Headscale CLI needs a minimal config to be able to locate the unix socket
-
# to talk to the server instance.
-
etc."headscale/config.yaml".source = cliConfigFile;
-
-
systemPackages = [ cfg.package ];
-
};
-
-
users.groups.headscale = lib.mkIf (cfg.group == "headscale") { };
-
-
users.users.headscale = lib.mkIf (cfg.user == "headscale") {
-
description = "headscale user";
-
home = dataDir;
-
group = cfg.group;
-
isSystemUser = true;
-
};
-
-
systemd.services.headscale = {
-
description = "headscale coordination server for Tailscale";
-
wants = [ "network-online.target" ];
-
after = [ "network-online.target" ];
-
wantedBy = [ "multi-user.target" ];
-
-
script = ''
-
${lib.optionalString (cfg.settings.database.postgres.password_file != null) ''
-
export HEADSCALE_DATABASE_POSTGRES_PASS="$(head -n1 ${lib.escapeShellArg cfg.settings.database.postgres.password_file})"
-
''}
-
-
exec ${lib.getExe cfg.package} serve --config ${configFile}
-
'';
-
-
serviceConfig =
-
let
-
capabilityBoundingSet = [ "CAP_CHOWN" ] ++ lib.optional (cfg.port < 1024) "CAP_NET_BIND_SERVICE";
-
in
-
{
-
Restart = "always";
-
Type = "simple";
-
User = cfg.user;
-
Group = cfg.group;
-
-
# Hardening options
-
RuntimeDirectory = "headscale";
-
# Allow headscale group access so users can be added and use the CLI.
-
RuntimeDirectoryMode = "0750";
-
-
StateDirectory = "headscale";
-
StateDirectoryMode = "0750";
-
-
ProtectSystem = "strict";
-
ProtectHome = true;
-
PrivateTmp = true;
-
PrivateDevices = true;
-
ProtectKernelTunables = true;
-
ProtectControlGroups = true;
-
RestrictSUIDSGID = true;
-
PrivateMounts = true;
-
ProtectKernelModules = true;
-
ProtectKernelLogs = true;
-
ProtectHostname = true;
-
ProtectClock = true;
-
ProtectProc = "invisible";
-
ProcSubset = "pid";
-
RestrictNamespaces = true;
-
RemoveIPC = true;
-
UMask = "0077";
-
-
CapabilityBoundingSet = capabilityBoundingSet;
-
AmbientCapabilities = capabilityBoundingSet;
-
NoNewPrivileges = true;
-
LockPersonality = true;
-
RestrictRealtime = true;
-
SystemCallFilter = [
-
"@system-service"
-
"~@privileged"
-
"@chown"
-
];
-
SystemCallArchitectures = "native";
-
RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX";
-
};
-
};
-
};
-
-
meta.maintainers = with lib.maintainers; [
-
kradalby
-
misterio77
-
];
-
}
+5 -7
modules/nixos/logiops.nix
···
rendered-config = libconfig-format.generate "logid.cfg" cfg.settings;
in
{
-
options.services.logiops = with lib; {
-
enable = mkEnableOption (mdDoc "Logiops HID++ configuration");
+
options.services.logiops = {
+
enable = lib.mkEnableOption "Logiops HID++ configuration";
-
package = mkPackageOption pkgs "logiops" { };
+
package = lib.mkPackageOption pkgs "logiops_0_2_3" { };
-
settings = mkOption {
+
settings = lib.mkOption {
type = libconfig-format.type;
default = { };
example = {
···
];
}];
};
-
description = mdDoc ''
+
description = lib.mdDoc ''
Logid configuration. Refer to
[the `logiops` wiki](https://github.com/PixlOne/logiops/wiki/Configuration)
for details on supported values.
···
restartTriggers = [ rendered-config ];
};
};
-
-
meta.maintainers = with lib.maintainers; [ ckie ];
}
+1 -1
nixos/fragments/kanata/arsenik.kbd.lisp
···
;; Numrow layer
(deflayer numrow
XX XX XX XX XX XX XX XX XX XX XX
-
XX XX XX XX XX XX XX XX XX XX
+
XX XX XX XX XX XX XX XX XX XX
@1 @2 @3 @4 @5 @6 @7 @8 @9 @0
XX XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX
+2 -4
nixos/fragments/logiops.nix
···
{ self
, config
, lib
-
, pkgs
, ...
}:
···
config.services.logiops = lib.mkIf cfg.enable {
enable = true;
-
package = pkgs.logiops_0_2_3;
settings =
let
cid = {
# Control IDs │ reprog? │ fn key? │ mouse key? │ gesture support?
-
leftMouse = 80; # 0x50 │ │ │ YES │
-
rightMouse = 81; # 0x51 │ │ │ YES │
+
leftMouse = 80; # 0x50 │ │ │ YES │
+
rightMouse = 81; # 0x51 │ │ │ YES │
middleMouse = 81; # 0x52 │ YES │ │ YES │ YES
back = 83; # 0x53 │ YES │ │ YES │ YES
forward = 86; # 0x56 │ YES │ │ YES │ YES
+9 -1
nixos/fragments/nix.nix
···
# Make NixOS system's legacy channels consistent with registry and flake inputs
else lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
-
gc = {
automatic = true;
# absolute disk space saver, if you forget to run GC
···
# avoid network calls at each nix invoation.
flake-registry = "";
+
use-xdg-base-directories = true;
+
keep-going = true;
extra-platforms = config.boot.binfmt.emulatedSystems;
···
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
};
+
};
+
+
# other disk space saver
+
services.angrr = {
+
enable = true;
+
period = "2weeks";
+
enableNixGcIntegration = true;
};
};
}
+7 -8
nixos/fragments/security.nix
···
security.rtkit.enable = true;
# Systemd Login
-
services.logind = {
-
lidSwitch = "suspend";
-
extraConfig = lib.generators.toKeyValue { } {
-
IdleAction = "lock";
-
# Don’t shutdown when power button is short-pressed
-
HandlePowerKey = "lock";
-
HandlePowerKeyLongPress = "suspend";
-
};
+
services.logind.settings.Login = {
+
HandleLidSwitch = "suspend";
+
IdleAction = "lock";
+
# Don’t shutdown when power button is short-pressed
+
HandlePowerKey = "lock";
+
HandlePowerKeyLongPress = "suspend";
};
# `swaylock` pam service must be at least declared to work properly
···
# Signing
programs.gnupg.agent.enable = true;
services.gnome.gnome-keyring.enable = true;
+
services.gnome.gcr-ssh-agent.enable = false;
# SSH
services.openssh = {
+6 -19
nixos/profiles/laptop.nix
···
-
{ self
-
, config
+
{ config
, pkgs
, ...
}:
-
let
-
inherit (self.outputs) nixosModules;
-
in
{
-
imports = [
-
# Replaces nixpkgs module with a custom one that support fallback static location
-
nixosModules.geoclue2
-
];
-
config = {
local.fragment = {
agenix.enable = true;
···
kernel.sysctl."kernel.perf_event_paranoid" = -1;
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
-
extraModulePackages = with config.boot.kernelPackages; [ perf xone ];
+
extraModulePackages = with config.boot.kernelPackages; [ xone ];
loader = {
systemd-boot.enable = true;
···
# Once in a while, the session stop job hangs and lasts the full default
# time (1min30). I just want to shutdown my computer please.
-
systemd.extraConfig = ''
-
DefaultTimeoutStopSec = 10s
-
'';
+
systemd.settings.Manager.DefaultTimeoutStopSec = "10s";
programs.dconf.enable = true;
···
};
};
-
programs.command-not-found.enable = false;
-
# This is needed for services like `darkman` and `gammastep`
services.geoclue2 = {
enable = true;
-
# Fallback using custom geoclue2 module waitng for an alternative to MLS
+
# Fallback using custom geoclue2 module waiting for an alternative to MLS
# (Mozilla Location Services). See related module in repo.
# INFO: lat vvvv vvv long → Paris rough location
-
staticFile = "48.8\n2.3\n0\n0\n";
+
# staticFile = "48.8\n2.3\n0\n0\n";
};
programs.wireshark = {
···
};
users.users.${config.local.user.username}.extraGroups = [ "wireshark" "plugdev" ];
-
# This option is already filled with aliases that snowball and have
+
# This option is already filled with aliases that snowball and have
# priority on fish internal `ls` aliases
environment.shellAliases = { ls = null; ll = null; l = null; };
programs.fish.enable = true;
-708
nixos/profiles/server.nix
···
-
{ self
-
, config
-
, pkgs
-
, upkgs
-
, ...
-
}:
-
-
let
-
inherit (self.inputs) unixpkgs srvos hypixel-bank-tracker tangled;
-
-
json-format = pkgs.formats.json { };
-
-
ext-if = "eth0";
-
external-ip = "91.99.55.74";
-
external-netmask = 27;
-
external-gw = "144.x.x.255";
-
external-ip6 = "2a01:4f8:c2c:76d2::1";
-
external-netmask6 = 64;
-
external-gw6 = "fe80::1";
-
-
well-known-discord-dir = pkgs.writeTextDir ".well-known/discord" ''
-
dh=919234284ceb2aba439d15b9136073eb2308989b
-
'';
-
webfinger-dir = pkgs.writeTextDir ".well-known/webfinger" ''
-
{
-
"subject": "acct:milo@wiro.world",
-
"aliases": [
-
"mailto:milo@wiro.world",
-
"https://wiro.world/"
-
],
-
"links": [
-
{
-
"rel": "http://wiro.world/rel/avatar",
-
"href": "https://wiro.world/logo.jpg",
-
"type": "image/jpeg"
-
},
-
{
-
"rel": "http://webfinger.net/rel/profile-page",
-
"href": "https://wiro.world/",
-
"type": "text/html"
-
},
-
{
-
"rel": "http://openid.net/specs/connect/1.0/issuer",
-
"href": "https://auth.wiro.world"
-
}
-
]
-
}
-
'';
-
-
website-hostname = "wiro.world";
-
-
pds-port = 3001;
-
pds-hostname = "pds.wiro.world";
-
-
grafana-port = 3002;
-
grafana-hostname = "console.wiro.world";
-
-
tangled-owner = "did:plc:xhgrjm4mcx3p5h3y6eino6ti";
-
tangled-knot-port = 3003;
-
tangled-knot-hostname = "knot.wiro.world";
-
tangled-spindle-port = 3004;
-
tangled-spindle-hostname = "spindle.wiro.world";
-
-
thelounge-port = 3005;
-
thelounge-hostname = "lounge.wiro.world";
-
-
headscale-port = 3006;
-
headscale-derp-port = 3478;
-
headscale-hostname = "headscale.wiro.world";
-
-
lldap-port = 3007;
-
lldap-hostname = "ldap.wiro.world";
-
-
authelia-port = 3008;
-
authelia-hostname = "auth.wiro.world";
-
-
matrix-port = 3009;
-
matrix-hostname = "matrix.wiro.world";
-
-
goatcounter-port = 3010;
-
goatcounter-hostname = "stats.wiro.world";
-
-
vaultwarden-port = 3011;
-
vaultwarden-hostname = "vault.wiro.world";
-
-
miniflux-port = 3012;
-
miniflux-hostname = "news.wiro.world";
-
-
hbt-main-port = 3013;
-
hbt-banana-port = 3014;
-
-
prometheus-port = 9001;
-
prometheus-node-exporter-port = 9002;
-
headscale-metrics-port = 9003;
-
authelia-metrics-port = 9004;
-
in
-
{
-
disabledModules = [ "services/networking/headscale.nix" ];
-
-
imports = [
-
srvos.nixosModules.server
-
srvos.nixosModules.hardware-hetzner-cloud
-
srvos.nixosModules.mixins-terminfo
-
-
self.nixosModules.headscale
-
-
hypixel-bank-tracker.nixosModules.default
-
-
tangled.nixosModules.knot
-
tangled.nixosModules.spindle
-
-
"${unixpkgs}/nixos/modules/services/matrix/tuwunel.nix"
-
];
-
-
config = {
-
boot.loader.grub.enable = true;
-
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" "ext4" ];
-
-
# Single network card is `eth0`
-
networking.usePredictableInterfaceNames = false;
-
-
networking.nameservers = [ "2001:4860:4860::8888" "2001:4860:4860::8844" ];
-
-
networking = {
-
interfaces.${ext-if} = {
-
ipv4.addresses = [{ address = external-ip; prefixLength = external-netmask; }];
-
ipv6.addresses = [{ address = external-ip6; prefixLength = external-netmask6; }];
-
};
-
defaultGateway = { interface = ext-if; address = external-gw; };
-
defaultGateway6 = { interface = ext-if; address = external-gw6; };
-
-
# Reflect firewall configuration on Hetzner
-
firewall.allowedTCPPorts = [ 22 80 443 ];
-
firewall.allowedUDPPorts = [ headscale-derp-port ];
-
};
-
-
services.qemuGuest.enable = true;
-
-
services.openssh.enable = true;
-
-
services.tailscale.enable = true;
-
-
security.sudo.wheelNeedsPassword = false;
-
-
local.fragment.nix.enable = true;
-
-
programs.fish.enable = true;
-
-
services.fail2ban = {
-
enable = true;
-
-
maxretry = 5;
-
ignoreIP = [ ];
-
-
bantime = "24h";
-
bantime-increment = {
-
enable = true;
-
multipliers = "1 2 4 8 16 32 64";
-
maxtime = "168h";
-
overalljails = true;
-
};
-
-
jails = { };
-
};
-
-
services.caddy = {
-
enable = true;
-
-
globalConfig = ''
-
metrics { per_host }
-
-
on_demand_tls {
-
ask http://localhost:${toString pds-port}/tls-check
-
}
-
'';
-
-
virtualHosts.${website-hostname}.extraConfig =
-
''
-
@discord {
-
path /.well-known/discord
-
method GET HEAD
-
}
-
route @discord {
-
header {
-
Access-Control-Allow-Origin "*"
-
X-Robots-Tag "noindex"
-
}
-
root ${well-known-discord-dir}
-
file_server
-
}
-
'' +
-
''
-
@webfinger {
-
path /.well-known/webfinger
-
method GET HEAD
-
query resource=acct:milo@wiro.world
-
query resource=mailto:milo@wiro.world
-
query resource=https://wiro.world
-
query resource=https://wiro.world/
-
}
-
route @webfinger {
-
header {
-
Content-Type "application/jrd+json"
-
Access-Control-Allow-Origin "*"
-
X-Robots-Tag "noindex"
-
}
-
root ${webfinger-dir}
-
file_server
-
}
-
'' +
-
''
-
reverse_proxy /.well-known/matrix/* http://localhost:${toString matrix-port}
-
'' +
-
# TODO: host website on server with automatic deployment
-
''
-
reverse_proxy https://mrnossiom.github.io {
-
header_up Host {http.request.host}
-
}
-
'';
-
-
virtualHosts.${grafana-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString grafana-port}
-
'';
-
-
virtualHosts.${pds-hostname} = {
-
serverAliases = [ "*.${pds-hostname}" ];
-
extraConfig = ''
-
tls { on_demand }
-
reverse_proxy http://localhost:${toString pds-port}
-
'';
-
};
-
-
virtualHosts.${tangled-knot-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString tangled-knot-port}
-
'';
-
-
virtualHosts.${tangled-spindle-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString tangled-spindle-port}
-
'';
-
-
virtualHosts.${thelounge-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString thelounge-port}
-
'';
-
-
virtualHosts.${headscale-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString headscale-port}
-
'';
-
-
virtualHosts.${lldap-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString lldap-port}
-
'';
-
-
virtualHosts.${authelia-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString authelia-port}
-
'';
-
-
virtualHosts.${matrix-hostname}.extraConfig = ''
-
reverse_proxy /_matrix/* http://localhost:${toString matrix-port}
-
'';
-
-
virtualHosts.${goatcounter-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString goatcounter-port}
-
'';
-
-
virtualHosts.${vaultwarden-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString vaultwarden-port}
-
'';
-
-
virtualHosts.${miniflux-hostname}.extraConfig = ''
-
reverse_proxy http://localhost:${toString miniflux-port}
-
'';
-
-
virtualHosts."hypixel-bank-tracker.xyz".extraConfig = ''
-
reverse_proxy http://localhost:${toString hbt-main-port}
-
'';
-
-
virtualHosts."banana.hypixel-bank-tracker.xyz".extraConfig = ''
-
reverse_proxy http://localhost:${toString hbt-banana-port}
-
'';
-
};
-
-
age.secrets.pds-env.file = ../../secrets/pds-env.age;
-
services.pds = {
-
enable = true;
-
package = upkgs.bluesky-pds;
-
-
settings = {
-
PDS_HOSTNAME = "pds.wiro.world";
-
PDS_PORT = pds-port;
-
# is in systemd /tmp subfolder
-
LOG_DESTINATION = "/tmp/pds.log";
-
};
-
-
environmentFiles = [
-
config.age.secrets.pds-env.path
-
];
-
};
-
-
services.tangled.knot = {
-
enable = true;
-
openFirewall = true;
-
-
motd = "Welcome to @wiro.world's knot!\n";
-
server = {
-
listenAddr = "localhost:${toString tangled-knot-port}";
-
hostname = tangled-knot-hostname;
-
owner = tangled-owner;
-
};
-
};
-
-
services.tangled.spindle = {
-
enable = true;
-
-
server = {
-
listenAddr = "localhost:${toString tangled-spindle-port}";
-
hostname = tangled-spindle-hostname;
-
owner = tangled-owner;
-
};
-
};
-
-
age.secrets.grafana-oidc-secret = { file = ../../secrets/grafana-oidc-secret.age; owner = "grafana"; };
-
services.grafana = {
-
enable = true;
-
-
settings = {
-
server = {
-
http_port = grafana-port;
-
domain = grafana-hostname;
-
root_url = "https://${grafana-hostname}";
-
};
-
-
"auth.generic_oauth" = {
-
enable = true;
-
name = "Authelia";
-
icon = "signin";
-
-
client_id = "grafana";
-
client_secret_path = config.age.secrets.grafana-oidc-secret.path;
-
auto_login = true;
-
-
scopes = [ "openid" "profile" "email" "groups" ];
-
auth_url = "https://auth.wiro.world/api/oidc/authorization";
-
token_url = "https://auth.wiro.world/api/oidc/token";
-
api_url = "https://auth.wiro.world/api/oidc/userinfo";
-
use_pkce = true;
-
};
-
};
-
};
-
-
services.prometheus = {
-
enable = true;
-
port = prometheus-port;
-
-
scrapeConfigs = [
-
{
-
job_name = "caddy";
-
static_configs = [{ targets = [ "localhost:${toString 2019}" ]; }];
-
}
-
{
-
job_name = "node-exporter";
-
static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }];
-
}
-
{
-
job_name = "headscale";
-
static_configs = [{ targets = [ "localhost:${toString headscale-metrics-port}" ]; }];
-
}
-
{
-
job_name = "authelia";
-
static_configs = [{ targets = [ "localhost:${toString authelia-metrics-port}" ]; }];
-
}
-
{
-
job_name = "miniflux";
-
static_configs = [{ targets = [ "localhost:${toString miniflux-port}" ]; }];
-
}
-
];
-
-
exporters.node = {
-
enable = true;
-
port = prometheus-node-exporter-port;
-
};
-
};
-
-
services.thelounge = {
-
enable = true;
-
port = thelounge-port;
-
public = false;
-
-
extraConfig = {
-
host = "127.0.0.1";
-
reverseProxy = true;
-
-
# TODO: use ldap, find a way to hide password
-
};
-
};
-
-
age.secrets.headscale-oidc-secret = { file = ../../secrets/headscale-oidc-secret.age; owner = config.services.headscale.user; };
-
# TODO: add dependency on authelia
-
services.headscale = {
-
enable = true;
-
package = upkgs.headscale;
-
-
port = headscale-port;
-
settings = {
-
server_url = "https://${headscale-hostname}";
-
metrics_listen_addr = "127.0.0.1:${toString headscale-metrics-port}";
-
-
policy.path = json-format.generate "policy.json" {
-
acls = [
-
{
-
action = "accept";
-
src = [ "autogroup:member" ];
-
dst = [ "autogroup:self:*" ];
-
}
-
];
-
ssh = [
-
{
-
action = "accept";
-
src = [ "autogroup:member" ];
-
dst = [ "autogroup:self" ];
-
# Adding root here is privilege escalation as a feature :)
-
users = [ "autogroup:nonroot" ];
-
}
-
];
-
};
-
-
# disable TLS
-
tls_cert_path = null;
-
tls_key_path = null;
-
-
dns = {
-
magic_dns = true;
-
base_domain = "net.wiro.world";
-
-
override_local_dns = true;
-
# Quad9 nameservers
-
nameservers.global = [ "9.9.9.9" "149.112.112.112" "2620:fe::fe" "2620:fe::9" ];
-
};
-
-
oidc = {
-
only_start_if_oidc_is_available = true;
-
issuer = "https://auth.wiro.world";
-
client_id = "headscale";
-
client_secret_path = config.age.secrets.headscale-oidc-secret.path;
-
scope = [ "openid" "profile" "email" "groups" ];
-
pkce.enabled = true;
-
};
-
-
derp.server = {
-
enable = true;
-
stun_listen_addr = "0.0.0.0:${toString headscale-derp-port}";
-
};
-
};
-
};
-
-
age.secrets.lldap-env.file = ../../secrets/lldap-env.age;
-
services.lldap = {
-
enable = true;
-
settings = {
-
http_url = "https://${lldap-hostname}";
-
http_port = lldap-port;
-
-
ldap_base_dn = "dc=wiro,dc=world";
-
};
-
environmentFile = config.age.secrets.lldap-env.path;
-
};
-
-
age.secrets.authelia-jwt-secret = { file = ../../secrets/authelia-jwt-secret.age; owner = config.services.authelia.instances.main.user; };
-
age.secrets.authelia-issuer-private-key = { file = ../../secrets/authelia-issuer-private-key.age; owner = config.services.authelia.instances.main.user; };
-
age.secrets.authelia-storage-key = { file = ../../secrets/authelia-storage-key.age; owner = config.services.authelia.instances.main.user; };
-
age.secrets.authelia-ldap-password = { file = ../../secrets/authelia-ldap-password.age; owner = config.services.authelia.instances.main.user; };
-
age.secrets.authelia-smtp-password = { file = ../../secrets/authelia-smtp-password.age; owner = config.services.authelia.instances.main.user; };
-
services.authelia.instances.main = {
-
enable = true;
-
-
secrets = {
-
jwtSecretFile = config.age.secrets.authelia-jwt-secret.path;
-
oidcIssuerPrivateKeyFile = config.age.secrets.authelia-issuer-private-key.path;
-
storageEncryptionKeyFile = config.age.secrets.authelia-storage-key.path;
-
};
-
environmentVariables = {
-
AUTHELIA_AUTHENTICATION_BACKEND_LDAP_PASSWORD_FILE = config.age.secrets.authelia-ldap-password.path;
-
AUTHELIA_NOTIFIER_SMTP_PASSWORD_FILE = config.age.secrets.authelia-smtp-password.path;
-
};
-
settings = {
-
server.address = "localhost:${toString authelia-port}";
-
storage.local.path = "/var/lib/authelia-main/db.sqlite3";
-
telemetry.metrics = {
-
enabled = true;
-
address = "tcp://:${toString authelia-metrics-port}/metrics";
-
};
-
-
session = {
-
cookies = [{
-
domain = "wiro.world";
-
authelia_url = "https://${authelia-hostname}";
-
default_redirection_url = "https://wiro.world";
-
}];
-
};
-
-
authentication_backend.ldap = {
-
address = "ldap://localhost:3890";
-
timeout = "5m"; # replace with systemd dependency
-
-
user = "uid=authelia,ou=people,dc=wiro,dc=world";
-
# Set in `AUTHELIA_AUTHENTICATION_BACKEND_LDAP_PASSWORD_FILE`.
-
# password = "";
-
-
base_dn = "dc=wiro,dc=world";
-
users_filter = "(&(|({username_attribute}={input})({mail_attribute}={input}))(objectClass=person))";
-
additional_users_dn = "ou=people";
-
groups_filter = "(&(member={dn})(objectClass=groupOfNames))";
-
additional_groups_dn = "ou=groups";
-
-
attributes = {
-
username = "uid";
-
display_name = "cn";
-
given_name = "givenname";
-
family_name = "last_name";
-
mail = "mail";
-
picture = "avatar";
-
-
group_name = "cn";
-
};
-
};
-
-
access_control = {
-
default_policy = "deny";
-
# Rules are sequential and do not apply to OIDC
-
rules = [
-
{
-
domain = "headscale.wiro.world";
-
policy = "two_factor";
-
-
}
-
{
-
domain = "news.wiro.world";
-
policy = "one_factor";
-
-
subject = [ [ "group:miniflux" "oauth2:client:miniflux" ] ];
-
}
-
{
-
domain = "*.wiro.world";
-
policy = "two_factor";
-
}
-
];
-
};
-
-
identity_providers.oidc = {
-
enforce_pkce = "always";
-
-
authorization_policies =
-
let
-
mkStrictPolicy = policy: subject:
-
{ default_policy = "deny"; rules = [{ inherit policy subject; }]; };
-
in
-
{
-
headscale = mkStrictPolicy "two_factor" [ "group:headscale" ];
-
tailscale = mkStrictPolicy "two_factor" [ "group:headscale" ];
-
grafana = mkStrictPolicy "one_factor" [ "group:grafana" ];
-
miniflux = mkStrictPolicy "one_factor" [ "group:miniflux" ];
-
};
-
-
claims_policies.headscale = { id_token = [ "email" "name" "preferred_username" "picture" "groups" ]; };
-
-
clients = [
-
{
-
client_name = "Headscale";
-
client_id = "headscale";
-
client_secret = "$pbkdf2-sha256$310000$XY680D9gkSoWhD0UtYHNFg$ptWB3exOYCga6uq1N.oimuV3ILjK3F8lBWBpsBpibos";
-
redirect_uris = [ "https://${headscale-hostname}/oidc/callback" ];
-
authorization_policy = "headscale";
-
claims_policy = "headscale";
-
}
-
{
-
client_name = "Tailscale";
-
client_id = "tailscale";
-
client_secret = "$pbkdf2-sha256$310000$PcUaup9aWKI9ZLeCF6.avw$FpsTxkDaxcoQlBi8aIacegXpjEDiCI6nXcaHyZ2Sxyc";
-
redirect_uris = [ "https://login.tailscale.com/a/oauth_response" ];
-
authorization_policy = "tailscale";
-
}
-
{
-
client_name = "Grafana Console";
-
client_id = "grafana";
-
client_secret = "$pbkdf2-sha256$310000$UkwrqxTZodGMs9.Ca2cXAA$HCWFgQbFHGXZpuz.I3HHdkTZLUevRVGlhKEFaOlPmKs";
-
redirect_uris = [ "https://${grafana-hostname}/login/generic_oauth" ];
-
authorization_policy = "grafana";
-
}
-
{
-
client_name = "Miniflux";
-
client_id = "miniflux";
-
client_secret = "$pbkdf2-sha256$310000$uPqbWfCOBXDY6nV1vsx3uA$HOWG2hL.c/bs9Dwaee3b9DxjH7KFO.SaZMbasXV9Vdw";
-
redirect_uris = [ "https://${miniflux-hostname}/oauth2/oidc/callback" ];
-
authorization_policy = "miniflux";
-
}
-
];
-
};
-
-
-
notifier.smtp = {
-
address = "smtp://smtp.resend.com:2587";
-
username = "resend";
-
# Set in `AUTHELIA_NOTIFIER_SMTP_PASSWORD_FILE`.
-
# password = "";
-
sender = "authelia@wiro.world";
-
};
-
};
-
};
-
-
age.secrets.tuwunel-registration-tokens = { file = ../../secrets/tuwunel-registration-tokens.age; owner = config.services.matrix-tuwunel.user; };
-
services.matrix-tuwunel = {
-
enable = true;
-
package = upkgs.matrix-tuwunel;
-
-
settings.global = {
-
address = [ "127.0.0.1" ];
-
port = [ matrix-port ];
-
-
server_name = "wiro.world";
-
well_known = {
-
client = "https://matrix.wiro.world";
-
server = "matrix.wiro.world:443";
-
};
-
-
grant_admin_to_first_user = true;
-
new_user_displayname_suffix = "";
-
-
allow_registration = true;
-
registration_token_file = config.age.secrets.tuwunel-registration-tokens.path;
-
};
-
};
-
-
services.goatcounter = {
-
enable = true;
-
-
port = goatcounter-port;
-
proxy = true;
-
extraArgs = [ "-automigrate" ];
-
};
-
-
age.secrets.vaultwarden-env.file = ../../secrets/vaultwarden-env.age;
-
services.vaultwarden = {
-
enable = true;
-
package = upkgs.vaultwarden;
-
-
environmentFile = config.age.secrets.vaultwarden-env.path;
-
config = {
-
ROCKET_PORT = vaultwarden-port;
-
DOMAIN = "https://${vaultwarden-hostname}";
-
SIGNUPS_ALLOWED = false;
-
ADMIN_TOKEN = "$argon2id$v=19$m=65540,t=3,p=4$YIe9wmrTsmjgZNPxe8m34O/d3XW3Fl/uZPPLQs79dAc$mjDVQSdBJqz2uBJuxtAvCIoHPzOnTDhNPuhER3dhHrY";
-
-
SMTP_HOST = "smtp.resend.com";
-
SMTP_PORT = 2465;
-
SMTP_SECURITY = "force_tls";
-
SMTP_USERNAME = "resend";
-
# SMTP_PASSWORD = ...; # Via secret env
-
SMTP_FROM = "bitwarden@wiro.world";
-
SMTP_FROM_NAME = "Bitwarden wiro.world";
-
};
-
};
-
-
users.users.miniflux = { isSystemUser = true; group = "miniflux"; };
-
users.groups.miniflux = { };
-
age.secrets.miniflux-oidc-secret = { file = ../../secrets/miniflux-oidc-secret.age; owner = "miniflux"; };
-
services.miniflux = {
-
enable = true;
-
-
createDatabaseLocally = true;
-
config = {
-
BASE_URL = "https://${miniflux-hostname}/";
-
LISTEN_ADDR = "127.0.0.1:${toString miniflux-port}";
-
CREATE_ADMIN = 0;
-
-
METRICS_COLLECTOR = 1;
-
-
OAUTH2_PROVIDER = "oidc";
-
OAUTH2_OIDC_PROVIDER_NAME = "wiro.world SSO";
-
OAUTH2_CLIENT_ID = "miniflux";
-
OAUTH2_CLIENT_SECRET_FILE = config.age.secrets.miniflux-oidc-secret.path;
-
OAUTH2_REDIRECT_URL = "https://${miniflux-hostname}/oauth2/oidc/callback";
-
OAUTH2_OIDC_DISCOVERY_ENDPOINT = "https://auth.wiro.world";
-
OAUTH2_USER_CREATION = 1;
-
DISABLE_LOCAL_AUTH = 1;
-
-
RUN_MIGRATIONS = 1;
-
-
# NetNewsWire is a very good iOS oss client that integrates well
-
# https://b.j4.lc/2025/05/05/setting-up-netnewswire-with-miniflux/
-
};
-
};
-
-
age.secrets.hypixel-bank-tracker-main.file = ../../secrets/hypixel-bank-tracker-main.age;
-
services.hypixel-bank-tracker.instances.main = {
-
enable = true;
-
-
port = hbt-main-port;
-
environmentFile = config.age.secrets.hypixel-bank-tracker-main.path;
-
};
-
-
age.secrets.hypixel-bank-tracker-banana.file = ../../secrets/hypixel-bank-tracker-banana.age;
-
services.hypixel-bank-tracker.instances.banana = {
-
enable = true;
-
-
port = hbt-banana-port;
-
environmentFile = config.age.secrets.hypixel-bank-tracker-banana.path;
-
};
-
};
-
}
+15 -6
pkgs/default.nix
···
-
{ self, system, ... }@pkgs:
+
{ self
+
+
, stdenv
+
, callPackage
+
, ...
+
}:
let
+
inherit (stdenv.hostPlatform) system;
+
inherit (self.inputs)
agenix
git-leave
+
nix-alien
wakatime-ls
;
in
{
-
asak = pkgs.callPackage ./asak.nix { };
-
ebnfer = pkgs.callPackage ./ebnfer.nix { };
-
find-unicode = pkgs.callPackage ./find-unicode.nix { };
-
names = pkgs.callPackage ./names.nix { };
-
probe-rs-udev-rules = pkgs.callPackage ./probe-rs-udev-rules.nix { };
+
asak = callPackage ./asak.nix { };
+
ebnfer = callPackage ./ebnfer.nix { };
+
find-unicode = callPackage ./find-unicode.nix { };
+
names = callPackage ./names.nix { };
+
probe-rs-udev-rules = callPackage ./probe-rs-udev-rules.nix { };
# Import packages defined in foreign repositories
inherit (agenix.packages.${system}) agenix;
inherit (git-leave.packages.${system}) git-leave;
+
inherit (nix-alien.packages.${system}) nix-alien;
inherit (wakatime-ls.packages.${system}) wakatime-ls;
}
secrets/authelia-issuer-private-key.age

This is a binary file and will not be displayed.

secrets/authelia-jwt-secret.age

This is a binary file and will not be displayed.

secrets/authelia-ldap-password.age

This is a binary file and will not be displayed.

-9
secrets/authelia-smtp-password.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 sMF1bg 0duJYaUlZd2G3tYi7CuV+c7KNaqWusLoMpoILvaajgc
-
AnAlDVzRdeoXGXvyllhSNCoDQjZ+nucLGHCfPWR8IBQ
-
-> ssh-ed25519 SmMcWg oX82fe4sQmKyjJqv9AFRY6Bww43V/8myNRsN9/M8Sho
-
Et6ycO8hm2XV36X5q7iO+nJCtjkYoq6mDBEssrjt/70
-
-> ssh-ed25519 Q8rMFA /gU1tIVjqExV8NXB1gSDsWIXpVfxm3zPJX7xOAqeqWM
-
szrd67kHWslLO+jMCuDmzYR0LPVVzd7idgl3AKt+USU
-
--- ojxyQVhx4rX+x5gzEEx8KFiorwywqEEyTNWUJY39jIk
-
�������ş* l��1����= n�Ŏ��(� �Iamz~B����������� 鰦�.�.Z>�',p��
-11
secrets/authelia-storage-key.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 sMF1bg PYC6LaFo/DTQlRMewqbVtS4lzVtKyuFZQSqCrQwwEyg
-
kj0sHy8IpnBsMBQy/XYtj2pLXlk6wprF3MxjFTOiZ6E
-
-> ssh-ed25519 SmMcWg rvlLGzf6D96Dh1lL8as2vjc3PB7G/86U8AR7/lAELT0
-
qcdOqVV6o+5OfJYj5pfZ62hOnrBQwY0DAeIJkLoyYss
-
-> ssh-ed25519 Q8rMFA eALgQVN5OA0EuYYEyEbFnju/Yii71e+xcs98LkXnyyo
-
Rbxu60qvXKdFaJ7lfs7LeYx37TIKYK2Gxw2QcxF3soA
-
--- ryt5q5lXn1Cyn4T6RSU1IR7dHZOTbyanaG6ZqeYYGBQ
-
�G���* \�ʕ�|���
-
�S�T���z�! �FIG͍��,��2Q��+�s�76Z�D`��Q�hM�],��E7�2<Q�
-
?ׯ�t��u\���xpe/rrR��L}��S��g�%�:�Oj����{T%h��D�~�+DЫ��W%� �ŗ�r�v$%m$
+22
secrets/default.nix
···
+
keys:
+
+
let
+
inherit (keys) sessions systems users;
+
+
nixos = systems ++ users;
+
home-manager = sessions ++ users;
+
in
+
{
+
# Used in NixOS config
+
"backup-rclone-googledrive.age".publicKeys = nixos;
+
"backup-restic-key.age".publicKeys = nixos;
+
+
# Used in Home Manager
+
"api-crates-io.age".publicKeys = home-manager;
+
"api-wakatime.age".publicKeys = home-manager;
+
"api-wakapi.age".publicKeys = home-manager;
+
+
# Not used in config but useful
+
"pgp-ca5e.age".publicKeys = users;
+
"ssh-uxgi.age".publicKeys = users;
+
}
-9
secrets/grafana-oidc-secret.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 sMF1bg 2+JZ3WMnTgnnNYmJqdqAtOsEIk9pAefHfwLcXZQpqlg
-
yE0R9b0mSzoT6mvoWUG829UmkgGkm6vg0i7WLORaTis
-
-> ssh-ed25519 SmMcWg c8goAmCIPQ5rsTwoOej9ndGc0uBpWILSn/wy6XJHK14
-
ArjlEl4hxi4N6Py1emxgxUFKvSXIwLWsy6HrWNqJUHw
-
-> ssh-ed25519 Q8rMFA t72V+A0n5Tnb0VqvBrzt3j75CbcfvQltodKMhF64SXY
-
V+Ynzd4tIUI8JPy9uyoi+frW6wJnQxDavHAqnp/lem8
-
--- mzRky/dA1MDArnDSSaGyZP9yAQgD2va4MfopbrdM0iU
-
��*�٪l����a5�QE£ uަ��"�;��3�l.!` �u� _+)$��d ��ˤ����ff�F��mѳc�a�EV��Nߧ��,�@����
secrets/headscale-oidc-secret.age

This is a binary file and will not be displayed.

-13
secrets/hypixel-bank-tracker-banana.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 sMF1bg L4Bb77BNTN5+2CVUxkUrYNrAj6FqaT3DkH84qqjiQxE
-
7qBoMysStcR8/TpQFAVMhDT59uKrNg80oIJruRO7sLo
-
-> ssh-ed25519 SmMcWg L5YrRltkxQF4wukSrg5QmOmGSfNqFQ/Q+MjDIarpqBk
-
wVMUhK3WnVyRq2whgZP1OFlS94NOHFhDm4GNqG+SD2Q
-
-> ssh-ed25519 Q8rMFA hfofGpblCvt5hkhAvq3eIXHCIKUt0y9HYRDXGu1pDB0
-
vB5xSjAJNfX4t224hDyxGAiUrN54ZTqA7dFUXnnAoNc
-
-> @UtB#-grease
-
tzHnzFDaCXfotjJH27bFWHSx6BkcuZi9kRC/XxzegMfScde08g84Lq0uwcIJBQv6
-
jnOLVfcHrtl+80V6D63x+rDmHV3QRhW7uXl4XRKEPYfRLVzkGdG69fDADg
-
--- UxCVaHhB7UXfuUiLRZ8tk7vJ8Iu9SpaWOpOoZslvMDg
-
Acv�������B��/3t���#ȝ���Os�9��� <�w��K� ��_�c,������K���p Y ��I�)׫
-
$�RB�x�� �=��fՍ�- ��&��!��njG�-�8i����a��5�*u��#��s
-13
secrets/hypixel-bank-tracker-main.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 sMF1bg 2rKzzE4Pua0+TwAn9yZsdhXziinxzJF5Whezuc6DPl4
-
qUPSXShxUf/7jDh0X5TnvfeUC+m83jmWSrP8/lweftc
-
-> ssh-ed25519 SmMcWg O5/Uj+Ds1S4G0VfTQs9jwUX+Dfcca2Yv3wk8g0N4Xls
-
HNIW22wiacVbCEPsxoC8zhVBzwNosJbJDFsUvB2EvcI
-
-> ssh-ed25519 Q8rMFA zVH1aTPabm7ede9LnUaS7jPRuwquRme1zL8zERbHC0s
-
BzsHGkLWh58yr369Qj4D/QAbaYBkL5dyw4spnGrhPXA
-
-> l-grease
-
RQnVuYNAWukXav0qt8jW2vHHvStxUyDcBWjxn9r20cqb9pcEqX8YmmY0fGxvq59V
-
EA
-
--- 2HqXUZzs3uyQ9g4jKAu55emz7/CQvK5AI/NQ8ONxjuk
-
� ��}F
-
�~���T�c������Ym��'>�"0q���������Z�����H}�ϛ'����� ��k/���t�v��Q�p,�ڝ�X� Ȉ6�g�'�̍ή�$}۷��\"،4F`�C�HŴ�@�q��D��k��~F=�n)�z
+10 -10
secrets/keys.nix
···
rec {
# Machine SSH key (/etc/ssh/ssh_host_ed25519_key.pub)
-
archaic = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJDuBHC0f7N0q1KRczJMoaBVdY0JFOtcpPy6WlYsoxUh";
-
neo = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINR1/9o1HLnSRkXt3xxAM5So1YCCNdJpBN1leSu7giuR";
-
systems = [ archaic neo ];
+
archaic-wiro-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJDuBHC0f7N0q1KRczJMoaBVdY0JFOtcpPy6WlYsoxUh";
+
neo-wiro-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINR1/9o1HLnSRkXt3xxAM5So1YCCNdJpBN1leSu7giuR";
+
systems = [ archaic-wiro-laptop neo-wiro-laptop ];
-
weird-row = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII5sThvKuIj8yfeZzUPYfxWxnjTTdNtSID2OL4czE8AL";
-
servers = [ weird-row ];
+
weird-row-server = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII5sThvKuIj8yfeZzUPYfxWxnjTTdNtSID2OL4czE8AL";
+
servers = [ weird-row-server ];
# Sessions specific age key (~/.ssh/id_home_manager.pub)
-
neo-milomoisson = "age1vz2zmduaqhaw5jrqh277pmp36plyth8rz5k9ccxeftfcl2nlhalqwvx5xz";
-
sessions = [ neo-milomoisson ];
+
neo-milo = "age1vz2zmduaqhaw5jrqh277pmp36plyth8rz5k9ccxeftfcl2nlhalqwvx5xz";
+
sessions = [ neo-milo ];
-
# User keys (~/.ssh/id_ed25519.pub)
-
milomoisson = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJdt7atyPTOfaBIsgDYYb0DG1yid2u78abaCDji6Uxgi";
+
# User keys (~/.ssh/id_{ed25519,ecdsa}.pub)
+
milo-ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJdt7atyPTOfaBIsgDYYb0DG1yid2u78abaCDji6Uxgi";
wirody = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMdW6ijH9oTsrswUJmQBF2LQkhjrMFkJ1LktnirPuL2S";
-
users = [ milomoisson wirody ];
+
users = [ milo-ed25519 wirody ];
}
secrets/lldap-env.age

This is a binary file and will not be displayed.

-9
secrets/miniflux-oidc-secret.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 sMF1bg E4UVPOuq5ZUSxGvIvr0Tod9PQRqDdqHu2Byv4fKi2io
-
FcdCyfLmRCmK5rmoLQ/m1KOJe9Etu9N/GHCM5lWCIPE
-
-> ssh-ed25519 SmMcWg wrKv3V6uSLnWQqIp65Rgi0qv7lQtyOXaxnahMo+s3EU
-
mXsJ1CbS3pzstf3xaWWF150+aXxW2kY2J5kAZWqtl+A
-
-> ssh-ed25519 Q8rMFA 91npFfTkw9Ur6aZp/pLzLUOIwwPJ9OA1peaZyTlROBU
-
12sib8HLjvgN06X6H0/AN4wMewQ8xup813DauZKQ+QY
-
--- /AGwAMAsPvvuRH6PPNrizBCsJedclYzdj6Kq4V3mx0o
-
zN��0�=�YP������rլ�!U�n;���n���/��}mCo�F��������ž!z���r������)u��o�3�>��>Z�f�񡤙1Ň ����
secrets/pds-env.age

This is a binary file and will not be displayed.

-42
secrets/secrets.nix
···
-
let
-
inherit (import ./keys.nix) servers sessions systems users;
-
-
nixos = systems ++ users;
-
home-manager = sessions ++ users;
-
deploy = servers ++ users;
-
in
-
{
-
# Used in NixOS config
-
"backup-rclone-googledrive.age".publicKeys = nixos;
-
"backup-restic-key.age".publicKeys = nixos;
-
-
# Used in Home Manager
-
"api-crates-io.age".publicKeys = home-manager;
-
"api-wakatime.age".publicKeys = home-manager;
-
"api-wakapi.age".publicKeys = home-manager;
-
-
# Used in server deployment
-
-
# Defines `PDS_JWT_SECRET`, `PDS_ADMIN_PASSWORD`, `PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX`, `PDS_EMAIL_SMTP_URL`, `PDS_EMAIL_FROM_ADDRESS`.
-
"pds-env.age".publicKeys = deploy;
-
# Defines `LLDAP_JWT_SECRET`, `LLDAP_KEY_SEED`.
-
"lldap-env.age".publicKeys = deploy;
-
"headscale-oidc-secret.age".publicKeys = deploy;
-
"grafana-oidc-secret.age".publicKeys = deploy;
-
"authelia-jwt-secret.age".publicKeys = deploy;
-
"authelia-issuer-private-key.age".publicKeys = deploy;
-
"authelia-storage-key.age".publicKeys = deploy;
-
"authelia-ldap-password.age".publicKeys = deploy;
-
"authelia-smtp-password.age".publicKeys = deploy;
-
"tuwunel-registration-tokens.age".publicKeys = deploy;
-
# Defines `SMTP_PASSWORD`
-
"vaultwarden-env.age".publicKeys = deploy;
-
"miniflux-oidc-secret.age".publicKeys = deploy;
-
# Defines `HYPIXEL_API_KEY`, `PROFILE_UUID`
-
"hypixel-bank-tracker-main.age".publicKeys = deploy;
-
"hypixel-bank-tracker-banana.age".publicKeys = deploy;
-
-
# Not used in config but useful
-
"pgp-ca5e.age".publicKeys = users;
-
"ssh-uxgi.age".publicKeys = users;
-
}
-9
secrets/tuwunel-registration-tokens.age
···
-
age-encryption.org/v1
-
-> ssh-ed25519 sMF1bg TVYRDtTe5khTJo0q8ShrR5o1WBrbK2htHjYCvi5QYAA
-
kx6Hke5RAZFfugR4aU28SRh4U8e4ymzeIY/+kYlAWhw
-
-> ssh-ed25519 SmMcWg AyJOM5lQHETeGiI/V5vUtu2vD6PqCZNnuTPvfnU90zE
-
9vM7/8JUbScHaeDWig16MgqtULryofSrRqhw2OMWfBs
-
-> ssh-ed25519 Q8rMFA TeUNtmHquyhhDrXf+zXY56oTGvzkhkaReIoBx5Yb+TE
-
DLfVy9cO1JrVln9CHV1ag66z2kIMrVzhcaIugLytojE
-
--- nr/3KZTVXNdemLdmp2bO2bjxKDHvcy3gezZKYN5Z1qI
-
�"��Z8��ԛ�GvJ�{��(�V9��1�N"��o���o����Х�oJ�~�1�!�}Egd�!�
secrets/vaultwarden-env.age

This is a binary file and will not be displayed.

+9 -2
secrets.nix
···
let
inherit (builtins) listToAttrs attrNames;
+
+
# Map the name and value of all items of an attrset
mapAttrs' =
f:
set:
listToAttrs (map (attr: f attr set.${attr}) (attrNames set));
+
+
keys = import ./secrets/keys.nix;
+
+
prependAttrsName = prefix: mapAttrs' (name: value: { name = prefix + name; inherit value; });
+
secretsDir = path: prependAttrsName (path + "/") ((import ./${path}/default.nix) keys);
in
-
# You can use agenix directly at repo top-level instead of having to change directory into `secrets/`
-
mapAttrs' (name: value: { name = ("secrets/" + name); inherit value; }) (import ./secrets/secrets.nix)
+
secretsDir "secrets"
+
// secretsDir "hosts/weird-row-server/secrets"
+1 -1
templates/blank/flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
+1 -1
templates/c/flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
+1 -1
templates/rust/flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
+1 -1
templates/rust-pkg/flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";