{ flake.modules.nixos.base = { config, lib, pkgs, ... }: { options.infra.user = lib.mkOption { type = lib.types.str; default = "vkcku"; description = "The name of the main user."; }; config = let username = config.infra.user; passwordKey = "hosts/${config.networking.hostName}/users/${username}"; in { sops.secrets."${passwordKey}".neededForUsers = true; users.mutableUsers = false; users.users."${username}" = { isNormalUser = true; createHome = true; home = "/home/${username}"; extraGroups = [ "wheel" ]; shell = pkgs.nushell; hashedPasswordFile = config.sops.secrets."${passwordKey}".path; }; }; }; }