93 lines
1.8 KiB
Nix
93 lines
1.8 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
mkNoctaliaSettings =
|
|
{
|
|
homeDirectory,
|
|
lib,
|
|
terminalCommand,
|
|
}:
|
|
import ./_noctalia-config.nix {
|
|
inherit
|
|
homeDirectory
|
|
lib
|
|
terminalCommand
|
|
;
|
|
};
|
|
|
|
mkBaseSettings =
|
|
{
|
|
homeDirectory,
|
|
lib,
|
|
terminalCommand,
|
|
}:
|
|
mkNoctaliaSettings {
|
|
inherit
|
|
homeDirectory
|
|
lib
|
|
terminalCommand
|
|
;
|
|
};
|
|
|
|
mkPortableSettings =
|
|
baseSettings:
|
|
lib.recursiveUpdate baseSettings {
|
|
bar.widgets.right = lib.concatMap (
|
|
widget:
|
|
if widget.id == "ControlCenter" then
|
|
[
|
|
{
|
|
id = "Network";
|
|
}
|
|
{
|
|
id = "Battery";
|
|
showPowerProfiles = true;
|
|
displayMode = "graphic";
|
|
}
|
|
widget
|
|
]
|
|
else
|
|
[ widget ]
|
|
) baseSettings.bar.widgets.right;
|
|
};
|
|
in
|
|
{
|
|
flake.modules.homeManager.noctalia =
|
|
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
osConfig,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
baseSettings = mkBaseSettings {
|
|
inherit lib;
|
|
homeDirectory = config.home.homeDirectory;
|
|
terminalCommand = lib.getExe pkgs.xdg-terminal-exec;
|
|
};
|
|
settings =
|
|
if baseSettings == { } || !(osConfig.facts.machine.portable or false) then
|
|
baseSettings
|
|
else
|
|
mkPortableSettings baseSettings;
|
|
in
|
|
{
|
|
imports = [ inputs.noctalia.homeModules.default ];
|
|
|
|
programs.noctalia-shell = {
|
|
enable = true;
|
|
package = lib.mkForce (
|
|
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
|
calendarSupport = true;
|
|
}
|
|
);
|
|
inherit settings;
|
|
};
|
|
};
|
|
}
|