2021-11-01 20:33:21 +00:00
|
|
|
{ pkgs, lib, config, ... }:
|
2021-07-29 20:21:51 +00:00
|
|
|
|
|
|
|
{
|
2021-11-01 20:33:21 +00:00
|
|
|
config = lib.mkIf (config.ptw.system.singleUser == "alexander") {
|
2021-07-29 20:21:51 +00:00
|
|
|
users.users.alexander = {
|
|
|
|
isNormalUser = true;
|
2022-04-27 11:10:16 +00:00
|
|
|
extraGroups = [ "wheel" "audio" "video" "kvm" "input" "libvirtd" "scanner" "lp" ];
|
2021-07-29 20:21:51 +00:00
|
|
|
hashedPassword = "$5$i4aZuQ/WXP.rFOc$lCzDqbrVsqBQt5954O.3bFPknD0jn27MmqzmE4DIAEC";
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
useDefaultShell = false;
|
|
|
|
uid = 1000;
|
|
|
|
isSystemUser = false;
|
|
|
|
};
|
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;
|
|
|
|
|
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
2021-12-02 10:11:54 +00:00
|
|
|
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";
|
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
|
|
|
};
|
2021-11-01 20:33:21 +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
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|