you know the drill at this point

This commit is contained in:
Chris Kruining 2025-07-24 16:02:25 +02:00
parent 2d0b2b5070
commit b8e4a0a8bc
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
27 changed files with 227 additions and 555 deletions

View file

@ -17,6 +17,9 @@ in
immutableByDefault = true;
windows.allowWindowsToRememberPositions = true;
panels = import ./panels.nix;
powerdevil = import ./power.nix;
session = {
general.askForConfirmationOnLogout = false;
sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout";

View file

@ -1,124 +1,109 @@
{ config, lib, namespace, osConfig ? {}, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.desktop.plasma;
osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; };
in
{
options.${namespace}.desktop.plasma = {
};
config = mkIf osCfg.enable {
programs.plasma.panels = [
[
{
location = "bottom";
floating = true;
lengthMode = "fill";
height = 42;
hiding = "none";
screen = "all";
widgets = [
{
location = "bottom";
floating = true;
lengthMode = "fill";
height = 42;
hiding = "none";
screen = "all";
widgets = [
{
panelSpacer = {
expanding = true;
panelSpacer = {
expanding = true;
};
}
{
kickoff = {
applicationsDisplayMode = "list";
compactDisplayStyle = false;
favoritesDisplayMode = "grid";
sortAlphabetically = true;
showButtonsFor = {
custom = [
"shutdown"
"reboot"
"logout"
"lock-screen"
];
};
showActionButtonCaptions = true;
};
}
{
iconTasks = {
appearance = {
fill = false;
highlightWindows = true;
iconSpacing = "medium";
indicateAudioStreams = true;
rows = {
multirowView = "never";
maximum = null;
};
}
{
kickoff = {
applicationsDisplayMode = "list";
compactDisplayStyle = false;
favoritesDisplayMode = "grid";
sortAlphabetically = true;
showButtonsFor = {
custom = [
"shutdown"
"reboot"
"logout"
"lock-screen"
];
};
showActionButtonCaptions = true;
showTooltips = true;
};
behavior = {
grouping = {
clickAction = "showPresentWindowsEffect";
method = "byProgramName";
};
}
{
iconTasks = {
appearance = {
fill = false;
highlightWindows = true;
iconSpacing = "medium";
indicateAudioStreams = true;
rows = {
multirowView = "never";
maximum = null;
};
showTooltips = true;
};
behavior = {
grouping = {
clickAction = "showPresentWindowsEffect";
method = "byProgramName";
};
minimizeActiveTaskOnClick = true;
newTasksAppearOn = "right";
showTasks = {
onlyInCurrentActivity = true;
onlyInCurrentDesktop = true;
onlyMinimized = false;
onlyInCurrentScreen = false;
};
sortingMethod = "manually";
unhideOnAttentionNeeded = true;
wheel = {
ignoreMinimizedTasks = true;
switchBetweenTasks = true;
};
};
launchers = [
"preferred://filemanager"
"preferred://browser"
"preferred://terminalemulator"
"preferred://email"
"applications:vesktop.desktop"
"applications:steam.desktop"
];
minimizeActiveTaskOnClick = true;
newTasksAppearOn = "right";
showTasks = {
onlyInCurrentActivity = true;
onlyInCurrentDesktop = true;
onlyMinimized = false;
onlyInCurrentScreen = false;
};
}
{
panelSpacer = {
expanding = true;
sortingMethod = "manually";
unhideOnAttentionNeeded = true;
wheel = {
ignoreMinimizedTasks = true;
switchBetweenTasks = true;
};
}
{
systemTray = {
icons = {
scaleToFit = true;
spacing = "small";
};
items = {
hidden = [
"org.kde.plasma.brightness"
];
};
pin = false;
};
}
{
digitalClock = {
date = {
enable = true;
format = "shortDate";
position = "belowTime";
};
time = {
format = "24h";
showSeconds = "onlyInTooltip";
};
};
}
];
};
launchers = [
"preferred://filemanager"
"preferred://browser"
"preferred://terminalemulator"
"preferred://email"
"applications:vesktop.desktop"
"applications:steam.desktop"
];
};
}
{
panelSpacer = {
expanding = true;
};
}
{
systemTray = {
icons = {
scaleToFit = true;
spacing = "small";
};
items = {
hidden = [
"org.kde.plasma.brightness"
];
};
pin = false;
};
}
{
digitalClock = {
date = {
enable = true;
format = "shortDate";
position = "belowTime";
};
time = {
format = "24h";
showSeconds = "onlyInTooltip";
};
};
}
];
};
}
}
]

View file

@ -1,52 +1,37 @@
{ config, lib, namespace, osConfig ? {}, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.desktop.plasma;
osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; };
in
{
options.${namespace}.desktop.plasma = {
AC = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
autoSuspend.action = "nothing";
dimDisplay.enable = false;
turnOffDisplay = {
idleTimeout = "never";
};
};
config = mkIf osCfg.enable {
programs.plasma.powerdevil = {
AC = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
battery = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
autoSuspend.action = "nothing";
dimDisplay.enable = false;
autoSuspend.action = "nothing";
dimDisplay.enable = false;
turnOffDisplay = {
idleTimeout = "never";
};
};
turnOffDisplay = {
idleTimeout = "never";
};
};
battery = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
lowBattery = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
autoSuspend.action = "nothing";
dimDisplay.enable = false;
autoSuspend.action = "nothing";
dimDisplay.enable = false;
turnOffDisplay = {
idleTimeout = "never";
};
};
lowBattery = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
autoSuspend.action = "nothing";
dimDisplay.enable = false;
turnOffDisplay = {
idleTimeout = "never";
};
};
turnOffDisplay = {
idleTimeout = "never";
};
};
}

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption;
inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption mkDefault;
inherit (lib.types) nullOr enum;
cfg = config.${namespace}.shell;
@ -12,17 +12,18 @@ in
default = null;
description = "Default system shell";
};
corePkgs.enable = mkEnableOption "core shell packages";
};
config = mkMerge [
(mkIf (cfg.default != null) {
users.defaultUserShell = pkgs."${cfg.default}";
})
# (if (cfg.default != null) then {
# shell = pkgs."${cfg.default}";
# } else {})
(mkIf cfg.corePkgs.enable {
${namespace}.shell.toolset = {
(mkIf (cfg.corePkgs.enable) {
${namespace}.shell.toolset = mkDefault {
bat.enable = true;
btop.enable = true;
eza.enable = true;
@ -33,7 +34,9 @@ in
yazi.enable = true;
zoxide.enable = true;
};
})
({
home.packages = with pkgs; [ any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;}) ];
programs = {
@ -50,4 +53,4 @@ in
};
})
];
}
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
inherit (lib.strings) concatStringsSep;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkEnableOption mkIf;
@ -10,7 +10,7 @@ in
};
config = mkIf cfg.enable {
environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)";
home.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)";
home.packages = with pkgs; [ lazygit lazyjj jujutsu ];

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
@ -10,27 +10,27 @@ in
};
config = mkIf cfg.enable {
user.package = with pkgs; [ gnupg ];
# home.packages = with pkgs; [ gnupg ];
environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
# home.sessionVariables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
programs.gnupg = {
enable = true;
# programs.gnupg = {
# enable = true;
agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gnome3;
# agent = {
# enable = true;
# enableSSHSupport = true;
# pinentryPackage = pkgs.pinentry-gnome3;
settings = let
cacheTTL = 86400;
in {
default-cache-ttl = cacheTTL;
default-cache-ttl-ssh = cacheTTL;
max-cache-ttl = cacheTTL;
max-cache-ttl-ssh = cacheTTL;
};
};
};
# settings = let
# cacheTTL = 86400;
# in {
# default-cache-ttl = cacheTTL;
# default-cache-ttl-ssh = cacheTTL;
# max-cache-ttl = cacheTTL;
# max-cache-ttl-ssh = cacheTTL;
# };
# };
# };
};
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;

View file

@ -1,7 +1,6 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib.${namespace}) mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.shell.toolset.yazi;
in

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf;
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.shell.zsh;
in
@ -10,13 +10,9 @@ in
};
config = mkIf cfg.enable {
${namespace}.shell = {
zsh.enable = true;
corePkgs.enable = true;
};
# Enable completion for sys-packages:
environment.pathsToLink = ["/share/zsh"];
# ${namespace}.shell = {
# zsh.enable = true;
# };
programs = {
starship.enableZshIntegration = true;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, namespace, ... }:
{ config, lib, pkgs, namespace, osConfig ? {}, ... }:
let
inherit (lib) mkIf mkDefault;
inherit (lib.options) mkOption mkEnableOption;
@ -23,9 +23,7 @@ in {
};
};
config = mkIf cfg.enable {
${namespace}.theming.enable = true;
config = mkIf (cfg.enable && osConfig.${namespace}.theming.enable) {
stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml";
image = ./${cfg.theme}.jpg;