at master 583 B view raw
1{ 2 config, 3 lib, 4 pkgs, 5 ... 6}: 7 8let 9 cfg = config.system.nixos-init; 10in 11{ 12 options.system.nixos-init = { 13 enable = lib.mkEnableOption '' 14 nixos-init, a system for bashless initialization. 15 16 This doesn't use any `activationScripts`. Anything set in these options is 17 a no-op here. 18 ''; 19 20 package = lib.mkPackageOption pkgs "nixos-init" { }; 21 }; 22 23 config = lib.mkIf cfg.enable { 24 assertions = [ 25 { 26 assertion = config.boot.initrd.systemd.enable; 27 message = "nixos-init can only be used with systemd initrd"; 28 } 29 ]; 30 }; 31}