From 3b28b497cd911d8f8e0146fa2232044dd2ca0c7a Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Sun, 3 Mar 2024 20:55:49 +0100 Subject: [PATCH] Home manager configuration says this is needed, don't know why, also small refactor to put nix config in shared --- nixos/desktop/default.nix | 22 ---------------------- nixos/hosts/queen/configuration.nix | 22 ---------------------- nixos/hosts/shodan/configuration.nix | 22 ---------------------- nixos/shared/default.nix | 23 +++++++++++++++++++++++ 4 files changed, 23 insertions(+), 66 deletions(-) diff --git a/nixos/desktop/default.nix b/nixos/desktop/default.nix index 059b450..7d66489 100644 --- a/nixos/desktop/default.nix +++ b/nixos/desktop/default.nix @@ -25,28 +25,6 @@ }; }; - 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; - }; - }; - environment.systemPackages = with pkgs; [ # Custom tools dvd diff --git a/nixos/hosts/queen/configuration.nix b/nixos/hosts/queen/configuration.nix index ce58117..f27ff53 100644 --- a/nixos/hosts/queen/configuration.nix +++ b/nixos/hosts/queen/configuration.nix @@ -51,28 +51,6 @@ #Set up sops config, and configure where the keyfile is, then set the mode for the unencrypted keys sops.defaultSopsFile = ./secrets/sops.yaml; - 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; - }; - }; - environment.systemPackages = with pkgs; [ akkoma fzf diff --git a/nixos/hosts/shodan/configuration.nix b/nixos/hosts/shodan/configuration.nix index 64eb2ea..1ef0501 100644 --- a/nixos/hosts/shodan/configuration.nix +++ b/nixos/hosts/shodan/configuration.nix @@ -43,28 +43,6 @@ #Set up sops config, and configure where the keyfile is, then set the mode for the unencrypted keys sops.defaultSopsFile = ./secrets/sops.yaml; - 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; - }; - }; - environment.systemPackages = with pkgs; [ #System: alejandra diff --git a/nixos/shared/default.nix b/nixos/shared/default.nix index db6995d..221e954 100644 --- a/nixos/shared/default.nix +++ b/nixos/shared/default.nix @@ -13,6 +13,29 @@ sops.age.keyFile = ../../../../../../var/secrets/keys.txt; sops.secrets."lillian-password".neededForUsers = true; + nix = { + package = pkgs.nixFlakes; + 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; + }; + }; + users.users.lillian = { isNormalUser = true; extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf" "docker"];