+/config
my dotfiles and nix configuration
git clone https://git.julia.blue/+/config
25665e9
main
1{ 2description = "nix configs for my computers" ; 3inputs = { 4nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ; 5nixpkgs-stable . url = "github:NixOS/nixpkgs/nixos-25.11" ; 6home-manager . url = "github:nix-community/home-manager" ; 7flake-utils . url = "github:numtide/flake-utils" ; 8nixos-hardware . url = "github:NixOS/nixos-hardware" ; 9ragenix . url = "github:yaxitech/ragenix" ; 10nix-index-database . url = "github:Mic92/nix-index-database" ; 11 12sorcery . url = "git+https://git.t4t.associates/char/sorcery?rev=ed73aac3ef3785ec9a265dff7fbd62ddf9616e82&shallow=1" ; 13catppuccin . url = "github:catppuccin/nix" ; 14slippi . url = "github:p1n3appl3/slippi-nix/remove-trace" ; 15tgm . url = "github:p1n3appl3/mame-tgm" ; 16# TODO: swap back from fork once lazymc is merged 17nix-minecraft . url = "github:p1n3appl3/nix-minecraft/lazymc" ; 18obs-gamepad . url = "git+http://git.julia.blue/+/obs-gamepad?shallow=1" ; 19}; 20 21outputs = { nixpkgs , nixpkgs-stable , home-manager , flake-utils , ragenix , 22self , obs-gamepad , nix-minecraft , tgm , ...} @inputs : 23let 24inherit ( nixpkgs ) lib ; 25mapDir = lib . filesystem . packagesFromDirectoryRecursive ; 26system = "x86_64-linux" ; 27special = { 28pkgs-stable = import nixpkgs-stable { inherit system ; config . allowUnfree = true ; }; 29inherit inputs self ; 30}; 31 32home = module :home-manager . lib . homeManagerConfiguration { 33pkgs = nixpkgs . legacyPackages .${ system }; 34extraSpecialArgs = special ; 35modules = [ ./mixins/home/common.nix module ] ++ 36builtins . attrValues self . outputs . homeModules ; 37}; 38 39machine = module :lib . nixosSystem { 40inherit system ; specialArgs = special ; 41modules = [ 42./mixins/nixos/common.nix module 43{ home-manager . extraSpecialArgs = special ; } 44] ++ builtins . attrValues self . outputs . nixosModules ; 45}; 46in { 47homeConfigurations = { 48ATLAS = home ./machines/atlas.nix ; 49guest = home ./machines/guest.nix ; 50}; 51 52nixosConfigurations = { 53Cortana = machine ./machines/cortana/main.nix ; 54WOPR = machine ./machines/wopr/main.nix ; 55HAL = machine ./machines/hal/main.nix ; 56ISO = machine ./machines/iso.nix ; 57}; 58 59# homeModules = mapDir { directory = ./modules/home; callPackage = import; }; 60# nixosModules = mapDir { directory = ./modules/nixos; callPackage = import; }; 61homeModules = { 62awawausb = import ./modules/home/awawausb.nix ; 63fightcade = import ./modules/home/fightcade.nix ; 64}; 65nixosModules = { 66m-overlay = import ./modules/nixos/m-overlay.nix ; 67porkbun-ddns = import ./modules/nixos/porkbun-ddns.nix ; 68rust-rpxy = import ./modules/nixos/rust-rpxy.nix ; 69sorcery = import ./modules/nixos/sorcery.nix ; 70}; 71 72overlays . default = let myPackages = final :_ :mapDir { 73directory = ./pkgs ; inherit ( final ) callPackage ; 74}; in lib . composeManyExtensions [ 75ragenix . overlays . default nix-minecraft . overlay obs-gamepad . overlays . default 76( import ./overlays.nix ) myPackages 77]; 78 79} // ( flake-utils . lib . eachSystem ( with flake-utils . lib . system ; [ x86_64-linux aarch64-linux ]) 80( system :let 81pkgs = import nixpkgs { inherit system ; 82overlays = [ self . overlays . default ]; 83config . allowUnfree = true ; 84}; 85in with lib ; rec { 86packages = ( pipe ./pkgs [ 87( dir :mapDir { directory = dir ; inherit ( pkgs ) callPackage ; }) 88( filterAttrs ( _ :meta . availableOn pkgs . stdenv . hostPlatform )) 89( filterAttrs ( _ :p :! ( p . meta . broken or false ))) 90]) // { inherit ( pkgs ) eza gdu ragenix chhoto-url ; }; # just for caching 91 92ci = ( pipe self . nixosConfigurations [ 93( lib . filterAttrs ( _ :v :v . config . nixpkgs . system == system )) 94( lib . mapAttrs ( _ :v :v . config . system . build . toplevel )) 95]) // packages ; 96}) 97); 98 99nixConfig = { 100extra-substituters = [ "https://pineapple.cachix.org" ]; 101extra-trusted-public-keys = [ 102"pineapple.cachix.org-1:FjFjdb26PFCZL09M2yHiPw1J+c1Ab9AbpfnFeTpzNQk=" 103]; 104}; 105 106# let me put this in the lock file or smth >:( 107inputs = { 108home-manager . inputs . nixpkgs . follows = "nixpkgs" ; 109nix-index-database . inputs . nixpkgs . follows = "nixpkgs" ; 110nixos-hardware . inputs . nixpkgs . follows = "nixpkgs" ; 111ragenix . inputs = { 112nixpkgs . follows = "nixpkgs-stable" ; flake-utils . follows = "flake-utils" ; 113agenix . inputs . home-manager . follows = "home-manager" ; 114}; 115slippi . inputs = { 116nixpkgs . follows = "nixpkgs" ; home-manager . follows = "home-manager" ; 117git-hooks . follows = "" ; 118}; 119tgm . inputs . nixpkgs . follows = "nixpkgs-stable" ; 120sorcery . inputs . nixpkgs . follows = "nixpkgs" ; 121nix-minecraft . inputs . nixpkgs . follows = "nixpkgs" ; 122catppuccin . inputs . nixpkgs . follows = "nixpkgs" ; 123obs-gamepad . inputs . nixpkgs . follows = "nixpkgs" ; 124}; 125}