Update nixos configuration to enable periodic GC, nixpkgs in registry and NIX_PATH

This commit is contained in:
xenia 2024-03-30 21:49:03 +01:00
parent fe9fc9aaee
commit 96065924c7
2 changed files with 16 additions and 2 deletions

View File

@ -65,7 +65,7 @@
nixpkgs-flake = nixpkgs; nixpkgs-flake = nixpkgs;
}; };
mkNixOsBase = opts: import ./nixos/base.nix opts; mkNixOsBase = opts: import ./nixos/base.nix (opts // { nixpkgs-flake = nixpkgs; });
mkNixOsGraphical = opts: import ./nixos/graphical.nix (opts // { fox-layout = rachel.keyboardLayouts.fox; }); mkNixOsGraphical = opts: import ./nixos/graphical.nix (opts // { fox-layout = rachel.keyboardLayouts.fox; });
mkNixOsNetworking = opts: import ./nixos/networking.nix opts; mkNixOsNetworking = opts: import ./nixos/networking.nix opts;
in { in {

View File

@ -1,11 +1,25 @@
{ {
system, pkgs, hostname, system, pkgs, nixpkgs-flake, hostname,
use-efi ? false, efi-mountpoint ? "/boot", use-efi ? false, efi-mountpoint ? "/boot",
use-grub ? false, grub-device ? "/dev/sda", use-grub ? false, grub-device ? "/dev/sda",
}: }:
{ {
nixpkgs.config.allowUnfree = true; # lol nixpkgs.config.allowUnfree = true; # lol
nix.gc = {
automatic = true;
dates = "03:00";
};
nix.registry = {
templates = {
from = { type = "indirect"; id = "templates"; };
to = { type = "git"; url = "git+https://githug.xyz/xenchel/templates"; };
};
nixpkgs.flake = nixpkgs-flake;
};
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
networking.hostName = hostname; networking.hostName = hostname;
boot.loader = if use-efi boot.loader = if use-efi