desktop building?

This commit is contained in:
mjallen18
2025-07-20 18:35:14 -05:00
parent 91be65bc39
commit 608a6ce9b8
51 changed files with 535 additions and 299 deletions

View File

@@ -89,7 +89,6 @@
modules.nixos = with inputs; [ modules.nixos = with inputs; [
chaotic.nixosModules.default chaotic.nixosModules.default
disko.nixosModules.disko disko.nixosModules.disko
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote lanzaboote.nixosModules.lanzaboote
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
@@ -172,6 +171,11 @@
]; ];
users = { users = {
"matt@desktop" = {
modules = with inputs; [
sops-nix.homeManagerModules.sops
];
};
"deck@deck" = { "deck@deck" = {
modules = with inputs; [ modules = with inputs; [
steam-rom-manager.homeManagerModules.default steam-rom-manager.homeManagerModules.default

View File

@@ -10,22 +10,6 @@ in
{ {
home.username = "matt"; home.username = "matt";
sops = {
age.keyFile = "/home/matt/.config/sops/age/keys.txt";
defaultSopsFile = "/etc/nixos/secrets/secrets.yaml";
validateSopsFiles = false;
secrets = {
"ssh-keys-public/desktop-nixos" = {
path = "/home/matt/.ssh/id_ed25519.pub";
mode = "0644";
};
"ssh-keys-private/desktop-nixos" = {
path = "/home/matt/.ssh/id_ed25519";
mode = "0600";
};
};
};
services = { services = {
remmina = { remmina = {
enable = true; enable = true;
@@ -41,7 +25,7 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
bottles bottles
unstable.compose2nix compose2nix
discord discord
distrobox distrobox
heroic heroic
@@ -56,7 +40,6 @@ in
protontricks protontricks
protonvpn-gui protonvpn-gui
python3 python3
qmk
smile smile
unigine-heaven unigine-heaven
via via

View File

@@ -1,105 +0,0 @@
{ lib, config, ... }:
with lib;
let
cfg = config.mjallen.desktop.extra.kitty;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = settings.fontName;
package = settings.fontPackage;
size = settings.fontSize;
};
settings = {
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
mouse_hide_wait = "2.0";
cursor_shape = "block";
url_style = "dotted";
confirm_os_window_close = "0";
background_opacity = "0.85";
# The basic colors
foreground = settings.theme.snowStorm.nord6;
background = settings.theme.polarNight.nord0;
selection_foreground = settings.theme.polarNight.nord0;
selection_background = settings.theme.aurora.nord15;
# Cursor colors
cursor = settings.theme.aurora.nord15;
cursor_text_color = settings.theme.polarNight.nord0;
# URL underline color when hovering with mouse
url_color = settings.theme.aurora.nord15;
# Kitty window border colors
active_border_color = settings.theme.frost.nord10;
inactive_border_color = settings.theme.polarNight.nord1;
bell_border_color = settings.theme.aurora.nord13;
# OS Window titlebar colors
wayland_titlebar_color = settings.theme.polarNight.nord0;
macos_titlebar_color = settings.theme.polarNight.nord0;
# Tab bar colors
active_tab_foreground = settings.theme.polarNight.nord3;
active_tab_background = settings.theme.aurora.nord15;
inactive_tab_foreground = settings.theme.snowStorm.nord6;
inactive_tab_background = settings.theme.polarNight.nord1;
tab_bar_background = settings.theme.polarNight.nord3;
# Colors for marks (marked text in the terminal)
mark1_foreground = settings.theme.polarNight.nord0;
mark1_background = settings.theme.frost.nord10;
mark2_foreground = settings.theme.polarNight.nord0;
mark2_background = settings.theme.aurora.nord15;
mark3_foreground = settings.theme.polarNight.nord0;
mark3_background = settings.theme.frost.nord8;
# The 16 terminal colors
# black
color0 = settings.theme.polarNight.nord0;
# Autosuggestion
color8 = settings.theme.frost.nord10;
# red
color1 = settings.theme.aurora.nord11;
color9 = settings.theme.aurora.nord11;
# green
color2 = settings.theme.aurora.nord14;
color10 = settings.theme.aurora.nord14;
# yellow
color3 = settings.theme.aurora.nord13;
color11 = settings.theme.aurora.nord13;
# blue
color4 = settings.theme.frost.nord10;
color12 = settings.theme.frost.nord10;
# magenta
color5 = settings.theme.aurora.nord15;
color13 = settings.theme.aurora.nord15;
# cyan
color6 = settings.theme.frost.nord8;
color14 = settings.theme.frost.nord8;
# white
color7 = settings.theme.snowStorm.nord5;
color15 = settings.theme.snowStorm.nord4;
};
};
};
}

View File

@@ -1,12 +0,0 @@
{ lib, ... }:
with lib;
{
options.mjallen.desktop.extra.nwg-panel = {
enable = mkEnableOption "enable nwg-panel";
defaultApps = mkOption {
type = attrs;
default = { };
};
};
}

View File

@@ -2,7 +2,7 @@
with lib; with lib;
let let
cfg = config.mjallen.desktop.hyprland; cfg = config.mjallen.desktop.hyprland;
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${config.home-manager.users.matt.gtk.iconTheme.name}"; drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${cfg.iconThemeName}";
in in
{ {
imports = [ imports = [
@@ -71,8 +71,8 @@ in
"$mod SHIFT, F, fullscreen, 0" "$mod SHIFT, F, fullscreen, 0"
"$mod SHIFT, E, exec, smile" "$mod SHIFT, E, exec, smile"
"$mod, mouse:276, movecurrentworkspacetomonitor, ${cfg.displayLeft.input}" "$mod, mouse:276, movecurrentworkspacetomonitor, ${cfg.display1.input}"
"$mod, mouse:275, movecurrentworkspacetomonitor, ${cfg.displayRight.input}" "$mod, mouse:275, movecurrentworkspacetomonitor, ${cfg.display2.input}"
# alt-tab between workspaces on active monitor # alt-tab between workspaces on active monitor
"$mod, Tab, workspace, m+1" "$mod, Tab, workspace, m+1"

View File

@@ -5,13 +5,48 @@ with lib;
enable = mkEnableOption "enable hyprland desktop"; enable = mkEnableOption "enable hyprland desktop";
primaryDisplay = mkOption { primaryDisplay = mkOption {
type = types.string; type = types.str;
default = "DP-1"; default = "DP-1";
}; };
display1 = {
input = mkOption {
type = types.str;
default = "DP-1";
};
resolution = mkOption {
type = types.str;
default = "3840x2160";
};
refreshRate = mkOptions {
type = types.str;
default = "240.00000";
};
};
display2 = {
input = mkOption {
type = types.str;
default = "DP-1";
};
resolution = mkOption {
type = types.str;
default = "3840x2160";
};
refreshRate = mkOptions {
type = types.str;
default = "240.00000";
};
};
wallpaper = mkOption { wallpaper = mkOption {
type = types.string; type = with types; listOf str;
default = "/run/wallpaper.jpeg"; default = [];
description = "list of hyprland wallpaper configs";
}; };
monitor = mkOption { monitor = mkOption {
@@ -44,6 +79,16 @@ with lib;
description = "any extra options"; description = "any extra options";
}; };
iconThemeName = mkOption {
type = types.str;
default = "Colloid-Dark";
};
gtkThemeName = mkOption {
type = types.str;
default = "Colloid-Dark";
};
defaultApps = mkOption { defaultApps = mkOption {
type = types.submodule { type = types.submodule {
options = { options = {
@@ -62,15 +107,15 @@ with lib;
hyprIdle = { hyprIdle = {
lockScreenTimer = mkOption { lockScreenTimer = mkOption {
type = with types; null || signed integer || floating point number; type = with types; int;
default = 5; default = 5;
}; };
screenOffTimer = mkOption { screenOffTimer = mkOption {
type = with types; null || signed integer || floating point number; type = with types; int;
default = 15; default = 15;
}; };
suspendTimer = mkOption { suspendTimer = mkOption {
type = with types; null || signed integer || floating point number; type = with types; int;
default = 30; default = 30;
}; };
}; };

View File

@@ -22,16 +22,16 @@ in
# on-resume = "brightnessctl -r"; # monitor backlight restore. # on-resume = "brightnessctl -r"; # monitor backlight restore.
# } # }
{ {
timeout = cfg.hypridle.lockScreenTimer; timeout = cfg.hyprIdle.lockScreenTimer;
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
} }
{ {
timeout = cfg.hypridle.screenOffTimer; timeout = cfg.hyprIdle.screenOffTimer;
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired. on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
} }
{ {
timeout = cfg.hypridle.suspendTimer; timeout = cfg.hyprIdle.suspendTimer;
on-timeout = "systemctl suspend"; # suspend pc on-timeout = "systemctl suspend"; # suspend pc
} }
]; ];

View File

@@ -16,10 +16,10 @@ let
cursorSize = 24; cursorSize = 24;
# GTK # GTK
gtkThemeSize = themeSize; # gtkThemeSize = themeSize;
gtkThemeAccent = themeAccent; # gtkThemeAccent = themeAccent;
gtkThemeVariant = themeVariant; # gtkThemeVariant = themeVariant;
gtkThemeColor = themeColor; # gtkThemeColor = themeColor;
gtkTheme = "Colloid-Dark-Compact-Nord"; gtkTheme = "Colloid-Dark-Compact-Nord";
gtkThemePkg = pkgs.colloid-gtk-theme.override { gtkThemePkg = pkgs.colloid-gtk-theme.override {
sizeVariants = [ themeSize ]; sizeVariants = [ themeSize ];
@@ -29,7 +29,7 @@ let
}; };
# Icons # Icons
iconThemeScheme = iconScheme; # iconThemeScheme = iconScheme;
iconTheme = "Colloid-Nord-Dark"; iconTheme = "Colloid-Nord-Dark";
iconThemePkg = pkgs.colloid-icon-theme.override { iconThemePkg = pkgs.colloid-icon-theme.override {
schemeVariants = [ iconScheme ]; schemeVariants = [ iconScheme ];

View File

@@ -10,12 +10,12 @@ in
CLUTTER_BACKEND = "wayland"; CLUTTER_BACKEND = "wayland";
EDITOR = "${cfg.defaultApps.editor.pname}"; EDITOR = "${cfg.defaultApps.editor.pname}";
VISUAL = "${cfg.defaultApps.visual.pname}"; VISUAL = "${cfg.defaultApps.visual.pname}";
ICON_THEME = settings.iconTheme; ICON_THEME = cfg.iconThemeName;
GTK_CSD = "0"; GTK_CSD = "0";
GTK_THEME = settings.gtkTheme; GTK_THEME = cfg.gtkThemeName;
GTK_USE_PORTAL = "1"; GTK_USE_PORTAL = "1";
HYPRCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name; HYPRCURSOR_THEME = config.home.pointerCursor.name;
HYPRCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size; HYPRCURSOR_SIZE = config.home.pointerCursor.size;
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1"; NIXOS_XDG_OPEN_USE_PORTAL = "1";
@@ -26,8 +26,8 @@ in
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland"; SDL_VIDEODRIVER = "wayland";
TERMINAL = "${cfg.defaultApps.terminal.pname}"; TERMINAL = "${cfg.defaultApps.terminal.pname}";
XCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name; XCURSOR_THEME = config.home.pointerCursor.name;
XCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size; XCURSOR_SIZE = config.home.pointerCursor.size;
XDG_CACHE_HOME = "\${HOME}/.cache"; XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config"; XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_CURRENT_DESKTOP = "Hyprland"; XDG_CURRENT_DESKTOP = "Hyprland";

View File

@@ -31,4 +31,32 @@
nord14 = "#a3be8c"; nord14 = "#a3be8c";
nord15 = "#b48ead"; nord15 = "#b48ead";
}; };
defaultOpacity = "opacity: 0.85;";
defaultBorderRadius = "border-radius: 1rem;";
defaultCenterOptions = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
'';
borderRight = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 0rem 1rem 1rem 0rem;
margin-right: 0.5rem;
'';
borderLeft = ''
padding-top: 0.2rem;
padding-bottom: 0.2rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 3px 0;
border-radius: 1rem 0rem 0rem 1rem;
margin-left: 0.5rem;
'';
} }

View File

@@ -39,7 +39,10 @@
btop.enable = lib.mkDefault true; btop.enable = lib.mkDefault true;
fastfetch.enable = lib.mkDefault true; fastfetch.enable = lib.mkDefault true;
home-manager.enable = lib.mkDefault true; home-manager.enable = lib.mkDefault true;
java.enable = lib.mkDefault true; java = {
enable = lib.mkDefault true;
package = pkgs.jdk17;
};
mangohud.enable = lib.mkDefault true; mangohud.enable = lib.mkDefault true;
password-store.enable = true; password-store.enable = true;
nh = { nh = {

View File

@@ -1,8 +1,8 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; with lib;
let let
cfg = config.mjallen.desktop.extra.btop; cfg = config.mjallen.programs.btop;
nord = import ../../theme/nord.nix; nord = import ../../desktop/theme/nord.nix;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.mjallen.desktop.extra.btop = { options.mjallen.programs.btop = {
enable = mkEnableOption "enable btop"; enable = mkEnableOption "enable btop";
}; };
} }

View File

@@ -0,0 +1,106 @@
{ lib, config, ... }:
with lib;
let
cfg = config.mjallen.programs.kitty;
nord = import ../../desktop/theme/nord.nix;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = cfg.font.name;
package = cfg.font.package;
size = cfg.font.size;
};
settings = {
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
mouse_hide_wait = "2.0";
cursor_shape = "block";
url_style = "dotted";
confirm_os_window_close = "0";
background_opacity = "0.85";
# The basic colors
foreground = nord.snowStorm.nord6;
background = nord.polarNight.nord0;
selection_foreground = nord.polarNight.nord0;
selection_background = nord.aurora.nord15;
# Cursor colors
cursor = nord.aurora.nord15;
cursor_text_color = nord.polarNight.nord0;
# URL underline color when hovering with mouse
url_color = nord.aurora.nord15;
# Kitty window border colors
active_border_color = nord.frost.nord10;
inactive_border_color = nord.polarNight.nord1;
bell_border_color = nord.aurora.nord13;
# OS Window titlebar colors
wayland_titlebar_color = nord.polarNight.nord0;
macos_titlebar_color = nord.polarNight.nord0;
# Tab bar colors
active_tab_foreground = nord.polarNight.nord3;
active_tab_background = nord.aurora.nord15;
inactive_tab_foreground = nord.snowStorm.nord6;
inactive_tab_background = nord.polarNight.nord1;
tab_bar_background = nord.polarNight.nord3;
# Colors for marks (marked text in the terminal)
mark1_foreground = nord.polarNight.nord0;
mark1_background = nord.frost.nord10;
mark2_foreground = nord.polarNight.nord0;
mark2_background = nord.aurora.nord15;
mark3_foreground = nord.polarNight.nord0;
mark3_background = nord.frost.nord8;
# The 16 terminal colors
# black
color0 = nord.polarNight.nord0;
# Autosuggestion
color8 = nord.frost.nord10;
# red
color1 = nord.aurora.nord11;
color9 = nord.aurora.nord11;
# green
color2 = nord.aurora.nord14;
color10 = nord.aurora.nord14;
# yellow
color3 = nord.aurora.nord13;
color11 = nord.aurora.nord13;
# blue
color4 = nord.frost.nord10;
color12 = nord.frost.nord10;
# magenta
color5 = nord.aurora.nord15;
color13 = nord.aurora.nord15;
# cyan
color6 = nord.frost.nord8;
color14 = nord.frost.nord8;
# white
color7 = nord.snowStorm.nord5;
color15 = nord.snowStorm.nord4;
};
};
};
}

View File

@@ -1,7 +1,7 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.mjallen.desktop.extra.kitty = { options.mjallen.programs.kitty = {
enable = mkEnableOption "enable kitty terminal"; enable = mkEnableOption "enable kitty terminal";
font = { font = {
@@ -14,14 +14,14 @@ with lib;
default = pkgs.dejavu_fonts; default = pkgs.dejavu_fonts;
}; };
size = mkOption { size = mkOption {
type = with types; null || signed integer || floating point number; type = with types; int;
default = 8; default = 8;
}; };
}; };
theme = mkOption { theme = mkOption {
type = types.attrs; type = types.attrs;
default = import ../../theme/nord.nix; default = import ../../desktop/theme/nord.nix;
}; };
}; };
} }

View File

@@ -1,8 +1,8 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; with lib;
let let
cfg = config.mjallen.desktop.extra.mako; cfg = config.mjallen.programs.mako;
nord = import ../../theme/nord.nix; nord = import ../../desktop/theme/nord.nix;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.mjallen.desktop.extra.mako = { options.mjallen.programs.mako = {
enable = mkEnableOption "enable mako"; enable = mkEnableOption "enable mako";
fontName = mkOption { fontName = mkOption {

View File

@@ -1,8 +1,8 @@
{ config, lib, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let let
cfg = config.mjallen.desktop.extra.nwg-dock; cfg = config.mjallen.programs.nwg-dock;
nord = import ../../theme/nord.nix; nord = import ../../desktop/theme/nord.nix;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.mjallen.desktop.extra.nwg-dock = { options.mjallen.programs.nwg-dock = {
enable = mkEnableOption "enable nwg-dock"; enable = mkEnableOption "enable nwg-dock";
}; };
} }

View File

@@ -1,8 +1,8 @@
{ config, lib, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
let let
cfg = config.mjallen.desktop.extra.nwg-drawer; cfg = config.mjallen.programs.nwg-drawer;
nord = import ../../theme/nord.nix; nord = import ../../desktop/theme/nord.nix;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.mjallen.desktop.extra.nwg-drawer = { options.mjallen.programs.nwg-drawer = {
enable = mkEnableOption "enable nwg-drawer"; enable = mkEnableOption "enable nwg-drawer";
}; };
} }

View File

@@ -1,7 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; with lib;
let let
cfg = config.mjallen.desktop.extra.nwg-dock; cfg = config.mjallen.programs.nwg-panel;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];

View File

@@ -0,0 +1,23 @@
{ lib, pkgs, ... }:
with lib;
{
options.mjallen.programs.nwg-panel = {
enable = mkEnableOption "enable nwg-panel";
defaultApps = mkOption {
type = types.submodule {
options = {
browser = mkOption { type = types.package; default = pkgs.firefox; };
editor = mkOption { type = types.package; default = pkgs.micro; };
fileExplorer = mkOption { type = types.package; default = pkgs.nemo; };
visual = mkOption { type = types.package; default = pkgs.vscodium; };
terminal = mkOption { type = types.package; default = pkgs.kitty; };
office = mkOption { type = types.package; default = pkgs.onlyoffice-bin_latest; };
video = mkOption { type = types.package; default = pkgs.vlc; };
imageViewer = mkOption { type = types.package; default = pkgs.gnome-photos; };
};
};
description = "Default applications used across the system.";
};
};
}

View File

@@ -1,8 +1,8 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; with lib;
let let
cfg = config.mjallen.desktop.extra.waybar; cfg = config.mjallen.programs.waybar;
nord = import ../../theme/nord.nix; nord = import ../../desktop/theme/nord.nix;
defaultOpacity = "opacity: 0.85;"; defaultOpacity = "opacity: 0.85;";
defaultBorderRadius = "border-radius: 1rem;"; defaultBorderRadius = "border-radius: 1rem;";
@@ -371,8 +371,8 @@ in
${defaultOpacity} ${defaultOpacity}
${defaultBorderRadius} ${defaultBorderRadius}
${defaultCenterOptions} ${defaultCenterOptions}
margin-left: ${hyprlandSettings.waybar.moduleStyle.window.margin-left or "4rem"}; margin-left: 4rem
margin-right: ${hyprlandSettings.waybar.moduleStyle.window.margin-right or "4rem"}; margin-right: 4rem
} }
/* make window module transparent when no windows present */ /* make window module transparent when no windows present */
@@ -513,8 +513,8 @@ in
color: ${nord.frost.nord9}; color: ${nord.frost.nord9};
background-color: ${nord.polarNight.nord0}; background-color: ${nord.polarNight.nord0};
${defaultOpacity} ${defaultOpacity}
${hyprlandSettings.waybar.moduleStyle.temperature.location or defaultCenterOptions} ${defaultCenterOptions}
border-radius: ${hyprlandSettings.waybar.moduleStyle.temperature.border-radius or "0"} border-radius: 0
} }
/* ------------- */ /* ------------- */
@@ -528,7 +528,7 @@ in
} }
/* ------------- */ /* ------------- */
'' + hyprlandSettings.waybar.extraModulesStyle or ''''; '' + cfg.extraModulesStyle or '''';
}; };
}; };
} }

