Restructure flake.nix for a simpler config for building different images off the same NixOS config.
This commit is contained in:
@@ -25,31 +25,27 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.direnv.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
direnv
|
||||
nix-direnv
|
||||
config = lib.mkIf config.me.direnv.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
direnv
|
||||
nix-direnv
|
||||
];
|
||||
|
||||
me.zsh.includes = [ direnv_zsh_hook ];
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
# List of allowed directories from `direnv allow`.
|
||||
directory = ".local/share/direnv";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
|
||||
me.zsh.includes = [ direnv_zsh_hook ];
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
# List of allowed directories from `direnv allow`.
|
||||
directory = ".local/share/direnv";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user