From ce831333a24011d0692f6871047fe74eab9fab8c Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 29 Nov 2026 17:24:18 +0100 Subject: initial commit --- config/users.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 config/users.nix (limited to 'config/users.nix') diff --git a/config/users.nix b/config/users.nix new file mode 100644 index 0000000..248d987 --- /dev/null +++ b/config/users.nix @@ -0,0 +1,32 @@ +{ lib, pkgs, ... }: + +let + remoteBuildingUsers = { + kerberos = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgohiYF2Dsaq6ImGaslnKJMwpiVtwAaM9cm1tpSRr7t root@kerberos"; + }; +in +{ + personal.user.enable = true; + users.users = builtins.mapAttrs (_: key: { + isNormalUser = true; + shell = pkgs.busybox-sandbox-shell; + openssh.authorizedKeys.keys = [ key ]; + homeMode = "700"; + }) remoteBuildingUsers; + + services.openssh.extraConfig = lib.concatLines ( + lib.mapAttrsToList (name: _: '' + Match user ${name} + PermitTTY yes + '') remoteBuildingUsers + ); + + # broken (not running) + system.userActivationScripts.remoteBuildingSetup = '' + if [[ $(whoami) = @(${builtins.concatStringsSep "|" (builtins.attrNames remoteBuildingUsers)}) ]] + then + mkdir --parents --mode=700 nixos-configuration + git init --bare nixos-configuration + fi + ''; +} -- cgit v1.3.1