Persist ssh keys for kodi user.
This commit is contained in:
parent
5a5d34911c
commit
368c455b7f
@ -24,10 +24,52 @@
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
(lib.mkIf config.me.graphical {
|
(lib.mkIf config.me.graphical {
|
||||||
users.extraUsers.kodi.isNormalUser = true;
|
|
||||||
services.cage.user = "kodi";
|
services.cage.user = "kodi";
|
||||||
services.cage.program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
|
services.cage.program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
|
||||||
services.cage.enable = true;
|
services.cage.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
kodi-wayland = prev.kodi-wayland.withPackages (
|
||||||
|
kodiPkgs: with kodiPkgs; [
|
||||||
|
joystick
|
||||||
|
]
|
||||||
|
);
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.kodi = {
|
||||||
|
isNormalUser = true;
|
||||||
|
createHome = true; # https://github.com/NixOS/nixpkgs/issues/6481
|
||||||
|
group = "kodi";
|
||||||
|
extraGroups = [ ];
|
||||||
|
uid = 12000;
|
||||||
|
packages = with pkgs; [
|
||||||
|
tree
|
||||||
|
];
|
||||||
|
# Generate with `mkpasswd -m scrypt`
|
||||||
|
hashedPassword = "$7$CU..../....VXvNQ8za3wSGpdzGXNT50/$HcFtn/yvwPMCw4888BelpiAPLAxe/zU87fD.d/N6U48";
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGu+k5lrirokdW5zVdRVBOqEOAvAPlIkG/MdJNc9g5ky"
|
||||||
|
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIEI6mu6I5Jp+Ib0vJxapGHbEShZjyvzV8jz5DnzDrI39AAAABHNzaDo="
|
||||||
|
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIAFNcSXwvy+brYTOGo56G93Ptuq2MmZsjvRWAfMqbmMLAAAABHNzaDo="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
users.groups.kodi.gid = 12000;
|
||||||
|
|
||||||
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||||
|
hideMounts = true;
|
||||||
|
users.kodi = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
directory = ".ssh";
|
||||||
|
user = "kodi";
|
||||||
|
group = "kodi";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user