yep, more dotfiles

Compare changes

Choose any two refs to compare.

Changed files
+1534 -1608
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; })
];
};
+238 -223
flake.lock
···
{
"nodes": {
+
"actor-typeahead-src": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1762835797,
+
"narHash": "sha256-heizoWUKDdar6ymfZTnj3ytcEv/L4d4fzSmtr0HlXsQ=",
+
"ref": "refs/heads/main",
+
"rev": "677fe7f743050a4e7f09d4a6f87bbf1325a06f6b",
+
"revCount": 6,
+
"type": "git",
+
"url": "https://tangled.org/@jakelazaroff.com/actor-typeahead"
+
},
+
"original": {
+
"type": "git",
+
"url": "https://tangled.org/@jakelazaroff.com/actor-typeahead"
+
}
+
},
"agenix": {
"inputs": {
"darwin": "darwin",
···
"systems": "systems"
},
"locked": {
-
"lastModified": 1754433428,
-
"narHash": "sha256-NA/FT2hVhKDftbHSwVnoRTFhes62+7dxZbxj5Gxvghs=",
+
"lastModified": 1762618334,
+
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
"owner": "ryantm",
"repo": "agenix",
-
"rev": "9edb1787864c4f59ae5074ad498b6272b3ec308d",
+
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
"type": "github"
},
"original": {
···
"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": {
···
},
"crane": {
"locked": {
-
"lastModified": 1731098351,
-
"narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
+
"lastModified": 1754269165,
+
"narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=",
"owner": "ipetkov",
"repo": "crane",
-
"rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
+
"rev": "444e81206df3f7d92780680e45858e31d2f07a08",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1758287904,
-
"narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=",
+
"lastModified": 1764627417,
+
"narHash": "sha256-D6xc3Rl8Ab6wucJWdvjNsGYGSxNjQHzRc2EZ6eeQ6l4=",
"owner": "nix-community",
"repo": "disko",
-
"rev": "67ff9807dd148e704baadbd4fd783b54282ca627",
+
"rev": "5a88a6eceb8fd732b983e72b732f6f4b8269bef3",
"type": "github"
},
"original": {
···
"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": 1696426674,
-
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+
"lastModified": 1761588595,
+
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
"owner": "edolstra",
"repo": "flake-compat",
-
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+
"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": 1730504689,
-
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
-
"owner": "hercules-ci",
-
"repo": "flake-parts",
-
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
-
"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": {
···
"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": {
···
"gitignore_2": {
"inputs": {
"nixpkgs": [
+
"hypixel-bank-tracker",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1762808025,
+
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
+
"owner": "hercules-ci",
+
"repo": "gitignore.nix",
+
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "gitignore.nix",
+
"type": "github"
+
}
+
},
+
"gitignore_3": {
+
"inputs": {
+
"nixpkgs": [
"lanzaboote",
-
"pre-commit-hooks-nix",
+
"pre-commit",
"nixpkgs"
]
},
···
"type": "github"
}
},
-
"gitignore_3": {
+
"gitignore_4": {
"inputs": {
"nixpkgs": [
"wakatime-ls",
···
"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": {
···
"type": "github"
}
},
-
"helix": {
-
"inputs": {
-
"nixpkgs": [
-
"unixpkgs"
-
],
-
"rust-overlay": "rust-overlay_2"
-
},
-
"locked": {
-
"lastModified": 1759201995,
-
"narHash": "sha256-3STv6fITv8Ar/kl0H7vIA7VV0d2gyLh8UL0BOiVacXg=",
-
"owner": "helix-editor",
-
"repo": "helix",
-
"rev": "bfcbef10c513108c7b43317569416c2eefc4ed44",
-
"type": "github"
-
},
-
"original": {
-
"owner": "helix-editor",
-
"repo": "helix",
-
"type": "github"
-
}
-
},
"home-manager": {
"inputs": {
"nixpkgs": [
···
]
},
"locked": {
-
"lastModified": 1747556831,
-
"narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=",
+
"lastModified": 1764398914,
+
"narHash": "sha256-YPrpwlVQidzQlMh0OnquaJR+58rKe9YNnuRis293Ilo=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33",
+
"rev": "d0c5fdc48db6f19471b8adc954eca09194e68036",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "release-25.05",
-
"repo": "home-manager",
-
"type": "github"
-
}
-
},
-
"home-manager_2": {
-
"inputs": {
-
"nixpkgs": [
-
"zen-browser",
-
"nixpkgs"
-
]
-
},
-
"locked": {
-
"lastModified": 1752603129,
-
"narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=",
-
"owner": "nix-community",
-
"repo": "home-manager",
-
"rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b",
-
"type": "github"
-
},
-
"original": {
-
"owner": "nix-community",
+
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
···
"url": "https://cdn.jsdelivr.net/npm/htmx-ext-ws@2.0.2"
}
},
+
"hypixel-bank-tracker": {
+
"inputs": {
+
"gitignore": "gitignore_2",
+
"nixpkgs": [
+
"nixpkgs"
+
],
+
"rust-overlay": "rust-overlay_2"
+
},
+
"locked": {
+
"lastModified": 1764455123,
+
"narHash": "sha256-ePlZ3OHBLTRlRa9zs2IeHNA8CuiMLyu5ZUzxoGI5Hp0=",
+
"owner": "pixilie",
+
"repo": "hypixel-bank-tracker",
+
"rev": "8e4e91b1a8fa264895fa40dda93c3363be33a958",
+
"type": "github"
+
},
+
"original": {
+
"owner": "pixilie",
+
"repo": "hypixel-bank-tracker",
+
"type": "github"
+
}
+
},
"ibm-plex-mono-src": {
"flake": false,
"locked": {
···
"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": 1737639419,
-
"narHash": "sha256-AEEDktApTEZ5PZXNDkry2YV2k6t0dTgLPEmAZbnigXU=",
+
"lastModified": 1764622702,
+
"narHash": "sha256-HggOVvg2U3EwT44wPHEwFKromf9qR9rTqfV1i3q7rYs=",
"owner": "nix-community",
"repo": "lanzaboote",
-
"rev": "a65905a09e2c43ff63be8c0e86a93712361f871e",
+
"rev": "6242b3b2b5e5afcf329027ed4eb5fa6e2eab10f1",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "v0.4.2",
"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": 1748004251,
-
"narHash": "sha256-XodjkVWTth3A2JpBqGBkdLD9kkWn94rnv98l3xwKukg=",
-
"owner": "LnL7",
+
"lastModified": 1764161084,
+
"narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=",
+
"owner": "nix-darwin",
"repo": "nix-darwin",
-
"rev": "33220d4791784e4dd4739edd3f6c028020082f91",
+
"rev": "e95de00a471d07435e0527ff4db092c84998698e",
"type": "github"
},
"original": {
-
"owner": "LnL7",
+
"owner": "nix-darwin",
+
"ref": "nix-darwin-25.11",
"repo": "nix-darwin",
"type": "github"
}
},
-
"nixos-hardware": {
+
"nix-index-database": {
+
"inputs": {
+
"nixpkgs": [
+
"nix-alien",
+
"nixpkgs"
+
]
+
},
"locked": {
-
"lastModified": 1758663926,
-
"narHash": "sha256-6CFdj7Xs616t1W4jLDH7IohAAvl5Dyib3qEv/Uqw1rk=",
-
"owner": "nixos",
-
"repo": "nixos-hardware",
-
"rev": "170ff93c860b2a9868ed1e1102d4e52cb3d934e1",
+
"lastModified": 1762660502,
+
"narHash": "sha256-C9F1C31ys0V7mnp4EcDy7L1cLZw/sCTEXqqTtGnvu08=",
+
"owner": "nix-community",
+
"repo": "nix-index-database",
+
"rev": "15c5451c63f4c612874a43846bfe3fa828b03eee",
"type": "github"
},
"original": {
-
"owner": "nixos",
-
"repo": "nixos-hardware",
+
"owner": "nix-community",
+
"repo": "nix-index-database",
"type": "github"
}
},
-
"nixpkgs": {
+
"nixos-hardware": {
"locked": {
-
"lastModified": 1747953325,
-
"narHash": "sha256-y2ZtlIlNTuVJUZCqzZAhIw5rrKP4DOSklev6c8PyCkQ=",
+
"lastModified": 1764440730,
+
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
"owner": "nixos",
-
"repo": "nixpkgs",
-
"rev": "55d1f923c480dadce40f5231feb472e81b0bab48",
+
"repo": "nixos-hardware",
+
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
"type": "github"
},
"original": {
"owner": "nixos",
-
"ref": "nixos-25.05",
-
"repo": "nixpkgs",
+
"repo": "nixos-hardware",
"type": "github"
}
},
-
"nixpkgs-stable": {
+
"nixpkgs": {
"locked": {
-
"lastModified": 1730741070,
-
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
-
"owner": "NixOS",
+
"lastModified": 1764406085,
+
"narHash": "sha256-CYbMp8hwuOf4umokSNp+t1s4Hjd4vxXq4S5CD+xvgNs=",
+
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
+
"rev": "9561691c9f450fad7c3526916e1c4f44be0d1192",
"type": "github"
},
"original": {
-
"owner": "NixOS",
-
"ref": "nixos-24.05",
+
"owner": "nixos",
+
"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"
-
],
-
"gitignore": "gitignore_2",
+
"flake-compat": "flake-compat",
+
"gitignore": "gitignore_3",
"nixpkgs": [
"lanzaboote",
"nixpkgs"
-
],
-
"nixpkgs-stable": "nixpkgs-stable"
+
]
},
"locked": {
-
"lastModified": 1731363552,
-
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
+
"lastModified": 1763988335,
+
"narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
-
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
+
"rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce",
"type": "github"
},
"original": {
···
"agenix": "agenix",
"disko": "disko",
"git-leave": "git-leave",
-
"helix": "helix",
"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": {
···
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
-
"helix",
+
"hypixel-bank-tracker",
"nixpkgs"
]
},
"locked": {
-
"lastModified": 1740623427,
-
"narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=",
+
"lastModified": 1763087910,
+
"narHash": "sha256-eB9Z1mWd1U6N61+F8qwDggX0ihM55s4E0CluwNukJRU=",
"owner": "oxalica",
"repo": "rust-overlay",
-
"rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab",
+
"rev": "cf4a68749733d45c0420726596367acd708eb2e8",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1731897198,
-
"narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
+
"lastModified": 1761791894,
+
"narHash": "sha256-myRIDh+PxaREz+z9LzbqBJF+SnTFJwkthKDX9zMyddY=",
"owner": "oxalica",
"repo": "rust-overlay",
-
"rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
+
"rev": "59c45eb69d9222a4362673141e00ff77842cd219",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1759107752,
-
"narHash": "sha256-VEdL1J4rk+Z/5wHhLSsvj5QmXWKHHDeN1P8YLGLa1RM=",
+
"lastModified": 1764205213,
+
"narHash": "sha256-VWKPkM4m5kGgJ0HY1WKfvlPkKka6tYwUR8snetAFTu8=",
"owner": "nix-community",
"repo": "srvos",
-
"rev": "97708379b1f3b64224632eb49a56e45fe6995e6f",
+
"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"
···
"tinted-zed": "tinted-zed"
},
"locked": {
-
"lastModified": 1760478648,
-
"narHash": "sha256-Y4l+Y3zUvqIDbyLrtOrzNvp1o50Fp9TYK+iwtwweFU4=",
+
"lastModified": 1764193603,
+
"narHash": "sha256-guX30TWe8HRG2qPFiM9893F2uTw4B8D/xkE6Mq7MiYg=",
"owner": "nix-community",
"repo": "stylix",
-
"rev": "1ec254101285777db13922303cc47ded06e10bb3",
+
"rev": "9bf8725a3d65b3ff0ba68ce13779657f5095e36b",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "release-25.05",
+
"ref": "release-25.11",
"repo": "stylix",
"type": "github"
}
···
},
"tangled": {
"inputs": {
-
"flake-compat": "flake-compat_2",
+
"actor-typeahead-src": "actor-typeahead-src",
+
"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": 1759247161,
-
"narHash": "sha256-Th0+karP19f0BC4cYBI27adn+lGFYCWq5C+FfQFrHXA=",
+
"lastModified": 1764005195,
+
"narHash": "sha256-PzuWiW/nMxwQTX0i1bHwGazQF4ptLNI9OGwpmhDb9i0=",
"ref": "refs/heads/master",
-
"rev": "5c9bf597da9a0f19635187a10f6711dd1917a9d7",
-
"revCount": 1467,
+
"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": 1761373498,
-
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
+
"lastModified": 1764950072,
+
"narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
+
"rev": "f61125a668a320878494449750330ca58b78c557",
"type": "github"
},
"original": {
···
},
"wakatime-ls": {
"inputs": {
-
"gitignore": "gitignore_3",
+
"gitignore": "gitignore_4",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay_4"
},
"locked": {
-
"lastModified": 1761744398,
-
"narHash": "sha256-3SigmxIycZgaW/BVDqf6hkC+octwNecBt5g0D69YrAU=",
+
"lastModified": 1761849542,
+
"narHash": "sha256-5fNSKIUG54TD5jq5hgsCmB4FB0mO8teiBE18fU81mfc=",
"owner": "mrnossiom",
"repo": "wakatime-ls",
-
"rev": "8598bc6f5e86522ee27605d4dee3ecf7a8a96dfa",
+
"rev": "89e4091ef5e4c1830dd9bd463f8b063f8335bfad",
"type": "github"
},
"original": {
···
},
"zen-browser": {
"inputs": {
-
"home-manager": "home-manager_2",
+
"home-manager": [
+
"home-manager"
+
],
"nixpkgs": [
"unixpkgs"
},
"locked": {
-
"lastModified": 1761535208,
-
"narHash": "sha256-E1PobJMiFmVUX2YdqYk/MpKb0LXavOYvlg8DCBBzlHc=",
+
"lastModified": 1764414951,
+
"narHash": "sha256-pZ2m2JmTTMyqiKB8WSigsSvAeoShI6OSRhzBuRO9SVY=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
-
"rev": "79a94872a3e6993a051c4e22a2dcb02c1d088acf",
+
"rev": "10d2aa53ada9b14f6df2f9877d6a057f0a2b262f",
"type": "github"
},
"original": {
+19 -16
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";
-
stylix.url = "github:nix-community/stylix/release-25.05";
-
stylix.inputs.nixpkgs.follows = "nixpkgs";
+
nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
+
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
-
## Misc
+
stylix.url = "github:nix-community/stylix/release-25.11";
+
stylix.inputs.nixpkgs.follows = "nixpkgs";
-
nix-darwin.url = "github:LnL7/nix-darwin";
-
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
+
## Miscellaneous
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
···
nixos-hardware.url = "github:nixos/nixos-hardware";
-
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2";
+
lanzaboote.url = "github:nix-community/lanzaboote";
lanzaboote.inputs.nixpkgs.follows = "unixpkgs";
srvos.url = "github:nix-community/srvos";
-
# srvos.inputs.nixpkgs.follows = "srvos/nixpkgs";
srvos.inputs.nixpkgs.follows = "nixpkgs";
## Packages
···
git-leave.url = "github:mrnossiom/git-leave";
git-leave.inputs.nixpkgs.follows = "nixpkgs";
-
helix.url = "github:helix-editor/helix";
-
helix.inputs.nixpkgs.follows = "unixpkgs";
+
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";
···
zen-browser.url = "github:0xc000022070/zen-browser-flake";
zen-browser.inputs.nixpkgs.follows = "unixpkgs";
+
zen-browser.inputs.home-manager.follows = "home-manager";
};
outputs = { self, nixpkgs, ... }:
···
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);
+5 -1
home-manager/fragments/firefox.nix
···
];
config = lib.mkIf cfg.enable {
-
home.sessionVariables.BROWSER = lib.getExe pkgs.firefox;
+
home.sessionVariables.BROWSER = lib.getExe config.programs.zen-browser.package;
stylix.targets.firefox = {
+
enable = false;
+
profileNames = [ "default" ];
+
};
+
stylix.targets.zen-browser = {
enable = false;
profileNames = [ "default" ];
};
+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 -2
home-manager/fragments/helix.nix
···
programs.helix = {
enable = true;
-
package = if flags.onlyCached then upkgs.helix else lpkgs.helix;
+
package = upkgs.helix;
defaultEditor = true;
settings = {
···
};
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
+11 -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
'';
···
{ criteria.app_id = "firefox"; command = "inhibit_idle fullscreen"; }
{ criteria.app_id = "mpv"; command = "inhibit_idle fullscreen"; }
{ criteria.app_id = "spotify"; command = "inhibit_idle fullscreen"; }
+
{ criteria.app_id = "zen-beta"; command = "inhibit_idle fullscreen"; }
];
};
···
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";
···
services.gammastep = {
enable = true;
+
tray = true;
provider = "geoclue2";
settings.general = {
adjustment-method = "wayland";
+6 -6
home-manager/fragments/tools.nix
···
{ config
, lib
, pkgs
-
, lpkgs
, ...
}:
···
# CLIs
asciinema
calc
+
csvlens
delta
dogdns
-
du-dust
+
dust
encfs
fastfetch
fd
ffmpeg
file
fzf
+
gemini-cli
inetutils
jq
just
···
lsof
mediainfo
openssl
+
otree
ouch
parallel
+
perf
pv
restic
ripgrep
···
uni
unzip
vlock
-
wcurl
wormhole-rs
-
]) ++ lib.optionals (!flags.onlyCached) [
-
lpkgs.otree
-
];
+
]) ++ lib.optionals (!flags.onlyCached) [ ];
programs.fish.shellAbbrs = {
# Use newer tools
+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;
+7 -8
home-manager/profiles/desktop.nix
···
figma-linux
file-roller
gnome-disk-utility
-
# TODO: move and embed config in nix
-
halloy
-
heroic
insomnia
kicad
-
ldtk
+
legcord
libreoffice-qt
localsend
mpv
···
pavucontrol
prismlauncher
rawtherapee
-
showmethekey
simple-scan
-
sonic-pi
transmission_4-gtk
-
vesktop
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.
'';
-1
modules/nixos/default.nix
···
{
-
geoclue2 = ./geoclue2.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;
-
# logitude = 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 overriden by other location services
-
# '';
-
# };
-
-
staticFile = mkOption {
-
type = types.nullOr (types.str);
-
default = null;
-
description = ''
-
Add a fallback location that will be overriden 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;
-
};
-
}
+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;
-647
nixos/profiles/server.nix
···
-
{ self
-
, config
-
, pkgs
-
, upkgs
-
, ...
-
}:
-
-
let
-
inherit (self.inputs) unixpkgs srvos agenix tangled;
-
-
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-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";
-
-
prometheus-port = 9001;
-
prometheus-node-exporter-port = 9002;
-
headscale-metrics-port = 9003;
-
authelia-metrics-port = 9004;
-
in
-
{
-
imports = [
-
srvos.nixosModules.server
-
srvos.nixosModules.hardware-hetzner-cloud
-
srvos.nixosModules.mixins-terminfo
-
-
agenix.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 ];
-
};
-
-
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
-
}
-
'' +
-
''
-
log {
-
level INFO
-
format console
-
output file /tmp/access-wiro.world.log
-
}
-
'' +
-
''
-
reverse_proxy /.well-known/matrix/* http://localhost:${toString matrix-port}
-
'' +
-
''
-
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}
-
'';
-
};
-
-
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; };
-
services.headscale = {
-
enable = true;
-
-
port = headscale-port;
-
settings = {
-
server_url = "https://${headscale-hostname}";
-
metrics_listen_addr = "127.0.0.1:${toString headscale-metrics-port}";
-
-
# disable TLS
-
tls_cert_path = null;
-
tls_key_path = null;
-
-
dns = {
-
magic_dns = true;
-
base_domain = "net.wiro.world";
-
};
-
-
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;
-
};
-
};
-
};
-
-
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;
-
-
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/
-
};
-
};
-
};
-
}
+20 -9
pkgs/default.nix
···
-
{ self, system, ... }@pkgs:
+
{ self
+
+
, stdenv
+
, callPackage
+
, ...
+
}:
let
-
inherit (self.inputs) agenix git-leave helix wakatime-ls;
+
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 { };
-
otree = pkgs.callPackage ./otree.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 (helix.packages.${system}) helix;
+
inherit (nix-alien.packages.${system}) nix-alien;
inherit (wakatime-ls.packages.${system}) wakatime-ls;
}
-38
pkgs/otree.nix
···
-
{ lib
-
-
, stdenv
-
, rustPlatform
-
, fetchFromGitHub
-
, darwin
-
}:
-
-
rustPlatform.buildRustPackage rec {
-
pname = "otree";
-
version = "0.1.0";
-
-
src = fetchFromGitHub {
-
owner = "fioncat";
-
repo = pname;
-
# rev = "v${version}";
-
rev = "bbaf9d53659e242eb7e85517c2d8aacefcac7d25";
-
hash = "sha256-xqTfNFot8wXSTxsQVwM+4hD+z0BIbblC/lpd9uBJf8I=";
-
};
-
-
cargoLock = {
-
lockFile = "${src}/Cargo.lock";
-
outputHashes = {
-
"tui-tree-widget-0.20.0" = "sha256-/uLp63J4FoMT1rMC9cv49JAX3SuPvFWPtvdS8pspsck=";
-
};
-
};
-
-
buildInputs = [ ]
-
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
-
-
meta = with lib; {
-
description = "A command line tool to view objects (JSON/YAML/TOML) in TUI tree widget";
-
homepage = "https://github.com/fioncat/otree";
-
license = licenses.mit;
-
maintainers = with maintainers; [ mrnossiom ];
-
mainProgram = "otree";
-
};
-
}
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.

+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.

-39
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;
-
-
# 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";