Nix configurations for my homelab
1{ nixpkgs, pkgs, ... }:
2{
3 systemd = {
4 services.nix-daemon.environment.TMPDIR = "/nix/tmp";
5 tmpfiles.settings."nix-tmp"."/nix/tmp".d = {
6 user = "root";
7 group = "root";
8 age = "1d";
9 };
10 };
11
12 users.users.mou.packages = with pkgs; [
13 age
14 git
15 nixd
16 nixfmt-rfc-style
17 sops
18
19 (callPackage ./packages/buildConfig { })
20 ];
21
22 nix = {
23 gc = {
24 automatic = true;
25 dates = "weekly";
26 options = "--delete-older-than 28d";
27 };
28 nixPath = [ "nixpkgs=${nixpkgs}" ];
29 optimise.automatic = true;
30 settings = {
31 auto-optimise-store = true;
32 build-dir = "/nix/tmp";
33 download-buffer-size = 134217728;
34 experimental-features = [
35 "nix-command"
36 "flakes"
37 ];
38 keep-going = true;
39 use-xdg-base-directories = true;
40 };
41 registry.seed.to = {
42 type = "git";
43 url = "https://tangled.org/@yemou.pink/seed";
44 };
45 };
46}