wm: add noctalia shell plugins
This commit is contained in:
parent
b9b9bbc998
commit
d1f4d2c281
38 changed files with 1398 additions and 696 deletions
|
|
@ -4,6 +4,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.systemConf) username;
|
||||
serverCfg = self.nixosConfigurations.dn-server.config;
|
||||
cfg = config.services.netbird;
|
||||
domain = serverCfg.services.netbird.server.domain;
|
||||
|
|
@ -14,6 +15,8 @@ in
|
|||
mode = "400";
|
||||
};
|
||||
|
||||
users.users.${username}.extraGroups = [ "netbird-wt0" ];
|
||||
|
||||
services.netbird = {
|
||||
clients.wt0 = {
|
||||
openFirewall = true;
|
||||
|
|
@ -21,6 +24,7 @@ in
|
|||
port = 51820;
|
||||
environment = {
|
||||
NB_MANAGEMENT_URL = "https://${domain}";
|
||||
NB_ADMIN_URL = "https://${domain}";
|
||||
};
|
||||
login = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,24 @@
|
|||
{ lib, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
openfortivpn
|
||||
];
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
networkmanager-fortisslvpn
|
||||
networkmanager-openvpn
|
||||
networkmanager-openconnect
|
||||
networkmanager-ssh
|
||||
networkmanager-sstp
|
||||
networkmanager-l2tp
|
||||
networkmanager-vpnc
|
||||
networkmanager-strongswan
|
||||
networkmanager-iodine
|
||||
];
|
||||
};
|
||||
enableIPv6 = lib.mkDefault false;
|
||||
firewall = {
|
||||
enable = lib.mkDefault true;
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ in
|
|||
btop
|
||||
eza
|
||||
fzf
|
||||
neofetch
|
||||
ripgrep
|
||||
fastfetch
|
||||
tree
|
||||
tldr # Alternative for man
|
||||
wget
|
||||
|
|
|
|||
|
|
@ -3,18 +3,54 @@ let
|
|||
inherit (lib) mkForce;
|
||||
in
|
||||
{
|
||||
backgroundOpacity = mkForce 0.25;
|
||||
capsuleOpacity = mkForce 0;
|
||||
backgroundOpacity = mkForce 0.25;
|
||||
autoHideDelay = 500;
|
||||
autoShowDelay = 150;
|
||||
barType = "floating";
|
||||
capsuleColorKey = "none";
|
||||
contentPadding = 2;
|
||||
density = "comfortable";
|
||||
exclusive = true;
|
||||
displayMode = "always_visible";
|
||||
floating = true;
|
||||
marginHorizontal = 0.25;
|
||||
marginVertical = 0.25;
|
||||
fontScale = 1;
|
||||
frameRadius = 12;
|
||||
frameThickness = 8;
|
||||
hideOnOverview = false;
|
||||
marginHorizontal = 5;
|
||||
marginVertical = 5;
|
||||
middleClickAction = "none";
|
||||
middleClickCommand = "";
|
||||
middleClickFollowMouse = false;
|
||||
monitors = [ ];
|
||||
mouseWheelAction = "none";
|
||||
mouseWheelWrap = true;
|
||||
outerCorners = false;
|
||||
position = "top";
|
||||
reverseScroll = false;
|
||||
rightClickAction = "controlCenter";
|
||||
rightClickCommand = "";
|
||||
rightClickFollowMouse = true;
|
||||
screenOverrides = [ ];
|
||||
showCapsule = true;
|
||||
showOnWorkspaceSwitch = true;
|
||||
showOutline = false;
|
||||
useSeparateOpacity = false;
|
||||
widgetSpacing = 6;
|
||||
widgets = {
|
||||
center = [
|
||||
{
|
||||
defaultSettings = {
|
||||
activeColor = "primary";
|
||||
enableToast = true;
|
||||
hideInactive = false;
|
||||
iconSpacing = 4;
|
||||
inactiveColor = "none";
|
||||
micFilterRegex = "";
|
||||
removeMargins = false;
|
||||
};
|
||||
id = "plugin:privacy-indicator";
|
||||
}
|
||||
{
|
||||
colorizeIcons = false;
|
||||
hideMode = "hidden";
|
||||
|
|
@ -22,13 +58,19 @@ in
|
|||
maxWidth = 145;
|
||||
scrollingMode = "hover";
|
||||
showIcon = true;
|
||||
textColor = "none";
|
||||
useFixedWidth = false;
|
||||
}
|
||||
];
|
||||
left = [
|
||||
{
|
||||
colorizeSystemIcon = "none";
|
||||
enableColorization = false;
|
||||
generalTooltipText = "";
|
||||
hideMode = "alwaysExpanded";
|
||||
icon = "rocket";
|
||||
id = "CustomButton";
|
||||
ipcIdentifier = "";
|
||||
leftClickExec = "noctalia-shell ipc call launcher toggle";
|
||||
leftClickUpdateText = false;
|
||||
maxTextLength = {
|
||||
|
|
@ -40,6 +82,9 @@ in
|
|||
parseJson = false;
|
||||
rightClickExec = "";
|
||||
rightClickUpdateText = false;
|
||||
showExecTooltip = true;
|
||||
showIcon = true;
|
||||
showTextTooltip = true;
|
||||
textCollapse = "";
|
||||
textCommand = "";
|
||||
textIntervalMs = 3000;
|
||||
|
|
@ -52,92 +97,185 @@ in
|
|||
wheelUpUpdateText = false;
|
||||
wheelUpdateText = false;
|
||||
}
|
||||
{ id = "plugin:weekly-calendar"; }
|
||||
{
|
||||
clockColor = "none";
|
||||
customFont = "";
|
||||
formatHorizontal = "HH:mm ddd, MMM dd";
|
||||
formatVertical = "HH mm - dd MM";
|
||||
id = "Clock";
|
||||
tooltipFormat = "HH:mm ddd, MMM dd";
|
||||
useCustomFont = false;
|
||||
usePrimaryColor = true;
|
||||
}
|
||||
{
|
||||
characterCount = 4;
|
||||
colorizeIcons = false;
|
||||
emptyColor = "secondary";
|
||||
enableScrollWheel = true;
|
||||
focusedColor = "primary";
|
||||
followFocusedScreen = false;
|
||||
fontWeight = "bold";
|
||||
groupedBorderOpacity = 1;
|
||||
hideUnoccupied = false;
|
||||
iconScale = 0.8;
|
||||
id = "Workspace";
|
||||
labelMode = "index";
|
||||
occupiedColor = "secondary";
|
||||
pillSize = 0.6;
|
||||
showApplications = false;
|
||||
showBadge = true;
|
||||
showLabelsOnlyWhenOccupied = true;
|
||||
unfocusedIconsOpacity = 1;
|
||||
}
|
||||
{
|
||||
compactMode = false;
|
||||
hideMode = "hidden";
|
||||
hideWhenIdle = false;
|
||||
id = "MediaMini";
|
||||
maxWidth = 250;
|
||||
panelShowAlbumArt = true;
|
||||
scrollingMode = "hover";
|
||||
showAlbumArt = true;
|
||||
showArtistFirst = false;
|
||||
showProgressRing = true;
|
||||
showVisualizer = true;
|
||||
textColor = "none";
|
||||
useFixedWidth = false;
|
||||
visualizerType = "linear";
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
blacklist = [
|
||||
"Bluetooth*"
|
||||
];
|
||||
blacklist = [ "Bluetooth*" ];
|
||||
chevronColor = "none";
|
||||
colorizeIcons = false;
|
||||
drawerEnabled = false;
|
||||
hidePassive = false;
|
||||
id = "Tray";
|
||||
pinned = [
|
||||
];
|
||||
pinned = [ ];
|
||||
}
|
||||
{
|
||||
compactMode = true;
|
||||
diskPath = "/";
|
||||
iconColor = "none";
|
||||
id = "SystemMonitor";
|
||||
showCpuCores = false;
|
||||
showCpuFreq = false;
|
||||
showCpuTemp = true;
|
||||
showCpuUsage = true;
|
||||
showDiskAvailable = false;
|
||||
showDiskUsage = false;
|
||||
showDiskUsageAsPercent = false;
|
||||
showGpuTemp = false;
|
||||
showLoadAverage = false;
|
||||
showMemoryAsPercent = false;
|
||||
showMemoryUsage = true;
|
||||
showNetworkStats = false;
|
||||
usePrimaryColor = false;
|
||||
showSwapUsage = false;
|
||||
textColor = "none";
|
||||
useMonospaceFont = true;
|
||||
usePadding = false;
|
||||
}
|
||||
{
|
||||
id = "ScreenRecorder";
|
||||
defaultSettings = {
|
||||
connectedColor = "primary";
|
||||
disconnectedColor = "none";
|
||||
displayMode = "onhover";
|
||||
};
|
||||
id = "plugin:network-manager-vpn";
|
||||
}
|
||||
{
|
||||
defaultSettings = {
|
||||
compactMode = false;
|
||||
defaultPeerAction = "copy-ip";
|
||||
hideDisconnected = false;
|
||||
pingCount = 5;
|
||||
refreshInterval = 5000;
|
||||
showIpAddress = true;
|
||||
showPing = false;
|
||||
};
|
||||
id = "plugin:netbird";
|
||||
}
|
||||
{
|
||||
defaultSettings = {
|
||||
audioCodec = "opus";
|
||||
audioSource = "default_output";
|
||||
colorRange = "limited";
|
||||
copyToClipboard = false;
|
||||
directory = "";
|
||||
filenamePattern = "recording_yyyyMMdd_HHmmss";
|
||||
frameRate = "60";
|
||||
hideInactive = false;
|
||||
iconColor = "none";
|
||||
quality = "very_high";
|
||||
resolution = "original";
|
||||
showCursor = true;
|
||||
videoCodec = "h264";
|
||||
videoSource = "portal";
|
||||
};
|
||||
id = "plugin:screen-recorder";
|
||||
}
|
||||
{
|
||||
iconColor = "none";
|
||||
id = "KeepAwake";
|
||||
textColor = "none";
|
||||
}
|
||||
{
|
||||
defaultSettings = {
|
||||
completedCount = 0;
|
||||
count = 0;
|
||||
current_page_id = 0;
|
||||
exportEmptySections = false;
|
||||
exportFormat = "markdown";
|
||||
exportPath = "~/Documents";
|
||||
isExpanded = false;
|
||||
pages = [
|
||||
{
|
||||
id = 0;
|
||||
name = "General";
|
||||
}
|
||||
];
|
||||
priorityColors = {
|
||||
high = "#f44336";
|
||||
low = "#9e9e9e";
|
||||
medium = "#2196f3";
|
||||
};
|
||||
showBackground = true;
|
||||
showCompleted = true;
|
||||
todos = [ ];
|
||||
useCustomColors = false;
|
||||
};
|
||||
id = "plugin:todo";
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
iconColor = "none";
|
||||
id = "Volume";
|
||||
middleClickCommand = "pwvucontrol || pavucontrol";
|
||||
textColor = "none";
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
id = "Brightness";
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
id = "VPN";
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
iconColor = "none";
|
||||
id = "Bluetooth";
|
||||
textColor = "none";
|
||||
}
|
||||
{
|
||||
hideWhenZero = true;
|
||||
hideWhenZeroUnread = false;
|
||||
iconColor = "none";
|
||||
id = "NotificationHistory";
|
||||
showUnreadBadge = true;
|
||||
unreadBadgeColor = "primary";
|
||||
}
|
||||
{
|
||||
deviceNativePath = "__default__";
|
||||
displayMode = "graphic";
|
||||
hideIfIdle = false;
|
||||
displayMode = "graphic-clean";
|
||||
hideIfIdle = true;
|
||||
hideIfNotDetected = true;
|
||||
id = "Battery";
|
||||
showNoctaliaPerformance = true;
|
||||
showPowerProfiles = true;
|
||||
showNoctaliaPerformance = false;
|
||||
showPowerProfiles = false;
|
||||
}
|
||||
{
|
||||
colorizeDistroLogo = false;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{ config }:
|
||||
{
|
||||
cards = [
|
||||
{
|
||||
|
|
@ -21,35 +22,38 @@
|
|||
id = "media-sysmon-card";
|
||||
}
|
||||
];
|
||||
diskPath = "/";
|
||||
position = "bottom_center";
|
||||
shortcuts = {
|
||||
left = [
|
||||
{ id = "Network"; }
|
||||
{ id = "Bluetooth"; }
|
||||
{ id = "WallpaperSelector"; }
|
||||
{
|
||||
id = "WiFi";
|
||||
}
|
||||
{
|
||||
id = "Bluetooth";
|
||||
}
|
||||
{
|
||||
id = "ScreenRecorder";
|
||||
}
|
||||
{
|
||||
id = "WallpaperSelector";
|
||||
defaultSettings = {
|
||||
audioCodec = "opus";
|
||||
audioSource = "default_output";
|
||||
colorRange = "limited";
|
||||
copyToClipboard = false;
|
||||
directory = "${config.home.homeDirectory}/Videos";
|
||||
filenamePattern = "recording_yyyyMMdd_HHmmss";
|
||||
frameRate = "60";
|
||||
hideInactive = false;
|
||||
iconColor = "none";
|
||||
quality = "very_high";
|
||||
resolution = "original";
|
||||
showCursor = true;
|
||||
videoCodec = "h264";
|
||||
videoSource = "portal";
|
||||
};
|
||||
id = "plugin:screen-recorder";
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
id = "Notifications";
|
||||
}
|
||||
{
|
||||
id = "PowerProfile";
|
||||
}
|
||||
{
|
||||
id = "KeepAwake";
|
||||
}
|
||||
{
|
||||
id = "NightLight";
|
||||
}
|
||||
{ id = "Notifications"; }
|
||||
{ id = "PowerProfile"; }
|
||||
{ id = "KeepAwake"; }
|
||||
{ id = "NightLight"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,21 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
inherit (config.systemConf) username;
|
||||
inherit (builtins) mapAttrs;
|
||||
inherit (builtins) mapAttrs hasAttr;
|
||||
inherit (lib)
|
||||
listToAttrs
|
||||
mkForce
|
||||
removePrefix
|
||||
concatStringsSep
|
||||
mapAttrsToList
|
||||
mkIf
|
||||
mkDefault
|
||||
;
|
||||
in
|
||||
{
|
||||
|
|
@ -18,10 +25,26 @@ in
|
|||
networking.networkmanager.enable = true;
|
||||
services.upower.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
systemd.user.services.polkit-gnome-authentication-agent-1.enable = mkForce false;
|
||||
|
||||
# ================================= #
|
||||
|
||||
# Calendar Service
|
||||
# Run `nix shell nixpkgs#gnome-control-center -c bash -c "XDG_CURRENT_DESKTOP=GNOME gnome-control-center"`,
|
||||
# Then login to service. Check: https://nixos.wiki/wiki/GNOME/Calendar
|
||||
programs.dconf.enable = true;
|
||||
services.gnome.evolution-data-server.enable = true;
|
||||
services.gnome.gnome-online-accounts.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
programs.evolution.enable = true;
|
||||
|
||||
home-manager.users.${username} =
|
||||
{ osConfig, config, ... }:
|
||||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
wmCfg = config.wm;
|
||||
bindCfg = wmCfg.keybinds;
|
||||
|
|
@ -56,224 +79,444 @@ in
|
|||
"XF86MonBrightnessUp" = ''noctalia "brightness" "increase"'';
|
||||
};
|
||||
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
colors = mkForce { };
|
||||
settings = {
|
||||
settingsVersion = 26;
|
||||
appLauncher = {
|
||||
customLaunchPrefix = "";
|
||||
customLaunchPrefixEnabled = false;
|
||||
enableClipPreview = true;
|
||||
enableClipboardHistory = true;
|
||||
pinnedExecs = [
|
||||
];
|
||||
position = "top_center";
|
||||
sortByMostUsed = true;
|
||||
terminalCommand = "${wmCfg.app.terminal.run}";
|
||||
useApp2Unit = false;
|
||||
viewMode = "list";
|
||||
# Install Required Packages
|
||||
home.packages = mkIf (hasAttr "wt0" osConfig.services.netbird.clients) [
|
||||
# Alias netbird-wt0 to netbird
|
||||
(pkgs.writeShellScriptBin "netbird" ''
|
||||
netbird-wt0 $@
|
||||
'')
|
||||
# Output noctalia settings in nix format
|
||||
(pkgs.writeShellScriptBin "noctalia-settings" ''
|
||||
PATH="$PATH:${pkgs.jq}/bin:${pkgs.nixfmt}/bin"
|
||||
tmp=$(mktemp)
|
||||
|
||||
noctalia-shell ipc call state all | jq -S .settings > "$tmp"
|
||||
|
||||
nix eval --impure --expr \
|
||||
"(builtins.fromJSON (builtins.readFile \"$tmp\"))$1" \
|
||||
| nixfmt
|
||||
|
||||
rm "$tmp"
|
||||
'')
|
||||
pkgs.gpu-screen-recorder
|
||||
];
|
||||
|
||||
programs.noctalia-shell =
|
||||
let
|
||||
officialPlugins = [
|
||||
"niri-overview-launcher"
|
||||
"timer"
|
||||
"screen-recorder"
|
||||
"clipper"
|
||||
"battery-threshold"
|
||||
"polkit-agent"
|
||||
"todo"
|
||||
"keybind-cheatsheet"
|
||||
"battery-action"
|
||||
"weekly-calendar"
|
||||
"privacy-indicator"
|
||||
"netbird"
|
||||
"network-manager-vpn"
|
||||
];
|
||||
states = listToAttrs (
|
||||
map (x: {
|
||||
name = x;
|
||||
value = {
|
||||
enabled = true;
|
||||
sourceUrl = "https://github.com/noctalia-dev/noctalia-plugins";
|
||||
};
|
||||
}) officialPlugins
|
||||
);
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
||||
calendarSupport = true;
|
||||
};
|
||||
audio = {
|
||||
cavaFrameRate = 30;
|
||||
externalMixer = "pwvucontrol";
|
||||
mprisBlacklist = [
|
||||
];
|
||||
preferredPlayer = "mpv";
|
||||
visualizerQuality = "high";
|
||||
visualizerType = "linear";
|
||||
volumeOverdrive = false;
|
||||
volumeStep = 5;
|
||||
};
|
||||
bar = import ./bar.nix { inherit lib; };
|
||||
brightness = {
|
||||
brightnessStep = 5;
|
||||
enableDdcSupport = false;
|
||||
enforceMinimum = true;
|
||||
};
|
||||
calendar = {
|
||||
cards = [
|
||||
systemd.enable = true;
|
||||
colors = mkForce { };
|
||||
plugins = {
|
||||
sources = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "banner-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "calendar-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "timer-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "weather-card";
|
||||
name = "Official Noctalia Plugins";
|
||||
url = "https://github.com/noctalia-dev/noctalia-plugins";
|
||||
}
|
||||
];
|
||||
inherit states;
|
||||
};
|
||||
changelog = {
|
||||
lastSeenVersion = "";
|
||||
pluginSettings = {
|
||||
netbird = {
|
||||
compactMode = true;
|
||||
defaultPeerAction = "copy-ip";
|
||||
hideDisconnected = false;
|
||||
pingCount = 5;
|
||||
refreshInterval = 5000;
|
||||
showIpAddress = false;
|
||||
showPing = false;
|
||||
};
|
||||
privacy-indicator = {
|
||||
activeColor = "primary";
|
||||
enableToast = false;
|
||||
hideInactive = true;
|
||||
iconSpacing = 4;
|
||||
inactiveColor = "none";
|
||||
micFilterRegex = "";
|
||||
removeMargins = true;
|
||||
};
|
||||
};
|
||||
colorSchemes = {
|
||||
darkMode = true;
|
||||
generateTemplatesForPredefined = true;
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "18:30";
|
||||
matugenSchemeType = "scheme-neutral";
|
||||
predefinedScheme = "Noctalia (default)";
|
||||
schedulingMode = "off";
|
||||
useWallpaperColors = true;
|
||||
};
|
||||
controlCenter = import ./controlCenter.nix;
|
||||
dock = {
|
||||
backgroundOpacity = mkForce 1.0;
|
||||
colorizeIcons = false;
|
||||
displayMode = "auto_hide";
|
||||
enabled = false;
|
||||
floatingRatio = 1;
|
||||
monitors = [
|
||||
];
|
||||
onlySameOutput = true;
|
||||
pinnedApps = [
|
||||
];
|
||||
size = 1;
|
||||
};
|
||||
general = {
|
||||
allowPanelsOnScreenWithoutBar = true;
|
||||
animationDisabled = false;
|
||||
animationSpeed = 1.5;
|
||||
avatarImage = "${config.home.homeDirectory}/.face";
|
||||
boxRadiusRatio = 0.68;
|
||||
iRadiusRatio = 0.68;
|
||||
compactLockScreen = false;
|
||||
dimmerOpacity = 0.4;
|
||||
enableShadows = true;
|
||||
forceBlackScreenCorners = true;
|
||||
language = "";
|
||||
lockOnSuspend = true;
|
||||
radiusRatio = 1;
|
||||
scaleRatio = 1;
|
||||
screenRadiusRatio = 1.09;
|
||||
shadowDirection = "bottom_right";
|
||||
shadowOffsetX = 2;
|
||||
shadowOffsetY = 3;
|
||||
showHibernateOnLockScreen = false;
|
||||
showScreenCorners = true;
|
||||
lockScreenAnimation = true;
|
||||
lockScreenCountdownDuration = 3000;
|
||||
};
|
||||
hooks = {
|
||||
enabled = false;
|
||||
darkModeChange = "";
|
||||
wallpaperChange = "";
|
||||
};
|
||||
location = {
|
||||
analogClockInCalendar = false;
|
||||
firstDayOfWeek = -1;
|
||||
name = "Taipei, TW";
|
||||
showCalendarEvents = true;
|
||||
showCalendarWeather = true;
|
||||
showWeekNumberInCalendar = false;
|
||||
use12hourFormat = false;
|
||||
useFahrenheit = false;
|
||||
weatherEnabled = true;
|
||||
weatherShowEffects = true;
|
||||
};
|
||||
network = {
|
||||
wifiEnabled = true;
|
||||
};
|
||||
nightLight = {
|
||||
enabled = true;
|
||||
autoSchedule = true;
|
||||
dayTemp = "6000";
|
||||
nightTemp = "5500";
|
||||
forced = false;
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "18:30";
|
||||
};
|
||||
notifications = {
|
||||
enableMarkdown = true;
|
||||
backgroundOpacity = mkForce 1.00;
|
||||
criticalUrgencyDuration = 15;
|
||||
enableKeyboardLayoutToast = true;
|
||||
enabled = true;
|
||||
location = "bottom_right";
|
||||
lowUrgencyDuration = 3;
|
||||
monitors = [
|
||||
];
|
||||
normalUrgencyDuration = 8;
|
||||
overlayLayer = true;
|
||||
respectExpireTimeout = false;
|
||||
};
|
||||
osd = {
|
||||
autoHideMs = 1500;
|
||||
backgroundOpacity = mkForce 0.55;
|
||||
enabled = true;
|
||||
enabledTypes = [
|
||||
0
|
||||
1
|
||||
2
|
||||
];
|
||||
location = "right";
|
||||
monitors = [
|
||||
];
|
||||
overlayLayer = true;
|
||||
};
|
||||
screenRecorder = {
|
||||
audioCodec = "opus";
|
||||
audioSource = "default_output";
|
||||
colorRange = "limited";
|
||||
directory = "${config.home.homeDirectory}/Videos";
|
||||
frameRate = 60;
|
||||
quality = "very_high";
|
||||
showCursor = true;
|
||||
videoCodec = "h264";
|
||||
videoSource = "portal";
|
||||
};
|
||||
sessionMenu = import ./sessionMenu.nix;
|
||||
systemMonitor = import ./systemMonitor.nix;
|
||||
templates = import ./templates.nix;
|
||||
ui = {
|
||||
fontDefault = config.stylix.fonts.sansSerif.name;
|
||||
fontDefaultScale = 1;
|
||||
fontFixed = config.stylix.fonts.monospace.name;
|
||||
fontFixedScale = 1;
|
||||
panelBackgroundOpacity = mkForce 0.25;
|
||||
panelsAttachedToBar = true;
|
||||
settingsPanelAttachToBar = true;
|
||||
tooltipsEnabled = true;
|
||||
};
|
||||
wallpaper = {
|
||||
directory = "${config.home.homeDirectory}/Pictures/Wallpapers";
|
||||
enableMultiMonitorDirectories = false;
|
||||
enabled = true;
|
||||
fillColor = "#000000";
|
||||
fillMode = "crop";
|
||||
hideWallpaperFilenames = true;
|
||||
monitorDirectories = [
|
||||
];
|
||||
overviewEnabled = true;
|
||||
panelPosition = "follow_bar";
|
||||
randomEnabled = false;
|
||||
randomIntervalSec = 300;
|
||||
recursiveSearch = false;
|
||||
setWallpaperOnAllMonitors = true;
|
||||
transitionDuration = 1500;
|
||||
transitionEdgeSmoothness = 0.05;
|
||||
transitionType = "random";
|
||||
useWallhaven = false;
|
||||
wallhavenCategories = "111";
|
||||
wallhavenOrder = "desc";
|
||||
wallhavenPurity = "100";
|
||||
wallhavenQuery = "";
|
||||
wallhavenResolutionHeight = "";
|
||||
wallhavenResolutionMode = "atleast";
|
||||
wallhavenResolutionWidth = "";
|
||||
wallhavenSorting = "relevance";
|
||||
settings = {
|
||||
appLauncher = {
|
||||
autoPasteClipboard = false;
|
||||
clipboardWatchImageCommand = "wl-paste --type image --watch cliphist store";
|
||||
clipboardWatchTextCommand = "wl-paste --type text --watch cliphist store";
|
||||
clipboardWrapText = true;
|
||||
customLaunchPrefix = "";
|
||||
customLaunchPrefixEnabled = false;
|
||||
density = "default";
|
||||
enableClipPreview = true;
|
||||
enableClipboardHistory = true;
|
||||
enableSessionSearch = true;
|
||||
enableSettingsSearch = true;
|
||||
enableWindowsSearch = true;
|
||||
iconMode = "tabler";
|
||||
ignoreMouseInput = false;
|
||||
overviewLayer = false;
|
||||
pinnedApps = [ ];
|
||||
position = "top_center";
|
||||
screenshotAnnotationTool = "";
|
||||
showCategories = true;
|
||||
showIconBackground = false;
|
||||
sortByMostUsed = true;
|
||||
terminalCommand = "${wmCfg.app.terminal.run}";
|
||||
useApp2Unit = false;
|
||||
viewMode = "list";
|
||||
};
|
||||
audio = {
|
||||
mprisBlacklist = [ ];
|
||||
preferredPlayer = "mpv";
|
||||
spectrumFrameRate = 30;
|
||||
visualizerType = "linear";
|
||||
volumeFeedback = false;
|
||||
volumeFeedbackSoundFile = "";
|
||||
volumeOverdrive = false;
|
||||
volumeStep = 5;
|
||||
};
|
||||
bar = import ./bar.nix { inherit lib; };
|
||||
brightness = {
|
||||
backlightDeviceMappings = [ ];
|
||||
brightnessStep = 5;
|
||||
enableDdcSupport = false;
|
||||
enforceMinimum = true;
|
||||
};
|
||||
calendar = {
|
||||
cards = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "banner-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "calendar-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "timer-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "weather-card";
|
||||
}
|
||||
];
|
||||
};
|
||||
colorSchemes = {
|
||||
darkMode = true;
|
||||
generationMethod = "tonal-spot";
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "18:30";
|
||||
monitorForColors = "";
|
||||
predefinedScheme = "Noctalia (default)";
|
||||
schedulingMode = "off";
|
||||
useWallpaperColors = true;
|
||||
};
|
||||
controlCenter = import ./controlCenter.nix { inherit config; };
|
||||
dock = {
|
||||
animationSpeed = 1;
|
||||
backgroundOpacity = mkForce 1.0;
|
||||
colorizeIcons = false;
|
||||
deadOpacity = 0.6;
|
||||
displayMode = "auto_hide";
|
||||
dockType = "floating";
|
||||
enabled = false;
|
||||
floatingRatio = 1;
|
||||
groupApps = false;
|
||||
groupClickAction = "cycle";
|
||||
groupContextMenuMode = "extended";
|
||||
groupIndicatorStyle = "dots";
|
||||
inactiveIndicators = false;
|
||||
indicatorColor = "primary";
|
||||
indicatorOpacity = 0.6;
|
||||
indicatorThickness = 3;
|
||||
launcherIconColor = "none";
|
||||
launcherPosition = "end";
|
||||
monitors = [ ];
|
||||
onlySameOutput = true;
|
||||
pinnedApps = [ ];
|
||||
pinnedStatic = false;
|
||||
position = "bottom";
|
||||
showDockIndicator = false;
|
||||
showLauncherIcon = false;
|
||||
sitOnFrame = false;
|
||||
size = 1;
|
||||
};
|
||||
general = {
|
||||
allowPanelsOnScreenWithoutBar = true;
|
||||
allowPasswordWithFprintd = false;
|
||||
animationDisabled = false;
|
||||
animationSpeed = 1.5;
|
||||
autoStartAuth = false;
|
||||
avatarImage = "${config.home.homeDirectory}/.face";
|
||||
boxRadiusRatio = 0.68;
|
||||
clockFormat = "hh\\nmm";
|
||||
clockStyle = "custom";
|
||||
compactLockScreen = false;
|
||||
dimmerOpacity = 0.4;
|
||||
enableBlurBehind = true;
|
||||
enableLockScreenCountdown = true;
|
||||
enableLockScreenMediaControls = false;
|
||||
enableShadows = true;
|
||||
forceBlackScreenCorners = true;
|
||||
iRadiusRatio = 0.68;
|
||||
keybinds = {
|
||||
keyDown = [ "Down" ];
|
||||
keyEnter = [
|
||||
"Return"
|
||||
"Enter"
|
||||
];
|
||||
keyEscape = [ "Esc" ];
|
||||
keyLeft = [ "Left" ];
|
||||
keyRemove = [ "Del" ];
|
||||
keyRight = [ "Right" ];
|
||||
keyUp = [ "Up" ];
|
||||
};
|
||||
language = "";
|
||||
lockOnSuspend = true;
|
||||
lockScreenAnimations = false;
|
||||
lockScreenBlur = 0;
|
||||
lockScreenCountdownDuration = 3000;
|
||||
lockScreenMonitors = [ ];
|
||||
lockScreenTint = 0;
|
||||
passwordChars = false;
|
||||
radiusRatio = 1;
|
||||
reverseScroll = false;
|
||||
scaleRatio = 1;
|
||||
screenRadiusRatio = 1.09;
|
||||
shadowDirection = "bottom_right";
|
||||
shadowOffsetX = 2;
|
||||
shadowOffsetY = 3;
|
||||
showChangelogOnStartup = true;
|
||||
showHibernateOnLockScreen = false;
|
||||
showScreenCorners = true;
|
||||
showSessionButtonsOnLockScreen = true;
|
||||
telemetryEnabled = false;
|
||||
};
|
||||
hooks = {
|
||||
darkModeChange = "";
|
||||
enabled = false;
|
||||
performanceModeDisabled = "";
|
||||
performanceModeEnabled = "";
|
||||
screenLock = "";
|
||||
screenUnlock = "";
|
||||
session = "";
|
||||
startup = "";
|
||||
wallpaperChange = "";
|
||||
};
|
||||
location = {
|
||||
analogClockInCalendar = false;
|
||||
firstDayOfWeek = -1;
|
||||
hideWeatherCityName = false;
|
||||
hideWeatherTimezone = false;
|
||||
name = mkDefault "Taipei, TW";
|
||||
showCalendarEvents = true;
|
||||
showCalendarWeather = true;
|
||||
showWeekNumberInCalendar = false;
|
||||
use12hourFormat = false;
|
||||
useFahrenheit = false;
|
||||
weatherEnabled = true;
|
||||
weatherShowEffects = true;
|
||||
};
|
||||
network = {
|
||||
airplaneModeEnabled = false;
|
||||
bluetoothAutoConnect = true;
|
||||
bluetoothDetailsViewMode = "grid";
|
||||
bluetoothHideUnnamedDevices = false;
|
||||
bluetoothRssiPollIntervalMs = 60000;
|
||||
bluetoothRssiPollingEnabled = false;
|
||||
disableDiscoverability = false;
|
||||
networkPanelView = "wifi";
|
||||
wifiDetailsViewMode = "grid";
|
||||
wifiEnabled = true;
|
||||
};
|
||||
nightLight = {
|
||||
autoSchedule = true;
|
||||
dayTemp = "6000";
|
||||
enabled = true;
|
||||
forced = false;
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "18:30";
|
||||
nightTemp = "5500";
|
||||
};
|
||||
notifications = {
|
||||
backgroundOpacity = mkForce 1.00;
|
||||
clearDismissed = true;
|
||||
criticalUrgencyDuration = 15;
|
||||
density = "default";
|
||||
enableBatteryToast = true;
|
||||
enableKeyboardLayoutToast = true;
|
||||
enableMarkdown = true;
|
||||
enableMediaToast = false;
|
||||
enabled = true;
|
||||
location = "bottom_right";
|
||||
lowUrgencyDuration = 3;
|
||||
monitors = [ ];
|
||||
normalUrgencyDuration = 8;
|
||||
overlayLayer = true;
|
||||
respectExpireTimeout = false;
|
||||
saveToHistory = {
|
||||
critical = true;
|
||||
low = true;
|
||||
normal = true;
|
||||
};
|
||||
sounds = {
|
||||
criticalSoundFile = "";
|
||||
enabled = false;
|
||||
excludedApps = "discord,firefox,chrome,chromium,edge";
|
||||
lowSoundFile = "";
|
||||
normalSoundFile = "";
|
||||
separateSounds = false;
|
||||
volume = 0.5;
|
||||
};
|
||||
};
|
||||
osd = {
|
||||
autoHideMs = 1500;
|
||||
backgroundOpacity = mkForce 0.55;
|
||||
enabled = true;
|
||||
enabledTypes = [
|
||||
0
|
||||
1
|
||||
2
|
||||
];
|
||||
location = "right";
|
||||
monitors = [ ];
|
||||
overlayLayer = true;
|
||||
};
|
||||
settingsVersion = 57;
|
||||
sessionMenu = import ./sessionMenu.nix;
|
||||
systemMonitor = {
|
||||
batteryCriticalThreshold = 5;
|
||||
batteryWarningThreshold = 20;
|
||||
cpuCriticalThreshold = 90;
|
||||
cpuWarningThreshold = 80;
|
||||
criticalColor = "";
|
||||
diskAvailCriticalThreshold = 10;
|
||||
diskAvailWarningThreshold = 20;
|
||||
diskCriticalThreshold = 90;
|
||||
diskWarningThreshold = 80;
|
||||
enableDgpuMonitoring = false;
|
||||
externalMonitor = "resources || missioncenter || jdsystemmonitor || corestats || system-monitoring-center || gnome-system-monitor || plasma-systemmonitor || mate-system-monitor || ukui-system-monitor || deepin-system-monitor || pantheon-system-monitor";
|
||||
gpuCriticalThreshold = 90;
|
||||
gpuWarningThreshold = 80;
|
||||
memCriticalThreshold = 90;
|
||||
memWarningThreshold = 80;
|
||||
swapCriticalThreshold = 90;
|
||||
swapWarningThreshold = 80;
|
||||
tempCriticalThreshold = 90;
|
||||
tempWarningThreshold = 80;
|
||||
useCustomColors = false;
|
||||
warningColor = "";
|
||||
};
|
||||
templates = {
|
||||
activeTemplates = [ ];
|
||||
enableUserTheming = false;
|
||||
};
|
||||
ui = {
|
||||
boxBorderEnabled = false;
|
||||
fontDefault = config.stylix.fonts.sansSerif.name;
|
||||
fontDefaultScale = 1;
|
||||
fontFixed = config.stylix.fonts.monospace.name;
|
||||
fontFixedScale = 1;
|
||||
panelBackgroundOpacity = mkForce 0.25;
|
||||
panelsAttachedToBar = true;
|
||||
settingsPanelMode = "attached";
|
||||
settingsPanelSideBarCardStyle = false;
|
||||
tooltipsEnabled = true;
|
||||
};
|
||||
wallpaper = {
|
||||
automationEnabled = false;
|
||||
directory = "${config.home.homeDirectory}/Pictures/Wallpapers";
|
||||
enableMultiMonitorDirectories = false;
|
||||
enabled = true;
|
||||
favorites = [ ];
|
||||
fillColor = "#000000";
|
||||
fillMode = "crop";
|
||||
hideWallpaperFilenames = true;
|
||||
monitorDirectories = [ ];
|
||||
overviewBlur = 0.4;
|
||||
overviewEnabled = true;
|
||||
overviewTint = 0.6;
|
||||
panelPosition = "follow_bar";
|
||||
randomIntervalSec = 300;
|
||||
setWallpaperOnAllMonitors = true;
|
||||
showHiddenFiles = false;
|
||||
skipStartupTransition = false;
|
||||
sortOrder = "name";
|
||||
transitionDuration = 1500;
|
||||
transitionEdgeSmoothness = 0.05;
|
||||
transitionType = "random";
|
||||
useSolidColor = false;
|
||||
useWallhaven = false;
|
||||
viewMode = "single";
|
||||
wallhavenApiKey = "";
|
||||
wallhavenCategories = "111";
|
||||
wallhavenOrder = "desc";
|
||||
wallhavenPurity = "100";
|
||||
wallhavenQuery = "";
|
||||
wallhavenRatios = "";
|
||||
wallhavenResolutionHeight = "";
|
||||
wallhavenResolutionMode = "atleast";
|
||||
wallhavenResolutionWidth = "";
|
||||
wallhavenSorting = "relevance";
|
||||
wallpaperChangeMode = "random";
|
||||
};
|
||||
plugins = {
|
||||
autoUpdate = false;
|
||||
};
|
||||
noctaliaPerformance = {
|
||||
disableDesktopWidgets = true;
|
||||
disableWallpaper = true;
|
||||
};
|
||||
desktopWidgets = {
|
||||
enabled = true;
|
||||
gridSnap = false;
|
||||
monitorWidgets = [ ];
|
||||
overviewEnabled = true;
|
||||
};
|
||||
idle = {
|
||||
customCommands = "[]";
|
||||
enabled = false;
|
||||
fadeDuration = 5;
|
||||
lockCommand = "";
|
||||
lockTimeout = 660;
|
||||
resumeLockCommand = "";
|
||||
resumeScreenOffCommand = "";
|
||||
resumeSuspendCommand = "";
|
||||
screenOffCommand = "";
|
||||
screenOffTimeout = 600;
|
||||
suspendCommand = "";
|
||||
suspendTimeout = 1800;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.niri.settings = mkIf osConfig.programs.niri.enable (
|
||||
with config.lib.niri.actions;
|
||||
|
|
|
|||
|
|
@ -1,38 +1,47 @@
|
|||
{
|
||||
countdownDuration = 3000;
|
||||
enableCountdown = true;
|
||||
powerOptiolargeButtonsLayout = "single-row";
|
||||
largeButtonsStyle = true;
|
||||
position = "bottom_center";
|
||||
powerOptions = [
|
||||
{
|
||||
action = "lock";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "1";
|
||||
}
|
||||
{
|
||||
action = "suspend";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "2";
|
||||
}
|
||||
{
|
||||
action = "hibernate";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "3";
|
||||
}
|
||||
{
|
||||
action = "reboot";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "4";
|
||||
}
|
||||
{
|
||||
action = "logout";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "5";
|
||||
}
|
||||
{
|
||||
action = "shutdown";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "6";
|
||||
}
|
||||
];
|
||||
showHeader = false;
|
||||
showKeybinds = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
cpuCriticalThreshold = 90;
|
||||
cpuPollingInterval = 3000;
|
||||
cpuWarningThreshold = 80;
|
||||
criticalColor = "";
|
||||
diskCriticalThreshold = 90;
|
||||
diskPollingInterval = 3000;
|
||||
diskWarningThreshold = 80;
|
||||
memCriticalThreshold = 90;
|
||||
memPollingInterval = 3000;
|
||||
memWarningThreshold = 80;
|
||||
networkPollingInterval = 3000;
|
||||
tempCriticalThreshold = 90;
|
||||
tempPollingInterval = 3000;
|
||||
tempWarningThreshold = 80;
|
||||
useCustomColors = false;
|
||||
warningColor = "";
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
alacritty = false;
|
||||
cava = false;
|
||||
code = false;
|
||||
discord = false;
|
||||
emacs = false;
|
||||
enableUserTemplates = false;
|
||||
foot = false;
|
||||
fuzzel = false;
|
||||
ghostty = false;
|
||||
gtk = false;
|
||||
kcolorscheme = false;
|
||||
kitty = false;
|
||||
niri = false;
|
||||
pywalfox = false;
|
||||
qt = false;
|
||||
spicetify = false;
|
||||
telegram = false;
|
||||
vicinae = false;
|
||||
walker = false;
|
||||
wezterm = false;
|
||||
}
|
||||
|
|
@ -1,22 +1,27 @@
|
|||
{
|
||||
adminPassFile,
|
||||
ldapConf,
|
||||
domain ? null,
|
||||
acmeConfs ? null,
|
||||
certs ? null,
|
||||
enableNginx ? true,
|
||||
hostname,
|
||||
domain,
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.sops) secrets;
|
||||
cfg = config.services.stalwart;
|
||||
secretPrefix = "/run/credentials/stalwart.service";
|
||||
adminPasswordVarName = "user_admin_password";
|
||||
adminPasswordFile = "${secretPrefix}/${adminPasswordVarName}";
|
||||
|
||||
logFilePath = "${config.services.stalwart.dataDir}/logs";
|
||||
fqdn = "${hostname}.${domain}";
|
||||
in
|
||||
{
|
||||
sops.secrets."stalwart/password" = {
|
||||
owner = cfg.user;
|
||||
group = cfg.group;
|
||||
mode = "0440";
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [
|
||||
|
|
@ -30,20 +35,14 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules =
|
||||
let
|
||||
inherit (config.users.users.stalwart) name group;
|
||||
in
|
||||
[
|
||||
"d ${logFilePath} 0750 ${name} ${group} - "
|
||||
];
|
||||
|
||||
services.stalwart = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
credentials = {
|
||||
user_admin_password = secrets."stalwart/password".path;
|
||||
};
|
||||
settings = {
|
||||
server = {
|
||||
hostname = if (domain != null) then "mx1.${domain}" else config.networking.fqdn;
|
||||
hostname = fqdn;
|
||||
proxy = {
|
||||
trusted-networks = [ "10.0.0.148" ];
|
||||
};
|
||||
|
|
@ -91,11 +90,9 @@ in
|
|||
};
|
||||
|
||||
lookup.default = {
|
||||
hostname = "mx1.${domain}";
|
||||
domain = "${domain}";
|
||||
inherit domain;
|
||||
hostname = fqdn;
|
||||
};
|
||||
acme = mkIf (acmeConfs != null) acmeConfs;
|
||||
certificate = mkIf (certs != null) certs;
|
||||
|
||||
directory = {
|
||||
"in-memory" = {
|
||||
|
|
@ -104,20 +101,19 @@ in
|
|||
{
|
||||
name = "postmaster";
|
||||
class = "individual";
|
||||
secret = "%{file:${adminPassFile}}%";
|
||||
secret = "%{file:${adminPasswordFile}}%";
|
||||
email = [ "postmaster@${domain}" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
"ldap" = ldapConf;
|
||||
imap.lookup.domains = [
|
||||
"mx1.${domain}"
|
||||
fqdn
|
||||
];
|
||||
};
|
||||
|
||||
authentication.fallback-admin = {
|
||||
user = "admin";
|
||||
secret = "%{file:${adminPassFile}}%";
|
||||
secret = "%{file:${adminPasswordFile}}%";
|
||||
};
|
||||
tracer."stdout" = {
|
||||
enable = true;
|
||||
|
|
@ -126,16 +122,4 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = mkIf enableNginx {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"mail.${domain}" = {
|
||||
locations."/".proxyPass = "http://127.0.0.1:8080";
|
||||
locations."/jmap".proxyPass = "http://127.0.0.1:31004";
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue