Initial commit. Add configuration for NixOS Proxmox image
This commit is contained in:
commit
4193e65a04
14 changed files with 321 additions and 0 deletions
27
config/common/users.nix
Normal file
27
config/common/users.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Common users.
|
||||
# Sources for this configuration:
|
||||
# - a generated NixOS 23.05 configuration
|
||||
# - https://nixos.org/manual/nixos/stable/#sec-user-management
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
authorizedKeysRepo = builtins.fetchGit {
|
||||
url = "ssh://git@gitlab.hamburg.ccc.de:4242/ccchh/infrastructure-authorized-keys.git";
|
||||
ref = "trunk";
|
||||
rev = "1b625d752fe5f19fd110871b9e3dfc6c93d3495a";
|
||||
};
|
||||
in
|
||||
{
|
||||
users.mutableUsers = false;
|
||||
|
||||
users.users.chaos = {
|
||||
isNormalUser = true;
|
||||
description = "Chaos";
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = builtins.filter (item: item != "") (lib.strings.splitString "\n" (builtins.readFile "${authorizedKeysRepo}/authorized_keys"));
|
||||
};
|
||||
|
||||
# Since our user doesn't have a password, allow passwordless sudo for wheel.
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue