feat: add users/{user}/nixos.nix support
This commit is contained in:
6
users/matej/keys.nix
Normal file
6
users/matej/keys.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
sshAuthorizedKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQGLdINKzs+sEy62Pefng0bcedgU396+OryFgeH99/c janezicmatej"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDk00+Km03epQXQs+xEwwH3zcurACzkEH+kDOPBw6RQe openpgp:0xB095D449"
|
||||
];
|
||||
}
|
||||
25
users/matej/nixos.nix
Normal file
25
users/matej/nixos.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
keys = import ./keys.nix;
|
||||
in
|
||||
{
|
||||
users.users.matej = {
|
||||
uid = 1000;
|
||||
isNormalUser = true;
|
||||
home = "/home/matej";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"docker"
|
||||
];
|
||||
openssh.authorizedKeys.keys = keys.sshAuthorizedKeys;
|
||||
};
|
||||
|
||||
users.groups.matej = {
|
||||
gid = 1000;
|
||||
members = [ "matej" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user