nixos-config/modules/users/alexander.nix

66 lines
1.8 KiB
Nix

{ pkgs, lib, config, ... }:
{
config = lib.mkIf (config.ptw.system.singleUser == "alexander") {
users.users.alexander = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "video" "kvm" "input" "libvirtd" "scanner" "lp" ];
hashedPassword = "$5$i4aZuQ/WXP.rFOc$lCzDqbrVsqBQt5954O.3bFPknD0jn27MmqzmE4DIAEC";
shell = pkgs.zsh;
useDefaultShell = false;
uid = 1000;
isSystemUser = false;
};
# Activate gpg
programs.gnupg.agent.enable = true;
# No need to use users."${system.singleUser}" as we already know it
home-manager.users.alexander = {
programs.home-manager.enable = true;
programs.ssh = {
enable = true;
matchBlocks = let
sshPort = (import ../../lib/ports.nix).sshPort;
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";
identityFile = "~/.ssh/gitea_papatutuwawa";
};
"github.com" = {
user = "git";
hostname = "github.com";
identityFile = "~/.ssh/github_polynomdivision";
};
"codeberg.org" = {
user = "git";
hostname = "codeberg.org";
identityFile = "~/.ssh/codeberg_papatutuwawa";
};
"collaborating.tuhh.de" = {
user = "git";
hostname = "collaborating.tuhh.de";
identityFile = "~/.ssh/gitlab_tuhh";
};
};
};
# TODO: Maybe move this somewhere else
services.gpg-agent = {
enable = true;
pinentryFlavor = "qt";
};
};
};
}