View File

@@ -1,7 +1,7 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.mjallen.desktop.extra.waybar = { options.mjallen.programs.waybar = {
enable = mkEnableOption "enable waybar"; enable = mkEnableOption "enable waybar";
layer = mkOption { layer = mkOption {
@@ -10,7 +10,7 @@ with lib;
}; };
modules-right = mkOption { modules-right = mkOption {
type = with types; listOf string; type = with types; listOf str;
default = []; default = [];
}; };
@@ -23,5 +23,10 @@ with lib;
type = types.attrs; type = types.attrs;
default = { }; default = { };
}; };
extraModulesStyle = mkOption {
type = types.str;
default = "";
};
}; };
} }

View File

@@ -1,7 +1,6 @@
{ config, lib, namespace, ... }: { config, lib, namespace, pkgs, ... }:
with lib;
let let
cfg = config.mjallen.desktop.extra.waybar; cfg = config.mjallen.programs.waybar;
pythonEnv = pkgs.python3.withPackages (ps: [ pythonEnv = pkgs.python3.withPackages (ps: [
pkgs.${namespace}.homeassistant-api pkgs.${namespace}.homeassistant-api

View File

@@ -1,7 +1,6 @@
{ config, lib, namespace, ... }: { config, lib, pkgs, ... }:
with lib;
let let
cfg = config.mjallen.desktop.extra.waybar; cfg = config.mjallen.programs.waybar;
waybar-weather = pkgs.writeScriptBin "waybar-weather" '' waybar-weather = pkgs.writeScriptBin "waybar-weather" ''
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell

View File

@@ -1,14 +1,14 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; with lib;
let let
cfg = config.mjallen.desktop.extra.wlogout; cfg = config.mjallen.programs.wlogout;
nord = import ../../theme/nord.nix; nord = import ../../desktop/theme/nord.nix;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.wlogout = { programs.wlogout = {
enable = true; enable = false;
layout = { layout = {
lock = { lock = {
label = "lock"; label = "lock";

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,7 +1,7 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.mjallen.desktop.extra.wlogout = { options.mjallen.programs.wlogout = {
enable = mkEnableOption "enable wlogout"; enable = mkEnableOption "enable wlogout";
fontName = mkOption { fontName = mkOption {

View File

@@ -1,8 +1,8 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; with lib;
let let
cfg = config.mjallen.desktop.extra.wofi; cfg = config.mjallen.programs.wofi;
nord = import ../../theme/nord.nix; nord = import ../../desktop/theme/nord.nix;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.mjallen.desktop.extra.wofi = { options.mjallen.programs.wofi = {
enable = mkEnableOption "enable wofi"; enable = mkEnableOption "enable wofi";
fontName = mkOption { fontName = mkOption {

View File

@@ -0,0 +1,18 @@
{ config, ... }:
{
# sops = {
# age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
# defaultSopsFile = "/etc/nixos/secrets/secrets.yaml";
# validateSopsFiles = false;
# secrets = {
# "ssh-keys-public/desktop-nixos" = {
# path = "/home/matt/.ssh/id_ed25519.pub";
# mode = "0644";
# };
# "ssh-keys-private/desktop-nixos" = {
# path = "/home/matt/.ssh/id_ed25519";
# mode = "0600";
# };
# };
# };
}

5
overlays/jdk/default.nix Normal file
View File

@@ -0,0 +1,5 @@
{ inputs, ... }:
final: prev: {
jdk = final.openjdk17;
openjdk8 = final.openjdk17;
}

View File

@@ -52,16 +52,16 @@ let
]; ];
in in
{ {
nix = { # nix = {
settings = { # settings = {
substituters = [ # substituters = [
"https://cache.mjallen.dev" # "https://cache.mjallen.dev"
]; # ];
trusted-public-keys = [ # trusted-public-keys = [
"cache.mjallen.dev-1:IzFmKCd8/gggI6lcCXsW65qQwiCLGFFN9t9s2iw7Lvc=" # "cache.mjallen.dev-1:IzFmKCd8/gggI6lcCXsW65qQwiCLGFFN9t9s2iw7Lvc="
]; # ];
}; # };
}; # };
chaotic.mesa-git.enable = false; chaotic.mesa-git.enable = false;
@@ -76,7 +76,7 @@ in
hardware = { hardware = {
# Enable the QMK firmware flashing tool. # Enable the QMK firmware flashing tool.
keyboard = { keyboard = {
qmk.enable = true; qmk.enable = false;
}; };
# Enable Sane and Brother printer support. # Enable Sane and Brother printer support.

View File

@@ -28,6 +28,9 @@
./nix.nix ./nix.nix
./sops.nix ./sops.nix
./users.nix ./users.nix
./specialisations/hyprland
]; ];
${namespace} = { ${namespace} = {

View File

@@ -1,97 +1,97 @@
let # let
theme = import ../../modules/nixos/hyprland/theme.nix; # theme = import ../../modules/nixos/hyprland/theme.nix;
defaultOpacity = theme.waybar.defaultOpacity; # defaultOpacity = theme.waybar.defaultOpacity;
defaultBorderRadius = theme.waybar.defaultBorderRadius; # defaultBorderRadius = theme.waybar.defaultBorderRadius;
defaultCenterOptions = theme.waybar.defaultCenterOptions; # defaultCenterOptions = theme.waybar.defaultCenterOptions;
borderLeft = theme.waybar.borderLeft; # borderLeft = theme.waybar.borderLeft;
borderRight = theme.waybar.borderRight; # borderRight = theme.waybar.borderRight;
# Displays # # Displays
displayLeft = { # displayLeft = {
input = "DP-1"; # input = "DP-1";
resolution = "3840x2160"; # resolution = "3840x2160";
refreshRate = "240.00000"; # refreshRate = "240.00000";
}; # };
displayRight = { # displayRight = {
input = "DP-2"; # input = "DP-2";
resolution = "3840x2160"; # resolution = "3840x2160";
refreshRate = "240.00000"; # refreshRate = "240.00000";
}; # };
in # in
{ # {
primaryDisplay = displayLeft; # primaryDisplay = displayLeft;
networkInterface = "wlp9s0"; # networkInterface = "wlp9s0";
wallpaper = [ # wallpaper = [
"${displayLeft.input}, /run/wallpaper.jpg" # "${displayLeft.input}, /run/wallpaper.jpg"
"${displayRight.input}, /run/wallpaper.jpg" # "${displayRight.input}, /run/wallpaper.jpg"
]; # ];
monitor = [ # monitor = [
"${displayLeft.input},${displayLeft.resolution}@${displayLeft.refreshRate},0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" # "${displayLeft.input},${displayLeft.resolution}@${displayLeft.refreshRate},0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
"${displayRight.input},${displayRight.resolution}@${displayRight.refreshRate},3840x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.5,sdrsaturation,0.98" # "${displayRight.input},${displayRight.resolution}@${displayRight.refreshRate},3840x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.5,sdrsaturation,0.98"
]; # ];
workspace = [ # workspace = [
"name:firefox, monitor:${displayRight.input}, default:false, special, class:(.*firefox.*)" # "name:firefox, monitor:${displayRight.input}, default:false, special, class:(.*firefox.*)"
"name:discord, monitor:${displayRight.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)" # "name:discord, monitor:${displayRight.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
"name:steam, monitor:${displayLeft.input}, default:false, special, class:(.*[Ss]team.*)" # "name:steam, monitor:${displayLeft.input}, default:false, special, class:(.*[Ss]team.*)"
]; # ];
windowRule = [ # windowRule = [
"size 2160 7680, tag:horizonrdp" # "size 2160 7680, tag:horizonrdp"
]; # ];
extraConfig = '' # extraConfig = ''
exec-once = nm-applet # exec-once = nm-applet
exec-once = [silent] firefox # exec-once = [silent] firefox
exec-once = [silent] vesktop # exec-once = [silent] vesktop
exec-once = [silent] chromium --app="https://music.apple.com" # exec-once = [silent] chromium --app="https://music.apple.com"
exec-once = [silent] steam # exec-once = [silent] steam
''; # '';
waybar = { # waybar = {
layer = "bottom"; # layer = "bottom";
modules-right = [ # modules-right = [
"tray" # "tray"
"custom/lights" # "custom/lights"
"temperature" # "temperature"
"temperature#gpu" # "temperature#gpu"
"keyboard-state#capslock" # "keyboard-state#capslock"
"keyboard-state#numlock" # "keyboard-state#numlock"
"wireplumber#sink" # "wireplumber#sink"
"wireplumber#source" # "wireplumber#source"
"bluetooth" # "bluetooth"
"network" # "network"
"idle_inhibitor" # "idle_inhibitor"
"clock" # "clock"
"custom/weather" # "custom/weather"
]; # ];
extraModules = { # extraModules = {
"custom/lights" = { # "custom/lights" = {
tooltip = false; # tooltip = false;
exec = "waybar-hass --get_light light.living_room_lights"; # exec = "waybar-hass --get_light light.living_room_lights";
interval = "once"; # interval = "once";
format = "{text}";#"󱉓"; # format = "{text}";#"󱉓";
on-click = "waybar-hass --toggle_light light.living_room_lights"; # on-click = "waybar-hass --toggle_light light.living_room_lights";
return-type = "json"; # return-type = "json";
}; # };
}; # };
extraModulesStyle = '' # extraModulesStyle = ''
#custom-lights { # #custom-lights {
color: ${theme.nord.frost.nord8}; # color: ${theme.nord.frost.nord8};
background-color: ${theme.nord.polarNight.nord0}; # background-color: ${theme.nord.polarNight.nord0};
${defaultOpacity} # ${defaultOpacity}
${borderLeft} # ${borderLeft}
} # }
#custom-lights:hover { # #custom-lights:hover {
background: ${theme.nord.polarNight.nord3}; # background: ${theme.nord.polarNight.nord3};
} # }
''; # '';
}; # };
} # }

View File

@@ -1,10 +1,56 @@
{ namespace, ... }: { lib, namespace, ... }:
let
# Displays
displayLeft = {
input = "DP-1";
resolution = "3840x2160";
refreshRate = "240.00000";
};
displayRight = {
input = "DP-2";
resolution = "3840x2160";
refreshRate = "240.00000";
};
in
{ {
specialisation.hyprland.inheritParentConfig = true;
specialisation.hyprland.configuration = { specialisation.hyprland.configuration = {
home-manager.users.matt = import ./home/default.nix;
${namespace} = { ${namespace} = {
desktop = { desktop = {
hyprland.enable = true; hyprland = {
gnome.enable = false; enable = true;
primaryDisplay = "DP-1";
wallpaper = [
"${displayLeft.input}, /run/wallpaper.jpg"
"${displayRight.input}, /run/wallpaper.jpg"
];
monitor = [
"${displayLeft.input},${displayLeft.resolution}@${displayLeft.refreshRate},0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
"${displayRight.input},${displayRight.resolution}@${displayRight.refreshRate},3840x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.5,sdrsaturation,0.98"
];
workspace = [
"name:firefox, monitor:${displayRight.input}, default:false, special, class:(.*firefox.*)"
"name:discord, monitor:${displayRight.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
"name:steam, monitor:${displayLeft.input}, default:false, special, class:(.*[Ss]team.*)"
];
windowRule = [
"size 2160 7680, tag:horizonrdp"
];
extraConfig = ''
exec-once = nm-applet
exec-once = [silent] firefox
exec-once = [silent] vesktop
exec-once = [silent] chromium --app="https://music.apple.com"
exec-once = [silent] steam
'';
};
gnome.enable = lib.mkForce false;
}; };
}; };
environment.etc."specialisation".text = "hyprland"; environment.etc."specialisation".text = "hyprland";

View File

@@ -0,0 +1,86 @@
{ pkgs, ... }:
let
theme = import ../../../../../../modules/home/desktop/theme/nord.nix;
fontName = "JetBrainsMono NFM";
fontPackage = pkgs.nerd-fonts.jetbrains-mono;
in
{
mjallen = {
desktop.hyprland = {
enable = true;
defaultApps = {
browser = pkgs.firefox;
};
};
programs = {
btop.enable = true;
kitty = {
enable = true;
font = {
name = fontName;
package = fontPackage;
};
};
mako = {
enable = true;
fontName = fontName;
};
nwg-dock.enable = true;
nwg-drawer.enable = true;
nwg-panel = {
enable = true;
defaultApps = {
browser = pkgs.firefox;
};
};
waybar = {
enable = true;
networkInterface = "wlp9s0";
layer = "bottom";
modules-right = [
"tray"
"custom/lights"
"temperature"
"temperature#gpu"
"keyboard-state#capslock"
"keyboard-state#numlock"
"wireplumber#sink"
"wireplumber#source"
"bluetooth"
"network"
"idle_inhibitor"
"clock"
"custom/weather"
];
extraModules = {
"custom/lights" = {
tooltip = false;
exec = "waybar-hass --get_light light.living_room_lights";
interval = "once";
format = "{text}";#"󱉓";
on-click = "waybar-hass --toggle_light light.living_room_lights";
return-type = "json";
};
};
extraModulesStyle = ''
#custom-lights {
color: ${theme.frost.nord8};
background-color: ${theme.polarNight.nord0};
${theme.defaultOpacity}
${theme.borderLeft}
}
#custom-lights:hover {
background: ${theme.polarNight.nord3};
}
'';
};
wlogout.enable = true;
wofi.enable = true;
};
};
}