Initial commit
This commit is contained in:
564
modules/features/_noctalia-config.nix
Normal file
564
modules/features/_noctalia-config.nix
Normal file
@@ -0,0 +1,564 @@
|
||||
{
|
||||
settingsVersion = 53;
|
||||
bar = {
|
||||
barType = "simple";
|
||||
position = "top";
|
||||
monitors = [];
|
||||
density = "default";
|
||||
showOutline = false;
|
||||
showCapsule = false;
|
||||
capsuleOpacity = 1;
|
||||
capsuleColorKey = "none";
|
||||
widgetSpacing = 6;
|
||||
contentPadding = 2;
|
||||
fontScale = 1;
|
||||
backgroundOpacity = 0;
|
||||
useSeparateOpacity = false;
|
||||
floating = false;
|
||||
marginVertical = 6;
|
||||
marginHorizontal = 8;
|
||||
frameThickness = 0;
|
||||
frameRadius = 0;
|
||||
outerCorners = false;
|
||||
hideOnOverview = true;
|
||||
displayMode = "always_visible";
|
||||
autoHideDelay = 500;
|
||||
autoShowDelay = 150;
|
||||
showOnWorkspaceSwitch = true;
|
||||
widgets = {
|
||||
left = [
|
||||
{
|
||||
colorizeSystemIcon = "none";
|
||||
customIconPath = "";
|
||||
enableColorization = false;
|
||||
icon = "rocket";
|
||||
iconColor = "none";
|
||||
id = "Launcher";
|
||||
useDistroLogo = false;
|
||||
}
|
||||
{
|
||||
characterCount = 2;
|
||||
colorizeIcons = true;
|
||||
emptyColor = "secondary";
|
||||
enableScrollWheel = true;
|
||||
focusedColor = "primary";
|
||||
followFocusedScreen = false;
|
||||
groupedBorderOpacity = 1;
|
||||
hideUnoccupied = true;
|
||||
iconScale = 0.75;
|
||||
id = "Workspace";
|
||||
labelMode = "none";
|
||||
occupiedColor = "secondary";
|
||||
pillSize = 0.6;
|
||||
showApplications = true;
|
||||
showBadge = false;
|
||||
showLabelsOnlyWhenOccupied = true;
|
||||
unfocusedIconsOpacity = 1;
|
||||
}
|
||||
];
|
||||
center = [
|
||||
{
|
||||
clockColor = "none";
|
||||
customFont = "";
|
||||
formatHorizontal = "HH:mm ddd, MMM dd";
|
||||
formatVertical = "HH mm - dd MM";
|
||||
id = "Clock";
|
||||
tooltipFormat = "HH:mm ddd, MMM dd";
|
||||
useCustomFont = false;
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
blacklist = [];
|
||||
chevronColor = "none";
|
||||
colorizeIcons = false;
|
||||
drawerEnabled = true;
|
||||
hidePassive = false;
|
||||
id = "Tray";
|
||||
pinned = [];
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
iconColor = "none";
|
||||
id = "Volume";
|
||||
middleClickCommand = "pwvucontrol || pavucontrol";
|
||||
textColor = "none";
|
||||
}
|
||||
{
|
||||
colorizeDistroLogo = false;
|
||||
colorizeSystemIcon = "none";
|
||||
customIconPath = "";
|
||||
enableColorization = false;
|
||||
icon = "noctalia";
|
||||
id = "ControlCenter";
|
||||
useDistroLogo = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
screenOverrides = [];
|
||||
};
|
||||
general = {
|
||||
avatarImage = "/home/kiri/.face";
|
||||
dimmerOpacity = 0;
|
||||
showScreenCorners = false;
|
||||
forceBlackScreenCorners = false;
|
||||
scaleRatio = 1;
|
||||
radiusRatio = 0.5;
|
||||
iRadiusRatio = 0.5;
|
||||
boxRadiusRatio = 0;
|
||||
screenRadiusRatio = 0;
|
||||
animationSpeed = 2;
|
||||
animationDisabled = false;
|
||||
compactLockScreen = false;
|
||||
lockScreenAnimations = false;
|
||||
lockOnSuspend = true;
|
||||
showSessionButtonsOnLockScreen = true;
|
||||
showHibernateOnLockScreen = false;
|
||||
enableLockScreenMediaControls = false;
|
||||
enableShadows = true;
|
||||
shadowDirection = "bottom_right";
|
||||
shadowOffsetX = 2;
|
||||
shadowOffsetY = 3;
|
||||
language = "";
|
||||
allowPanelsOnScreenWithoutBar = true;
|
||||
showChangelogOnStartup = true;
|
||||
telemetryEnabled = false;
|
||||
enableLockScreenCountdown = true;
|
||||
lockScreenCountdownDuration = 10000;
|
||||
autoStartAuth = false;
|
||||
allowPasswordWithFprintd = false;
|
||||
clockStyle = "custom";
|
||||
clockFormat = "hh\\nmm";
|
||||
passwordChars = false;
|
||||
lockScreenMonitors = [];
|
||||
lockScreenBlur = 0;
|
||||
lockScreenTint = 0;
|
||||
keybinds = {
|
||||
keyUp = [
|
||||
"Up"
|
||||
"Ctrl+K"
|
||||
];
|
||||
keyDown = [
|
||||
"Down"
|
||||
"Ctrl+J"
|
||||
];
|
||||
keyLeft = [
|
||||
"Left"
|
||||
"Ctrl+H"
|
||||
];
|
||||
keyRight = [
|
||||
"Right"
|
||||
"Ctrl+L"
|
||||
];
|
||||
keyEnter = [
|
||||
"Return"
|
||||
];
|
||||
keyEscape = [
|
||||
"Esc"
|
||||
];
|
||||
keyRemove = [
|
||||
"Del"
|
||||
];
|
||||
};
|
||||
reverseScroll = false;
|
||||
};
|
||||
ui = {
|
||||
fontDefault = "Comfortaa Medium";
|
||||
fontFixed = "FiraCode Nerd Font";
|
||||
fontDefaultScale = 1;
|
||||
fontFixedScale = 1;
|
||||
tooltipsEnabled = true;
|
||||
boxBorderEnabled = false;
|
||||
panelBackgroundOpacity = 1;
|
||||
panelsAttachedToBar = true;
|
||||
settingsPanelMode = "attached";
|
||||
settingsPanelSideBarCardStyle = false;
|
||||
};
|
||||
location = {
|
||||
name = "Meterik, Limburg";
|
||||
weatherEnabled = true;
|
||||
weatherShowEffects = true;
|
||||
useFahrenheit = false;
|
||||
use12hourFormat = false;
|
||||
showWeekNumberInCalendar = true;
|
||||
showCalendarEvents = true;
|
||||
showCalendarWeather = true;
|
||||
analogClockInCalendar = false;
|
||||
firstDayOfWeek = "unknown character to parse: -";
|
||||
",
|
||||
" = "unknown character to parse: h";
|
||||
deWeatherTimezone = false;
|
||||
hideWeatherCityName = false;
|
||||
};
|
||||
calendar = {
|
||||
cards = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "calendar-header-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "calendar-month-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "weather-card";
|
||||
}
|
||||
];
|
||||
};
|
||||
wallpaper = {
|
||||
enabled = true;
|
||||
overviewEnabled = false;
|
||||
directory = "/home/kiri/media/images/wallpapers";
|
||||
monitorDirectories = [];
|
||||
enableMultiMonitorDirectories = false;
|
||||
showHiddenFiles = false;
|
||||
viewMode = "recursive";
|
||||
setWallpaperOnAllMonitors = true;
|
||||
fillMode = "crop";
|
||||
fillColor = "#000000";
|
||||
useSolidColor = false;
|
||||
solidColor = "#1a1a2e";
|
||||
automationEnabled = false;
|
||||
wallpaperChangeMode = "random";
|
||||
randomIntervalSec = 300;
|
||||
transitionDuration = 1500;
|
||||
transitionType = "random";
|
||||
skipStartupTransition = false;
|
||||
transitionEdgeSmoothness = 5.0e-2;
|
||||
panelPosition = "follow_bar";
|
||||
hideWallpaperFilenames = false;
|
||||
overviewBlur = 0.4;
|
||||
overviewTint = 0.6;
|
||||
useWallhaven = false;
|
||||
wallhavenQuery = "";
|
||||
wallhavenSorting = "relevance";
|
||||
wallhavenOrder = "desc";
|
||||
wallhavenCategories = "111";
|
||||
wallhavenPurity = "100";
|
||||
wallhavenRatios = "";
|
||||
wallhavenApiKey = "";
|
||||
wallhavenResolutionMode = "atleast";
|
||||
wallhavenResolutionWidth = "";
|
||||
wallhavenResolutionHeight = "";
|
||||
sortOrder = "name";
|
||||
favorites = [];
|
||||
};
|
||||
appLauncher = {
|
||||
enableClipboardHistory = true;
|
||||
autoPasteClipboard = false;
|
||||
enableClipPreview = true;
|
||||
clipboardWrapText = true;
|
||||
clipboardWatchTextCommand = "wl-paste --type text --watch cliphist store";
|
||||
clipboardWatchImageCommand = "wl-paste --type image --watch cliphist store";
|
||||
position = "top_center";
|
||||
pinnedApps = [];
|
||||
useApp2Unit = false;
|
||||
sortByMostUsed = true;
|
||||
terminalCommand = "kitty -e";
|
||||
customLaunchPrefixEnabled = false;
|
||||
customLaunchPrefix = "";
|
||||
viewMode = "grid";
|
||||
showCategories = true;
|
||||
iconMode = "tabler";
|
||||
showIconBackground = false;
|
||||
enableSettingsSearch = true;
|
||||
enableWindowsSearch = true;
|
||||
enableSessionSearch = true;
|
||||
ignoreMouseInput = false;
|
||||
screenshotAnnotationTool = "";
|
||||
overviewLayer = false;
|
||||
density = "default";
|
||||
};
|
||||
controlCenter = {
|
||||
position = "close_to_bar_button";
|
||||
diskPath = "/";
|
||||
shortcuts = {
|
||||
left = [
|
||||
{
|
||||
id = "Network";
|
||||
}
|
||||
{
|
||||
id = "Bluetooth";
|
||||
}
|
||||
{
|
||||
id = "WallpaperSelector";
|
||||
}
|
||||
{
|
||||
id = "NoctaliaPerformance";
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
id = "Notifications";
|
||||
}
|
||||
{
|
||||
id = "PowerProfile";
|
||||
}
|
||||
{
|
||||
id = "KeepAwake";
|
||||
}
|
||||
{
|
||||
id = "NightLight";
|
||||
}
|
||||
];
|
||||
};
|
||||
cards = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "profile-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "shortcuts-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "audio-card";
|
||||
}
|
||||
{
|
||||
enabled = false;
|
||||
id = "brightness-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "weather-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "media-sysmon-card";
|
||||
}
|
||||
];
|
||||
};
|
||||
systemMonitor = {
|
||||
cpuWarningThreshold = 80;
|
||||
cpuCriticalThreshold = 90;
|
||||
tempWarningThreshold = 80;
|
||||
tempCriticalThreshold = 90;
|
||||
gpuWarningThreshold = 80;
|
||||
gpuCriticalThreshold = 90;
|
||||
memWarningThreshold = 80;
|
||||
memCriticalThreshold = 90;
|
||||
swapWarningThreshold = 80;
|
||||
swapCriticalThreshold = 90;
|
||||
diskWarningThreshold = 80;
|
||||
diskCriticalThreshold = 90;
|
||||
diskAvailWarningThreshold = 20;
|
||||
diskAvailCriticalThreshold = 10;
|
||||
batteryWarningThreshold = 20;
|
||||
batteryCriticalThreshold = 5;
|
||||
enableDgpuMonitoring = false;
|
||||
useCustomColors = false;
|
||||
warningColor = "";
|
||||
criticalColor = "";
|
||||
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";
|
||||
};
|
||||
dock = {
|
||||
enabled = false;
|
||||
position = "bottom";
|
||||
displayMode = "exclusive";
|
||||
dockType = "floating";
|
||||
backgroundOpacity = 1;
|
||||
floatingRatio = 1;
|
||||
size = 1;
|
||||
onlySameOutput = true;
|
||||
monitors = [];
|
||||
pinnedApps = [];
|
||||
colorizeIcons = false;
|
||||
showLauncherIcon = false;
|
||||
launcherPosition = "end";
|
||||
launcherIconColor = "none";
|
||||
pinnedStatic = false;
|
||||
inactiveIndicators = false;
|
||||
groupApps = false;
|
||||
groupContextMenuMode = "extended";
|
||||
groupClickAction = "cycle";
|
||||
groupIndicatorStyle = "dots";
|
||||
deadOpacity = 0.6;
|
||||
animationSpeed = 1;
|
||||
sitOnFrame = false;
|
||||
showFrameIndicator = true;
|
||||
};
|
||||
network = {
|
||||
wifiEnabled = true;
|
||||
airplaneModeEnabled = false;
|
||||
bluetoothRssiPollingEnabled = false;
|
||||
bluetoothRssiPollIntervalMs = 60000;
|
||||
networkPanelView = "wifi";
|
||||
wifiDetailsViewMode = "grid";
|
||||
bluetoothDetailsViewMode = "grid";
|
||||
bluetoothHideUnnamedDevices = false;
|
||||
disableDiscoverability = false;
|
||||
};
|
||||
sessionMenu = {
|
||||
enableCountdown = true;
|
||||
countdownDuration = 10000;
|
||||
position = "center";
|
||||
showHeader = true;
|
||||
showKeybinds = true;
|
||||
largeButtonsStyle = true;
|
||||
largeButtonsLayout = "single-row";
|
||||
powerOptions = [
|
||||
{
|
||||
action = "lock";
|
||||
command = "";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "1";
|
||||
}
|
||||
{
|
||||
action = "suspend";
|
||||
command = "";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "2";
|
||||
}
|
||||
{
|
||||
action = "hibernate";
|
||||
command = "";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "3";
|
||||
}
|
||||
{
|
||||
action = "reboot";
|
||||
command = "";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "4";
|
||||
}
|
||||
{
|
||||
action = "logout";
|
||||
command = "";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "5";
|
||||
}
|
||||
{
|
||||
action = "shutdown";
|
||||
command = "";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "6";
|
||||
}
|
||||
{
|
||||
action = "rebootToUefi";
|
||||
command = "";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
keybind = "";
|
||||
}
|
||||
];
|
||||
};
|
||||
notifications = {
|
||||
enabled = true;
|
||||
enableMarkdown = false;
|
||||
density = "default";
|
||||
monitors = [];
|
||||
location = "top_right";
|
||||
overlayLayer = true;
|
||||
backgroundOpacity = 1;
|
||||
respectExpireTimeout = false;
|
||||
lowUrgencyDuration = 3;
|
||||
normalUrgencyDuration = 8;
|
||||
criticalUrgencyDuration = 15;
|
||||
clearDismissed = true;
|
||||
saveToHistory = {
|
||||
low = true;
|
||||
normal = true;
|
||||
critical = true;
|
||||
};
|
||||
sounds = {
|
||||
enabled = false;
|
||||
volume = 0.5;
|
||||
separateSounds = false;
|
||||
criticalSoundFile = "";
|
||||
normalSoundFile = "";
|
||||
lowSoundFile = "";
|
||||
excludedApps = "discord,firefox,chrome,chromium,edge";
|
||||
};
|
||||
enableMediaToast = false;
|
||||
enableKeyboardLayoutToast = true;
|
||||
enableBatteryToast = true;
|
||||
};
|
||||
osd = {
|
||||
enabled = true;
|
||||
location = "top_right";
|
||||
autoHideMs = 2000;
|
||||
overlayLayer = true;
|
||||
backgroundOpacity = 1;
|
||||
enabledTypes = [
|
||||
0
|
||||
1
|
||||
2
|
||||
];
|
||||
monitors = [];
|
||||
};
|
||||
audio = {
|
||||
volumeStep = 5;
|
||||
volumeOverdrive = false;
|
||||
cavaFrameRate = 30;
|
||||
visualizerType = "linear";
|
||||
mprisBlacklist = [];
|
||||
preferredPlayer = "";
|
||||
volumeFeedback = false;
|
||||
volumeFeedbackSoundFile = "";
|
||||
};
|
||||
brightness = {
|
||||
brightnessStep = 5;
|
||||
enforceMinimum = true;
|
||||
enableDdcSupport = false;
|
||||
backlightDeviceMappings = [];
|
||||
};
|
||||
colorSchemes = {
|
||||
useWallpaperColors = false;
|
||||
predefinedScheme = "Kanagawa";
|
||||
darkMode = true;
|
||||
schedulingMode = "off";
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "18:30";
|
||||
generationMethod = "tonal-spot";
|
||||
monitorForColors = "";
|
||||
};
|
||||
templates = {
|
||||
activeTemplates = [];
|
||||
enableUserTheming = false;
|
||||
};
|
||||
nightLight = {
|
||||
enabled = false;
|
||||
forced = false;
|
||||
autoSchedule = true;
|
||||
nightTemp = "4000";
|
||||
dayTemp = "6500";
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "18:30";
|
||||
};
|
||||
hooks = {
|
||||
enabled = false;
|
||||
wallpaperChange = "";
|
||||
darkModeChange = "";
|
||||
screenLock = "";
|
||||
screenUnlock = "";
|
||||
performanceModeEnabled = "";
|
||||
performanceModeDisabled = "";
|
||||
startup = "";
|
||||
session = "";
|
||||
};
|
||||
plugins = {
|
||||
autoUpdate = false;
|
||||
};
|
||||
idle = {
|
||||
enabled = false;
|
||||
screenOffTimeout = 600;
|
||||
lockTimeout = 660;
|
||||
suspendTimeout = 1800;
|
||||
fadeDuration = 5;
|
||||
customCommands = "[]";
|
||||
};
|
||||
desktopWidgets = {
|
||||
enabled = false;
|
||||
overviewEnabled = true;
|
||||
gridSnap = false;
|
||||
monitorWidgets = [];
|
||||
};
|
||||
}
|
||||
12
modules/features/audio.nix
Normal file
12
modules/features/audio.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
lux.audio.nixos = {
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
25
modules/features/bitwarden.nix
Normal file
25
modules/features/bitwarden.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ den, lib, ... }:
|
||||
let
|
||||
getPrimaryEmail =
|
||||
user:
|
||||
(lib.findFirst (email: email.primary) (throw "Missing primary email for ${user.userName}") (builtins.attrValues user.emails)).address;
|
||||
in
|
||||
{
|
||||
lux.bitwarden = den.lib.parametric {
|
||||
includes = [
|
||||
(
|
||||
{ host, user }:
|
||||
{
|
||||
homeManager.programs.rbw.settings = {
|
||||
email = getPrimaryEmail user;
|
||||
base_url = "https://vault.${host.serviceDomain}";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
homeManager = {
|
||||
programs.rbw.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/features/bluetooth.nix
Normal file
6
modules/features/bluetooth.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
lux.bluetooth.nixos = {
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
};
|
||||
}
|
||||
10
modules/features/clipboard.nix
Normal file
10
modules/features/clipboard.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
lux.clipboard.homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.wl-clipboard ];
|
||||
|
||||
services.cliphist.enable = true;
|
||||
services.wl-clip-persist.enable = true;
|
||||
};
|
||||
}
|
||||
23
modules/features/dev-tools.nix
Normal file
23
modules/features/dev-tools.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
lux.dev-tools.homeManager =
|
||||
{ config, ... }:
|
||||
{
|
||||
home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.jq.enable = true;
|
||||
programs.bun.enable = true;
|
||||
programs.ripgrep.enable = true;
|
||||
programs.uv.enable = true;
|
||||
};
|
||||
}
|
||||
84
modules/features/email.nix
Normal file
84
modules/features/email.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{ den, lib, ... }:
|
||||
{
|
||||
lux.email = den.lib.perUser (
|
||||
{ user, ... }:
|
||||
let
|
||||
mkEmailAccount =
|
||||
_: email:
|
||||
{
|
||||
enable = true;
|
||||
address = email.address;
|
||||
primary = email.primary;
|
||||
realName = user.realName;
|
||||
userName = email.address;
|
||||
thunderbird =
|
||||
{
|
||||
enable = true;
|
||||
}
|
||||
// lib.optionalAttrs (email.kind == "office365") {
|
||||
settings = id: {
|
||||
"mail.smtpserver.smtp_${id}.authMethod" = 10;
|
||||
"mail.server.server_${id}.authMethod" = 10;
|
||||
};
|
||||
};
|
||||
}
|
||||
// (
|
||||
if email.kind == "mxrouting" then
|
||||
{
|
||||
imap = {
|
||||
authentication = "plain";
|
||||
host = "taylor.mxrouting.net";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
smtp = {
|
||||
authentication = "plain";
|
||||
host = "taylor.mxrouting.net";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
flavor = "outlook.office365.com";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
homeManager = { ... }: {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.${user.name} = {
|
||||
isDefault = true;
|
||||
withExternalGnupg = true;
|
||||
settings = {
|
||||
# LAYOUT: Force 3-Pane Vertical View (Folders | List | Message)
|
||||
"mail.ui.display.message_pane_vertical" = true;
|
||||
|
||||
# APPEARANCE: Enable "Cards View" (modern multi-line list)
|
||||
# Note: 'cards' is the value for the new view
|
||||
"mail.ui.display.thread_pane_view_type" = "cards";
|
||||
|
||||
# DENSITY: "Compact" is usually cleaner for tech-savvy users
|
||||
"mail.uidensity" = 1; # 0=Default, 1=Compact, 2=Touch
|
||||
|
||||
# PRIVACY & CLEANUP
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"mail.server.server2.hidden" = true; # Hide "Local Folders"
|
||||
|
||||
# Start page disable for faster boot
|
||||
"mailnews.start_page.enabled" = false;
|
||||
|
||||
# Disable the "Get a new email address" feature in account manager
|
||||
"mail.provider.enabled" = false;
|
||||
|
||||
"layout.css.devPixelsPerPx" = 0.85;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email.accounts = lib.mapAttrs mkEmailAccount user.emails;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
3
modules/features/flatpak.nix
Normal file
3
modules/features/flatpak.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lux.flatpak.nixos.services.flatpak.enable = true;
|
||||
}
|
||||
26
modules/features/fonts.nix
Normal file
26
modules/features/fonts.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
lux.fonts.nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
iosevka
|
||||
jetbrains-mono
|
||||
fira-code
|
||||
roboto
|
||||
fira
|
||||
merriweather
|
||||
ibm-plex
|
||||
lexend
|
||||
literata
|
||||
montserrat
|
||||
source-sans-pro
|
||||
source-serif-pro
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/features/gemini.nix
Normal file
15
modules/features/gemini.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
lux.gemini = {
|
||||
homeManager =
|
||||
{ config, ... }:
|
||||
{
|
||||
home.sessionVariables.GEMINI_CONFIG_DIR = "${config.xdg.configHome}/gemini";
|
||||
|
||||
programs.gemini-cli.enable = true;
|
||||
programs.opencode.enable = true;
|
||||
|
||||
# Needed for extensions
|
||||
programs.npm.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
32
modules/features/git.nix
Normal file
32
modules/features/git.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ den, lib, ... }:
|
||||
let
|
||||
getPrimaryEmail =
|
||||
user:
|
||||
(lib.findFirst (email: email.primary) (throw "Missing primary email for ${user.userName}") (
|
||||
builtins.attrValues user.emails
|
||||
)).address;
|
||||
in
|
||||
{
|
||||
lux.git = den.lib.parametric {
|
||||
includes = [
|
||||
(
|
||||
{ user, ... }:
|
||||
{
|
||||
homeManager.programs.git = {
|
||||
enable = true;
|
||||
signing.format = "ssh";
|
||||
ignores = [
|
||||
".claude/"
|
||||
".codex/"
|
||||
];
|
||||
settings = {
|
||||
user.name = user.realName;
|
||||
user.email = getPrimaryEmail user;
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
22
modules/features/local-apps.nix
Normal file
22
modules/features/local-apps.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
lux.local-apps.homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.sessionVariables.BROWSER = "vivaldi";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
brave
|
||||
vivaldi
|
||||
postman
|
||||
spotify
|
||||
calcure
|
||||
planify
|
||||
unzip
|
||||
gimp
|
||||
dbeaver-bin
|
||||
];
|
||||
|
||||
programs.imv.enable = true;
|
||||
programs.sioyek.enable = true;
|
||||
};
|
||||
}
|
||||
49
modules/features/mpv.nix
Normal file
49
modules/features/mpv.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
lux.mpv = {
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
bindings = {
|
||||
D = "cycle deband";
|
||||
};
|
||||
config = {
|
||||
profile = "high-quality";
|
||||
|
||||
osc = "no";
|
||||
border = "no";
|
||||
|
||||
vo = "gpu-next";
|
||||
gpu-api = "vulkan";
|
||||
hwdec = "vulkan";
|
||||
|
||||
demuxer-mkv-subtitle-preroll = "yes";
|
||||
sub-auto = "fuzzy";
|
||||
|
||||
sub-gauss = 1.0;
|
||||
sub-gray = "yes";
|
||||
|
||||
tone-mapping = "bt.2446a";
|
||||
|
||||
keep-open = "yes";
|
||||
save-position-on-quit = "yes";
|
||||
|
||||
volume-max = 150;
|
||||
|
||||
deband = "yes";
|
||||
deband-iterations = 2;
|
||||
deband-threshold = 64;
|
||||
deband-range = 17;
|
||||
deband-grain = 12;
|
||||
};
|
||||
scripts = with pkgs.mpvScripts; [
|
||||
modernz
|
||||
thumbfast
|
||||
mpris
|
||||
autosub
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
187
modules/features/neovim/default.nix
Normal file
187
modules/features/neovim/default.nix
Normal file
@@ -0,0 +1,187 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
lux.neovim.homeManager =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
|
||||
|
||||
imports = [
|
||||
(inputs.nix-wrapper-modules.lib.mkInstallModule {
|
||||
name = "neovim";
|
||||
value = inputs.nix-wrapper-modules.lib.wrapperModules.neovim;
|
||||
loc = [
|
||||
"home"
|
||||
"packages"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
# Configure sops-nix secret
|
||||
sops.secrets.gemini-api-key-neovim = {};
|
||||
|
||||
wrappers.neovim = {
|
||||
enable = true;
|
||||
|
||||
# Inject the API key into the Neovim environment only
|
||||
env = {
|
||||
GEMINI_API_KEY = "$(cat ${config.sops.secrets.gemini-api-key-neovim.path})";
|
||||
};
|
||||
|
||||
# 1. Point to your existing Lua config directory
|
||||
settings.config_directory = ./lua-config;
|
||||
|
||||
# 2. Runtime Dependencies (from lspsAndRuntimeDeps)
|
||||
# These are added to the PATH of the wrapper
|
||||
extraPackages = with pkgs; [
|
||||
# Tools
|
||||
universal-ctags
|
||||
ripgrep
|
||||
fd
|
||||
tree-sitter
|
||||
wl-clipboard
|
||||
# LSPs & Formatters
|
||||
stylua
|
||||
lua-language-server
|
||||
nixd
|
||||
nix-doc
|
||||
nixfmt
|
||||
dafny
|
||||
typescript
|
||||
typescript-language-server
|
||||
rustc
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
astro-language-server
|
||||
tinymist
|
||||
typstyle
|
||||
|
||||
# ty
|
||||
# basedpyright
|
||||
ty
|
||||
ruff
|
||||
];
|
||||
|
||||
# 3. Plugins (from startupPlugins & optionalPlugins)
|
||||
# Since you use lz.n in Lua, we just list them all here.
|
||||
# The wrapper will add them to the packpath.
|
||||
specs = {
|
||||
# Core lazy-loading plugin
|
||||
lz-n = {
|
||||
data = pkgs.vimPlugins.lz-n;
|
||||
};
|
||||
plenary = {
|
||||
data = pkgs.vimPlugins.plenary-nvim;
|
||||
};
|
||||
|
||||
# All other plugins
|
||||
general = {
|
||||
data = with pkgs.vimPlugins; [
|
||||
nvim-treesitter.withAllGrammars
|
||||
nvim-treesitter-textobjects
|
||||
trouble-nvim
|
||||
guess-indent-nvim
|
||||
which-key-nvim
|
||||
telescope-nvim
|
||||
telescope-fzf-native-nvim
|
||||
telescope-ui-select-nvim
|
||||
conform-nvim
|
||||
blink-cmp
|
||||
luasnip
|
||||
friendly-snippets
|
||||
mini-nvim
|
||||
nvim-lspconfig
|
||||
lazydev-nvim
|
||||
colorful-menu-nvim
|
||||
lualine-nvim
|
||||
zen-mode-nvim
|
||||
kanagawa-nvim
|
||||
project-nvim
|
||||
typst-preview-nvim
|
||||
direnv-vim
|
||||
codecompanion-nvim
|
||||
copilot-lua
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# 4. Passing Data to Lua (Replacing nixCats.extra)
|
||||
# We put these in `settings` so they appear in require('nix-info').settings
|
||||
settings = {
|
||||
# Hostname/ConfigDir needed for nixd
|
||||
# NOTE: Adjust these paths to match your actual denful/flake variables
|
||||
nixdExtras = {
|
||||
nixpkgs = "import ${pkgs.path} {}";
|
||||
# Assuming you have access to the flake path in your config,
|
||||
# otherwise hardcode or pass via specialArgs
|
||||
nixos_options = ''(builtins.getFlake "path://${config.home.homeDirectory}/.config/nixos").nixosConfigurations.polaris.config.networking.hostName}.options'';
|
||||
home_manager_options = ''(builtins.getFlake "path://${config.home.homeDirectory}/.config/nixos").nixosConfigurations.polaris.config.networking.hostName}.options.home-manager.users.type.getSubOptions []'';
|
||||
};
|
||||
|
||||
# TODO: Put in separate theme file
|
||||
themeSetup = # lua
|
||||
''
|
||||
require("kanagawa").setup({
|
||||
colors = {
|
||||
theme = {
|
||||
all = {
|
||||
ui = {
|
||||
bg_gutter = "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
overrides = function(colors)
|
||||
local theme = colors.theme
|
||||
|
||||
local makeDiagnosticColor = function(color)
|
||||
local c = require("kanagawa.lib.color")
|
||||
return { fg = color, bg = c(color):blend(theme.ui.bg, 0.95):to_hex() }
|
||||
end
|
||||
|
||||
return {
|
||||
TelescopeTitle = { fg = theme.ui.special, bold = true },
|
||||
TelescopePromptNormal = { bg = theme.ui.bg_p1 },
|
||||
TelescopePromptBorder = { fg = theme.ui.bg_p1, bg = theme.ui.bg_p1 },
|
||||
TelescopeResultsNormal = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m1 },
|
||||
TelescopeResultsBorder = { fg = theme.ui.bg_m1, bg = theme.ui.bg_m1 },
|
||||
TelescopePreviewNormal = { bg = theme.ui.bg_dim },
|
||||
TelescopePreviewBorder = { bg = theme.ui.bg_dim, fg = theme.ui.bg_dim },
|
||||
|
||||
Pmenu = { fg = theme.ui.shade0, bg = theme.ui.bg_p1 }, -- add `blend = vim.o.pumblend` to enable transparency
|
||||
PmenuSel = { fg = "NONE", bg = theme.ui.bg_p2 },
|
||||
PmenuSbar = { bg = theme.ui.bg_m1 },
|
||||
PmenuThumb = { bg = theme.ui.bg_p2 },
|
||||
|
||||
DiagnosticVirtualTextHint = makeDiagnosticColor(theme.diag.hint),
|
||||
DiagnosticVirtualTextInfo = makeDiagnosticColor(theme.diag.info),
|
||||
DiagnosticVirtualTextWarn = makeDiagnosticColor(theme.diag.warning),
|
||||
DiagnosticVirtualTextError = makeDiagnosticColor(theme.diag.error),
|
||||
}
|
||||
end,
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("kanagawa-wave")
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
# 5. Wrapper Configuration
|
||||
# Enable Python/Node providers
|
||||
hosts.python3.nvim-host.enable = true;
|
||||
hosts.node.nvim-host.enable = true;
|
||||
|
||||
# Ensure the bin name matches what you expect
|
||||
binName = "nvim";
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/features/neovim/lua-config/init.lua
Normal file
9
modules/features/neovim/lua-config/init.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
require("options")
|
||||
require("plugins.lsp")
|
||||
require("plugins.completion")
|
||||
require("plugins.formatting")
|
||||
require("plugins.treesitter")
|
||||
require("plugins.telescope")
|
||||
require("plugins.ui")
|
||||
require("plugins.core")
|
||||
require("plugins.ai")
|
||||
138
modules/features/neovim/lua-config/lua/options.lua
Normal file
138
modules/features/neovim/lua-config/lua/options.lua
Normal file
@@ -0,0 +1,138 @@
|
||||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
vim.o.expandtab = true
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.tabstop = 2
|
||||
vim.o.softtabstop = 2
|
||||
|
||||
-- Make line numbers default
|
||||
vim.o.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- Experiment for yourself to see if you like it!
|
||||
-- vim.o.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.o.mouse = "a"
|
||||
|
||||
-- Don't show the mode, since it's already in the status line
|
||||
vim.o.showmode = false
|
||||
|
||||
vim.opt.shortmess:append("Wc")
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.schedule(function()
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
end)
|
||||
|
||||
-- Enable break indent
|
||||
vim.o.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
vim.o.undofile = true
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.o.signcolumn = "yes"
|
||||
|
||||
-- Decrease update time
|
||||
vim.o.updatetime = 250
|
||||
|
||||
-- Decrease mapped sequence wait time
|
||||
vim.o.timeoutlen = 300
|
||||
|
||||
-- Configure how new splits should be opened
|
||||
vim.o.splitright = true
|
||||
vim.o.splitbelow = true
|
||||
|
||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
--
|
||||
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
|
||||
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
|
||||
-- See `:help lua-options`
|
||||
-- and `:help lua-options-guide`
|
||||
vim.o.list = true
|
||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||
|
||||
-- Preview substitutions live, as you type!
|
||||
vim.o.inccommand = "split"
|
||||
|
||||
-- Show which line your cursor is on
|
||||
vim.o.cursorline = true
|
||||
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.o.scrolloff = 10
|
||||
|
||||
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
||||
-- instead raise a dialog asking if you wish to save the current file(s)
|
||||
-- See `:help 'confirm'`
|
||||
vim.o.confirm = true
|
||||
|
||||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||
-- See `:help hlsearch`
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
-- is not what someone will guess without a bit more experience.
|
||||
--
|
||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||
-- or just use <C-\><C-n> to exit terminal mode
|
||||
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
||||
|
||||
-- TIP: Disable arrow keys in normal mode
|
||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Keybinds to make split navigation easier.
|
||||
-- Use CTRL+<hjkl> to switch between windows
|
||||
--
|
||||
-- See `:help wincmd` for a list of all window commands
|
||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
||||
|
||||
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
|
||||
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
|
||||
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
|
||||
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
||||
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
||||
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
-- Try it with `yap` in normal mode
|
||||
-- See `:help vim.hl.on_yank()`
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
desc = "Highlight when yanking (copying) text",
|
||||
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
|
||||
callback = function()
|
||||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
72
modules/features/neovim/lua-config/lua/plugins/ai.lua
Normal file
72
modules/features/neovim/lua-config/lua/plugins/ai.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"copilot.lua",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
after = function()
|
||||
require("copilot").setup({
|
||||
-- Disable inline suggestions, let CodeCompanion (or blink) handle interactions
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"codecompanion.nvim",
|
||||
cmd = { "CodeCompanion", "CodeCompanionChat", "CodeCompanionActions" },
|
||||
keys = {
|
||||
{ "<leader>aa", "<cmd>CodeCompanionChat Toggle<cr>", mode = { "n", "v" }, desc = "[A]I [A]ssistant" },
|
||||
{ "<leader>ac", "<cmd>CodeCompanionActions<cr>", mode = { "n", "v" }, desc = "[A]I [C]ode Actions" },
|
||||
},
|
||||
after = function()
|
||||
require("codecompanion").setup({
|
||||
-- Set Gemini as the default strategy
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = "gemini",
|
||||
},
|
||||
inline = {
|
||||
adapter = "gemini",
|
||||
},
|
||||
},
|
||||
-- Configure all available adapters
|
||||
adapters = {
|
||||
copilot = function()
|
||||
return require("codecompanion.adapters").extend("copilot", {
|
||||
schema = {
|
||||
model = {
|
||||
default = "claude-3.5-sonnet", -- Good default for Copilot chat
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
gemini = function()
|
||||
return require("codecompanion.adapters").extend("gemini", {
|
||||
env = {
|
||||
api_key = "GEMINI_API_KEY",
|
||||
},
|
||||
schema = {
|
||||
model = {
|
||||
default = "gemini-3.1-pro-preview",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
gemini_cli = function()
|
||||
return require("codecompanion.adapters").extend("gemini_cli", {
|
||||
-- Pass the model as a CLI argument
|
||||
args = {
|
||||
"--model",
|
||||
"gemini-3.1-pro-preview",
|
||||
},
|
||||
-- Set authentication to use standard Google Login
|
||||
env = {
|
||||
auth_method = "oauth-personal",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
104
modules/features/neovim/lua-config/lua/plugins/completion.lua
Normal file
104
modules/features/neovim/lua-config/lua/plugins/completion.lua
Normal file
@@ -0,0 +1,104 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"friendly-snippets",
|
||||
},
|
||||
{
|
||||
"luasnip",
|
||||
before = function()
|
||||
require("lz.n").trigger_load("friendly-snippets")
|
||||
end,
|
||||
after = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
-- Load custom lua snippets
|
||||
require("luasnip.loaders.from_lua").load({ paths = { vim.fn.stdpath("config") .. "/snippets" } })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"colorful-menu.nvim",
|
||||
after = function()
|
||||
require("colorful-menu").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"blink.cmp",
|
||||
event = { "InsertEnter", "CmdlineEnter" },
|
||||
before = function()
|
||||
-- Trigger lazydev so it's ready for blink source
|
||||
require("lz.n").trigger_load({ "lazydev.nvim", "luasnip", "colorful-menu.nvim" })
|
||||
end,
|
||||
after = function()
|
||||
require("blink.cmp").setup({
|
||||
keymap = {
|
||||
preset = "default",
|
||||
|
||||
-- [Up/Down]
|
||||
["<C-j>"] = { "select_next", "fallback" },
|
||||
["<C-k>"] = { "select_prev", "fallback" }, -- Overrides Signature Help
|
||||
|
||||
-- [Insert Suggestion]
|
||||
["<tab>"] = { "select_and_accept", "fallback" },
|
||||
|
||||
-- [Remap Signature Help]
|
||||
-- Since we took <C-k>, let's move signature help to <C-g> (optional)
|
||||
["<C-g>"] = { "show_signature", "hide_signature", "fallback" },
|
||||
},
|
||||
|
||||
appearance = {
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
|
||||
completion = {
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 500,
|
||||
},
|
||||
menu = {
|
||||
draw = {
|
||||
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
||||
components = {
|
||||
label = {
|
||||
text = function(ctx)
|
||||
return require("colorful-menu").blink_components_text(ctx)
|
||||
end,
|
||||
highlight = function(ctx)
|
||||
return require("colorful-menu").blink_components_highlight(ctx)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
cmdline = {
|
||||
completion = {
|
||||
menu = {
|
||||
auto_show = true,
|
||||
},
|
||||
},
|
||||
keymap = { preset = "inherit" },
|
||||
},
|
||||
|
||||
sources = {
|
||||
default = {
|
||||
"lsp",
|
||||
"path",
|
||||
"snippets",
|
||||
"lazydev",
|
||||
},
|
||||
providers = {
|
||||
lazydev = { module = "lazydev.integrations.blink", score_offset = 100 },
|
||||
},
|
||||
},
|
||||
|
||||
snippets = { preset = "luasnip" },
|
||||
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
|
||||
signature = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
65
modules/features/neovim/lua-config/lua/plugins/core.lua
Normal file
65
modules/features/neovim/lua-config/lua/plugins/core.lua
Normal file
@@ -0,0 +1,65 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"mini.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
after = function()
|
||||
-- Better Around/Inside textobjects
|
||||
require("mini.ai").setup({ n_lines = 500 })
|
||||
|
||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
require("mini.surround").setup()
|
||||
|
||||
-- Auto-pairs (replaces nvim-autopairs)
|
||||
require("mini.pairs").setup()
|
||||
|
||||
local files = require("mini.files")
|
||||
files.setup()
|
||||
vim.keymap.set("n", "<leader>e", function()
|
||||
if not files.close() then
|
||||
files.open(vim.api.nvim_buf_get_name(0))
|
||||
end
|
||||
end, { desc = "File [E]xplorer" })
|
||||
|
||||
local icons = require("mini.icons")
|
||||
icons.setup()
|
||||
icons.mock_nvim_web_devicons()
|
||||
|
||||
local hipatterns = require("mini.hipatterns")
|
||||
hipatterns.setup({
|
||||
highlighters = {
|
||||
-- Highlight hex color strings (#rrggbb) using that color
|
||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
||||
-- Highlight TODOs, FIXMEs, etc. (replaces todo-comments.nvim)
|
||||
fixme = { pattern = "%f[%w]()FIXME()%f[%W]", group = "MiniHipatternsFixme" },
|
||||
hack = { pattern = "%f[%w]()HACK()%f[%W]", group = "MiniHipatternsHack" },
|
||||
todo = { pattern = "%f[%w]()TODO()%f[%W]", group = "MiniHipatternsTodo" },
|
||||
note = { pattern = "%f[%w]()NOTE()%f[%W]", group = "MiniHipatternsNote" },
|
||||
},
|
||||
})
|
||||
|
||||
local indentscope = require("mini.indentscope")
|
||||
indentscope.setup({
|
||||
symbol = "│",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"guess-indent.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
after = function()
|
||||
require("guess-indent").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"direnv.vim",
|
||||
event = "BufEnter",
|
||||
},
|
||||
})
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"conform.nvim",
|
||||
event = "BufWritePre",
|
||||
cmd = "ConformInfo",
|
||||
keys = {
|
||||
{
|
||||
"<leader>f",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_format = "fallback" })
|
||||
end,
|
||||
mode = "",
|
||||
desc = "[F]ormat buffer",
|
||||
},
|
||||
},
|
||||
after = function()
|
||||
require("conform").setup({
|
||||
notify_on_error = true,
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- languages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||
return nil
|
||||
else
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
}
|
||||
end
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
python = { "isort", "black" },
|
||||
--
|
||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
},
|
||||
formatters = {
|
||||
stylua = {
|
||||
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
192
modules/features/neovim/lua-config/lua/plugins/lsp.lua
Normal file
192
modules/features/neovim/lua-config/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,192 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"typst-preview.nvim",
|
||||
ft = "typst",
|
||||
after = function()
|
||||
-- Setup typst-preview
|
||||
require("typst-preview").setup({
|
||||
-- Optionally configure things here
|
||||
dependencies_bin = {
|
||||
-- For example, use tinymist as the LSP if that's what you are running
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>tp", "<cmd>TypstPreviewToggle<cr>", { desc = "[T]ypst [P]review Toggle" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"lazydev.nvim",
|
||||
cmd = "LazyDev",
|
||||
ft = "lua",
|
||||
after = function()
|
||||
require("lazydev").setup({
|
||||
library = {
|
||||
{ words = { "nixCats", "settings" }, path = "nix-info" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
before = function()
|
||||
require("lz.n").trigger_load("lazydev.nvim")
|
||||
end,
|
||||
after = function()
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
|
||||
callback = function(args)
|
||||
-- Get the client and buffer from the event arguments [cite: 119]
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
local bufnr = args.buf
|
||||
|
||||
local map = function(keys, func, desc, mode)
|
||||
mode = mode or "n"
|
||||
vim.keymap.set(mode, keys, func, { buffer = bufnr, desc = "LSP: " .. desc })
|
||||
end
|
||||
|
||||
-- Standard LSP functions
|
||||
map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
|
||||
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction", { "n", "x" })
|
||||
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||
map("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||
|
||||
-- Telescope Mappings
|
||||
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
|
||||
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
||||
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
|
||||
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
||||
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
||||
|
||||
-- Highlight references (Document Highlight)
|
||||
if client and client:supports_method("textDocument/documentHighlight", bufnr) then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
|
||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
buffer = bufnr,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||
buffer = bufnr,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspDetach", {
|
||||
group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }),
|
||||
callback = function(event)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event.buf })
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- Inlay Hints
|
||||
if client and client:supports_method("textDocument/inlayHint", bufnr) then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
||||
map("<leader>th", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }))
|
||||
end, "[T]oggle Inlay [H]ints")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- 1. Setup Diagnostics (Visuals)
|
||||
vim.diagnostic.config({
|
||||
severity_sort = true,
|
||||
-- underline = { severity = vim.diagnostic.severity.ERROR },
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = " ",
|
||||
[vim.diagnostic.severity.WARN] = " ",
|
||||
[vim.diagnostic.severity.INFO] = " ",
|
||||
[vim.diagnostic.severity.HINT] = " ",
|
||||
},
|
||||
},
|
||||
virtual_text = {
|
||||
source = "if_many",
|
||||
spacing = 4,
|
||||
prefix = "●",
|
||||
format = function(diagnostic)
|
||||
local diagnostic_message = {
|
||||
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
||||
[vim.diagnostic.severity.WARN] = diagnostic.message,
|
||||
[vim.diagnostic.severity.INFO] = diagnostic.message,
|
||||
[vim.diagnostic.severity.HINT] = diagnostic.message,
|
||||
}
|
||||
return diagnostic_message[diagnostic.severity]
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = "LuaJIT" },
|
||||
signatureHelp = { enabled = true },
|
||||
diagnostics = { globals = { "nixCats", "vim" } },
|
||||
telemetry = { enabled = false },
|
||||
completion = { callSnippet = "Replace" },
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("lua_ls")
|
||||
|
||||
local settings = require("nix-info").settings
|
||||
|
||||
-- Nix
|
||||
vim.lsp.config("nixd", {
|
||||
settings = {
|
||||
nixd = {
|
||||
nixpkgs = { expr = settings.nixdExtras.nixpkgs },
|
||||
options = {
|
||||
nixos = { expr = settings.nixdExtras.nixos_options },
|
||||
["home-manager"] = { expr = settings.nixdExtras.home_manager_options },
|
||||
},
|
||||
formatting = { command = { "nixfmt" } },
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("nixd")
|
||||
|
||||
-- Dafny
|
||||
vim.lsp.enable("dafny")
|
||||
|
||||
-- TypeScript/JS
|
||||
vim.lsp.enable("ts_ls")
|
||||
|
||||
-- Rust
|
||||
vim.lsp.enable("rust_analyzer")
|
||||
|
||||
-- Python
|
||||
vim.lsp.enable("ty")
|
||||
vim.lsp.enable("ruff")
|
||||
|
||||
vim.lsp.enable("astro")
|
||||
|
||||
vim.lsp.config("tinymist", {
|
||||
settings = {
|
||||
tinymist = {
|
||||
formatterMode = "typstyle",
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("tinymist")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"trouble.nvim",
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
||||
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
||||
},
|
||||
after = function()
|
||||
require("trouble").setup({
|
||||
focus = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
101
modules/features/neovim/lua-config/lua/plugins/telescope.lua
Normal file
101
modules/features/neovim/lua-config/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,101 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"project.nvim",
|
||||
event = { "VimEnter" }, -- Load early to set root correctly
|
||||
after = function()
|
||||
require("project").setup({
|
||||
-- 1. Automagically change directory to project root
|
||||
manual_mode = false,
|
||||
|
||||
-- LSP detection
|
||||
lsp = { enabled = true },
|
||||
|
||||
-- Files/folders that indicate a root
|
||||
patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", "flake.nix" },
|
||||
|
||||
-- Show hidden files in telescope
|
||||
show_hidden = true,
|
||||
|
||||
-- When the project scope changes, change the directory
|
||||
scope_chdir = "global",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"telescope.nvim",
|
||||
event = "VimEnter",
|
||||
before = function()
|
||||
require("lz.n").trigger_load("project.nvim")
|
||||
end,
|
||||
after = function()
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
path_display = { "truncate" },
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = {
|
||||
prompt_position = "top",
|
||||
},
|
||||
sorting_strategy = "ascending",
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-k>"] = actions.move_selection_previous, -- Move up with Ctrl-k
|
||||
["<C-j>"] = actions.move_selection_next, -- Move down with Ctrl-j
|
||||
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, -- Send to quickfix
|
||||
},
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown(),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Enable Telescope extensions if they are installed
|
||||
pcall(require("telescope").load_extension, "projects")
|
||||
pcall(require("telescope").load_extension, "fzf")
|
||||
pcall(require("telescope").load_extension, "ui-select")
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
|
||||
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
|
||||
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
|
||||
vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" })
|
||||
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
|
||||
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
|
||||
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
|
||||
vim.keymap.set("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]esume" })
|
||||
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
||||
vim.keymap.set("n", "<leader>sp", function()
|
||||
require("telescope").extensions.projects.projects({})
|
||||
end, { desc = "[S]earch [P]rojects" })
|
||||
|
||||
-- Slightly advanced example of overriding default behavior and theme
|
||||
vim.keymap.set("n", "<leader>/", function()
|
||||
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
}))
|
||||
end, { desc = "[/] Fuzzily search in current buffer" })
|
||||
|
||||
-- It's also possible to pass additional configuration options.
|
||||
-- See `:help telescope.builtin.live_grep()` for information about particular keys
|
||||
vim.keymap.set("n", "<leader>s/", function()
|
||||
builtin.live_grep({
|
||||
grep_open_files = true,
|
||||
prompt_title = "Live Grep in Open Files",
|
||||
})
|
||||
end, { desc = "[S]earch [/] in Open Files" })
|
||||
|
||||
-- Shortcut for searching your Neovim configuration files
|
||||
vim.keymap.set("n", "<leader>sn", function()
|
||||
builtin.find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end, { desc = "[S]earch [N]eovim files" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,28 @@
|
||||
local ok, treesitter = pcall(require, "nvim-treesitter")
|
||||
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
treesitter.setup({})
|
||||
|
||||
local group = vim.api.nvim_create_augroup("lux-treesitter", { clear = true })
|
||||
local enableTreesitter = function(bufnr)
|
||||
vim.schedule(function()
|
||||
if not vim.api.nvim_buf_is_valid(bufnr) then
|
||||
return
|
||||
end
|
||||
|
||||
if pcall(vim.treesitter.start, bufnr) then
|
||||
vim.bo[bufnr].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter", "FileType" }, {
|
||||
group = group,
|
||||
pattern = "*",
|
||||
callback = function(args)
|
||||
enableTreesitter(args.buf)
|
||||
end,
|
||||
})
|
||||
1
modules/features/neovim/lua-config/lua/plugins/typst.lua
Normal file
1
modules/features/neovim/lua-config/lua/plugins/typst.lua
Normal file
@@ -0,0 +1 @@
|
||||
require("lz.n").load({})
|
||||
81
modules/features/neovim/lua-config/lua/plugins/ui.lua
Normal file
81
modules/features/neovim/lua-config/lua/plugins/ui.lua
Normal file
@@ -0,0 +1,81 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"theme-loader",
|
||||
event = "VimEnter",
|
||||
load = function()
|
||||
local settings = require("nix-info").settings
|
||||
local theme_code = settings.themeSetup
|
||||
|
||||
local func, err = loadstring(theme_code)
|
||||
if func then
|
||||
func()
|
||||
else
|
||||
print("Error loading theme code: " .. err)
|
||||
end
|
||||
|
||||
end,
|
||||
},
|
||||
{
|
||||
"lualine.nvim",
|
||||
event = "VimEnter",
|
||||
after = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
globalstatus = true,
|
||||
component_separators = "",
|
||||
section_separators = "",
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diagnostics" },
|
||||
lualine_c = { "filename" },
|
||||
|
||||
lualine_x = { "lsp_status" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"zen-mode.nvim",
|
||||
cmd = "ZenMode",
|
||||
after = function()
|
||||
require("zen-mode").setup({
|
||||
window = {
|
||||
options = {
|
||||
linebreak = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"which-key.nvim",
|
||||
event = "VimEnter",
|
||||
before = function()
|
||||
require("lz.n").trigger_load("mini.nvim")
|
||||
end,
|
||||
after = function()
|
||||
require("which-key").setup({
|
||||
preset = "modern",
|
||||
delay = 200,
|
||||
icons = {
|
||||
-- set icon mappings to true if you have a Nerd Font
|
||||
mappings = true,
|
||||
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
|
||||
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
|
||||
keys = {},
|
||||
},
|
||||
|
||||
-- Document existing key chains
|
||||
spec = {
|
||||
{ "<leader>s", group = "[S]earch" },
|
||||
{ "<leader>t", group = "[T]oggle" },
|
||||
{ "<leader>h", group = "Git [H]unk", mode = { "n", "v" } },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
91
modules/features/neovim/lua-config/snippets/nix.lua
Normal file
91
modules/features/neovim/lua-config/snippets/nix.lua
Normal file
@@ -0,0 +1,91 @@
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
|
||||
return {
|
||||
-- Full lux module (both nixos and homeManager)
|
||||
s("luxmod", {
|
||||
t({
|
||||
"{ inputs, ... }:",
|
||||
"{",
|
||||
" lux."
|
||||
}),
|
||||
i(1, "moduleName"),
|
||||
t({
|
||||
" = {",
|
||||
" nixos = { config, lib, pkgs, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(2),
|
||||
t({
|
||||
"",
|
||||
" };",
|
||||
"",
|
||||
" homeManager = { config, lib, pkgs, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(3),
|
||||
t({
|
||||
"",
|
||||
" };",
|
||||
" };",
|
||||
"}",
|
||||
}),
|
||||
}),
|
||||
|
||||
-- lux nixos only module
|
||||
s("luxnixos", {
|
||||
t({
|
||||
"{ inputs, ... }:",
|
||||
"{",
|
||||
" lux."
|
||||
}),
|
||||
i(1, "moduleName"),
|
||||
t({
|
||||
".nixos = { config, lib, pkgs, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(0),
|
||||
t({
|
||||
"",
|
||||
" };",
|
||||
"}",
|
||||
}),
|
||||
}),
|
||||
|
||||
-- lux homeManager only module
|
||||
s("luxhm", {
|
||||
t({
|
||||
"{ inputs, ... }:",
|
||||
"{",
|
||||
" lux."
|
||||
}),
|
||||
i(1, "moduleName"),
|
||||
t({
|
||||
".homeManager = { config, lib, pkgs, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(0),
|
||||
t({
|
||||
"",
|
||||
" };",
|
||||
"}",
|
||||
}),
|
||||
}),
|
||||
|
||||
-- den inline aspect
|
||||
s("denaspect", {
|
||||
t({
|
||||
"(",
|
||||
" { host, user, ... }: {",
|
||||
" "
|
||||
}),
|
||||
i(0),
|
||||
t({
|
||||
"",
|
||||
" }",
|
||||
")"
|
||||
}),
|
||||
}),
|
||||
}
|
||||
6
modules/features/networking.nix
Normal file
6
modules/features/networking.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
lux.networking.nixos.networking = {
|
||||
nftables.enable = true;
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
}
|
||||
374
modules/features/niri.nix
Normal file
374
modules/features/niri.nix
Normal file
@@ -0,0 +1,374 @@
|
||||
{ den, inputs, lib, ... }:
|
||||
let
|
||||
mkOutputs =
|
||||
host:
|
||||
lib.mapAttrs (
|
||||
_: display:
|
||||
lib.optionalAttrs display.primary {
|
||||
focus-at-startup = true;
|
||||
}
|
||||
// lib.filterAttrs (_: value: value != null) {
|
||||
position = display.position;
|
||||
scale = display.scale;
|
||||
mode = display.mode;
|
||||
}
|
||||
) host.displays;
|
||||
in
|
||||
{
|
||||
lux.niri = {
|
||||
includes = [
|
||||
(den.lib.perHost {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [ inputs.niri.nixosModules.niri ];
|
||||
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
|
||||
|
||||
programs.niri.enable = true;
|
||||
programs.niri.package = pkgs.niri-unstable;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# Essential services for Nautilus (Trash, Networking, Disks, Search)
|
||||
services.gvfs.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
};
|
||||
})
|
||||
(den.lib.perUser (
|
||||
{ host, ... }:
|
||||
{
|
||||
homeManager =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
playerctl
|
||||
nautilus
|
||||
brightnessctl
|
||||
xwayland-satellite
|
||||
];
|
||||
|
||||
programs.niri = {
|
||||
settings = {
|
||||
outputs = mkOutputs host;
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
spawn-at-startup = [
|
||||
{ command = [ "xwayland-satellite" ]; }
|
||||
{ command = [ "noctalia-shell" ]; }
|
||||
{ command = [ "qbittorrent" ]; }
|
||||
];
|
||||
prefer-no-csd = true;
|
||||
hotkey-overlay.skip-at-startup = true;
|
||||
screenshot-path = "${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%dT%H:%M:%S.png";
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Aesthetics & Visuals
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
# Fast, snappy animations
|
||||
animations.slowdown = 0.6;
|
||||
|
||||
cursor = with config.home.pointerCursor; {
|
||||
size = size;
|
||||
theme = name;
|
||||
hide-after-inactive-ms = 3000;
|
||||
hide-when-typing = true;
|
||||
};
|
||||
|
||||
layout = {
|
||||
always-center-single-column = true;
|
||||
gaps = 14;
|
||||
|
||||
focus-ring.enable = false;
|
||||
|
||||
default-column-width = {
|
||||
proportion = 1. / 2.;
|
||||
};
|
||||
# Kanagawa-wave Colorscheme for border
|
||||
border = {
|
||||
enable = true;
|
||||
width = 3;
|
||||
active.color = "#7E9CD8"; # Crystal Blue
|
||||
inactive.color = "#54546D"; # Sumi Ink 4
|
||||
urgent.color = "#E82424"; # Samurai Red
|
||||
};
|
||||
};
|
||||
|
||||
window-rules = [
|
||||
{
|
||||
# Sleek rounded corners
|
||||
geometry-corner-radius =
|
||||
let
|
||||
radius = 10.0;
|
||||
in
|
||||
{
|
||||
bottom-left = radius;
|
||||
bottom-right = radius;
|
||||
top-left = radius;
|
||||
top-right = radius;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
}
|
||||
];
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# System & Input
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
debug = {
|
||||
honor-xdg-activation-with-invalid-serial = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
focus-follows-mouse.enable = true;
|
||||
keyboard = {
|
||||
repeat-delay = 300;
|
||||
repeat-rate = 50;
|
||||
xkb.options = "caps:escape";
|
||||
};
|
||||
mouse.accel-speed = 0.4;
|
||||
};
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Keybinds
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
binds = {
|
||||
# --- Applications & Launchers ---
|
||||
"Mod+Return" = {
|
||||
action.spawn = "kitty";
|
||||
hotkey-overlay.title = "Terminal";
|
||||
};
|
||||
"Mod+B" = {
|
||||
action.spawn = "vivaldi";
|
||||
hotkey-overlay.title = "Browser";
|
||||
};
|
||||
"Mod+Space" = {
|
||||
repeat = false;
|
||||
action.spawn = [
|
||||
"vicinae"
|
||||
"toggle"
|
||||
];
|
||||
hotkey-overlay.title = "App Launcher";
|
||||
};
|
||||
|
||||
# --- Media & Brightness Controls ---
|
||||
"XF86AudioPlay" = {
|
||||
action.spawn-sh = "playerctl play-pause";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioStop" = {
|
||||
action.spawn-sh = "playerctl stop";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioPrev" = {
|
||||
action.spawn-sh = "playerctl previous";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioNext" = {
|
||||
action.spawn-sh = "playerctl next";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioRaiseVolume" = {
|
||||
action.spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
action.spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86MonBrightnessUp" = {
|
||||
action.spawn-sh = "brightnessctl s 10%+";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
"XF86MonBrightnessDown" = {
|
||||
action.spawn-sh = "brightnessctl s 10%-";
|
||||
allow-when-locked = true;
|
||||
};
|
||||
|
||||
# --- Screenshots ---
|
||||
"Mod+S".action.screenshot = [ ];
|
||||
"Mod+Ctrl+S".action.screenshot-screen = [ ];
|
||||
"Mod+Alt+S".action.screenshot-window = [ ];
|
||||
|
||||
# --- Session & System ---
|
||||
"Mod+Shift+Slash".action.show-hotkey-overlay = [ ];
|
||||
"Mod+Escape" = {
|
||||
action.toggle-keyboard-shortcuts-inhibit = [ ];
|
||||
allow-inhibiting = false;
|
||||
};
|
||||
"Mod+Alt+L" = {
|
||||
action.spawn-sh = "loginctl lock-session";
|
||||
hotkey-overlay.title = "Lock Screen";
|
||||
};
|
||||
"Mod+Shift+E".action.quit = [ ];
|
||||
"Ctrl+Alt+Delete".action.quit = [ ];
|
||||
"Mod+Shift+P".action.power-off-monitors = [ ];
|
||||
|
||||
# --- Overview & Window Management ---
|
||||
"Mod+O" = {
|
||||
action.toggle-overview = [ ];
|
||||
repeat = false;
|
||||
};
|
||||
"Mod+Q" = {
|
||||
action.close-window = [ ];
|
||||
repeat = false;
|
||||
};
|
||||
|
||||
# Focus Movement (Vim-like + Arrows)
|
||||
"Mod+H".action.focus-column-or-monitor-left = [ ];
|
||||
"Mod+J".action.focus-window-down = [ ];
|
||||
"Mod+K".action.focus-window-up = [ ];
|
||||
"Mod+L".action.focus-column-or-monitor-right = [ ];
|
||||
|
||||
# Window Movement
|
||||
"Mod+Ctrl+Left".action.move-column-left = [ ];
|
||||
"Mod+Ctrl+Down".action.move-window-down = [ ];
|
||||
"Mod+Ctrl+Up".action.move-window-up = [ ];
|
||||
"Mod+Ctrl+Right".action.move-column-right = [ ];
|
||||
"Mod+Ctrl+H".action.move-column-left = [ ];
|
||||
"Mod+Ctrl+J".action.move-window-down = [ ];
|
||||
"Mod+Ctrl+K".action.move-window-up = [ ];
|
||||
"Mod+Ctrl+L".action.move-column-right = [ ];
|
||||
|
||||
# Column Focus & Movement
|
||||
"Mod+Home".action.focus-column-first = [ ];
|
||||
"Mod+End".action.focus-column-last = [ ];
|
||||
"Mod+Ctrl+Home".action.move-column-to-first = [ ];
|
||||
"Mod+Ctrl+End".action.move-column-to-last = [ ];
|
||||
|
||||
# Monitor Focus
|
||||
"Mod+Shift+Left".action.focus-monitor-left = [ ];
|
||||
"Mod+Shift+Down".action.focus-monitor-down = [ ];
|
||||
"Mod+Shift+Up".action.focus-monitor-up = [ ];
|
||||
"Mod+Shift+Right".action.focus-monitor-right = [ ];
|
||||
"Mod+Shift+H".action.focus-monitor-left = [ ];
|
||||
"Mod+Shift+J".action.focus-monitor-down = [ ];
|
||||
"Mod+Shift+K".action.focus-monitor-up = [ ];
|
||||
"Mod+Shift+L".action.focus-monitor-right = [ ];
|
||||
|
||||
# Monitor Movement
|
||||
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = [ ];
|
||||
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = [ ];
|
||||
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = [ ];
|
||||
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = [ ];
|
||||
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = [ ];
|
||||
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = [ ];
|
||||
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = [ ];
|
||||
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = [ ];
|
||||
|
||||
# Workspace Focus
|
||||
"Mod+Page_Down".action.focus-workspace-down = [ ];
|
||||
"Mod+Page_Up".action.focus-workspace-up = [ ];
|
||||
"Mod+U".action.focus-workspace-down = [ ];
|
||||
"Mod+I".action.focus-workspace-up = [ ];
|
||||
|
||||
# Workspace Movement (Column)
|
||||
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = [ ];
|
||||
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = [ ];
|
||||
"Mod+Ctrl+U".action.move-column-to-workspace-down = [ ];
|
||||
"Mod+Ctrl+I".action.move-column-to-workspace-up = [ ];
|
||||
|
||||
# Workspace Movement (Entire Workspace)
|
||||
"Mod+Shift+Page_Down".action.move-workspace-down = [ ];
|
||||
"Mod+Shift+Page_Up".action.move-workspace-up = [ ];
|
||||
"Mod+Shift+U".action.move-workspace-down = [ ];
|
||||
"Mod+Shift+I".action.move-workspace-up = [ ];
|
||||
|
||||
# --- Mouse Wheel Scrolling ---
|
||||
"Mod+WheelScrollDown" = {
|
||||
action.focus-workspace-down = [ ];
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
action.focus-workspace-up = [ ];
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollDown" = {
|
||||
action.move-column-to-workspace-down = [ ];
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollUp" = {
|
||||
action.move-column-to-workspace-up = [ ];
|
||||
cooldown-ms = 150;
|
||||
};
|
||||
|
||||
"Mod+WheelScrollRight".action.focus-column-right = [ ];
|
||||
"Mod+WheelScrollLeft".action.focus-column-left = [ ];
|
||||
"Mod+Ctrl+WheelScrollRight".action.move-column-right = [ ];
|
||||
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = [ ];
|
||||
"Mod+Shift+WheelScrollDown".action.focus-column-right = [ ];
|
||||
"Mod+Shift+WheelScrollUp".action.focus-column-left = [ ];
|
||||
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = [ ];
|
||||
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = [ ];
|
||||
|
||||
# --- Workspace Indices ---
|
||||
"Mod+1".action.focus-workspace = 1;
|
||||
"Mod+2".action.focus-workspace = 2;
|
||||
"Mod+3".action.focus-workspace = 3;
|
||||
"Mod+4".action.focus-workspace = 4;
|
||||
"Mod+5".action.focus-workspace = 5;
|
||||
"Mod+6".action.focus-workspace = 6;
|
||||
"Mod+7".action.focus-workspace = 7;
|
||||
"Mod+8".action.focus-workspace = 8;
|
||||
"Mod+9".action.focus-workspace = 9;
|
||||
|
||||
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
|
||||
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
|
||||
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
|
||||
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
|
||||
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
|
||||
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
|
||||
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
|
||||
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
||||
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
||||
|
||||
# --- Column/Window Reshaping & Organization ---
|
||||
"Mod+BracketLeft".action.consume-or-expel-window-left = [ ];
|
||||
"Mod+BracketRight".action.consume-or-expel-window-right = [ ];
|
||||
"Mod+Comma".action.consume-window-into-column = [ ];
|
||||
"Mod+Period".action.expel-window-from-column = [ ];
|
||||
|
||||
"Mod+R".action.switch-preset-column-width = [ ];
|
||||
"Mod+Shift+R".action.switch-preset-window-height = [ ];
|
||||
"Mod+Ctrl+R".action.reset-window-height = [ ];
|
||||
"Mod+F".action.maximize-column = [ ];
|
||||
"Mod+Shift+F".action.fullscreen-window = [ ];
|
||||
"Mod+M".action.maximize-window-to-edges = [ ];
|
||||
"Mod+Ctrl+F".action.expand-column-to-available-width = [ ];
|
||||
"Mod+C".action.center-column = [ ];
|
||||
"Mod+Ctrl+C".action.center-visible-columns = [ ];
|
||||
|
||||
"Mod+Minus".action.set-column-width = "-10%";
|
||||
"Mod+Equal".action.set-column-width = "+10%";
|
||||
"Mod+Shift+Minus".action.set-window-height = "-10%";
|
||||
"Mod+Shift+Equal".action.set-window-height = "+10%";
|
||||
|
||||
"Mod+V".action.toggle-window-floating = [ ];
|
||||
"Mod+Shift+V".action.switch-focus-between-floating-and-tiling = [ ];
|
||||
"Mod+W".action.toggle-column-tabbed-display = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
))
|
||||
];
|
||||
};
|
||||
}
|
||||
55
modules/features/nix.nix
Normal file
55
modules/features/nix.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{ den, inputs, ... }:
|
||||
{
|
||||
lux.nix = {
|
||||
includes = [
|
||||
(den.lib.perHost {
|
||||
nixos = {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix = {
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
channel.enable = false;
|
||||
|
||||
settings = {
|
||||
trusted-users = [ "@wheel" ];
|
||||
use-xdg-base-directories = true;
|
||||
auto-optimise-store = true;
|
||||
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "ns";
|
||||
runtimeInputs = [
|
||||
pkgs.fzf
|
||||
pkgs.nix-search-tv
|
||||
];
|
||||
text = builtins.readFile "${pkgs.nix-search-tv.src}/nixpkgs.sh";
|
||||
})
|
||||
];
|
||||
|
||||
programs.television = {
|
||||
enable = true;
|
||||
enableZshIntegration = false;
|
||||
};
|
||||
|
||||
programs.nix-search-tv = {
|
||||
enable = true;
|
||||
enableTelevisionIntegration = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/features/noctalia.nix
Normal file
19
modules/features/noctalia.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
lux.noctalia.homeManager =
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ inputs.noctalia.homeModules.default ];
|
||||
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
package = lib.mkForce (
|
||||
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
||||
calendarSupport = true;
|
||||
}
|
||||
);
|
||||
|
||||
settings = import ./_noctalia-config.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
86
modules/features/pim.nix
Normal file
86
modules/features/pim.nix
Normal file
@@ -0,0 +1,86 @@
|
||||
{ den, ... }:
|
||||
let
|
||||
calendarAccount = den.lib.perUser (
|
||||
{ host, user }:
|
||||
{
|
||||
homeManager =
|
||||
{ config, ... }:
|
||||
let
|
||||
calendarsPath = "${config.xdg.dataHome}/calendars";
|
||||
in
|
||||
{
|
||||
programs.pimsync.enable = true;
|
||||
services.pimsync.enable = true;
|
||||
|
||||
programs.khal = {
|
||||
# FIXME: Temporarily disabled because of bug in nixpkgs-unstable (27-02-26)
|
||||
enable = false;
|
||||
locale = {
|
||||
timeformat = "%H:%M";
|
||||
dateformat = "$m-$d";
|
||||
};
|
||||
};
|
||||
|
||||
programs.todoman = {
|
||||
enable = true;
|
||||
glob = "*/*";
|
||||
extraConfig = ''
|
||||
date_format = "%Y-%m-%d"
|
||||
time_format = "%H:%M"
|
||||
default_list = "personal"
|
||||
default_due = 0
|
||||
default_command = "list --sort priority,due"
|
||||
humanize = True
|
||||
'';
|
||||
};
|
||||
|
||||
accounts.calendar = {
|
||||
basePath = calendarsPath;
|
||||
accounts = {
|
||||
"radicale" = {
|
||||
primary = true;
|
||||
primaryCollection = "personal";
|
||||
|
||||
local = {
|
||||
type = "filesystem";
|
||||
fileExt = ".ics";
|
||||
};
|
||||
|
||||
remote = {
|
||||
url = "https://radicale.${host.serviceDomain}/";
|
||||
type = "caldav";
|
||||
userName = user.userName;
|
||||
passwordCommand = [
|
||||
"rbw"
|
||||
"get"
|
||||
"Radicale"
|
||||
];
|
||||
};
|
||||
|
||||
pimsync = {
|
||||
enable = true;
|
||||
extraPairDirectives = [
|
||||
{
|
||||
name = "collections";
|
||||
params = [ "from b" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
khal = {
|
||||
enable = true;
|
||||
type = "discover";
|
||||
color = "light blue";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
lux.pim = {
|
||||
includes = [ calendarAccount ];
|
||||
};
|
||||
}
|
||||
7
modules/features/pinentry.nix
Normal file
7
modules/features/pinentry.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
lux.pinentry.homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.rbw.settings.pinentry = pkgs.pinentry-gnome3;
|
||||
};
|
||||
}
|
||||
10
modules/features/podman.nix
Normal file
10
modules/features/podman.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
lux.podman = {
|
||||
homeManager = {
|
||||
services.podman = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/features/printing.nix
Normal file
14
modules/features/printing.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
lux.printing.nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
cups-filters
|
||||
cups-browsed
|
||||
cnijfilter2
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/features/qbittorrent-client.nix
Normal file
19
modules/features/qbittorrent-client.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.qbittorrent-client = {
|
||||
includes = [
|
||||
(den.lib.perHost {
|
||||
nixos.networking.firewall = {
|
||||
allowedTCPPorts = [ 43864 ];
|
||||
allowedUDPPorts = [ 43864 ];
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.qbittorrent ];
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/features/region-nl.nix
Normal file
22
modules/features/region-nl.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ ... }:
|
||||
{
|
||||
lux.region-nl.nixos = {
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
|
||||
# Use '.' as decimal point and ',' as thouands separator
|
||||
LC_NUMERIC = "en_IE.UTF-8";
|
||||
LC_MONETARY = "en_IE.UTF-8";
|
||||
|
||||
# English day and month names, YYYY-MM-DD format
|
||||
LC_TIME = "en_IE.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/features/sddm.nix
Normal file
17
modules/features/sddm.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
lux.sddm = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
theme = "${pkgs.sddm-astronaut}/share/sddm/themes/sddm-astronaut-theme";
|
||||
extraPackages = with pkgs; [
|
||||
kdePackages.qtmultimedia
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/features/services/actual.nix
Normal file
22
modules/features/services/actual.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.actual = den.lib.perHost (
|
||||
{ host, ... }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.actual = {
|
||||
enable = true;
|
||||
openFirewall = false;
|
||||
settings = {
|
||||
port = 3000;
|
||||
hostname = "127.0.0.1";
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts."finance.${host.serviceDomain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.actual.settings.port}";
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
10
modules/features/services/caddy.nix
Normal file
10
modules/features/services/caddy.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.caddy = den.lib.perHost ({ host }: {
|
||||
nixos.services.caddy = {
|
||||
enable = true;
|
||||
email = "mail@jelles.net";
|
||||
openFirewall = true;
|
||||
};
|
||||
});
|
||||
}
|
||||
20
modules/features/services/deluge.nix
Normal file
20
modules/features/services/deluge.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
lux.deluge = {
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
sops.secrets.deluge-auth-file = { };
|
||||
|
||||
services.deluge = {
|
||||
enable = true;
|
||||
# For some reason passwords never match??
|
||||
declarative = false;
|
||||
};
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.deluge ];
|
||||
};
|
||||
};
|
||||
}
|
||||
36
modules/features/services/gitea.nix
Normal file
36
modules/features/services/gitea.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.gitea = den.lib.perHost (
|
||||
{ host }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.${host.serviceDomain}";
|
||||
ROOT_URL = "https://git.${host.serviceDomain}/";
|
||||
HTTP_PORT = 3001;
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
|
||||
START_SSH_SERVER = false;
|
||||
SSH_PORT = 22;
|
||||
};
|
||||
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.settings.AllowUsers = [ "gitea" ];
|
||||
|
||||
services.caddy.virtualHosts."git.${host.serviceDomain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.gitea.settings.server.HTTP_PORT}";
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
80
modules/features/services/openssh.nix
Normal file
80
modules/features/services/openssh.nix
Normal file
@@ -0,0 +1,80 @@
|
||||
{ den, lib, ... }:
|
||||
let
|
||||
hostConfig =
|
||||
{ host }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = lib.attrNames host.users;
|
||||
};
|
||||
};
|
||||
|
||||
users.users = lib.mapAttrs (_: user: {
|
||||
openssh.authorizedKeys.keys = user.authorizedSshKeys;
|
||||
}) host.users;
|
||||
|
||||
assertions = lib.optionals host.requiresSshRecovery (
|
||||
let
|
||||
missingUsers = lib.filter (userName: !(builtins.hasAttr userName host.users)) host.sshRecoveryUsers;
|
||||
usersWithoutKeys = lib.filter (
|
||||
userName:
|
||||
(builtins.hasAttr userName host.users) && host.users.${userName}.authorizedSshKeys == [ ]
|
||||
) host.sshRecoveryUsers;
|
||||
in
|
||||
[
|
||||
{
|
||||
assertion = config.services.openssh.enable;
|
||||
message = "Hosts with requiresSshRecovery must enable OpenSSH.";
|
||||
}
|
||||
{
|
||||
assertion = config.services.openssh.settings.PasswordAuthentication == false;
|
||||
message = "Hosts with requiresSshRecovery must disable SSH password authentication.";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
let
|
||||
rootLogin = config.services.openssh.settings.PermitRootLogin;
|
||||
in
|
||||
rootLogin == false || rootLogin == "no";
|
||||
message = "Hosts with requiresSshRecovery must disable SSH root login.";
|
||||
}
|
||||
{
|
||||
assertion = host.sshRecoveryUsers != [ ];
|
||||
message = "Hosts with requiresSshRecovery must declare at least one sshRecoveryUser.";
|
||||
}
|
||||
{
|
||||
assertion = missingUsers == [ ];
|
||||
message =
|
||||
"All sshRecoveryUsers must exist on the host. Missing: "
|
||||
+ lib.concatStringsSep ", " missingUsers;
|
||||
}
|
||||
{
|
||||
assertion = usersWithoutKeys == [ ];
|
||||
message =
|
||||
"All sshRecoveryUsers must have plain authorizedSshKeys. Missing keys for: "
|
||||
+ lib.concatStringsSep ", " usersWithoutKeys;
|
||||
}
|
||||
{
|
||||
assertion = host.sopsHostSshKeyPath != null;
|
||||
message = "Hosts with requiresSshRecovery must set sopsHostSshKeyPath.";
|
||||
}
|
||||
{
|
||||
assertion = config.services.openssh.openFirewall || lib.elem 22 config.networking.firewall.allowedTCPPorts;
|
||||
message = "Hosts with requiresSshRecovery must expose SSH through the firewall.";
|
||||
}
|
||||
]
|
||||
);
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
lux.services._.openssh = den.lib.parametric.exactly {
|
||||
includes = [ hostConfig ];
|
||||
};
|
||||
}
|
||||
13
modules/features/services/qbittorrent.nix
Normal file
13
modules/features/services/qbittorrent.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ ... }:
|
||||
{
|
||||
lux.qbittorrent = {
|
||||
nixos = {
|
||||
services.qbittorrent = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
torrentingPort = 43864;
|
||||
webuiPort = 8123;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
33
modules/features/services/radicale.nix
Normal file
33
modules/features/services/radicale.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.radicale = den.lib.perHost (
|
||||
{ host }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.radicale = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server.hosts = [ "127.0.0.1:5232" ];
|
||||
|
||||
auth = {
|
||||
type = "htpasswd";
|
||||
htpasswd_filename = "/var/lib/radicale/users";
|
||||
htpasswd_encryption = "bcrypt";
|
||||
};
|
||||
|
||||
storage.filesystem_folder = "/var/lib/radicale/collections";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."radicale.${host.serviceDomain}".extraConfig = ''
|
||||
reverse_proxy :5232 {
|
||||
header_up X-Script-Name /
|
||||
header_up X-Forwarded-For {remote}
|
||||
header_up X-Remote-User {http.auth.user.id}
|
||||
}'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
20
modules/features/services/vaultwarden.nix
Normal file
20
modules/features/services/vaultwarden.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.vaultwarden = den.lib.perHost ({ host }: {
|
||||
nixos = { config, ... }: {
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
backupDir = "/var/backup/vaultwarden";
|
||||
config = {
|
||||
DOMAIN = "https://vault.${host.serviceDomain}";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
ROCKET_PORT = 8100;
|
||||
ROCKET_LOG = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."vault.${host.serviceDomain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||||
};
|
||||
});
|
||||
}
|
||||
184
modules/features/shell.nix
Normal file
184
modules/features/shell.nix
Normal file
@@ -0,0 +1,184 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
lux.shell = {
|
||||
homeManager =
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
home.sessionVariables = {
|
||||
STARSHIP_CACHE = "${config.xdg.cacheHome}/starship";
|
||||
};
|
||||
|
||||
# Delete zcompdump on config switch, so that we regenerate completions
|
||||
home.activation = {
|
||||
clearZshCompDump = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
rm -f "${config.programs.zsh.dotDir}"/.zcompdump*
|
||||
'';
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = "${config.xdg.configHome}/zsh";
|
||||
|
||||
enableCompletion = true;
|
||||
completionInit = ''
|
||||
autoload -U compinit
|
||||
compinit -C
|
||||
|
||||
ZCOMPDUMP="${config.programs.zsh.dotDir}/.zcompdump"
|
||||
# Compile it in the background
|
||||
{
|
||||
if [[ -s "$ZCOMPDUMP" && (! -s "''${ZCOMPDUMP}.zwc" || "$ZCOMPDUMP" -nt "''${ZCOMPDUMP}.zwc") ]]; then
|
||||
zcompile "$ZCOMPDUMP"
|
||||
fi
|
||||
} &!
|
||||
'';
|
||||
autosuggestion.enable = true;
|
||||
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = [
|
||||
"main"
|
||||
"brackets"
|
||||
"pattern"
|
||||
"regexp"
|
||||
"root"
|
||||
"line"
|
||||
];
|
||||
};
|
||||
|
||||
historySubstringSearch.enable = true;
|
||||
|
||||
history = {
|
||||
ignoreDups = true;
|
||||
save = 10000;
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh_history";
|
||||
};
|
||||
|
||||
profileExtra = lib.optionalString (config.home.sessionPath != [ ]) ''
|
||||
export PATH="$PATH''${PATH:+:}${lib.concatStringsSep ":" config.home.sessionPath}"
|
||||
'';
|
||||
|
||||
initContent =
|
||||
# bash
|
||||
''
|
||||
bindkey -v
|
||||
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
# search history based on what's typed in the prompt
|
||||
autoload -U history-search-end
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
bindkey "^[OA" history-beginning-search-backward-end
|
||||
bindkey "^[OB" history-beginning-search-forward-end
|
||||
|
||||
# General completion behavior
|
||||
zstyle ':completion:*' completer _extensions _complete _approximate
|
||||
|
||||
# Use cache
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
|
||||
|
||||
# Complete the alias
|
||||
zstyle ':completion:*' complete true
|
||||
|
||||
# Autocomplete options
|
||||
zstyle ':completion:*' complete-options true
|
||||
|
||||
# Completion matching control
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*' keep-prefix true
|
||||
|
||||
# Group matches and describe
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' list-grouped false
|
||||
zstyle ':completion:*' list-separator '''
|
||||
zstyle ':completion:*' group-name '''
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*:matches' group 'yes'
|
||||
zstyle ':completion:*:warnings' format '%F{red}%B-- No match for: %d --%b%f'
|
||||
zstyle ':completion:*:messages' format '%d'
|
||||
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
|
||||
zstyle ':completion:*:descriptions' format '[%d]'
|
||||
|
||||
# Colors
|
||||
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
|
||||
|
||||
# case insensitive tab completion
|
||||
zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
||||
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand'
|
||||
zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands
|
||||
zstyle ':completion:*' special-dirs true
|
||||
zstyle ':completion:*' squeeze-slashes true
|
||||
|
||||
# Sort
|
||||
zstyle ':completion:*' sort false
|
||||
zstyle ":completion:*:git-checkout:*" sort false
|
||||
zstyle ':completion:*' file-sort modification
|
||||
zstyle ':completion:*:eza' sort false
|
||||
zstyle ':completion:complete:*:options' sort false
|
||||
zstyle ':completion:files' sort false
|
||||
'';
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
|
||||
format = lib.concatStrings [
|
||||
"$nix_shell"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$line_break"
|
||||
"$character"
|
||||
];
|
||||
|
||||
directory = {
|
||||
truncation_length = 99;
|
||||
truncate_to_repo = false;
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
format = "[$symbol]($style) ";
|
||||
symbol = "🐚";
|
||||
style = "";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
format = "([$state( $progress_current/$progress_total)]($style)) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
|
||||
line_break = {
|
||||
disabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/features/sops-password.nix
Normal file
14
modules/features/sops-password.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.sops-password = den.lib.perUser (
|
||||
{ user, ... }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
sops.secrets."hashed-password-${user.userName}".neededForUsers = true;
|
||||
users.users.${user.userName}.hashedPasswordFile = config.sops.secrets."hashed-password-${user.userName}".path;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
27
modules/features/ssh.nix
Normal file
27
modules/features/ssh.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.ssh = {
|
||||
homeManager =
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
includes = [
|
||||
config.sops.templates."ssh-config-orion".path
|
||||
];
|
||||
};
|
||||
|
||||
sops.secrets."orion-ip" = { };
|
||||
sops.templates."ssh-config-orion".content = ''
|
||||
Host orion
|
||||
HostName ${config.sops.placeholder."orion-ip"}
|
||||
ForwardAgent yes
|
||||
'';
|
||||
};
|
||||
|
||||
nixos.security.sudo.extraConfig = ''
|
||||
Defaults env_keep+=SSH_AUTH_SOCK
|
||||
'';
|
||||
};
|
||||
}
|
||||
13
modules/features/steam.nix
Normal file
13
modules/features/steam.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ ... }:
|
||||
{
|
||||
lux.steam = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
protontricks.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
56
modules/features/syncthing.nix
Normal file
56
modules/features/syncthing.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
den,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
meshDevices = lib.listToAttrs (
|
||||
lib.concatMap (
|
||||
host:
|
||||
lib.mapAttrsToList (
|
||||
userName: user:
|
||||
let
|
||||
name = "${userName}@${host.name}";
|
||||
in
|
||||
{
|
||||
inherit name;
|
||||
value = {
|
||||
inherit name;
|
||||
id = user.syncthingId;
|
||||
};
|
||||
}
|
||||
) (lib.filterAttrs (_: u: u.syncthingId != null) host.users)
|
||||
) (lib.attrValues den.hosts.x86_64-linux)
|
||||
);
|
||||
in
|
||||
{
|
||||
lux.syncthing = den.lib.perUser (
|
||||
{ host, user }:
|
||||
{
|
||||
homeManager = {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
|
||||
settings = {
|
||||
folders = {
|
||||
sync = {
|
||||
path = "~/sync";
|
||||
label = "sync";
|
||||
devices = lib.attrNames meshDevices;
|
||||
};
|
||||
calibre = {
|
||||
path = "~/calibre";
|
||||
label = "calibre";
|
||||
devices = lib.attrNames meshDevices;
|
||||
};
|
||||
};
|
||||
devices = meshDevices;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
10
modules/features/system-base.nix
Normal file
10
modules/features/system-base.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
lux.system-base.nixos = {
|
||||
users.mutableUsers = false;
|
||||
|
||||
services.dbus.implementation = "broker";
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
environment.localBinInPath = true;
|
||||
};
|
||||
}
|
||||
82
modules/features/terminal.nix
Normal file
82
modules/features/terminal.nix
Normal file
@@ -0,0 +1,82 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
lux.terminal = {
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.terminal-exec = {
|
||||
enable = true;
|
||||
settings.default = [ "kitty.desktop" ];
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "JetBrains Mono";
|
||||
size = 11;
|
||||
};
|
||||
settings = {
|
||||
# Fonts
|
||||
disable_ligatures = "always";
|
||||
|
||||
# Scrollback
|
||||
scrollback_lines = 10000;
|
||||
|
||||
# Terminal bell
|
||||
enable_audio_bell = false;
|
||||
|
||||
# Window layout
|
||||
confirm_os_window_close = 0;
|
||||
window_padding_width = 3;
|
||||
|
||||
# Advanced
|
||||
update_check_interval = 0;
|
||||
};
|
||||
extraConfig = ''
|
||||
## name: Kanagawa
|
||||
## license: MIT
|
||||
## author: Tommaso Laurenzi
|
||||
## upstream: https://github.com/rebelot/kanagawa.nvim/
|
||||
|
||||
background #1F1F28
|
||||
foreground #DCD7BA
|
||||
selection_background #2D4F67
|
||||
selection_foreground #C8C093
|
||||
url_color #72A7BC
|
||||
cursor #C8C093
|
||||
|
||||
# Tabs
|
||||
active_tab_background #1F1F28
|
||||
active_tab_foreground #C8C093
|
||||
inactive_tab_background #1F1F28
|
||||
inactive_tab_foreground #727169
|
||||
#tab_bar_background #15161E
|
||||
|
||||
# normal
|
||||
color0 #16161D
|
||||
color1 #C34043
|
||||
color2 #76946A
|
||||
color3 #C0A36E
|
||||
color4 #7E9CD8
|
||||
color5 #957FB8
|
||||
color6 #6A9589
|
||||
color7 #C8C093
|
||||
|
||||
# bright
|
||||
color8 #727169
|
||||
color9 #E82424
|
||||
color10 #98BB6C
|
||||
color11 #E6C384
|
||||
color12 #7FB4CA
|
||||
color13 #938AA9
|
||||
color14 #7AA89F
|
||||
color15 #DCD7BA
|
||||
|
||||
# extended colors
|
||||
color16 #FFA066
|
||||
color17 #FF5D62
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
54
modules/features/theme.nix
Normal file
54
modules/features/theme.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
lux.theme = {
|
||||
homeManager =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.pointerCursor = {
|
||||
name = "phinger-cursors-light";
|
||||
package = pkgs.phinger-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.bookmarks = [
|
||||
"sftp://orion Orion VPS"
|
||||
];
|
||||
theme = {
|
||||
name = "Kanagawa-BL-LB";
|
||||
# Package in nixpkgs is outdated
|
||||
package = pkgs.kanagawa-gtk-theme.overrideAttrs (oldAttrs: {
|
||||
version = "unstable-2025-10-23";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "Fausto-Korpsvart";
|
||||
repo = "Kanagawa-GKT-Theme";
|
||||
rev = "55ca4ba249eba21f861b9866b71ab41bb8930318";
|
||||
hash = "sha256-UdMoMx2DoovcxSp/zBZ3PRv/Qpj+prd0uPm1gmdak2E=";
|
||||
};
|
||||
});
|
||||
};
|
||||
gtk4.theme = {
|
||||
inherit (config.gtk.theme) name package;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Kanagawa";
|
||||
package = pkgs.kanagawa-icon-theme.overrideAttrs (oldAttrs: {
|
||||
version = "unstable-2025-10-23";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "Fausto-Korpsvart";
|
||||
repo = "Kanagawa-GKT-Theme";
|
||||
rev = "55ca4ba249eba21f861b9866b71ab41bb8930318";
|
||||
hash = "sha256-UdMoMx2DoovcxSp/zBZ3PRv/Qpj+prd0uPm1gmdak2E=";
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk3";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
73
modules/features/vicinae.nix
Normal file
73
modules/features/vicinae.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
lux.vicinae = {
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.vicinae = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
themes = {
|
||||
kanagawa-wave = {
|
||||
meta = {
|
||||
version = 1;
|
||||
name = "Kanagawa Wave";
|
||||
description = "A dark theme inspired by the colors of the famous painting by Katsushika Hokusai.";
|
||||
variant = "dark";
|
||||
inherits = "vicinae-dark";
|
||||
};
|
||||
colors = {
|
||||
core = {
|
||||
background = "#1F1F28";
|
||||
foreground = "#DCD7BA";
|
||||
secondary_background = "#16161D";
|
||||
border = "#2A2A37";
|
||||
accent = "#7E9CD8";
|
||||
};
|
||||
accents = {
|
||||
blue = "#7E9CD8";
|
||||
green = "#98BB6C";
|
||||
magenta = "#D27E99";
|
||||
orange = "#FFA066";
|
||||
purple = "#957FB8";
|
||||
red = "#E82424";
|
||||
yellow = "#E6C384";
|
||||
cyan = "#7AA89F";
|
||||
};
|
||||
input = {
|
||||
border_focus = "colors.core.accent";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
theme = {
|
||||
light.name = "kanagawa-wave";
|
||||
dark.name = "kanagawa-wave";
|
||||
};
|
||||
};
|
||||
|
||||
extensions = with inputs.vicinae-extensions.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||
agenda
|
||||
#bluetooth
|
||||
brotab
|
||||
#dbus
|
||||
fuzzy-files
|
||||
github
|
||||
it-tools
|
||||
niri
|
||||
nix
|
||||
podman
|
||||
process-manager
|
||||
pulseaudio
|
||||
simple-bookmarks
|
||||
ssh
|
||||
#systemd
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
52
modules/features/xdg.nix
Normal file
52
modules/features/xdg.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
lux.xdg = {
|
||||
homeManager =
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
homeDir = config.home.homeDirectory;
|
||||
localDir = "${homeDir}/.local";
|
||||
mediaDir = "${homeDir}/media";
|
||||
in
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
|
||||
cacheHome = "${localDir}/cache";
|
||||
configHome = "${homeDir}/.config";
|
||||
dataHome = "${localDir}/share";
|
||||
stateHome = "${localDir}/state";
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
setSessionVariables = true;
|
||||
|
||||
download = "${homeDir}/downloads";
|
||||
documents = "${homeDir}/documents";
|
||||
|
||||
# Organize into media folder
|
||||
music = "${mediaDir}/music";
|
||||
pictures = "${mediaDir}/images";
|
||||
videos = "${mediaDir}/videos";
|
||||
|
||||
# Hide these
|
||||
desktop = "${localDir}/desktop";
|
||||
publicShare = "${localDir}/public";
|
||||
templates = "${localDir}/templates";
|
||||
};
|
||||
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplicationPackages = with pkgs; [
|
||||
sioyek
|
||||
imv
|
||||
vivaldi
|
||||
neovim
|
||||
nautilus
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user