Compare commits

...

2 Commits

Author SHA1 Message Date
668929c120 i3 feature 2026-08-01 20:20:19 +01:00
7be2e897d4 made hyprland default session for display manager 2026-08-01 20:20:13 +01:00
3 changed files with 107 additions and 1 deletions

View File

@@ -14,6 +14,7 @@
audio
systemTheme
];
runtimePkgs = self'.packages.hyprland.passthru.runtimePackages;
lib = pkgs.lib;
@@ -27,12 +28,16 @@
enable = true;
package = self'.packages.hyprland;
};
services.displayManager.defaultSession = "hyprland";
services.xserver.enable = true;
security.polkit.enable = true;
environment.systemPackages = with pkgs; [
hyprlock
gsettings-desktop-schemas
];
system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] ''
mkdir -p /run/hypr-runtime-env/bin
${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: pkg: ''
@@ -40,6 +45,7 @@
'')
runtimePkgs)}
'';
system.activationScripts.hyprConfig = lib.stringAfter ["specialfs"] ''
mkdir -p /run/hypr/config
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config
@@ -54,7 +60,7 @@
packages = {
hyprland = inputs'.hyprland.packages.default.override {
flags."--config" = "/run/hypr/config/hyprland.lua";
env."MODULES_ROOT" = "/run/hypr/config/modules";
env."MODULES_ROOT" = "/run/hypr/config/modules";
runtimePackages =
inputs.hyprland.lib.defaultRuntimePkgs.${system}
// {

View File

@@ -0,0 +1,60 @@
set $mod Mod4
set $term kitty
set $menu dmenu_run
exec_always --no-startup-id xrandr --output DP-1 --mode 1920x1080 --rate 60 --pos 0x0 --rotate normal --output DP-2 --mode 1920x1080 --rate 60 --pos 1920x0 --rotate normal --output HDMI-A-1 --mode 1920x1080 --rate 60 --pos -1920x0 --rotate normal
font pango:FiraMono Nerd Font 10
workspace 1 output DP-1
workspace 2 output HDMI-A-1
workspace 3 output DP-2
# Window functions
bindsym $mod+BackSpace kill
bindsym $mod+b fullscreen toggle
# Apps
bindsym $mod+Return exec --no-startup-id $term
bindsym $mod+d exec --no-startup-id $menu
bindsym $mod+f exec --no-startup-id firefox
bindsym $mod+s exec --no-startup-id nemo
# Focus windows
bindsym $mod+k focus up
bindsym $mod+j focus down
bindsym $mod+h focus left
bindsym $mod+l focus right
# Move windows
bindsym $mod+Shift+h move left
bindsym $mod+Shift+l move right
bindsym $mod+Shift+k move up
bindsym $mod+Shift+j move down
# Workspaces
bindsym $mod+q workspace number 1
bindsym $mod+w workspace number 2
bindsym $mod+e workspace number 3
bindsym $mod+r workspace number 4
bindsym $mod+t workspace number 5
bindsym $mod+y workspace number 6
bindsym $mod+u workspace number 7
bindsym $mod+i workspace number 8
bindsym $mod+o workspace number 9
bindsym $mod+p workspace number 10
# Move container to workspace
bindsym $mod+Shift+q move container to workspace number 1
bindsym $mod+Shift+w move container to workspace number 2
bindsym $mod+Shift+e move container to workspace number 3
bindsym $mod+Shift+r move container to workspace number 4
bindsym $mod+Shift+t move container to workspace number 5
bindsym $mod+Shift+y move container to workspace number 6
bindsym $mod+Shift+u move container to workspace number 7
bindsym $mod+Shift+i move container to workspace number 8
bindsym $mod+Shift+o move container to workspace number 9
bindsym $mod+Shift+p move container to workspace number 10
# Logout menu
bindsym $mod+Shift+a exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"

View File

@@ -0,0 +1,40 @@
{
self,
inputs,
moduleWithSystem,
...
}: {
flake.nixosModules.i3 = moduleWithSystem ({
pkgs,
self',
inputs',
...
}: {
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
};
windowManager.i3 = {
enable = true;
package = self'.packages.i3;
extraPackages = with pkgs; [
dmenu
i3status
xinit
];
};
};
});
perSystem = {pkgs, ...}: {
packages.i3 = inputs.wrappers.lib.wrapPackage ({...}: {
inherit pkgs;
package = pkgs.i3;
flags = {
"-c" = ./config;
};
});
};
}