diff --git a/flakes/hyprland/default.nix b/flakes/hyprland/default.nix
deleted file mode 100644
index 8b96a31..0000000
--- a/flakes/hyprland/default.nix
+++ /dev/null
@@ -1,170 +0,0 @@
-{
- config,
- lib,
- pkgs,
- hyprland,
- hyprlandPkgs,
- ...
-}:
-let
- ccfg = import ../../config.nix;
- cfg_path = [
- ccfg.custom_config_key
- "desktopEnvironment"
- "hyprland"
- ];
- cfg = lib.attrsets.getAttrFromPath cfg_path config;
-in
-with lib;
-{
- options =
- { }
- // lib.attrsets.setAttrByPath cfg_path {
- enable = lib.mkEnableOption "hyprland desktop environment";
- terminalCommand = mkOption {
- type = lib.types.str;
- default = "foot";
- description = "The terminal command to use.";
- };
- extraOptions = mkOption {
- type = lib.types.attrs;
- default = { };
- description = "Extra options for Hyprland configuration.";
- };
- hyprpaperSettings = lib.mkOption {
- type = lib.types.attrs;
- default = { };
- description = "Extra options for hyprpaper configuration.";
- };
- swaync = {
- enable = lib.mkEnableOption "Enable Swaync (notification center for Hyprland)";
- };
- waybar = {
- enable = lib.mkEnableOption "Enable Waybar (status bar for Hyprland)";
- };
- };
-
- config = lib.mkIf cfg.enable {
- # Enable for all users
- home-manager = {
- sharedModules = [
- hyprland.homeManagerModules.default
- ./home_manager
- ];
- };
-
- services.greetd = {
- enable = true;
- vt = 2;
- settings = {
- default_session = {
- command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --cmd '${pkgs.dbus}/bin/dbus-run-session ${hyprlandPkgs.hyprland}/bin/Hyprland'";
- user = "greeter";
- };
- };
- };
-
- # Caps Lock as Escape for console/tty
- console.useXkbConfig = true;
- services.xserver.xkb = {
- layout = "us";
- options = "caps:escape";
- };
-
- environment.systemPackages = with pkgs; [
- wl-clipboard
- wl-clip-persist
- wofi # application launcher
- nemo # file manager (x11)
- # nautilus # file manager
- feh # image viewer (x11)
- # imv # image viewer
- networkmanager # network management
- upower # power management
- brightnessctl # screen/keyboard brightness control
- wireplumber # media session manager
- libgtop # system monitor library
- bluez # Bluetooth support
- power-profiles-daemon # power profiles
- grim
- slurp
- hyprpicker
- grimblast # screenshot tool
- wf-recorder # screen recording tool
- btop # system monitor
- ];
-
- services.blueman.enable = config.hardware.bluetooth.enable;
-
- programs.hyprland = {
- enable = true;
- # xwayland.enable = false;
- # withUWSM = true;
-
- # set the flake package
- package = hyprlandPkgs.hyprland;
- # make sure to also set the portal package, so that they are in sync
- # This is set below now in xdf portal directly so we can also add things like gtk
- # portalPackage = hyprlandPkgs.xdg-desktop-portal-hyprland;
- };
-
- xdg.portal = {
- enable = true;
- extraPortals = lib.mkForce [
- hyprlandPkgs.xdg-desktop-portal-hyprland
- # hyprlandPkgs.xdg-desktop-portal-wlr
- hyprlandPkgs.xdg-desktop-portal-gtk
- ];
- config.common.default = [
- "hyprland"
- # "wlr"
- "gtk"
- ];
- };
-
- # Enable PipeWire + WirePlumber so xdg-desktop-portal can do screencast
- services.pipewire = {
- enable = true;
- # Enable WirePlumber session manager via the pipewire module option
- wireplumber = {
- enable = true;
- };
- };
-
- hardware.graphics = {
- enable = true;
- package = hyprlandPkgs.mesa;
- # if you also want 32-bit support (e.g for Steam)
- # enable32Bit = true;
- package32 = hyprlandPkgs.pkgsi686Linux.mesa;
- };
-
- # Environment variables
- environment.sessionVariables = {
- GTK_THEME = "Adwaita:dark";
- XDG_SESSION_TYPE = "wayland";
- # XDG_CURRENT_DESKTOP = "sway";
- # XDG_SESSION_DESKTOP = "sway";
- # prefer EGL renderer (can be changed back to "auto" if needed)
- WLR_RENDERER = "egl";
-
- # Tell apps to run native wayland
- NIXOS_OZONE_WL = "1";
- ELECTRON_OZONE_PLATFORM_HINT = "wayland";
- ELECTRON_ENABLE_WAYLAND = "1";
- ELECTRON_DISABLE_SANDBOX = "0";
- GDK_BACKEND = "wayland,x11"; # GTK
- QT_QPA_PLATFORM = "wayland;xcb"; # Qt 5/6
- MOZ_ENABLE_WAYLAND = "1"; # Firefox
- SDL_VIDEODRIVER = "wayland"; # SDL apps/games
- CLUTTER_BACKEND = "wayland";
- };
-
- # Qt theming
- qt = {
- enable = true;
- platformTheme = "gtk2";
- style = "adwaita-dark";
- };
- };
-}
diff --git a/flakes/hyprland/flake.nix b/flakes/hyprland/flake.nix
index 82733cc..9fc6a6f 100644
--- a/flakes/hyprland/flake.nix
+++ b/flakes/hyprland/flake.nix
@@ -1,6 +1,6 @@
{
inputs = {
- ragenix.url = "github:yaxitech/ragenix";
+ hyprland.url = "github:hyprwm/Hyprland";
};
outputs =
@@ -20,6 +20,7 @@
{
imports = [
hyprland.nixosModules.default
+ ./hyprland.nix
];
config = {
_module.args = {
diff --git a/flakes/hyprland/home_manager/hyprland.nix b/flakes/hyprland/home_manager/hyprland.nix
index 3d8b6b7..afd313e 100644
--- a/flakes/hyprland/home_manager/hyprland.nix
+++ b/flakes/hyprland/home_manager/hyprland.nix
@@ -4,15 +4,6 @@
hyprlandPkgs,
...
}:
-let
- ccfg = import ../../../config.nix;
- cfg_path = [
- ccfg.custom_config_key
- "desktopEnvironment"
- "hyprland"
- ];
- cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
-in
{
wayland.windowManager.hyprland = {
enable = true;
@@ -21,7 +12,7 @@ in
# hyprspace
# ];
- settings = lib.attrsets.recursiveUpdate {
+ settings = {
# Debug logs enabled when this is uncommented
debug.disable_logs = false;
debug.disable_time = false;
@@ -89,7 +80,7 @@ in
bind = [
# Applications
- "$mainMod, Return, exec, ${cfg.terminalCommand}"
+ "$mainMod, Return, exec, foot"
"$mainMod, Space, exec, pkill wofi || wofi --show drun"
"$mainMod, q, killactive"
"$mainMod SHIFT, escape, exit"
@@ -171,6 +162,6 @@ in
"$mainMod, mouse:273, resizewindow"
];
- } cfg.extraOptions;
+ };
};
}
diff --git a/flakes/hyprland/home_manager/hyprpaper.nix b/flakes/hyprland/home_manager/hyprpaper.nix
index 06d6820..d129096 100644
--- a/flakes/hyprland/home_manager/hyprpaper.nix
+++ b/flakes/hyprland/home_manager/hyprpaper.nix
@@ -1,22 +1,8 @@
{
- osConfig,
- lib,
...
}:
-let
- ccfg = import ../../../config.nix;
- cfg_path = [
- ccfg.custom_config_key
- "desktopEnvironment"
- "hyprland"
- ];
- cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
-in
{
- config = {
- services.hyprpaper = {
- enable = true;
- settings = cfg.hyprpaperSettings;
- };
+ services.hyprpaper = {
+ enable = true;
};
}
diff --git a/flakes/hyprland/home_manager/quickshell.nix b/flakes/hyprland/home_manager/quickshell.nix
index 2f5032c..ac12426 100644
--- a/flakes/hyprland/home_manager/quickshell.nix
+++ b/flakes/hyprland/home_manager/quickshell.nix
@@ -1,19 +1,8 @@
{
- osConfig,
- lib,
pkgs,
upkgs,
...
}:
-let
- ccfg = import ../../../config.nix;
- cfg_path = [
- ccfg.custom_config_key
- "desktopEnvironment"
- "hyprland"
- ];
- cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
-in
{
home.packages = with pkgs; [
upkgs.quickshell
diff --git a/flakes/hyprland/home_manager/swaync.nix b/flakes/hyprland/home_manager/swaync.nix
index b26fa58..6891a76 100644
--- a/flakes/hyprland/home_manager/swaync.nix
+++ b/flakes/hyprland/home_manager/swaync.nix
@@ -1,251 +1,237 @@
{
- lib,
- osConfig,
...
}:
-let
- ccfg = import ../../../config.nix;
- cfg_path = [
- ccfg.custom_config_key
- "desktopEnvironment"
- "hyprland"
- "swaync"
- ];
- cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
-in
{
- config = lib.mkIf cfg.enable {
- services.swaync = {
- enable = true;
- settings = {
- ignore = [
- "com.spotify.Client"
- ];
+ services.swaync = {
+ enable = true;
+ settings = {
+ ignore = [
+ "com.spotify.Client"
+ ];
- positionX = "right";
- positionY = "top";
- layer = "overlay";
- control-center-layer = "top";
- layer-shell = true;
- cssPriority = "application";
+ positionX = "right";
+ positionY = "top";
+ layer = "overlay";
+ control-center-layer = "top";
+ layer-shell = true;
+ cssPriority = "application";
- control-center-margin-top = 0;
- control-center-margin-bottom = 0;
- control-center-margin-right = 0;
- control-center-margin-left = 0;
+ control-center-margin-top = 0;
+ control-center-margin-bottom = 0;
+ control-center-margin-right = 0;
+ control-center-margin-left = 0;
- notification-2fa-action = true;
- notification-inline-replies = false;
- notification-icon-size = 64;
- notification-body-image-height = 100;
- notification-body-image-width = 200;
+ notification-2fa-action = true;
+ notification-inline-replies = false;
+ notification-icon-size = 64;
+ notification-body-image-height = 100;
+ notification-body-image-width = 200;
- timeout = 10;
- timeout-low = 5;
- timeout-critical = 0;
+ timeout = 10;
+ timeout-low = 5;
+ timeout-critical = 0;
- control-center-width = 500;
- control-center-height = 600;
- notification-window-width = 500;
+ control-center-width = 500;
+ control-center-height = 600;
+ notification-window-width = 500;
- keyboard-shortcuts = true;
- image-visibility = "when-available";
- transition-time = 200;
- hide-on-clear = false;
- hide-on-action = true;
- script-fail-notify = true;
+ keyboard-shortcuts = true;
+ image-visibility = "when-available";
+ transition-time = 200;
+ hide-on-clear = false;
+ hide-on-action = true;
+ script-fail-notify = true;
- widgets = [
- "inhibitors"
- "title"
- "dnd"
- "volume"
- "backlight"
- "mpris"
- "buttons-grid#quick"
- "notifications"
- ];
+ widgets = [
+ "inhibitors"
+ "title"
+ "dnd"
+ "volume"
+ "backlight"
+ "mpris"
+ "buttons-grid#quick"
+ "notifications"
+ ];
- # Widget configurations
- widget-config = {
- inhibitors = {
- text = "Inhibitors";
- button-text = "Clear All";
- clear-all-button = true;
- };
- title = {
- text = "Notifications";
- clear-all-button = true;
- button-text = "Clear All";
- };
- dnd.text = "Do Not Disturb";
- mpris = {
- image-size = 96;
- image-radius = 12;
- };
- volume = {
- label = "";
- show-per-app = true;
- };
- backlight = {
- label = "";
- device = "intel_backlight";
- };
- "buttons-grid#quick" = {
- columns = 4; # adjust: 3/4/5
- icon-size = 20; # tweak to taste
- actions = [
- # Power
- {
- label = "";
- tooltip = "Shutdown";
- command = "confirm-action 'systemctl poweroff' 'Shutdown?'";
- }
- {
- label = "";
- tooltip = "Reboot";
- command = "confirm-action 'systemctl reboot' 'Reboot?'";
- }
- {
- label = "";
- tooltip = "Logout";
- command = "confirm-action 'hyprctl dispatch exit' 'Logout?'";
- }
- ];
- };
+ # Widget configurations
+ widget-config = {
+ inhibitors = {
+ text = "Inhibitors";
+ button-text = "Clear All";
+ clear-all-button = true;
+ };
+ title = {
+ text = "Notifications";
+ clear-all-button = true;
+ button-text = "Clear All";
+ };
+ dnd.text = "Do Not Disturb";
+ mpris = {
+ image-size = 96;
+ image-radius = 12;
+ };
+ volume = {
+ label = "";
+ show-per-app = true;
+ };
+ backlight = {
+ label = "";
+ device = "intel_backlight";
+ };
+ "buttons-grid#quick" = {
+ columns = 4; # adjust: 3/4/5
+ icon-size = 20; # tweak to taste
+ actions = [
+ # Power
+ {
+ label = "";
+ tooltip = "Shutdown";
+ command = "confirm-action 'systemctl poweroff' 'Shutdown?'";
+ }
+ {
+ label = "";
+ tooltip = "Reboot";
+ command = "confirm-action 'systemctl reboot' 'Reboot?'";
+ }
+ {
+ label = "";
+ tooltip = "Logout";
+ command = "confirm-action 'hyprctl dispatch exit' 'Logout?'";
+ }
+ ];
};
};
-
- # Custom CSS for the control center
- style = ''
- .control-center {
- background: #1a1b26;
- border: 2px solid #7dcae4;
- border-radius: 12px;
- }
-
- .control-center-list {
- background: transparent;
- }
-
- .control-center .notification-row:focus,
- .control-center .notification-row:hover {
- opacity: 1;
- background: #24283b;
- }
-
- .notification {
- border-radius: 8px;
- margin: 6px 12px;
- box-shadow: 0 0 0 1px rgba(125, 196, 228, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), 0 2px 6px 2px rgba(0, 0, 0, 0.3);
- padding: 0;
- }
-
- /* Widget styling */
- .widget-title {
- margin: 8px;
- font-size: 1.5rem;
- color: #c0caf5;
- }
-
- .widget-dnd {
- margin: 8px;
- font-size: 1.1rem;
- color: #c0caf5;
- }
-
- .widget-dnd > switch {
- font-size: initial;
- border-radius: 8px;
- background: #414868;
- border: 1px solid #7dcae4;
- }
-
- .widget-dnd > switch:checked {
- background: #7dcae4;
- }
-
- .widget-mpris {
- color: #c0caf5;
- background: #24283b;
- padding: 8px;
- margin: 8px;
- border-radius: 8px;
- }
-
- .widget-mpris-player {
- padding: 8px;
- margin: 8px;
- }
-
- .widget-mpris-title {
- font-weight: bold;
- font-size: 1.25rem;
- }
-
- .widget-mpris-subtitle {
- font-size: 1.1rem;
- color: #9ece6a;
- }
-
- .widget-volume {
- background: #24283b;
- padding: 8px;
- margin: 8px;
- border-radius: 8px;
- color: #c0caf5;
- }
-
- .widget-backlight {
- background: #24283b;
- padding: 8px;
- margin: 8px;
- border-radius: 8px;
- color: #c0caf5;
- }
-
- .widget-menubar {
- background: #24283b;
- padding: 8px;
- margin: 8px;
- border-radius: 8px;
- color: #c0caf5;
- }
-
- .widget-menubar .menu-item button {
- background: #1f2335;
- color: #c0caf5;
- border-radius: 8px;
- padding: 6px 10px;
- margin: 4px;
- border: 1px solid #2e3440;
- font-family: "JetBrainsMonoNL Nerd Font";
- }
-
- .widget-menubar .menu-item button:hover {
- background: #414868;
- border-color: #7dcae4;
- }
-
- .topbar-buttons button {
- border: none;
- background: transparent;
- color: #c0caf5;
- font-size: 1.1rem;
- border-radius: 8px;
- margin: 0 4px;
- padding: 8px;
- }
-
- .topbar-buttons button:hover {
- background: #414868;
- }
-
- .topbar-buttons button:active {
- background: #7dcae4;
- color: #1a1b26;
- }
- '';
};
+
+ # Custom CSS for the control center
+ style = ''
+ .control-center {
+ background: #1a1b26;
+ border: 2px solid #7dcae4;
+ border-radius: 12px;
+ }
+
+ .control-center-list {
+ background: transparent;
+ }
+
+ .control-center .notification-row:focus,
+ .control-center .notification-row:hover {
+ opacity: 1;
+ background: #24283b;
+ }
+
+ .notification {
+ border-radius: 8px;
+ margin: 6px 12px;
+ box-shadow: 0 0 0 1px rgba(125, 196, 228, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), 0 2px 6px 2px rgba(0, 0, 0, 0.3);
+ padding: 0;
+ }
+
+ /* Widget styling */
+ .widget-title {
+ margin: 8px;
+ font-size: 1.5rem;
+ color: #c0caf5;
+ }
+
+ .widget-dnd {
+ margin: 8px;
+ font-size: 1.1rem;
+ color: #c0caf5;
+ }
+
+ .widget-dnd > switch {
+ font-size: initial;
+ border-radius: 8px;
+ background: #414868;
+ border: 1px solid #7dcae4;
+ }
+
+ .widget-dnd > switch:checked {
+ background: #7dcae4;
+ }
+
+ .widget-mpris {
+ color: #c0caf5;
+ background: #24283b;
+ padding: 8px;
+ margin: 8px;
+ border-radius: 8px;
+ }
+
+ .widget-mpris-player {
+ padding: 8px;
+ margin: 8px;
+ }
+
+ .widget-mpris-title {
+ font-weight: bold;
+ font-size: 1.25rem;
+ }
+
+ .widget-mpris-subtitle {
+ font-size: 1.1rem;
+ color: #9ece6a;
+ }
+
+ .widget-volume {
+ background: #24283b;
+ padding: 8px;
+ margin: 8px;
+ border-radius: 8px;
+ color: #c0caf5;
+ }
+
+ .widget-backlight {
+ background: #24283b;
+ padding: 8px;
+ margin: 8px;
+ border-radius: 8px;
+ color: #c0caf5;
+ }
+
+ .widget-menubar {
+ background: #24283b;
+ padding: 8px;
+ margin: 8px;
+ border-radius: 8px;
+ color: #c0caf5;
+ }
+
+ .widget-menubar .menu-item button {
+ background: #1f2335;
+ color: #c0caf5;
+ border-radius: 8px;
+ padding: 6px 10px;
+ margin: 4px;
+ border: 1px solid #2e3440;
+ font-family: "JetBrainsMonoNL Nerd Font";
+ }
+
+ .widget-menubar .menu-item button:hover {
+ background: #414868;
+ border-color: #7dcae4;
+ }
+
+ .topbar-buttons button {
+ border: none;
+ background: transparent;
+ color: #c0caf5;
+ font-size: 1.1rem;
+ border-radius: 8px;
+ margin: 0 4px;
+ padding: 8px;
+ }
+
+ .topbar-buttons button:hover {
+ background: #414868;
+ }
+
+ .topbar-buttons button:active {
+ background: #7dcae4;
+ color: #1a1b26;
+ }
+ '';
};
}
diff --git a/flakes/hyprland/home_manager/template.nix b/flakes/hyprland/home_manager/template.nix
deleted file mode 100644
index 905d5e4..0000000
--- a/flakes/hyprland/home_manager/template.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- osConfig,
- lib,
- pkgs,
- ...
-}:
-let
- ccfg = import ../../../config.nix;
- cfg_path = [
- ccfg.custom_config_key
- "desktopEnvironment"
- "hyprland"
- ];
- cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
-in
-{
-
-}
diff --git a/flakes/hyprland/home_manager/waybar.nix b/flakes/hyprland/home_manager/waybar.nix
index 66f3349..8ceef8c 100644
--- a/flakes/hyprland/home_manager/waybar.nix
+++ b/flakes/hyprland/home_manager/waybar.nix
@@ -1,258 +1,245 @@
-{ lib, osConfig, ... }:
-let
- ccfg = import ../../../config.nix;
- cfg_path = [
- ccfg.custom_config_key
- "desktopEnvironment"
- "hyprland"
- "waybar"
- ];
- cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
-in
+{ lib, ... }:
{
- config = lib.mkIf cfg.enable {
+ programs.waybar = {
+ enable = true;
+ systemd.enable = true;
+ settings = {
+ mainBar = {
+ layer = "top";
+ position = "top";
+ height = 28;
+ spacing = 6;
+ margin-top = 0;
+ margin-bottom = 0;
+ margin-left = 10;
+ margin-right = 10;
- programs.waybar = {
- enable = true;
- systemd.enable = true;
- settings = {
- mainBar = {
- layer = "top";
- position = "top";
- height = 28;
- spacing = 6;
- margin-top = 0;
- margin-bottom = 0;
- margin-left = 10;
- margin-right = 10;
+ modules-left = [
+ "hyprland/workspaces"
+ ];
+ modules-center = [
+ "clock"
+ "temperature"
+ "cpu"
+ "memory"
+ "disk"
+ ];
+ modules-right = [
+ "battery"
+ "battery#bat2"
+ "pulseaudio"
+ "network"
+ "bluetooth"
+ "power-profiles-daemon"
+ "backlight"
+ "custom/notifications"
+ "tray"
+ "custom/power"
+ ];
- modules-left = [
- "hyprland/workspaces"
- ];
- modules-center = [
- "clock"
- "temperature"
- "cpu"
- "memory"
- "disk"
- ];
- modules-right = [
- "battery"
- "battery#bat2"
- "pulseaudio"
- "network"
- "bluetooth"
- "power-profiles-daemon"
- "backlight"
- "custom/notifications"
- "tray"
- "custom/power"
- ];
-
- "hyprland/workspaces" = {
- format = "{icon}";
- format-icons = {
- "1" = "一";
- "2" = "二";
- "3" = "三";
- "4" = "四";
- "5" = "五";
- "6" = "六";
- "7" = "七";
- "8" = "八";
- "9" = "九";
- "10" = "十";
- "11" = "十一";
- "12" = "十二";
- "13" = "十三";
- "14" = "十四";
- "15" = "十五";
- "16" = "十六";
- "17" = "十七";
- "18" = "十八";
- "19" = "十九";
- "20" = "二十";
- };
- disable-scroll = false;
+ "hyprland/workspaces" = {
+ format = "{icon}";
+ format-icons = {
+ "1" = "一";
+ "2" = "二";
+ "3" = "三";
+ "4" = "四";
+ "5" = "五";
+ "6" = "六";
+ "7" = "七";
+ "8" = "八";
+ "9" = "九";
+ "10" = "十";
+ "11" = "十一";
+ "12" = "十二";
+ "13" = "十三";
+ "14" = "十四";
+ "15" = "十五";
+ "16" = "十六";
+ "17" = "十七";
+ "18" = "十八";
+ "19" = "十九";
+ "20" = "二十";
};
-
- # CENTER
- clock = {
- format = "{:%b %d, %H:%M}";
- tooltip-format = "{:%Y %B}\n{calendar}";
- };
-
- temperature = {
- thermal-zone = 2;
- hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
- critical-threshold = 80;
- format-critical = " {temperatureC}°C";
- format = " {temperatureC}°C";
- };
-
- cpu = {
- format = " {usage}%";
- tooltip = true;
- on-click = "btop";
- };
-
- memory = {
- format = " {}%";
- on-click = "btop";
- };
-
- disk = {
- interval = 30;
- format = " {percentage_used}%";
- path = "/";
- on-click = "btop";
- };
-
- # RIGHT
- "battery" = {
- "states" = {
- # "good"= 95;
- "warning" = 30;
- "critical" = 15;
- };
- "format" = "{capacity}% {icon}";
- "format-full" = "{capacity}% {icon}";
- "format-charging" = "{capacity}% ";
- "format-plugged" = "{capacity}% ";
- "format-alt" = "{time} {icon}";
- # "format-good"= ""; // An empty format will hide the module
- # "format-full"= "";
- "format-icons" = [
- ""
- ""
- ""
- ""
- ""
- ];
- };
- "battery#bat2" = {
- "bat" = "BAT2";
- };
-
- pulseaudio = {
- format = "{icon} {volume}%";
- format-bluetooth = " {volume}%";
- format-bluetooth-muted = " ";
- format-muted = " ";
- format-source = " {volume}%";
- format-source-muted = " ";
- format-icons = {
- headphone = "";
- hands-free = "";
- headset = "";
- phone = "";
- portable = "";
- car = "";
- default = [
- ""
- ""
- ""
- ];
- };
- scroll-step = 5;
- on-click = "pavucontrol";
- on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
- };
-
- network = {
- format-wifi = " {essid} ({signalStrength}%)";
- format-ethernet = " {ipaddr}/{cidr}";
- tooltip-format = "{ifname} via {gwaddr} ";
- format-linked = " {ifname} (No IP)";
- format-disconnected = " Disconnected";
- # on-click = "wofi-wifi-menu";
- # on-click-right = "nmcli radio wifi toggle";
- };
-
- bluetooth = {
- format = " {status}";
- format-connected = " {device_alias}";
- format-connected-battery = " {device_alias} {device_battery_percentage}%";
- tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
- tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
- tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
- tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
- # on-click = "wofi-bluetooth-menu";
- # on-click-right = "bluetoothctl power toggle";
- };
-
- "power-profiles-daemon" = {
- format = "{icon}";
- "tooltip-format" = "Power profile: {profile}\nDriver: {driver}";
- tooltip = true;
- "format-icons" = {
- default = "";
- performance = "";
- balanced = "";
- "power-saver" = "";
- };
- };
-
- backlight = {
- format = "{percent}% {icon}";
- "format-icons" = [
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ];
- };
-
- "custom/notifications" = {
- format = "{icon} {}";
- format-icons = {
- notification = "";
- none = "";
- dnd-notification = "";
- dnd-none = "";
- inhibited-notification = "";
- inhibited-none = "";
- dnd-inhibited-notification = "";
- dnd-inhibited-none = "";
- };
- return-type = "json";
- exec-if = "which swaync-client";
- exec = "swaync-client -swb";
- on-click = "swaync-client -t -sw";
- on-click-right = "swaync-client -d -sw";
- escape = true;
- tooltip = false;
- };
-
- "sway/language" = {
- format = "{}";
- };
-
- "tray" = {
- "spacing" = 10;
- };
-
- "custom/power" = {
- format = "⏻ ";
- tooltip = false;
- menu = "on-click";
- "menu-file" = ./waybar/power_menu.xml;
- "menu-actions" = {
- shutdown = "shutdown 0";
- reboot = "reboot";
- logout = "loginctl terminate-session $(loginctl list-sessions | grep seat0 | awk '{print $1}')";
- };
- };
-
+ disable-scroll = false;
};
- };
- style = builtins.readFile ./waybar/waybar.css;
+ # CENTER
+ clock = {
+ format = "{:%b %d, %H:%M}";
+ tooltip-format = "{:%Y %B}\n{calendar}";
+ };
+
+ temperature = {
+ thermal-zone = 2;
+ hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
+ critical-threshold = 80;
+ format-critical = " {temperatureC}°C";
+ format = " {temperatureC}°C";
+ };
+
+ cpu = {
+ format = " {usage}%";
+ tooltip = true;
+ on-click = "btop";
+ };
+
+ memory = {
+ format = " {}%";
+ on-click = "btop";
+ };
+
+ disk = {
+ interval = 30;
+ format = " {percentage_used}%";
+ path = "/";
+ on-click = "btop";
+ };
+
+ # RIGHT
+ "battery" = {
+ "states" = {
+ # "good"= 95;
+ "warning" = 30;
+ "critical" = 15;
+ };
+ "format" = "{capacity}% {icon}";
+ "format-full" = "{capacity}% {icon}";
+ "format-charging" = "{capacity}% ";
+ "format-plugged" = "{capacity}% ";
+ "format-alt" = "{time} {icon}";
+ # "format-good"= ""; // An empty format will hide the module
+ # "format-full"= "";
+ "format-icons" = [
+ ""
+ ""
+ ""
+ ""
+ ""
+ ];
+ };
+ "battery#bat2" = {
+ "bat" = "BAT2";
+ };
+
+ pulseaudio = {
+ format = "{icon} {volume}%";
+ format-bluetooth = " {volume}%";
+ format-bluetooth-muted = " ";
+ format-muted = " ";
+ format-source = " {volume}%";
+ format-source-muted = " ";
+ format-icons = {
+ headphone = "";
+ hands-free = "";
+ headset = "";
+ phone = "";
+ portable = "";
+ car = "";
+ default = [
+ ""
+ ""
+ ""
+ ];
+ };
+ scroll-step = 5;
+ on-click = "pavucontrol";
+ on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
+ };
+
+ network = {
+ format-wifi = " {essid} ({signalStrength}%)";
+ format-ethernet = " {ipaddr}/{cidr}";
+ tooltip-format = "{ifname} via {gwaddr} ";
+ format-linked = " {ifname} (No IP)";
+ format-disconnected = " Disconnected";
+ # on-click = "wofi-wifi-menu";
+ # on-click-right = "nmcli radio wifi toggle";
+ };
+
+ bluetooth = {
+ format = " {status}";
+ format-connected = " {device_alias}";
+ format-connected-battery = " {device_alias} {device_battery_percentage}%";
+ tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
+ tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
+ tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
+ tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
+ # on-click = "wofi-bluetooth-menu";
+ # on-click-right = "bluetoothctl power toggle";
+ };
+
+ "power-profiles-daemon" = {
+ format = "{icon}";
+ "tooltip-format" = "Power profile: {profile}\nDriver: {driver}";
+ tooltip = true;
+ "format-icons" = {
+ default = "";
+ performance = "";
+ balanced = "";
+ "power-saver" = "";
+ };
+ };
+
+ backlight = {
+ format = "{percent}% {icon}";
+ "format-icons" = [
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ];
+ };
+
+ "custom/notifications" = {
+ format = "{icon} {}";
+ format-icons = {
+ notification = "";
+ none = "";
+ dnd-notification = "";
+ dnd-none = "";
+ inhibited-notification = "";
+ inhibited-none = "";
+ dnd-inhibited-notification = "";
+ dnd-inhibited-none = "";
+ };
+ return-type = "json";
+ exec-if = "which swaync-client";
+ exec = "swaync-client -swb";
+ on-click = "swaync-client -t -sw";
+ on-click-right = "swaync-client -d -sw";
+ escape = true;
+ tooltip = false;
+ };
+
+ "sway/language" = {
+ format = "{}";
+ };
+
+ "tray" = {
+ "spacing" = 10;
+ };
+
+ "custom/power" = {
+ format = "⏻ ";
+ tooltip = false;
+ menu = "on-click";
+ "menu-file" = ./waybar/power_menu.xml;
+ "menu-actions" = {
+ shutdown = "shutdown 0";
+ reboot = "reboot";
+ logout = "loginctl terminate-session $(loginctl list-sessions | grep seat0 | awk '{print $1}')";
+ };
+ };
+
+ };
};
+
+ style = builtins.readFile ./waybar/waybar.css;
};
}
diff --git a/flakes/hyprland/hyprland.nix b/flakes/hyprland/hyprland.nix
new file mode 100644
index 0000000..88e9a42
--- /dev/null
+++ b/flakes/hyprland/hyprland.nix
@@ -0,0 +1,132 @@
+{
+ config,
+ lib,
+ pkgs,
+ hyprland,
+ hyprlandPkgs,
+ ...
+}:
+with lib;
+{
+ # Enable for all users
+ home-manager = {
+ sharedModules = [
+ hyprland.homeManagerModules.default
+ ./home_manager
+ ];
+ };
+
+ services.greetd = {
+ enable = true;
+ vt = 2;
+ settings = {
+ default_session = {
+ command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --cmd '${pkgs.dbus}/bin/dbus-run-session ${hyprlandPkgs.hyprland}/bin/Hyprland'";
+ user = "greeter";
+ };
+ };
+ };
+
+ # Caps Lock as Escape for console/tty
+ console.useXkbConfig = true;
+ services.xserver.xkb = {
+ layout = "us";
+ options = "caps:escape";
+ };
+
+ environment.systemPackages = with pkgs; [
+ wl-clipboard
+ wl-clip-persist
+ wofi # application launcher
+ nemo # file manager (x11)
+ # nautilus # file manager
+ feh # image viewer (x11)
+ # imv # image viewer
+ networkmanager # network management
+ upower # power management
+ brightnessctl # screen/keyboard brightness control
+ wireplumber # media session manager
+ libgtop # system monitor library
+ bluez # Bluetooth support
+ power-profiles-daemon # power profiles
+ grim
+ slurp
+ hyprpicker
+ grimblast # screenshot tool
+ wf-recorder # screen recording tool
+ btop # system monitor
+ ];
+
+ services.blueman.enable = config.hardware.bluetooth.enable;
+
+ programs.hyprland = {
+ enable = true;
+ # xwayland.enable = false;
+ # withUWSM = true;
+
+ # set the flake package
+ package = hyprlandPkgs.hyprland;
+ # make sure to also set the portal package, so that they are in sync
+ # This is set below now in xdf portal directly so we can also add things like gtk
+ # portalPackage = hyprlandPkgs.xdg-desktop-portal-hyprland;
+ };
+
+ xdg.portal = {
+ enable = true;
+ extraPortals = lib.mkForce [
+ hyprlandPkgs.xdg-desktop-portal-hyprland
+ # hyprlandPkgs.xdg-desktop-portal-wlr
+ hyprlandPkgs.xdg-desktop-portal-gtk
+ ];
+ config.common.default = [
+ "hyprland"
+ # "wlr"
+ "gtk"
+ ];
+ };
+
+ # Enable PipeWire + WirePlumber so xdg-desktop-portal can do screencast
+ services.pipewire = {
+ enable = true;
+ # Enable WirePlumber session manager via the pipewire module option
+ wireplumber = {
+ enable = true;
+ };
+ };
+
+ hardware.graphics = {
+ enable = true;
+ package = hyprlandPkgs.mesa;
+ # if you also want 32-bit support (e.g for Steam)
+ # enable32Bit = true;
+ package32 = hyprlandPkgs.pkgsi686Linux.mesa;
+ };
+
+ # Environment variables
+ environment.sessionVariables = {
+ GTK_THEME = "Adwaita:dark";
+ XDG_SESSION_TYPE = "wayland";
+ # XDG_CURRENT_DESKTOP = "sway";
+ # XDG_SESSION_DESKTOP = "sway";
+ # prefer EGL renderer (can be changed back to "auto" if needed)
+ WLR_RENDERER = "egl";
+
+ # Tell apps to run native wayland
+ NIXOS_OZONE_WL = "1";
+ ELECTRON_OZONE_PLATFORM_HINT = "wayland";
+ ELECTRON_ENABLE_WAYLAND = "1";
+ ELECTRON_DISABLE_SANDBOX = "0";
+ GDK_BACKEND = "wayland,x11"; # GTK
+ QT_QPA_PLATFORM = "wayland;xcb"; # Qt 5/6
+ MOZ_ENABLE_WAYLAND = "1"; # Firefox
+ SDL_VIDEODRIVER = "wayland"; # SDL apps/games
+ CLUTTER_BACKEND = "wayland";
+ };
+
+ # Qt theming
+ qt = {
+ enable = true;
+ platformTheme = "gtk2";
+ style = "adwaita-dark";
+ };
+}
diff --git a/hosts/lio/configuration.nix b/hosts/lio/configuration.nix
index 1fd52c5..cb8f9d5 100644
--- a/hosts/lio/configuration.nix
+++ b/hosts/lio/configuration.nix
@@ -1,5 +1,4 @@
{
- upkgs,
pkgs,
...
}:
@@ -46,11 +45,6 @@
nodejs_24
foot
vlc
- upkgs.ladybird
google-chrome
- trilium-desktop
- dig
- traceroute
- # opensnitch-ui
];
}
diff --git a/hosts/oren/configuration.nix b/hosts/oren/configuration.nix
index 268baf6..9bcccd8 100644
--- a/hosts/oren/configuration.nix
+++ b/hosts/oren/configuration.nix
@@ -5,7 +5,6 @@
...
}:
{
- system.stateVersion = "24.11"; # Did you read the comment?
environment.systemPackages = with pkgs; [
# [Laptop] Battery status
acpi
diff --git a/hosts/oren/flake.nix b/hosts/oren/flake.nix
index 488711e..22385c5 100644
--- a/hosts/oren/flake.nix
+++ b/hosts/oren/flake.nix
@@ -1,11 +1,17 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
- nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
+ home-manager.url = "github:rycee/home-manager/release-25.05";
- # Use relative to get current version for testing
- # common.url = "path:../../common";
- common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles";
+ # Use relative to get current version for testin
+ # common.url = "path:../../flakes/common";
+ common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/common";
+ # secrets.url = "path:../../flakes/secrets";
+ secrets.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/secrets";
+ # flatpaks.url = "path:../../flakes/flatpaks";
+ flatpaks.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/flatpaks";
+ hyprland.url = "path:../../flakes/hyprland";
+ # hyprland.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/hyprland";
ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim";
};
@@ -13,30 +19,123 @@
outputs =
{
nixpkgs,
- nixpkgs-unstable,
-
+ home-manager,
common,
+ secrets,
+ flatpaks,
+ hyprland,
ros_neovim,
...
}:
let
configuration_name = "oren";
+ system = "x86_64-linux";
+ stateVersion = "25.05";
+ primaryUser = "josh";
lib = nixpkgs.lib;
in
{
nixosConfigurations = {
"${configuration_name}" = (
lib.nixosSystem {
+ inherit system;
modules = [
- common.nixosModules.default
+ home-manager.nixosModules.default
+
+ secrets.nixosModules.default
ros_neovim.nixosModules.default
+ flatpaks.nixosModules.default
+ hyprland.nixosModules.default
+
+ common.nixosModules.essentials
+ common.nixosModules.git
+ common.nixosModules.tmux
+ common.nixosModules.boot_systemd
+ common.nixosModules.hardening
+ common.nixosModules.jetbrains_font
+ common.nixosModules.nix_options
+ common.nixosModules.podman
+ common.nixosModules.tailnet
+ common.nixosModules.timezone_auto
+ common.nixosModules.tty_caps_esc
+ common.nixosModules.zsh
+
./configuration.nix
./hardware-configuration.nix
# ./sway_customizations.nix
./hyprland_customizations.nix
(
{ config, pkgs, ... }:
- {
+ rec {
+ # Home Manager
+ home-manager = {
+ useUserPackages = true;
+ useGlobalPkgs = true;
+ backupFileExtension = "bak";
+ # add all normal users to home manager so it applies to them
+ users = lib.mapAttrs (name: user: {
+ home.stateVersion = stateVersion;
+ programs.home-manager.enable = true;
+ }) (lib.filterAttrs (name: user: user.isNormalUser or false) users.users);
+
+ sharedModules = [
+ common.homeManagerModules.tmux
+ common.homeManagerModules.atuin
+ common.homeManagerModules.direnv
+ common.homeManagerModules.foot
+ common.homeManagerModules.git
+ common.homeManagerModules.postgres_cli_options
+ common.homeManagerModules.ssh
+ common.homeManagerModules.starship
+ common.homeManagerModules.zoxide
+ common.homeManagerModules.zsh
+ ];
+ };
+
+ # System configuration
+ system.stateVersion = stateVersion;
+ networking.hostName = configuration_name;
+ programs.nh.flake = "/home/${primaryUser}/.config/nixos-config/hosts/${config.networking.hostName}";
+ nixpkgs.config.allowUnfree = true;
+ users.users = {
+ "${primaryUser}" = {
+ isNormalUser = true;
+ initialPassword = "password1";
+ extraGroups = [
+ "wheel"
+ "networkmanager"
+ "video"
+ "input"
+ ];
+ openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILMzgAe4od9K4EsvH2g7xjNU7hGoJiFJlYcvB0BoDCvn nix2oren"
+ ];
+ };
+ };
+
+ environment.systemPackages = with pkgs; [
+ lua
+ qdirstat
+ ffmpeg-full
+ vlc
+ google-chrome
+
+ nodejs_24
+ ttyd
+ appimage-run
+ ];
+
+ services.flatpak.packages = [
+ "org.signal.Signal"
+ "dev.vencord.Vesktop"
+ "md.obsidian.Obsidian"
+ "com.spotify.Client"
+ "com.bitwarden.desktop"
+ "org.openscad.OpenSCAD"
+ "im.riot.Riot"
+ "com.rustdesk.RustDesk"
+ ];
+
services.devmon.enable = true;
services.gvfs.enable = true;
services.udisks2.enable = true;
@@ -68,98 +167,6 @@
"ollamal" = "ollama list | tail -n +2 | awk '{print $1}' | fzf --ansi --preview 'ollama show {}'";
};
-
- environment.systemPackages = with pkgs; [
- lua
- qdirstat
- ffmpeg-full
- appimage-run
- nodejs_24
- foot
- ttyd
- ];
-
- services.ollama = {
- enable = true;
- package = nixpkgs-unstable.legacyPackages.x86_64-linux.ollama;
- acceleration = "rocm"; # cuda for NVIDA; rocm for amd; false/default for neither
- };
-
- ringofstorms_common = {
- systemName = configuration_name;
- boot.systemd.enable = true;
- general = {
- enableSleep = true;
- reporting.enable = true;
- };
- secrets.enable = true;
- desktopEnvironment.hyprland = {
- enable = true;
- waybar.enable = true;
- swaync.enable = true;
- };
- programs = {
- qFlipper.enable = true;
- rustDev.enable = true;
- uhkAgent.enable = true;
- tailnet.enable = true;
- ssh.enable = true;
- podman.enable = true;
- virt-manager.enable = true;
- flatpaks = {
- enable = true;
- packages = [
- "org.signal.Signal"
- "dev.vencord.Vesktop"
- "md.obsidian.Obsidian"
- "com.spotify.Client"
- "org.videolan.VLC"
- "com.bitwarden.desktop"
- "im.riot.Riot"
- "com.rustdesk.RustDesk"
- "com.google.Chrome"
- ];
- };
- };
- users = {
- # Users are all normal users and default password is password1
- admins = [ "josh" ]; # First admin is also the primary user owning nix config
- users = {
- josh = {
- openssh.authorizedKeys.keys = [
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILMzgAe4od9K4EsvH2g7xjNU7hGoJiFJlYcvB0BoDCvn nix2oren"
- ];
- extraGroups = [
- "networkmanager"
- "video"
- "input"
- ];
- shell = pkgs.zsh;
- };
- };
- };
- homeManager = {
- users = {
- josh = {
- imports = with common.homeManagerModules; [
- zsh
- ssh
- starship
- zoxide
- tmux
- atuin
- kitty
- foot
- direnv
- git
- nix_deprecations
- obs
- postgres
- ];
- };
- };
- };
- };
}
)
];
diff --git a/hosts/oren/hyprland_customizations.nix b/hosts/oren/hyprland_customizations.nix
index 9c5d114..a360176 100644
--- a/hosts/oren/hyprland_customizations.nix
+++ b/hosts/oren/hyprland_customizations.nix
@@ -1,4 +1,4 @@
-{ lib, pkgs, ... }:
+{ ... }:
let
hyprlandExtraOptions = {
exec-once = [
@@ -11,20 +11,23 @@ let
};
in
{
- options = { };
+ home-manager.sharedModules = [
+ (
+ { ... }:
+ {
+ wayland.windowManager.hyprland.settings = hyprlandExtraOptions;
+ services.hyprpaper.settings = {
+ mode = "fill"; # Wallpaper display mode: fill, fit, stretch, center, tile
- config = {
- ringofstorms_common.desktopEnvironment.hyprland.extraOptions = hyprlandExtraOptions;
- ringofstorms_common.desktopEnvironment.hyprland.hyprpaperSettings = {
- mode = "fill"; # Wallpaper display mode: fill, fit, stretch, center, tile
+ preload = [
+ "${../_shared_assets/wallpapers/pixel_neon.png}"
+ ];
- preload = [
- "${../_shared_assets/wallpapers/pixel_neon.png}"
- ];
-
- wallpaper = [
- "eDP-1,${../_shared_assets/wallpapers/pixel_neon.png}"
- ];
- };
- };
+ wallpaper = [
+ "eDP-1,${../_shared_assets/wallpapers/pixel_neon.png}"
+ ];
+ };
+ }
+ )
+ ];
}
diff --git a/hosts/template.nix b/hosts/template.nix
index ab57606..fba7b68 100644
--- a/hosts/template.nix
+++ b/hosts/template.nix
@@ -47,6 +47,7 @@
common.nixosModules.git
common.nixosModules.tmux
common.nixosModules.boot_systemd
+ common.nixosModules.de_sway
common.nixosModules.hardening
common.nixosModules.jetbrains_font
common.nixosModules.nix_options
@@ -105,11 +106,19 @@
"input"
];
openssh.authorizedKeys.keys = [
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJN2nsLmAlF6zj5dEBkNSJaqcCya+aB6I0imY8Q5Ew0S nix2lio"
+ "REPLACE"
];
};
};
+ environment.systemPackages = with pkgs; [
+ lua
+ qdirstat
+ ffmpeg-full
+ vlc
+ google-chrome
+ ];
+
services.flatpak.packages = [
"org.signal.Signal"
"dev.vencord.Vesktop"