Restructure flake.nix for a simpler config for building different images off the same NixOS config.
This commit is contained in:
@@ -89,39 +89,35 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.waybar.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf config.me.graphical {
|
||||
environment.systemPackages = with pkgs; [
|
||||
waybar
|
||||
waybar_available_memory
|
||||
waybar_battery
|
||||
waybar_clock
|
||||
waybar_night_mode
|
||||
waybar_sound
|
||||
waybar_temperature
|
||||
python3 # for clock TODO python should not be in the system packages, maybe switch to a venv? ref https://nixos.wiki/wiki/Python
|
||||
bc # for temperature and sound
|
||||
jq # for memory, battery, sound, night mode, and temperature
|
||||
upower # for battery
|
||||
wlsunset # for night mode
|
||||
];
|
||||
config = lib.mkIf (config.me.waybar.enable && config.me.graphical) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
waybar
|
||||
waybar_available_memory
|
||||
waybar_battery
|
||||
waybar_clock
|
||||
waybar_night_mode
|
||||
waybar_sound
|
||||
waybar_temperature
|
||||
python3 # for clock TODO python should not be in the system packages, maybe switch to a venv? ref https://nixos.wiki/wiki/Python
|
||||
bc # for temperature and sound
|
||||
jq # for memory, battery, sound, night mode, and temperature
|
||||
upower # for battery
|
||||
wlsunset # for night mode
|
||||
];
|
||||
|
||||
me.swayIncludes = [
|
||||
waybar_sway_config
|
||||
];
|
||||
me.swayIncludes = [
|
||||
waybar_sway_config
|
||||
];
|
||||
|
||||
services.upower.enable = true; # for battery
|
||||
services.upower.enable = true; # for battery
|
||||
|
||||
me.install.user.talexander.file = {
|
||||
".config/waybar/config" = {
|
||||
source = ./files/waybar_config.json;
|
||||
};
|
||||
".config/waybar/style.css" = {
|
||||
source = ./files/style.css;
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
me.install.user.talexander.file = {
|
||||
".config/waybar/config" = {
|
||||
source = ./files/waybar_config.json;
|
||||
};
|
||||
".config/waybar/style.css" = {
|
||||
source = ./files/style.css;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user