diff --git a/flake.nix b/flake.nix index 9cdeee7f..3005684b 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,13 @@ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "mrjones2014-dotfiles.cachix.org-1:c66wfzthG6KZEWnltlzW/EjhlH9FwUVi5jM4rVD1Rw4=" ]; + experimental-features = "nix-command flakes"; + trusted-users = [ "mat" ]; + # these two are for optimized nix-direnv setups + keep-outputs = true; + keep-derivations = true; }; + outputs = inputs@{ self, nixpkgs, home-manager, agenix, flake-utils, ... }: { nixosConfigurations = { diff --git a/home-manager/modules/fish.nix b/home-manager/modules/fish.nix index 3a4980fa..a6e517cd 100644 --- a/home-manager/modules/fish.nix +++ b/home-manager/modules/fish.nix @@ -92,11 +92,11 @@ ${if isDarwin then "home-manager switch --flake ~/git/dotfiles/.#mac" else if isServer then - "sudo nixos-rebuild switch --flake ~/git/dotfiles/.#server --accept-nix-config" + "sudo nixos-rebuild switch --flake ~/git/dotfiles/.#server --accept-flake-config" else if isThinkpad then - "sudo nixos-rebuild switch --flake ~/git/dotfiles/.#laptop --accept-nix-config" + "sudo nixos-rebuild switch --flake ~/git/dotfiles/.#laptop --accept-flake-config" else - "sudo nixos-rebuild switch --flake ~/git/dotfiles/.#pc --accept-nix-config"} + "sudo nixos-rebuild switch --flake ~/git/dotfiles/.#pc --accept-flake-config"} ''; }; nix-clean = { diff --git a/home-manager/shared.nix b/home-manager/shared.nix index c6604435..2a4f5237 100644 --- a/home-manager/shared.nix +++ b/home-manager/shared.nix @@ -1,13 +1,5 @@ { pkgs, lib, ... }: { - nix = { - package = lib.mkDefault pkgs.lix; - extraOptions = '' - keep-outputs = true - keep-derivations = true - auto-optimise-store = true - experimental-features = nix-command flakes - ''; - }; + nix.package = lib.mkDefault pkgs.lix; theme = "tokyonight"; imports = [ ../nixos-modules/theme.nix diff --git a/nixos-modules/common.nix b/nixos-modules/common.nix index d5e0a539..c2299b9b 100644 --- a/nixos-modules/common.nix +++ b/nixos-modules/common.nix @@ -1,13 +1,9 @@ { pkgs, lib, ... }: { nix = { package = lib.mkDefault pkgs.lix; - settings.trusted-users = [ "mat" ]; - extraOptions = '' - keep-outputs = true - keep-derivations = true - auto-optimise-store = true - experimental-features = nix-command flakes - ''; + # setting this here because it causes issues on Darwin; + # https://github.com/NixOS/nix/issues/7273 + settings.auto-optimise-store = true; }; environment.systemPackages = [ pkgs.mullvad-vpn ];