update nixpkgs, home-manager, remove root password, refactor, use tmpfs, c2: use disk labels

This commit is contained in:
Henri Dohmen 2025-04-19 22:36:22 +02:00
parent 59a71b5cf2
commit 62d3765e58
8 changed files with 109 additions and 39 deletions

View file

@ -9,5 +9,9 @@
};
};
# otherwise /tmp is on disk. This *may* be problematic as nix
# builds in /tmp but I think my swap is large enough...
boot.tmp.useTmpfs = true;
boot.kernelPackages = pkgs.linuxPackages_6_13;
}

View file

@ -1,31 +1,54 @@
{ lib, ... }:
{
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
auto-optimise-store = true;
lib,
inputs,
config,
...
}:
{
config = {
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
auto-optimise-store = true;
};
programs.nix-ld.enable = true;
nixpkgs.config.allowUnfree = false;
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
"vscode"
"obsidian"
"steam"
"steam-unwrapped"
"gateway" # jetbrains
"spotify"
"rust-rover"
];
home.home.stateVersion = config.system.stateVersion; # is this safe?
};
programs.nix-ld.enable = true;
imports = [
inputs.home-manager.nixosModules.home-manager
];
nixpkgs.config.allowUnfree = false;
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
"vscode"
"obsidian"
"steam"
"steam-unwrapped"
"gateway" # jetbrains
"spotify"
"rust-rover"
];
# I don't think this will ever be multi user,
# no need to seperate home-manager. `home` is used
# in users.nix, I should prbably refactor...
options = {
home = lib.mkOption {
type = lib.types.attrs;
default = { };
};
};
}

View file

@ -19,6 +19,7 @@
unzip
wget
wl-clipboard
nixfmt-rfc-style
];
programs = {

View file

@ -21,7 +21,6 @@
wireguard-tools
bitwarden
kitty
nixfmt-rfc-style
nil
];

View file

@ -1,8 +1,15 @@
{ pkgs, ... }:
{
users.users.hd = {
pkgs,
lib,
options,
...
}:
{
users.users."hd" = {
description = "Henri";
isNormalUser = true;
createHome = true;
home = "/home/hd";
extraGroups = [
"networkmanager"
"wheel"
@ -10,4 +17,7 @@
shell = pkgs.fish;
packages = [ ];
};
home-manager.users."hd" = lib.mkAliasDefinitions options.home;
users.users.root.hashedPassword = "!";
}