My Nix Configuration
at main 4.8 kB view raw
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 ]; 9 trusted-public-keys = [ 10 "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 11 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 12 ]; 13 cores = 0; 14 max-jobs = 2; 15 netrc-file = "/home/thehedgehog/.netrc"; 16 }; 17 description = "PyroNet machines and services"; 18 19 inputs = { 20 flake-parts = { 21 url = "github:hercules-ci/flake-parts"; 22 }; 23 nixpkgs.url = "https://nixpkgs.dev/channel/nixpkgs-unstable"; 24 nixpkgs-stalwart-fix.url = "github:pyrox0/nixpkgs/fix/stalwart-module"; 25 # Overrides 26 flake-compat.url = "github:edolstra/flake-compat"; 27 flake-utils = { 28 url = "github:numtide/flake-utils"; 29 }; 30 31 # Inputs 32 agenix = { 33 url = "github:ryantm/agenix"; 34 inputs = { 35 nixpkgs.follows = "nixpkgs"; 36 home-manager.follows = "home-manager"; 37 }; 38 }; 39 buildbot-nix = { 40 url = "github:nix-community/buildbot-nix"; 41 inputs.nixpkgs.follows = "nixpkgs"; 42 inputs.flake-parts.follows = "flake-parts"; 43 inputs.treefmt-nix.follows = ""; 44 }; 45 caelestia = { 46 url = "github:caelestia-dots/shell"; 47 inputs.nixpkgs.follows = "nixpkgs"; 48 inputs.quickshell.follows = "quickshell"; 49 }; 50 ctp = { 51 url = "github:catppuccin/nix"; 52 }; 53 dn42 = { 54 url = "github:pyrox0/dn43.nix"; 55 inputs.nixpkgs.follows = "nixpkgs"; 56 }; 57 dms = { 58 url = "github:AvengeMedia/DankMaterialShell"; 59 inputs.nixpkgs.follows = "nixpkgs"; 60 }; 61 # DMS Plugins 62 dms-wp-shuffler = { 63 url = "github:Daniel-42-z/dms-wallpaper-shuffler"; 64 flake = false; 65 }; 66 dms-power-usage = { 67 url = "github:Daniel-42-z/dms-power-usage"; 68 flake = false; 69 }; 70 dms-plugins = { 71 url = "github:AvengeMedia/dms-plugins"; 72 flake = false; 73 }; 74 easy-hosts.url = "github:tgirlcloud/easy-hosts"; 75 golink = { 76 url = "github:tailscale/golink"; 77 inputs.nixpkgs.follows = "nixpkgs"; 78 }; 79 hardware = { 80 url = "github:nixos/nixos-hardware"; 81 }; 82 home-manager = { 83 url = "github:nix-community/home-manager"; 84 inputs.nixpkgs.follows = "nixpkgs"; 85 }; 86 nix-index-database = { 87 url = "github:Mic92/nix-index-database"; 88 inputs.nixpkgs.follows = "nixpkgs"; 89 }; 90 my-pkgs = { 91 url = "git+https://git.pyrox.dev/pyrox/pkgs"; 92 inputs.nixpkgs.follows = "nixpkgs"; 93 }; 94 quickshell = { 95 url = "github:quickshell-mirror/quickshell"; 96 inputs.nixpkgs.follows = "nixpkgs"; 97 }; 98 tangled = { 99 url = "git+https://tangled.org/@tangled.org/core"; 100 }; 101 treefmt-nix = { 102 url = "github:numtide/treefmt-nix"; 103 inputs.nixpkgs.follows = "nixpkgs"; 104 }; 105 }; 106 107 outputs = 108 inputs: 109 inputs.flake-parts.lib.mkFlake { inherit inputs; } { 110 # Systems we want to build for 111 systems = [ 112 "x86_64-linux" 113 ]; 114 115 # Flake modules 116 imports = [ 117 inputs.easy-hosts.flakeModule 118 inputs.home-manager.flakeModules.home-manager 119 inputs.treefmt-nix.flakeModule 120 ./packages.nix 121 ./lib 122 ./overlays 123 ./devShells 124 ./nixosModules 125 ./homeModules 126 ./templates 127 ./hosts 128 ]; 129 130 # # Flake attributes 131 # flake = { 132 # 133 # }; 134 135 # Per-system stuff 136 perSystem = 137 { 138 system, 139 ... 140 }: 141 { 142 _module.args.pkgs = import inputs.nixpkgs { 143 inherit system; 144 overlays = [ 145 inputs.self.overlays.openssh-fixperms 146 inputs.golink.overlays.default 147 ]; 148 config = { 149 allowUnfree = true; 150 }; 151 }; 152 treefmt = { 153 programs = { 154 deadnix = { 155 enable = true; 156 no-underscore = true; 157 }; 158 jsonfmt.enable = true; 159 jsonfmt.excludes = [ ".zed/settings.json" ]; 160 just.enable = true; 161 keep-sorted.enable = true; 162 mdformat.enable = true; 163 mdformat.settings.wrap = 120; 164 nixf-diagnose.enable = true; 165 nixfmt.enable = true; 166 nixfmt.indent = 2; 167 nixfmt.width = 120; 168 shellcheck.enable = true; 169 statix.enable = true; 170 stylua.enable = true; 171 taplo.enable = true; 172 yamlfmt.enable = true; 173 }; 174 }; 175 }; 176 # Enable debugging for nixd 177 debug = true; 178 }; 179}