lib/default: format

This commit is contained in:
steveej 2024-01-19 11:49:33 +01:00
parent 9ad9b97298
commit 1bfb2a25ab

View file

@ -1,35 +1,38 @@
{ { lib
lib, , config
config, ,
}: let }:
let
keys = import ../../variables/keys.nix; keys = import ../../variables/keys.nix;
in { in
{
mkUser = args: ( mkUser = args: (
lib.attrsets.recursiveUpdate { lib.attrsets.recursiveUpdate
isNormalUser = true; {
extraGroups = [ isNormalUser = true;
"docker" extraGroups = [
"wheel" "docker"
"libvirtd" "wheel"
"networkmanager" "libvirtd"
"vboxusers" "networkmanager"
"users" "vboxusers"
"input" "users"
"audio" "input"
"video" "audio"
"cdrom" "video"
"adbusers" "cdrom"
"dialout" "adbusers"
"cdrom" "dialout"
]; "cdrom"
openssh.authorizedKeys.keys = keys.users.steveej.openssh; ];
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
# TODO: investigate why this secret cannot be found # TODO: investigate why this secret cannot be found
# openssh.authorizedKeys.keyFiles = [ # openssh.authorizedKeys.keyFiles = [
# config.sops.secrets.sharedSshKeys-steveej.path # config.sops.secrets.sharedSshKeys-steveej.path
# ]; # ];
} }
args args
); );
disk = rec { disk = rec {
@ -38,7 +41,7 @@ in {
# LVM doesn't allow most characters in VG names # LVM doesn't allow most characters in VG names
# TODO: replace this with a whitelist for: [a-zA-Z0-9.-_+] # TODO: replace this with a whitelist for: [a-zA-Z0-9.-_+]
volumeGroup = diskId: builtins.replaceStrings [":"] [""] diskId; volumeGroup = diskId: builtins.replaceStrings [ ":" ] [ "" ] diskId;
# This is important at install-time # This is important at install-time
bootGrubDevice = diskId: "/dev/disk/by-id/" + diskId; bootGrubDevice = diskId: "/dev/disk/by-id/" + diskId;