Format the entire project.

This commit is contained in:
Kevin Baensch 2023-09-11 20:23:04 +02:00
parent 1dc50ae17d
commit 6f9db5e3a4
Signed by: derped
GPG key ID: C0F1D326C7626543
115 changed files with 3451 additions and 2901 deletions

View file

@ -1,8 +1,11 @@
{ config, lib, fn, pkgs, ... }:
with lib;
let
{
config,
lib,
fn,
pkgs,
...
}:
with lib; let
withDocker = config.virtualisation.docker.enable;
withPodman = config.virtualisation.podman.enable;
administrators = user: {
@ -13,16 +16,23 @@ let
in {
isNormalUser = true;
name = user.name;
uid = user.id;
subUidRanges = (optional withPodman { startUid = 100000; count = 65536; });
subGidRanges = (optional withPodman { startGid = 100000; count = 65536; });
uid = user.id;
subUidRanges = optional withPodman {
startUid = 100000;
count = 65536;
};
subGidRanges = optional withPodman {
startGid = 100000;
count = 65536;
};
home = builtins.toPath "/home/${user.name}";
createHome = true;
description = "Administrative user ${user.name}.";
group = user.name;
extraGroups = [ "audio" "wheel" "network" ]
extraGroups =
["audio" "wheel" "network"]
++ (optionals cfg.xserver.enable ["input" "video"])
++ (optionals cfg.printing.enable [ "cups" "lp" ])
++ (optionals cfg.printing.enable ["cups" "lp"])
++ (optional (withDocker && !withPodman) "docker")
++ (optional withPodman "podman");
shell = "${pkgs.zsh}/bin/zsh";
@ -30,19 +40,20 @@ let
};
};
mkusergroup = user: {
name = user.name;
value = {
name = user.name;
gid = user.id;
members = [ user.name ];
};
};
mkusergroup = user: {
name = user.name;
value = {
name = user.name;
gid = user.id;
members = [user.name];
};
};
in {
sops.secrets = (fn.sopsHelper
sops.secrets =
fn.sopsHelper
(user: "users/${user.name}/password")
config.machine.administrators
{ neededForUsers = true; });
{neededForUsers = true;};
users = {
mutableUsers = false;
users = listToAttrs (map administrators config.machine.administrators);