1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2024-12-01 04:05:16 +01:00
parent 47036cde64
commit 0968b6f955
57 changed files with 426 additions and 86 deletions

View file

@ -11,5 +11,6 @@
efiSysMountPoint = "/boot";
};
};
tmp.cleanOnBoot = true;
};
}

15
common/fish.nix Normal file
View file

@ -0,0 +1,15 @@
{pkgs, ...}: {
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;
nixpkgs.overlays = [
(final: prev: {
fish = prev.fish.overrideAttrs (_: {
postInstall = ''
rm $out/share/applications/fish.desktop
'';
});
})
];
}

View file

@ -1,15 +0,0 @@
{
boot.tmp.cleanOnBoot = true;
fileSystems = {
"/" = {
fsType = "ext4";
label = "main";
options = ["noatime"];
};
"/boot" = {
label = "BOOT";
fsType = "vfat";
};
};
}

View file

@ -1,3 +0,0 @@
{
time.timeZone = "UTC";
}

13
common/user.nix Normal file
View file

@ -0,0 +1,13 @@
{lib, ...}: let
inherit (lib) types;
in {
options = {
users.mainUser = lib.mkOption {
type = types.passwdEntry types.str;
default = "lukas";
description = ''
The main user.
'';
};
};
}

View file

@ -1,5 +1,11 @@
{config, ...}: {
age.secrets.user-lukas.file = ../secrets/user-lukas.age;
{
config,
lib,
...
}: let
inherit (config.users) mainUser;
in {
age.secrets = lib.mkSecrets {"user-${mainUser}" = {};};
users = {
mutableUsers = false;
@ -9,10 +15,10 @@
hashedPassword = "!";
openssh.authorizedKeys.keys = builtins.attrValues (import ../pubkeys.nix).hosts;
};
lukas = {
${mainUser} = {
uid = 1000;
isNormalUser = true;
hashedPasswordFile = config.age.secrets.user-lukas.path;
hashedPasswordFile = config.age.secrets."user-${mainUser}".path;
openssh.authorizedKeys.keys = builtins.attrValues (import ../pubkeys.nix).users;
extraGroups = ["wheel"];
};