Fix home/nix module on non-nixos machines

This commit is contained in:
Riley Apeldoorn 2023-05-23 10:32:24 +02:00
parent e1652df3d0
commit 55e2169571
3 changed files with 14 additions and 4 deletions

View file

@ -18,7 +18,10 @@
config = {
home-manager.users."riley" = a: lib.pipe a [
(import "${path}/home.nix")
(x: x // { imports = [ ./shared/home ]; })
(x: x // {
imports = [ ./shared/home ];
isNixos = true;
})
];
};
};

View file

@ -1,4 +1,4 @@
{ ... }:
{ lib, ... }:
{
@ -12,6 +12,11 @@
./gui
];
options.isNixos = lib.mkOption {
type = lib.types.bool;
default = false;
};
config.theme = import ../../themes/lean.nix;
}

View file

@ -1,6 +1,8 @@
{ ... }:
{ lib, pkgs, config, ... }:
{
(lib.mkIf (!config.isNixos) {
nix.package = pkgs.nix;
}) // {
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];