Migrate aspi host config
This commit is contained in:
41
hosts/common/users/julian/default.nix
Normal file
41
hosts/common/users/julian/default.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in
|
||||
{
|
||||
users.mutableUsers = false;
|
||||
users.users.julian = {
|
||||
description = "Julian";
|
||||
group = "julian";
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
extraGroups = ifTheyExist [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"audio"
|
||||
"network"
|
||||
"video"
|
||||
"podman"
|
||||
"docker"
|
||||
"git"
|
||||
];
|
||||
|
||||
openssh.authorizedKeys.keys = lib.splitString "\n" (
|
||||
builtins.readFile ../../../../home/julian/ssh.pub
|
||||
);
|
||||
hashedPasswordFile = config.sops.secrets.julian-password.path;
|
||||
packages = [ pkgs.home-manager ];
|
||||
};
|
||||
|
||||
sops.secrets.julian-password = {
|
||||
sopsFile = ../../secrets.yaml;
|
||||
neededForUsers = true;
|
||||
};
|
||||
|
||||
home-manager.users.julian = import ../../../../home/julian/${config.networking.hostName}.nix;
|
||||
}
|
Reference in New Issue
Block a user