nixos-config/modules/users/alexander.nix

68 lines
1.9 KiB
Nix
Raw Normal View History

{ pkgs, lib, config, ... }:
2021-07-29 20:21:51 +00:00
{
config = lib.mkIf (config.ptw.system.singleUser == "alexander") {
2021-07-29 20:21:51 +00:00
users.users.alexander = {
isNormalUser = true;
2022-06-30 17:59:45 +00:00
extraGroups = [ "wheel" "audio" "video" "kvm" "input" "libvirtd" "scanner" "lp" "alexander" ];
2021-07-29 20:21:51 +00:00
hashedPassword = "$5$i4aZuQ/WXP.rFOc$lCzDqbrVsqBQt5954O.3bFPknD0jn27MmqzmE4DIAEC";
shell = pkgs.zsh;
useDefaultShell = false;
uid = 1000;
isSystemUser = false;
};
2022-06-30 17:59:45 +00:00
users.groups.alexander = {};
2021-08-04 17:07:42 +00:00
2021-07-29 20:21:51 +00:00
# Activate gpg
programs.gnupg.agent.enable = true;
2021-08-04 17:07:42 +00:00
# No need to use users."${system.singleUser}" as we already know it
2021-07-29 20:21:51 +00:00
home-manager.users.alexander = {
programs.home-manager.enable = true;
2022-07-09 16:18:15 +00:00
home.stateVersion = "22.11";
2021-07-29 20:21:51 +00:00
programs.ssh = {
enable = true;
2021-12-02 10:11:54 +00:00
matchBlocks = let
2022-10-15 10:06:07 +00:00
sshPort = 3434;
2021-12-02 10:11:54 +00:00
in {
ayame = {
port = sshPort;
hostname = "78.46.184.48";
user = "alexander";
identityFile = "~/.ssh/polynom.me_ayame";
identitiesOnly = true;
};
"git.polynom.me" = {
port = 2222;
user = "gitea";
hostname = "git.polynom.me";
2021-12-08 16:50:55 +00:00
identityFile = "~/.ssh/gitea_papatutuwawa";
2021-12-02 10:11:54 +00:00
};
"github.com" = {
user = "git";
hostname = "github.com";
identityFile = "~/.ssh/github_polynomdivision";
};
2022-04-23 11:22:03 +00:00
"codeberg.org" = {
user = "git";
hostname = "codeberg.org";
identityFile = "~/.ssh/codeberg_papatutuwawa";
2021-12-02 10:11:54 +00:00
};
2022-06-12 20:29:36 +00:00
"collaborating.tuhh.de" = {
user = "git";
hostname = "collaborating.tuhh.de";
identityFile = "~/.ssh/gitlab_tuhh";
};
2021-12-02 10:11:54 +00:00
};
2021-07-29 20:21:51 +00:00
};
# TODO: Maybe move this somewhere else
2021-07-29 20:21:51 +00:00
services.gpg-agent = {
enable = true;
2022-06-15 17:43:12 +00:00
pinentryFlavor = "qt";
2021-07-29 20:21:51 +00:00
};
};
};
}