mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Add option for additional groups to user meta definition
This commit is contained in:
parent
6bb520b0ae
commit
e061882727
@ -1,6 +1,11 @@
|
||||
{ config, pkgs, inputs, nixos-hardware, ... }: {
|
||||
imports =
|
||||
[ ../../common/users.nix ./hardware-configuration.nix ./software.nix ];
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
nixos-hardware,
|
||||
...
|
||||
}: {
|
||||
imports = [../../common/users.nix ./hardware-configuration.nix ./software.nix];
|
||||
|
||||
elss = {
|
||||
# base system
|
||||
@ -43,7 +48,12 @@
|
||||
admins = ["ellmau"];
|
||||
users = [];
|
||||
|
||||
meta = { ellmau.git = { signDefault = true; }; };
|
||||
meta = {
|
||||
ellmau = {
|
||||
git = {signDefault = true;};
|
||||
extraGroups = ["networkmanager"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, nixos-hardware, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
nixos-hardware,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../common/users.nix
|
||||
./printer.nix
|
||||
@ -49,11 +55,14 @@
|
||||
users = [];
|
||||
|
||||
meta = {
|
||||
ellmau.git = {
|
||||
ellmau = {
|
||||
git = {
|
||||
key = "0x4998BEEE";
|
||||
gpgsm = true;
|
||||
signDefault = true;
|
||||
};
|
||||
extraGroups = ["networkmanager"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -45,6 +45,12 @@ with lib; {
|
||||
type = types.str;
|
||||
description = "Email address of the user";
|
||||
};
|
||||
extraGroups = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "additional groups to add";
|
||||
default = [];
|
||||
};
|
||||
|
||||
git = mkOption {
|
||||
type = types.submodule {
|
||||
options = {
|
||||
@ -92,7 +98,7 @@ with lib; {
|
||||
inherit (meta) description;
|
||||
isNormalUser = true;
|
||||
home = "/home/${login}";
|
||||
extraGroups = [];
|
||||
extraGroups = meta.extraGroups;
|
||||
openssh.authorizedKeys.keys = meta.publicKeys;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user