File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 360360 } ;
361361 } ;
362362
363+ loadNixOSRPi =
364+ hostName : path :
365+ let
366+ nixos-raspberrypi =
367+ inputs . nixos-raspberrypi
368+ or ( throw ''${ path } depends on nixos-raspberrypi. To fix this, add `inputs.nixos-raspberrypi.url = "github:nvmd/nixos-raspberrypi";` to your flake'' ) ;
369+ in
370+ {
371+ class = "nixos" ;
372+ value = nixos-raspberrypi . lib . nixosSystem {
373+ modules = [
374+ perSystemModule
375+ path
376+ ]
377+ ++ mkHomeUsersModule hostName home-manager . nixosModules . default ;
378+ specialArgs = specialArgs // {
379+ inherit hostName ;
380+ nixos-raspberrypi = inputs . nixos-raspberrypi ;
381+ } ;
382+ } ;
383+ } ;
384+
363385 loadNixDarwin =
364386 hostName : path :
365387 let
407429 loadDefault name ( path + "/default.nix" )
408430 else if builtins . pathExists ( path + "/configuration.nix" ) then
409431 loadNixOS name ( path + "/configuration.nix" )
432+ else if builtins . pathExists ( path + "/rpi-configuration.nix" ) then
433+ loadNixOSRPi name ( path + "/rpi-configuration.nix" )
410434 else if builtins . pathExists ( path + "/darwin-configuration.nix" ) then
411435 loadNixDarwin name ( path + "/darwin-configuration.nix" )
412436 else if builtins . pathExists ( path + "/system-configuration.nix" ) then
You can’t perform that action at this time.
0 commit comments