unliterated my config
This commit is contained in:
parent
02f76a734e
commit
1f978da586
1 changed files with 566 additions and 2495 deletions
33
modules/users/coyote/default.nix
Normal file
33
modules/users/coyote/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
USER_ID = 1000;
|
||||
KEY_FILE = "id_ed25519";
|
||||
in {
|
||||
users.users.coyote = {
|
||||
isNormalUser = true;
|
||||
description = "coyote";
|
||||
extraGroups = ["wheel" "networkmanager" "lp" "scanner"];
|
||||
uid = USER_ID;
|
||||
};
|
||||
users.defaultUserShell = pkgs.unstable.fish;
|
||||
|
||||
# daemon blurb to get SSH for Git working
|
||||
environment.sessionVariables.SSH_AUTH_SOCK = "/run/user/${builtins.toString USER_ID}/ssh-agent";
|
||||
|
||||
systemd.user.services.ssh-add-key = {
|
||||
wantedBy = ["default.target"];
|
||||
after = ["ssh-agent.service"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStartPre = "${pkgs.coreutils-full}/bin/sleep 1";
|
||||
ExecStart = [
|
||||
"${pkgs.openssh}/bin/ssh-add ${config.users.users.coyote.home}/.ssh/${KEY_FILE}"
|
||||
];
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in a new issue