diff --git a/home-manager/common/image-specific.nix b/home-manager/common/image-specific.nix new file mode 100644 index 00000000..3bc60474 --- /dev/null +++ b/home-manager/common/image-specific.nix @@ -0,0 +1,4 @@ +{ lib, ... }: { + # Requires secrets not available in images + programs.atuin.enable = mkDefault false; +} diff --git a/home-manager/default.nix b/home-manager/default.nix index 12e528d8..5a1ca50d 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -1,4 +1,4 @@ -{ lib, inputs, hostname, username, desktop, hmStateVersion, system, ... }: { +{ lib, inputs, hostname, username, desktop, hmStateVersion, system, image, ... }: { imports = [ # Common configs ./common/software/cli @@ -16,6 +16,7 @@ ++ lib.optional (builtins.isString desktop) ./common/software/gui # GUI packages ++ lib.optional (builtins.isString desktop) ./common/desktops/${desktop} # Machine-agnostic desktop configs ++ lib.optional (builtins.isString desktop) ./hosts/${hostname}/desktops/${desktop} # Machine-specific desktop configs + ++ lib.optional {builtins.isString image } ./common/image-specific.nix # Disables things that require secrets ; news.display = "silent"; diff --git a/lib/default.nix b/lib/default.nix index 8057ad3a..df112deb 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -155,10 +155,11 @@ theme ? "default", repo ? "nixpkgs", unfree ? false, + image ? true, format }: inputs.nixos-generators.nixosGenerate { specialArgs = { - inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu system theme format; + inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu system theme format image; # Choose whether to pull from stable or unstable pkgs = import inputs.${repo} { inherit system; @@ -182,7 +183,7 @@ inputs.sops-nix.nixosModules.sops inputs.lanzaboote.nixosModules.lanzaboote inputs.home-manager.nixosModules.home-manager { - home-manager.extraSpecialArgs = { inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu system theme format; }; + home-manager.extraSpecialArgs = { inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu system theme format image; }; home-manager.users."${username}" = import ../home-manager; } ]; diff --git a/nixos/common/modules/networking.nix b/nixos/common/modules/networking.nix index 3da38f86..2bc58733 100644 --- a/nixos/common/modules/networking.nix +++ b/nixos/common/modules/networking.nix @@ -4,6 +4,7 @@ networkmanager = { enable = true; logLevel = "INFO"; + dns = "dnsmasq"; }; useDHCP = lib.mkDefault true;