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