adampad branch fixes

This commit is contained in:
cnst
2024-08-02 13:51:42 +02:00
parent 6439059d7b
commit 7271ba3eae
304 changed files with 37 additions and 83400 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,50 +30,20 @@ in {
];
};
programs.dconf.enable = true;
imports = [
inputs.home-manager.nixosModules.home-manager
./imports.nix
./system.nix
./hardware-configuration.nix
];
home-manager.users.adam = import ../../../home/users/adam/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 = true;
efi.canTouchEfiVariables = true;
};
environment.sessionVariables = {
FLAKE = "/home/adam/.nix-config";
boot = {
consoleLogLevel = 3;
kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
kernelParams = [
"amd_pstate=active"
"quiet"
"splash"
];
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.05";
system.stateVersion = lib.mkDefault "23.11";
}