Restructure flake.nix for a simpler config for building different images off the same NixOS config.
This commit is contained in:
@@ -76,46 +76,42 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.zsh.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsh
|
||||
config = lib.mkIf config.me.zsh.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsh
|
||||
];
|
||||
|
||||
users.users.talexander.shell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
me.install.user.talexander.file = {
|
||||
".zshrc" = {
|
||||
source = "${zshrc}";
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".histdb";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0700";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
users.users.talexander.shell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
me.install.user.talexander.file = {
|
||||
".zshrc" = {
|
||||
source = "${zshrc}";
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".histdb";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0700";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
zsh-histdb = (final.callPackage ./package/zsh-histdb/package.nix { });
|
||||
})
|
||||
];
|
||||
}
|
||||
]
|
||||
);
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
zsh-histdb = (final.callPackage ./package/zsh-histdb/package.nix { });
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user