Aires on Nostr: #Nix tips: tired of manually importing all of your Nix files? Want to just have all ...
#Nix tips: tired of manually importing all of your Nix files? Want to just have all of them automagically import? Thanks to Evanjsx on Reddit, you can!
Just create a folder for your modules, drop this Nix file into it, and import it (e.g. from one of your hosts). It'll recursively import any .nix files in the folder while excluding itself and any folders labeled "home-manager": https://github.com/8bitbuddhist/nix-configuration/blob/main/modules/autoimport.nix
EvanJS' original version: https://github.com/evanjs/nixos_cfg/blob/master/config/new-modules/default.nix
(I hope this isn't an anti-pattern 🥴)
#NixOS #Aux #LazyProgramming
Just create a folder for your modules, drop this Nix file into it, and import it (e.g. from one of your hosts). It'll recursively import any .nix files in the folder while excluding itself and any folders labeled "home-manager": https://github.com/8bitbuddhist/nix-configuration/blob/main/modules/autoimport.nix
EvanJS' original version: https://github.com/evanjs/nixos_cfg/blob/master/config/new-modules/default.nix
(I hope this isn't an anti-pattern 🥴)
#NixOS #Aux #LazyProgramming