Skip to content

Commit

Permalink
nixos/*: unhide remaining systemd stage-1 options
Browse files Browse the repository at this point in the history
These options were missed in NixOS#226237, but they all were
specifically added for systemd stage-1.
  • Loading branch information
lilyinstarlight committed Jul 3, 2023
1 parent 46e3229 commit e9207b0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
5 changes: 0 additions & 5 deletions nixos/modules/config/users-groups.nix
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,12 @@ in {

# systemd initrd
boot.initrd.systemd.users = mkOption {
visible = false;
description = ''
Users to include in initrd.
'';
default = {};
type = types.attrsOf (types.submodule ({ name, ... }: {
options.uid = mkOption {
visible = false;
type = types.int;
description = ''
ID of the user in initrd.
Expand All @@ -555,7 +553,6 @@ in {
default = cfg.users.${name}.uid;
};
options.group = mkOption {
visible = false;
type = types.singleLineStr;
description = ''
Group the user belongs to in initrd.
Expand All @@ -567,14 +564,12 @@ in {
};

boot.initrd.systemd.groups = mkOption {
visible = false;
description = ''
Groups to include in initrd.
'';
default = {};
type = types.attrsOf (types.submodule ({ name, ... }: {
options.gid = mkOption {
visible = false;
type = types.int;
description = ''
ID of the group in initrd.
Expand Down
2 changes: 0 additions & 2 deletions nixos/modules/services/hardware/udev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ in
packages = mkOption {
type = types.listOf types.path;
default = [];
visible = false;
description = lib.mdDoc ''
*This will only be used when systemd is used in stage 1.*
Expand All @@ -311,7 +310,6 @@ in
binPackages = mkOption {
type = types.listOf types.path;
default = [];
visible = false;
description = lib.mdDoc ''
*This will only be used when systemd is used in stage 1.*
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/system/dbus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ in
options = {

boot.initrd.systemd.dbus = {
enable = mkEnableOption (lib.mdDoc "dbus in stage 1") // { visible = false; };
enable = mkEnableOption (lib.mdDoc "dbus in stage 1");
};

services.dbus = {
Expand Down
8 changes: 6 additions & 2 deletions nixos/modules/tasks/bcache.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{ config, lib, pkgs, ... }:

{
options.boot.initrd.services.bcache.enable = (lib.mkEnableOption (lib.mdDoc "bcache support in the initrd")) // {
visible = false; # only works with systemd stage 1
options.boot.initrd.services.bcache.enable = lib.mkEnableOption (lib.mdDoc "bcache support in the initrd") // {
description = lib.mdDoc ''
*This will only be used when systemd is used in stage 1.*
Whether to enable bcache support in the initrd.
'';
};

config = {
Expand Down
8 changes: 6 additions & 2 deletions nixos/modules/tasks/lvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ in {
boot.vdo.enable = mkEnableOption (lib.mdDoc "support for booting from VDOLVs");
};

options.boot.initrd.services.lvm.enable = (mkEnableOption (lib.mdDoc "enable booting from LVM2 in the initrd")) // {
visible = false;
options.boot.initrd.services.lvm.enable = mkEnableOption (lib.mdDoc "booting from LVM2 in the initrd") // {
description = lib.mdDoc ''
*This will only be used when systemd is used in stage 1.*
Whether to enable booting from LVM2 in the initrd.
'';
};

config = mkMerge [
Expand Down
8 changes: 6 additions & 2 deletions nixos/modules/tasks/swraid.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
in {

options.boot.initrd.services.swraid = {
enable = (lib.mkEnableOption (lib.mdDoc "swraid support using mdadm")) // {
visible = false; # only has effect when the new stage 1 is in place
enable = lib.mkEnableOption (lib.mdDoc "swraid support using mdadm") // {
description = ''
*This will only be used when systemd is used in stage 1.*
Whether to enable swraid support using mdadm.
'';
};

mdadmConf = lib.mkOption {
Expand Down

0 comments on commit e9207b0

Please sign in to comment.