From 8e7eea9b80abb4a907d3af85e93675178fb5f02d Mon Sep 17 00:00:00 2001 From: veneficium Date: Mon, 10 Nov 2025 19:44:52 +0100 Subject: [PATCH] move nix config to flake --- flake.nix | 17 +++++++++++++++++ hosts/main-laptop/configuration.nix | 9 --------- scripts/rebuild.sh | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 152224a..0605c5a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,23 @@ { description = "Veneficium's amazing fantastic mindblowingly stupid nixOS configuration! :3"; + nixConfig = { + experimental-features = "nix-command flakes"; + substitute = "true"; + extra-substituters = [ + "https://cache.nixos.org" + "https://nix-community.cachix.org" + "https://niri.cachix.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" + ]; + cores = 0; + max-jobs = 2; + }; + inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; diff --git a/hosts/main-laptop/configuration.nix b/hosts/main-laptop/configuration.nix index c99b110..b55e412 100644 --- a/hosts/main-laptop/configuration.nix +++ b/hosts/main-laptop/configuration.nix @@ -19,15 +19,6 @@ users.extraGroups.vboxusers.members = [ "fedfer" ]; - nix.settings = { - substituters = [ - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - stylix.enable = true; stylix.autoEnable = true; stylix = { diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh index 9ce096b..3368372 100755 --- a/scripts/rebuild.sh +++ b/scripts/rebuild.sh @@ -1,2 +1,2 @@ #! /bin/sh -sudo nixos-rebuild switch --flake . \ No newline at end of file +sudo nixos-rebuild switch --accept-flake-config --flake .