From 82186c0b8fc10ff72c6c1a48ee3ae1bb3ce48c99 Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Mon, 8 Jan 2024 16:24:38 +0100 Subject: [PATCH] Forgot some settings in wheatley, fixed now --- nixos/hosts/wheatley/configuration.nix | 58 ++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 7 deletions(-) diff --git a/nixos/hosts/wheatley/configuration.nix b/nixos/hosts/wheatley/configuration.nix index 6eb918d..acc6d63 100644 --- a/nixos/hosts/wheatley/configuration.nix +++ b/nixos/hosts/wheatley/configuration.nix @@ -14,13 +14,63 @@ nix.binaryCachePublicKeys = ["cache.armv7l.xyz-1:kBY/eGnBAYiqYfg0fy0inWhshUo+pGFM3Pj7kIkmlBk="]; # nixos-generate-config should normally set up file systems correctly - imports = [./hardware-configuration.nix]; + imports = [ + inputs.home-manager.nixosModules.home-manager + + ./hardware-configuration.nix + ]; + + nixpkgs = { + # You can add overlays here + overlays = [ + # Add overlays your own flake exports (from overlays and pkgs dir): + outputs.overlays.additions + outputs.overlays.modifications + outputs.overlays.unstable-packages + + # You can also add overlays exported from other flakes: + # neovim-nightly-overlay.overlays.default + + # Or define it inline, for example: + # (final: prev: { + # hi = final.hello.overrideAttrs (oldAttrs: { + # patches = [ ./change-hello-to-hi.patch ]; + # }); + # }) + ]; + # Configure your nixpkgs instance + config = { + # Disable if you don't want unfree packages + allowUnfree = true; + }; + }; environment.systemPackages = with pkgs; [ age git ]; + nix = { + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + # This will add each flake input as a registry + # To make nix3 commands consistent with your flake + registry = lib.mapAttrs (_: value: {flake = value;}) inputs; + + # This will additionally add your inputs to the system's legacy channels + # Making legacy nix commands consistent as well, awesome! + nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; + + settings = { + # Enable flakes and new 'nix' command + experimental-features = "nix-command flakes"; + # Deduplicate and optimize nix store + auto-optimise-store = true; + }; + }; virtualisation.oci-containers.backend = "podman"; virtualisation.oci-containers.containers.pihole = { image = "pihole/pihole:2024.01.0"; @@ -106,12 +156,6 @@ flags = lib.mkForce []; }; - nix.gc = { - automatic = true; - options = "-d"; - }; - nix.autoOptimiseStore = true; - # Enable networking networking.networkmanager.enable = true;