chore: nixfmt *
This commit is contained in:
parent
dc761a5271
commit
d039179898
161 changed files with 2688 additions and 3024 deletions
|
@ -1,31 +1,32 @@
|
|||
{ keys ? import ../../variables/keys.nix
|
||||
, passwords ? import ../../variables/passwords.crypt.nix
|
||||
}:
|
||||
{ keys ? import ../../variables/keys.nix
|
||||
, passwords ? import ../../variables/passwords.crypt.nix }:
|
||||
|
||||
{
|
||||
mkRoot = { } @ args: {
|
||||
hashedPassword = passwords.users.root;
|
||||
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
|
||||
} // args;
|
||||
mkRoot = { }@args:
|
||||
{
|
||||
hashedPassword = passwords.users.root;
|
||||
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
|
||||
} // args;
|
||||
|
||||
mkUser = {uid, hashedPassword ? passwords.users.steveej, ... } @ args: {
|
||||
inherit uid hashedPassword;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"docker"
|
||||
"wheel"
|
||||
"libvirtd"
|
||||
"networkmanager"
|
||||
"vboxusers"
|
||||
"users"
|
||||
"input"
|
||||
"audio"
|
||||
"video"
|
||||
"cdrom"
|
||||
"adbusers"
|
||||
];
|
||||
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
|
||||
} // args;
|
||||
mkUser = { uid, hashedPassword ? passwords.users.steveej, ... }@args:
|
||||
{
|
||||
inherit uid hashedPassword;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"docker"
|
||||
"wheel"
|
||||
"libvirtd"
|
||||
"networkmanager"
|
||||
"vboxusers"
|
||||
"users"
|
||||
"input"
|
||||
"audio"
|
||||
"video"
|
||||
"cdrom"
|
||||
"adbusers"
|
||||
];
|
||||
openssh.authorizedKeys.keys = keys.users.steveej.openssh;
|
||||
} // args;
|
||||
|
||||
disk = rec {
|
||||
# TODO: verify the GPT PARTLABEL cap at 36 chars
|
||||
|
@ -44,14 +45,16 @@
|
|||
|
||||
# Cannot use the disk ID here because might be different at install vs. runtime.
|
||||
# Example: MMC card which is used in the internal reader vs. USB reader
|
||||
bootFsDevice = diskId: "/dev/disk/by-partlabel/" + (shortenGptPartlabel ("2-"+diskId));
|
||||
bootLuksDevice = diskId: "/dev/disk/by-partlabel/" + (shortenGptPartlabel ("3-"+diskId));
|
||||
luksName = diskId: (volumeGroup diskId)+"pv";
|
||||
bootFsDevice = diskId:
|
||||
"/dev/disk/by-partlabel/" + (shortenGptPartlabel ("2-" + diskId));
|
||||
bootLuksDevice = diskId:
|
||||
"/dev/disk/by-partlabel/" + (shortenGptPartlabel ("3-" + diskId));
|
||||
luksName = diskId: (volumeGroup diskId) + "pv";
|
||||
luksPhysicalVolume = diskId: "/dev/mapper/" + (luksName diskId);
|
||||
lvmPv = diskId: encrypted:
|
||||
if encrypted == true
|
||||
then luksPhysicalVolume diskId
|
||||
else bootLuksDevice diskId
|
||||
;
|
||||
if encrypted == true then
|
||||
luksPhysicalVolume diskId
|
||||
else
|
||||
bootLuksDevice diskId;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue