Started work on refactoring nix config codebase

This commit is contained in:
lulusilly 2025-09-08 19:27:07 -04:00
parent d4e2c2b16f
commit 2e76139dde
3 changed files with 49 additions and 26 deletions

33
.config/nix/flake.lock generated
View file

@ -139,25 +139,38 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": "nixpkgs"
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1756683562, "lastModified": 1757256385,
"narHash": "sha256-3fcIqwm1u+rF3kkgUYYEIcLrs93+Pi+a6AwiEAxdP5g=", "narHash": "sha256-WK7tOhWwr15mipcckhDg2no/eSpM1nIh4C9le8HgHhk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fccb44df77266a3891939f35197f538dace3442f", "rev": "f35703b412c67b48e97beb6e27a6ab96a084cd37",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "id": "home-manager",
"repo": "home-manager", "type": "indirect"
"type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1757068644,
"narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1756542300, "lastModified": 1756542300,
"narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=", "narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
@ -201,7 +214,7 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"stylix": "stylix" "stylix": "stylix"
} }
}, },

View file

@ -0,0 +1,26 @@
{ config, pkgs, inputs, ... }
{
# Enable automatic system updates
system.autoUpgrade = {
enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"-L" # print build logs
];
dates = "weekly";
randomizedDelaySec = "45min";
};
# Automate Nix garbage collection
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# Allow non-free software (RMS will be mad at me :<)
nixpkgs.config.allowUnfree = true;
# Enable nix-command and flakes
nix.settings.experimental-features = [ "nix-command" "flakes"];
}

View file

@ -6,22 +6,6 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
# Enable automatic system updates
system.autoUpgrade = {
enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"-L" # print build logs
];
dates = "weekly";
randomizedDelaySec = "45min";
};
# Allow non-free software (RMS will be mad at me :<)
nixpkgs.config.allowUnfree = true;
# Enable nix-command and flakes
nix.settings.experimental-features = [ "nix-command" "flakes"];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
systemd.tpm2.enable = false; systemd.tpm2.enable = false;