My Nix Configuration
1{ 2 nixConfig = { 3 experimental-features = "nix-command flakes"; 4 substitute = "true"; 5 extra-substituters = [ 6 "https://cache.nixos.org" 7 "https://nix-community.cachix.org" 8 "https://install.determinate.systems" 9 "https://vicinae.cachix.org" 10 ]; 11 trusted-public-keys = [ 12 "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 13 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 14 "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" 15 "vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc=" 16 ]; 17 cores = 0; 18 max-jobs = 2; 19 netrc-file = "/home/thehedgehog/.netrc"; 20 }; 21 description = "PyroNet machines and services"; 22 23 inputs = { 24 flake-parts = { 25 url = "github:hercules-ci/flake-parts"; 26 inputs.nixpkgs-lib.follows = "nixpkgs-lib"; 27 }; 28 nixpkgs.url = "https://nixpkgs.dev/channel/nixpkgs-unstable"; 29 nixpkgs-stalwart-fix.url = "github:pyrox0/nixpkgs/fix/stalwart-module"; 30 stable.url = "github:nixos/nixpkgs/nixos-24.05"; 31 # Overrides 32 flake-compat.url = "github:edolstra/flake-compat"; 33 systems.url = "github:nix-systems/default"; 34 flake-utils = { 35 url = "github:numtide/flake-utils"; 36 inputs.systems.follows = "systems"; 37 }; 38 nixpkgs-lib.url = "github:nix-community/nixpkgs.lib"; 39 40 # Inputs 41 agenix = { 42 url = "github:ryantm/agenix"; 43 inputs = { 44 nixpkgs.follows = "nixpkgs"; 45 systems.follows = "systems"; 46 home-manager.follows = "home-manager"; 47 }; 48 }; 49 buildbot-nix = { 50 url = "github:nix-community/buildbot-nix"; 51 inputs.nixpkgs.follows = "nixpkgs"; 52 inputs.flake-parts.follows = "flake-parts"; 53 inputs.treefmt-nix.follows = ""; 54 }; 55 ctp = { 56 url = "github:catppuccin/nix"; 57 }; 58 dix = { 59 url = "https://flakehub.com/f/DeterminateSystems/nix-src/*"; 60 inputs = { 61 nixpkgs.follows = "nixpkgs"; 62 nixpkgs-regression.follows = ""; 63 nixpkgs-23-11.follows = ""; 64 65 flake-parts.follows = ""; 66 git-hooks-nix.follows = ""; 67 }; 68 }; 69 determinate = { 70 url = "github:DeterminateSystems/determinate"; 71 inputs = { 72 nixpkgs.follows = "nixpkgs"; 73 nix.follows = "dix"; 74 }; 75 }; 76 dns = { 77 url = "github:nix-community/dns.nix"; 78 inputs.flake-utils.follows = "flake-utils"; 79 inputs.nixpkgs.follows = "nixpkgs"; 80 }; 81 easy-hosts.url = "github:tgirlcloud/easy-hosts"; 82 golink = { 83 url = "github:tailscale/golink"; 84 inputs.systems.follows = "systems"; 85 inputs.nixpkgs.follows = "nixpkgs"; 86 }; 87 hardware = { 88 url = "github:nixos/nixos-hardware"; 89 }; 90 home-manager = { 91 url = "github:nix-community/home-manager"; 92 inputs.nixpkgs.follows = "nixpkgs"; 93 }; 94 iceshrimp = { 95 url = "git+https://iceshrimp.dev/pyrox/packaging"; 96 inputs.nixpkgs.follows = "nixpkgs"; 97 }; 98 mailserver = { 99 url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master"; 100 inputs = { 101 flake-compat.follows = "flake-compat"; 102 nixpkgs.follows = "nixpkgs"; 103 }; 104 }; 105 nix-search = { 106 url = "github:diamondburned/nix-search"; 107 inputs.nixpkgs.follows = "nixpkgs"; 108 inputs.flake-utils.follows = "flake-utils"; 109 inputs.flake-compat.follows = "flake-compat"; 110 }; 111 nix-index = { 112 url = "github:nix-community/nix-index"; 113 inputs.flake-compat.follows = "flake-compat"; 114 inputs.nixpkgs.follows = "nixpkgs"; 115 }; 116 nix-index-database = { 117 url = "github:Mic92/nix-index-database"; 118 inputs.nixpkgs.follows = "nixpkgs"; 119 }; 120 my-pkgs = { 121 url = "git+https://git.pyrox.dev/pyrox/pkgs"; 122 inputs.nixpkgs.follows = "nixpkgs"; 123 }; 124 vicinae = { 125 url = "github:vicinaehq/vicinae"; 126 }; 127 tangled = { 128 url = "git+https://tangled.org/@tangled.org/core"; 129 }; 130 }; 131 132 outputs = 133 inputs: 134 inputs.flake-parts.lib.mkFlake { inherit inputs; } { 135 # Systems we want to build for 136 systems = [ 137 "x86_64-linux" 138 ]; 139 140 # Flake modules 141 imports = [ 142 inputs.easy-hosts.flakeModule 143 inputs.home-manager.flakeModules.home-manager 144 ./packages 145 ./lib 146 ./overlays 147 ./devShells 148 ./nixosModules 149 ./homeModules 150 ./templates 151 ./hosts 152 ]; 153 154 # # Flake attributes 155 # flake = { 156 # 157 # }; 158 159 # Per-system stuff 160 perSystem = 161 { 162 pkgs, 163 system, 164 ... 165 }: 166 { 167 _module.args.pkgs = import inputs.nixpkgs { 168 inherit system; 169 overlays = [ 170 # inputs.self.overlays.pyronet-packages 171 inputs.self.overlays.openssh-fixperms 172 inputs.golink.overlays.default 173 ]; 174 config = { 175 allowUnfree = true; 176 }; 177 }; 178 formatter = pkgs.nixfmt; 179 }; 180 # Enable debugging for nixd 181 debug = true; 182 }; 183}