This commit is contained in:
cnst
2024-08-01 19:11:01 +02:00
parent ec2d61b288
commit a58147df97
17 changed files with 168 additions and 310 deletions

View File

@@ -1,10 +1,7 @@
{
inputs,
outputs,
lib,
config,
pkgs,
system,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
@@ -33,54 +30,20 @@ in {
];
};
programs.dconf.enable = true;
imports = [
inputs.home-manager.nixosModules.home-manager
./imports.nix
./system.nix
./hardware-configuration.nix
];
home-manager.users.toothpick = import ../../../home/users/toothpick/home.nix;
nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
settings = {
auto-optimise-store = lib.mkDefault true;
warn-dirty = false;
# Enable flakes and new 'nix' command
experimental-features = [
"nix-command"
"flakes"
];
# Opinionated: disable global registry
flake-registry = "";
# Workaround for https://github.com/NixOS/nix/issues/9574
nix-path = config.nix.nixPath;
};
# Opinionated: disable channels
channel.enable = false;
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
# Bootloader
boot.loader = {
systemd-boot.enable = lib.mkForce false;
efi.canTouchEfiVariables = true;
};
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
environment.sessionVariables = {
FLAKE = "/home/toothpick/.nix-config";
boot = {
blacklistedKernelModules = ["ucsi_ccg"];
consoleLogLevel = 3;
kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
kernelParams = [
"quiet"
"splash"
];
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.05";
system.stateVersion = lib.mkDefault "23.11";
}