dhcpcd: automatically enable the user, if detected.
not sure this is the *best* place for it, but then, what is?
This commit is contained in:
parent
46a0e949f9
commit
8059477edd
|
@ -22,6 +22,4 @@
|
|||
# raw `sendmail` works, but i think pleroma's passing it some funny flags or something, idk.
|
||||
# hack to fix that.
|
||||
users.users.pleroma.extraGroups = [ "postdrop" ];
|
||||
users.users.dhcpcd.uid = config.sane.allocations.dhcpcd-uid;
|
||||
users.groups.dhcpcd.gid = config.sane.allocations.dhcpcd-gid;
|
||||
}
|
||||
|
|
11
modules/universal/env/users.nix
vendored
11
modules/universal/env/users.nix
vendored
|
@ -4,6 +4,10 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.sane.users;
|
||||
# see nixpkgs/nixos/modules/services/networking/dhcpcd.nix
|
||||
hasDHCP = config.networking.dhcpcd.enable &&
|
||||
(config.networking.useDHCP || any (i: i.useDHCP == true) (attrValues config.networking.interfaces));
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -71,6 +75,13 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
users.users.dhcpcd = mkIf hasDHCP {
|
||||
uid = config.sane.allocations.dhcpcd-uid;
|
||||
};
|
||||
users.groups.dhcpcd = mkIf hasDHCP {
|
||||
gid = config.sane.allocations.dhcpcd-gid;
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
wheelNeedsPassword = false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user