I would like to create an iso for my system. What can I do, if the definitions in ${nixos}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
are different from my definitions? For example, in the following, I get the error
nix build ~/etc/nixos/#isos.testsystem.config.system.build.isoImage
error: The option `home-manager.users.testuser.fonts.fontconfig.enable' has conflicting definition values:
- In `/nix/store/qqhk99qrcq5n2pfk9g7hn5zyvdd8frmf-source/flake.nix': false
- In `/nix/store/qqhk99qrcq5n2pfk9g7hn5zyvdd8frmf-source/flake.nix': true
with the flake.nix
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs = { nixpkgs.follows = "nixpkgs"; };
};
};
outputs = inputs @ { nixpkgs, home-manager, nixos, ... }:
let
system = "x86_64-linux";
inherit (nixpkgs) lib;
pkgs = import nixpkgs {
system = system;
config = { allowUnfree = true; };
};
in
{
isos = {
testsystem = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
system.stateVersion = "19.09";
}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.testuser = {
fonts.fontconfig.enable = true;
};
}
] ++ [
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
];
};
};
};
}