try and failed at i3 again

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-10-25 22:42:47 -05:00
parent 4c9e388d30
commit d81ea35db9
7 changed files with 204 additions and 15 deletions

View file

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./i3.nix ];
}

View file

@ -0,0 +1,94 @@
{ pkgs, ... }:
{
xsession.enable = true;
xsession.windowManager.i3 = {
enable = true;
package = pkgs.i3;
extraConfig = ''
focus_follows_mouse no
default_border pixel 1
default_floating_border pixel 1
floating_modifier Mod4
'';
config = rec {
modifier = "Mod4";
terminal = "kitty";
menu = "rofi -show drun";
focus.followMouse = false;
gaps = {
inner = 2;
outer = 5;
smartBorders = "on";
};
keybindings = {
"${modifier}+return" = "exec ${terminal}";
"${modifier}+space" = "exec pkill rofi || rofi -show drun";
"${modifier}+q" = "kill";
"${modifier}+shift+Escape" = "exit";
"${modifier}+shift+q" = "exec i3lock";
"${modifier}+f" = "floating toggle";
"${modifier}+h" = "focus left";
"${modifier}+l" = "focus right";
"${modifier}+k" = "focus up";
"${modifier}+j" = "focus down";
"${modifier}+1" = "workspace number 1";
"${modifier}+n" = "workspace number 1";
"${modifier}+2" = "workspace number 2";
"${modifier}+m" = "workspace number 2";
"${modifier}+3" = "workspace number 3";
"${modifier}+comma" = "workspace number 3";
"${modifier}+4" = "workspace number 4";
"${modifier}+period" = "workspace number 4";
"${modifier}+5" = "workspace number 5";
"${modifier}+slash" = "workspace number 5";
"${modifier}+6" = "workspace number 6";
"${modifier}+7" = "workspace number 7";
"${modifier}+8" = "workspace number 8";
"${modifier}+9" = "workspace number 9";
"${modifier}+0" = "workspace number 10";
"${modifier}+shift+h" = "move left";
"${modifier}+shift+l" = "move right";
"${modifier}+shift+k" = "move up";
"${modifier}+shift+j" = "move down";
"${modifier}+shift+1" = "move container to workspace number 1";
"${modifier}+shift+n" = "move container to workspace number 1";
"${modifier}+shift+2" = "move container to workspace number 2";
"${modifier}+shift+m" = "move container to workspace number 2";
"${modifier}+shift+3" = "move container to workspace number 3";
"${modifier}+shift+comma" = "move container to workspace number 3";
"${modifier}+shift+4" = "move container to workspace number 4";
"${modifier}+shift+period" = "move container to workspace number 4";
"${modifier}+shift+5" = "move container to workspace number 5";
"${modifier}+shift+slash" = "move container to workspace number 5";
"${modifier}+shift+6" = "move container to workspace number 6";
"${modifier}+shift+7" = "move container to workspace number 7";
"${modifier}+shift+8" = "move container to workspace number 8";
"${modifier}+shift+9" = "move container to workspace number 9";
"${modifier}+shift+0" = "move container to workspace number 10";
"${modifier}+left" = "resize shrink width 10 px or 10 ppt";
"${modifier}+down" = "resize shrink height 10 px or 10 ppt";
"${modifier}+up" = "resize grow height 10 px or 10 ppt";
"${modifier}+right" = "resize grow width 10 px or 10 ppt";
"Print" = "exec sh -c 'maim -s | xclip -selection clipboard -t image/png'";
};
bars = [
{
position = "top";
statusCommand = "${pkgs.i3status}/bin/i3status";
}
];
startup = [ ];
};
};
}

View file

@ -0,0 +1,50 @@
{
config,
lib,
pkgs,
...
}:
{
services.xserver = {
enable = true;
# displayManager.startx.enable = true;
windowManager.i3 = {
enable = true;
# package = pkgs.i3;
extraPackages = with pkgs; [
dmenu
i3status
i3lock
];
};
desktopManager = {
xterm.enable = true;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
};
};
displayManager = {
# lightdm.enable = true;
defaultSession = "xfce+i3";
};
};
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 ${pkgs.xorg.xinit}/bin/startx ${pkgs.xfce.xfce4-session}/bin/startxfce4 -- ${pkgs.xorg.xorgserver}/bin/X -keeptty -quiet vt${toString config.services.greetd.vt}'";
user = "greeter";
};
};
};
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config.common.default = [ "gtk" ];
};
}

View file

@ -84,5 +84,5 @@
fi
'';
};
}) config.users.users;
}) (lib.filterAttrs (n: u: u.isNormalUser or false) config.users.users);
}

18
hosts/lio/flake.lock generated
View file

@ -27,20 +27,14 @@
},
"common": {
"locked": {
"dir": "flakes/common",
"lastModified": 1761238599,
"narHash": "sha256-BXSFjTnqgPzNk9ldiVPreAIPNOeEpKy7kXnIgYTkoPU=",
"ref": "refs/heads/master",
"rev": "6472f64f360095b948954bcc2543d095f46e9a21",
"revCount": 740,
"type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
"path": "../../flakes/common",
"type": "path"
},
"original": {
"dir": "flakes/common",
"type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
}
"path": "../../flakes/common",
"type": "path"
},
"parent": []
},
"crane": {
"locked": {

View file

@ -6,8 +6,8 @@
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Use relative to get current version for testing
# common.url = "path:../../flakes/common";
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/common";
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";
@ -56,6 +56,7 @@
common.nixosModules.tmux
common.nixosModules.boot_systemd
common.nixosModules.de_sway
# common.nixosModules.de_i3
common.nixosModules.hardening
common.nixosModules.jetbrains_font
common.nixosModules.nix_options
@ -73,6 +74,7 @@
# ./jails_text.nix
# ./hyprland_customizations.nix
./sway_customizations.nix
# ./i3_customizations.nix
./opencode-shim.nix
(
{
@ -96,6 +98,7 @@
sharedModules = [
common.homeManagerModules.de_sway
# common.homeManagerModules.de_i3
common.homeManagerModules.tmux
common.homeManagerModules.atuin
common.homeManagerModules.direnv

View file

@ -0,0 +1,44 @@
{ pkgs, ... }:
let
assignLines = ''
workspace 1 output DP-1
workspace 2 output DP-1
workspace 3 output DP-1
workspace 4 output DP-1
workspace 5 output DP-1
workspace 6 output DP-1
workspace 7 output DP-2
workspace 8 output DP-2
workspace 9 output DP-2
workspace 10 output DP-2
'';
bg1 = ../_shared_assets/wallpapers/pixel_neon.png;
bg2 = ../_shared_assets/wallpapers/pixel_neon_v.png;
xrSetup = ''
xrandr --output DP-1 --mode 3840x2160 --rate 97.983 --pos 0x0 --primary
xrandr --output DP-2 --mode 3440x1440 --rate 99.982 --rotate left --left-of DP-1
'';
fehCmd = "feh --bg-fill ${bg1} ${bg2}";
startupCmd = "sh -c 'sleep 0.05; i3-msg workspace number 7; sleep 0.05; i3-msg workspace number 1'";
i3ExtraOptions = {
startup = [
{ command = "exec --no-startup-id ${fehCmd}"; }
{ command = "exec --no-startup-id ${xrSetup}"; }
{ command = "exec --no-startup-id ${startupCmd}"; }
];
};
in
{
options = { };
config = {
home-manager.sharedModules = [
(
{ ... }:
{
# xsession.windowManager.i3.config = i3ExtraOptions;
# xsession.windowManager.i3.extraConfig = assignLines;
}
)
];
};
}