84 lines
2.1 KiB
Nix
84 lines
2.1 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
let
|
|
profile = import ./profile.nix;
|
|
home-directory = "/home/${profile.username}";
|
|
ssh-filename = "${home-directory}/.ssh/id_ed25519";
|
|
in
|
|
{
|
|
|
|
imports = [
|
|
<home-manager/nixos>
|
|
./desktop-environment/config.nix
|
|
./terminal-environment/config.nix
|
|
./system-environment/config.nix
|
|
];
|
|
|
|
users.users.${profile.username} = {
|
|
isNormalUser = true;
|
|
description = "Nina Chlóe Kassandra";
|
|
extraGroups = [ "networkmanager" "wheel" "docker" "scanner" "lp" "uucp" "dialout"];
|
|
packages = with pkgs; [];
|
|
shell = pkgs.zsh;
|
|
hashedPassword = profile.hashed-password;
|
|
};
|
|
|
|
home-manager.backupFileExtension = "bck.lck";
|
|
|
|
home-manager.users.${profile.username} = { pkgs, ... }: {
|
|
home.stateVersion = "25.11";
|
|
programs.git = {
|
|
enable = true;
|
|
settings = {
|
|
user = {
|
|
name = "Nina Chloé Kassandra Reiß";
|
|
email = "nina.reiss@nickr.eu";
|
|
};
|
|
push = {
|
|
autoSetupRemote = true;
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
programs.ssh = {
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
Host git.nickr.eu
|
|
HostName git.nickr.eu
|
|
Port 22
|
|
|
|
Host nickr.eu
|
|
HostName nickr.eu
|
|
Port 222
|
|
|
|
Host nichkara.eu
|
|
HostName nichkara.eu
|
|
Port 222
|
|
|
|
Host git.nichkara.eu
|
|
HostName git.nichkara.eu
|
|
Port 22
|
|
'';
|
|
};
|
|
};
|
|
|
|
systemd.services.generate-ssh-key = {
|
|
description = "Generate SSH key if missing";
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [ "network.target" ];
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
User = profile.username;
|
|
};
|
|
|
|
script = ''
|
|
if [ ! -f ${ssh-filename} ]; then
|
|
mkdir -p ${home-directory}/.ssh
|
|
chmod 700 ${home-directory}/.ssh
|
|
${pkgs.openssh}/bin/ssh-keygen -t ed25519 -N "" -f ${ssh-filename}
|
|
fi
|
|
'';
|
|
};
|
|
}
|