refactor: clean noctalia config
This commit is contained in:
@@ -3,35 +3,6 @@
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mkNoctaliaSettings =
|
||||
{ homeDirectory }:
|
||||
import ./_noctalia-config.nix {
|
||||
inherit homeDirectory;
|
||||
};
|
||||
|
||||
mkBaseSettings =
|
||||
{ homeDirectory }:
|
||||
mkNoctaliaSettings {
|
||||
inherit homeDirectory;
|
||||
};
|
||||
|
||||
mkPortableSettings =
|
||||
baseSettings:
|
||||
lib.recursiveUpdate baseSettings {
|
||||
bar.default.end = lib.concatMap (
|
||||
widget:
|
||||
if widget == "control-center" then
|
||||
[
|
||||
"network"
|
||||
"battery"
|
||||
widget
|
||||
]
|
||||
else
|
||||
[ widget ]
|
||||
) baseSettings.bar.default.end;
|
||||
};
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager.noctalia =
|
||||
{
|
||||
@@ -42,21 +13,205 @@ in
|
||||
...
|
||||
}:
|
||||
let
|
||||
baseSettings = mkBaseSettings {
|
||||
homeDirectory = config.home.homeDirectory;
|
||||
};
|
||||
settings =
|
||||
if baseSettings == { } || !(osConfig.facts.machine.portable or false) then
|
||||
baseSettings
|
||||
else
|
||||
mkPortableSettings baseSettings;
|
||||
homeDir = config.home.homeDirectory;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.noctalia.homeModules.default ];
|
||||
|
||||
programs.noctalia = {
|
||||
enable = true;
|
||||
inherit settings;
|
||||
settings = {
|
||||
audio = {
|
||||
enable_sounds = true;
|
||||
sound_volume = 1.0;
|
||||
};
|
||||
|
||||
bar.default = {
|
||||
end =
|
||||
if osConfig.facts.machine.portable then
|
||||
[
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"volume"
|
||||
"network"
|
||||
"battery"
|
||||
"clipboard"
|
||||
"control-center"
|
||||
]
|
||||
else
|
||||
[
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"volume"
|
||||
"clipboard"
|
||||
"control-center"
|
||||
];
|
||||
font_weight = 400;
|
||||
start = [ "workspaces" ];
|
||||
thickness = 30;
|
||||
};
|
||||
|
||||
calendar = {
|
||||
enabled = true;
|
||||
account.radicale = {
|
||||
name = "Personal";
|
||||
provider = "custom";
|
||||
server_url = "https://radicale.jelles.net/";
|
||||
type = "caldav";
|
||||
username = "kiri";
|
||||
};
|
||||
};
|
||||
|
||||
desktop_widgets = {
|
||||
enabled = false;
|
||||
schema_version = 2;
|
||||
widget_order = [ ];
|
||||
grid = {
|
||||
cell_size = 16;
|
||||
major_interval = 4;
|
||||
visible = true;
|
||||
};
|
||||
widget = { };
|
||||
};
|
||||
|
||||
location.address = "Meterik, The Netherlands";
|
||||
|
||||
lockscreen = {
|
||||
blur_intensity = 0.8;
|
||||
blurred_desktop = true;
|
||||
fingerprint = false;
|
||||
tint_intensity = 0.5;
|
||||
};
|
||||
|
||||
lockscreen_widgets = {
|
||||
enabled = true;
|
||||
schema_version = 2;
|
||||
widget_order = [
|
||||
"lockscreen-login-box@DP-2"
|
||||
"lockscreen-login-box@DP-3"
|
||||
];
|
||||
grid = {
|
||||
cell_size = 16;
|
||||
major_interval = 4;
|
||||
visible = true;
|
||||
};
|
||||
widget = {
|
||||
"lockscreen-login-box@DP-2" = {
|
||||
box_height = 70.0;
|
||||
box_width = 400.0;
|
||||
cx = 1280.0;
|
||||
cy = 1317.0;
|
||||
output = "DP-2";
|
||||
rotation = 0.0;
|
||||
type = "login_box";
|
||||
settings = {
|
||||
background_color = "surface_variant";
|
||||
background_opacity = 0.88;
|
||||
background_radius = 12.0;
|
||||
input_opacity = 1.0;
|
||||
input_radius = 6.0;
|
||||
show_login_button = true;
|
||||
};
|
||||
};
|
||||
"lockscreen-login-box@DP-3" = {
|
||||
box_height = 70.0;
|
||||
box_width = 400.0;
|
||||
cx = 1280.0;
|
||||
cy = 1317.0;
|
||||
output = "DP-3";
|
||||
rotation = 0.0;
|
||||
type = "login_box";
|
||||
settings = {
|
||||
background_color = "surface_variant";
|
||||
background_opacity = 0.88;
|
||||
background_radius = 12.0;
|
||||
input_opacity = 1.0;
|
||||
input_radius = 6.0;
|
||||
show_login_button = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nightlight = {
|
||||
enabled = true;
|
||||
temperature_night = 3000;
|
||||
};
|
||||
|
||||
notification = {
|
||||
layer = "overlay";
|
||||
position = "bottom_right";
|
||||
};
|
||||
|
||||
plugins = {
|
||||
enabled = [ ];
|
||||
source = [
|
||||
{
|
||||
kind = "git";
|
||||
location = "https://github.com/noctalia-dev/official-plugins";
|
||||
name = "official";
|
||||
}
|
||||
{
|
||||
kind = "git";
|
||||
location = "https://github.com/noctalia-dev/community-plugins";
|
||||
name = "community";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
shell = {
|
||||
font_family = "Lexend";
|
||||
screen_time_enabled = true;
|
||||
settings_show_advanced = true;
|
||||
ui_scale = 1.1;
|
||||
animation.speed = 1.5;
|
||||
screen_corners = {
|
||||
enabled = true;
|
||||
size = 50;
|
||||
};
|
||||
screenshot.directory = "${homeDir}/media/images/screenshots";
|
||||
};
|
||||
|
||||
theme = {
|
||||
builtin = "Kanagawa";
|
||||
community_palette = "Kanagawa Paper";
|
||||
wallpaper_scheme = "m3-content";
|
||||
templates = {
|
||||
enable_builtin_templates = false;
|
||||
enable_community_templates = false;
|
||||
};
|
||||
};
|
||||
|
||||
wallpaper = {
|
||||
directory = "${homeDir}/media/images/wallpapers";
|
||||
default.path = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
||||
last.path = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
||||
monitors = {
|
||||
DP-2.path = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
||||
DP-3.path = "${homeDir}/media/images/wallpapers/green-leaves.png";
|
||||
};
|
||||
};
|
||||
|
||||
weather.refresh_minutes = 15;
|
||||
|
||||
widget = {
|
||||
bluetooth.hide_when_no_connected_device = true;
|
||||
cat = {
|
||||
audio_spectrum = true;
|
||||
type = "noctalia/bongocat:cat";
|
||||
};
|
||||
clock.format = "{:%b %d | %H:%M}";
|
||||
media = {
|
||||
art_size = 90.0;
|
||||
max_length = 800;
|
||||
};
|
||||
tray.drawer = true;
|
||||
volume.show_label = false;
|
||||
workspaces.display = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
"network"
|
||||
"battery"
|
||||
|
||||
Reference in New Issue
Block a user