This commit is contained in:
2025-01-29 21:33:37 +01:00
commit a2247c5b26
30 changed files with 1036 additions and 0 deletions

25
system/core/default.nix Normal file
View File

@@ -0,0 +1,25 @@
{ lib, ... }:
{
imports = [
./users.nix
./ssh-server.nix
];
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [
"en_US.UTF-8/UTF-8"
"fr_FR.UTF-8/UTF-8"
];
};
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
system.stateVersion = lib.mkDefault "24.11";
time.timeZone = lib.mkDefault "Europe/Paris";
}

View File

@@ -0,0 +1,15 @@
{
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
AuthenticationMethods = "publickey";
PubkeyAuthentication = "yes";
ChallengeResponseAuthentication = "no";
UsePAM = false;
X11Forwarding = false;
};
};
}

30
system/core/users.nix Normal file
View File

@@ -0,0 +1,30 @@
{
keys,
lib,
pkgs,
...
}:
{
users.mutableUsers = lib.mkDefault false;
users.users.rpqt = {
isNormalUser = true;
createHome = true;
home = "/home/rpqt";
description = "Romain Paquet";
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [ keys.rpqt.haze ];
initialHashedPassword = "$y$j9T$.y7GZIaYYgEHt1spMsOqi/$k4O3AAKBhJF0gI.G9/Ja8ssGsVTv3VPD5WC.7ErAUD1";
extraGroups = [
"wheel"
];
};
programs.zsh.enable = true;
}