Allow unfree, fix weird nix error when using home in nixos config

This commit is contained in:
Sam W 2023-01-07 13:47:13 +00:00
parent 1529fda04d
commit a0b452def4
2 changed files with 20 additions and 2 deletions

View File

@ -32,7 +32,10 @@
username ? "samw",
}:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${system};
pkgs = (import inputs.nixpkgs {
inherit system;
config.allowUnfree = true; # Yes I know it's bad for me
});
modules = [
{ home = {
inherit username;
@ -41,7 +44,18 @@
then "/Users/${username}"
else "/home/${username}";
stateVersion = "21.11";
};}] ++ profiles ++ [{nixpkgs.overlays = overlays;}];
};}] ++ profiles ++ [
{nixpkgs.overlays = overlays;}
# See comment in home/default.nix.
({ pkgs, ... }: {
nix = {
enable = true;
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
settings.max-jobs = "auto"; # Gotta go fast (build derivations in parallel)
};
})
];
extraSpecialArgs = {inherit system;};
};
};

View File

@ -11,12 +11,16 @@ in {
"EDITOR" = "vim";
"WORDCHARS" = "\${WORDCHARS//[\\/.=]/}"; # ctrl-w on paths without make angery
};
/*
# For some reason this doesn't play nice when using home manager config from inside
# a nixos configuration.
nix = {
enable = true;
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
settings.max-jobs = "auto"; # Gotta go fast (build derivations in parallel)
};
*/
programs = {
home-manager.enable = true;