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.
|
# raw `sendmail` works, but i think pleroma's passing it some funny flags or something, idk.
|
||||||
# hack to fix that.
|
# hack to fix that.
|
||||||
users.users.pleroma.extraGroups = [ "postdrop" ];
|
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;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.sane.users;
|
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
|
in
|
||||||
{
|
{
|
||||||
options = {
|
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 = {
|
security.sudo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wheelNeedsPassword = false;
|
wheelNeedsPassword = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user