add home-manager

This commit is contained in:
Dennis Wuitz
2023-12-25 03:39:20 +01:00
parent c6c879ddb4
commit e08f011d28
7 changed files with 112 additions and 97 deletions

View File

@ -1,8 +1,5 @@
{ pkgs, lib, config }:
{ pkgs, lib, config, name, ... }:
import ../default.nix {
inherit pkgs lib config;
userName = "AmethystAndroid";
pubKeys = {
palatine-hill = "ed25516-AAAAAAA";
};
inherit pkgs lib config name;
pubKeys = [ "ed25516-AAAAAAA" ];
}

7
users/alice/home.nix Normal file
View File

@ -0,0 +1,7 @@
{ ... }:
{
programs = {
};
home.stateVersion = "23.11";
}

View File

@ -1,5 +1,14 @@
{ lib, config, pkgs, userName, pubKeys }:
{
lib,
config,
pkgs,
name,
pubKeys ? [],
defaultShell ? "zsh",
}:
{
inherit name;
isNormalUser = true;
uid = 1000;
extraGroups = [
@ -8,14 +17,12 @@
(lib.mkIf config.networking.networkmanager.enable "networkmanager")
(lib.mkIf config.programs.adb.enable "adbusers")
(lib.mkIf config.programs.wireshark.enable "wireshark")
(lib.mkIf config.programs.virtualisation.docker.enable "docker")
(lib.mkIf config.virtualisation.docker.enable "docker")
"libvirtd"
"dialout"
"plugdev"
"uaccess"
];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
(lib.mkIf (pubKeys ? ${config.networking.hostName}) pubKeys.${config.networking.hostName})
];
shell = pkgs.${defaultShell};
openssh.authorizedKeys.keys = pubKeys;
}