summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Saeid <amir@glgdgt.com>2026-04-29 22:16:31 +0100
committerAmir Saeid <amir@glgdgt.com>2026-04-29 22:16:31 +0100
commitb702dccffa02bd33235f4c6de4684613dbc6d4c6 (patch)
tree412bf6294c4912695d1350840fb2a56c4459d954
parentbf309bb0249429221c8afa9ddf633c58767bb7a1 (diff)
Retire custom .xinitrc
-rw-r--r--flake.lock69
-rw-r--r--flake.nix8
-rw-r--r--hosts/gheshki/home.nix189
3 files changed, 179 insertions, 87 deletions
diff --git a/flake.lock b/flake.lock
index da551d7..03f0a62 100644
--- a/flake.lock
+++ b/flake.lock
@@ -57,6 +57,24 @@
"type": "github"
}
},
+ "flake-utils_3": {
+ "inputs": {
+ "systems": "systems_4"
+ },
+ "locked": {
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
@@ -158,6 +176,22 @@
"type": "github"
}
},
+ "nixpkgs_5": {
+ "locked": {
+ "lastModified": 1777268161,
+ "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
@@ -185,9 +219,29 @@
"nixgl": "nixgl",
"nixpkgs": "nixpkgs_3",
"nixvim": "nixvim",
+ "sctd": "sctd",
"unstable": "unstable"
}
},
+ "sctd": {
+ "inputs": {
+ "flake-utils": "flake-utils_3",
+ "nixpkgs": "nixpkgs_5"
+ },
+ "locked": {
+ "lastModified": 1777497081,
+ "narHash": "sha256-1P+sU4zENDpIPnuMBFeujPW8hxznRSMIAUQlXqbgmio=",
+ "owner": "amir",
+ "repo": "sctd",
+ "rev": "dbd50f625979aa8a4062eb08b9b73bb3e2c04406",
+ "type": "github"
+ },
+ "original": {
+ "owner": "amir",
+ "repo": "sctd",
+ "type": "github"
+ }
+ },
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -233,6 +287,21 @@
"type": "github"
}
},
+ "systems_4": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
"unstable": {
"locked": {
"lastModified": 1772773019,
diff --git a/flake.nix b/flake.nix
index dd34119..de989ee 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,6 +8,7 @@
flake-utils.url = "github:numtide/flake-utils";
nixgl.url = "github:nix-community/nixGL";
nixvim.url = "github:nix-community/nixvim";
+ sctd.url = "github:amir/sctd";
};
outputs =
@@ -19,6 +20,7 @@
flake-utils,
nixgl,
nixvim,
+ sctd,
...
}:
let
@@ -45,7 +47,10 @@
{
pkgs = import nixpkgs {
inherit system;
- overlays = [ nixgl.overlay ];
+ overlays = [
+ nixgl.overlay
+ sctd.overlays.default
+ ];
config = {
allowUnfree = false;
};
@@ -53,6 +58,7 @@
modules = [
./hosts/${hostname}/home.nix
nixvim.homeModules.nixvim
+ sctd.homeManagerModules.default
];
extraSpecialArgs = (mkExtraArgs system) // {
inherit hostname;
diff --git a/hosts/gheshki/home.nix b/hosts/gheshki/home.nix
index 05ef648..a83b3cc 100644
--- a/hosts/gheshki/home.nix
+++ b/hosts/gheshki/home.nix
@@ -22,101 +22,104 @@
pkgs.nixgl.nixGLIntel
];
- xsession.windowManager.i3 = {
+ xsession = {
enable = true;
- config = {
- modifier = "Mod4";
-
- fonts = {
- names = [ "${userOptions.fontName} SemiBold" ];
- size = 10.0;
- };
-
- terminal = "nixGLIntel alacritty";
-
- keybindings =
- let
- mod = "Mod4";
- in
- {
- "${mod}+Return" = "exec nixGLIntel alacritty";
- "${mod}+o" = "exec ~/Applications/firefox/firefox";
- "${mod}+d" = "exec dmenu_run";
-
- "${mod}+b" = "workspace back_and_forth";
- "${mod}+c" = "kill";
-
- "${mod}+f" = "fullscreen toggle";
- "${mod}+h" = "split h";
- "${mod}+v" = "split v";
-
- "${mod}+Left" = "focus left";
- "${mod}+Down" = "focus down";
- "${mod}+Up" = "focus up";
- "${mod}+Right" = "focus right";
-
- "${mod}+Shift+Left" = "move left";
- "${mod}+Shift+Down" = "move down";
- "${mod}+Shift+Up" = "move up";
- "${mod}+Shift+Right" = "move right";
-
- "${mod}+Shift+c" = "reload";
- "${mod}+Shift+r" = "restart";
- "${mod}+Shift+e" =
- "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'";
-
- "${mod}+1" = "workspace number 1";
- "${mod}+2" = "workspace number 2";
- "${mod}+3" = "workspace number 3";
- "${mod}+4" = "workspace number 4";
- "${mod}+5" = "workspace number 5";
- "${mod}+6" = "workspace number 6";
- "${mod}+7" = "workspace number 7";
- "${mod}+8" = "workspace number 8";
- "${mod}+9" = "workspace number 9";
- "${mod}+0" = "workspace number 0";
-
- "${mod}+Shift+1" = "move container to workspace 1";
- "${mod}+Shift+2" = "move container to workspace 2";
- "${mod}+Shift+3" = "move container to workspace 3";
- "${mod}+Shift+4" = "move container to workspace 4";
- "${mod}+Shift+5" = "move container to workspace 5";
- "${mod}+Shift+6" = "move container to workspace 6";
- "${mod}+Shift+7" = "move container to workspace 7";
- "${mod}+Shift+8" = "move container to workspace 8";
- "${mod}+Shift+9" = "move container to workspace 9";
- "${mod}+Shift+0" = "move container to workspace 0";
+ windowManager.i3 = {
+ enable = true;
+ config = {
+ modifier = "Mod4";
+
+ fonts = {
+ names = [ "${userOptions.fontName} SemiBold" ];
+ size = 10.0;
};
- bars = [
- {
- fonts = {
- names = [ userOptions.fontName ];
- style = "SemiBold";
- size = 10.0;
+ terminal = "nixGLIntel alacritty";
+
+ keybindings =
+ let
+ mod = "Mod4";
+ in
+ {
+ "${mod}+Return" = "exec nixGLIntel alacritty";
+ "${mod}+o" = "exec ~/Applications/firefox/firefox";
+ "${mod}+d" = "exec dmenu_run";
+
+ "${mod}+b" = "workspace back_and_forth";
+ "${mod}+c" = "kill";
+
+ "${mod}+f" = "fullscreen toggle";
+ "${mod}+h" = "split h";
+ "${mod}+v" = "split v";
+
+ "${mod}+Left" = "focus left";
+ "${mod}+Down" = "focus down";
+ "${mod}+Up" = "focus up";
+ "${mod}+Right" = "focus right";
+
+ "${mod}+Shift+Left" = "move left";
+ "${mod}+Shift+Down" = "move down";
+ "${mod}+Shift+Up" = "move up";
+ "${mod}+Shift+Right" = "move right";
+
+ "${mod}+Shift+c" = "reload";
+ "${mod}+Shift+r" = "restart";
+ "${mod}+Shift+e" =
+ "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'";
+
+ "${mod}+1" = "workspace number 1";
+ "${mod}+2" = "workspace number 2";
+ "${mod}+3" = "workspace number 3";
+ "${mod}+4" = "workspace number 4";
+ "${mod}+5" = "workspace number 5";
+ "${mod}+6" = "workspace number 6";
+ "${mod}+7" = "workspace number 7";
+ "${mod}+8" = "workspace number 8";
+ "${mod}+9" = "workspace number 9";
+ "${mod}+0" = "workspace number 10";
+
+ "${mod}+Shift+1" = "move container to workspace 1";
+ "${mod}+Shift+2" = "move container to workspace 2";
+ "${mod}+Shift+3" = "move container to workspace 3";
+ "${mod}+Shift+4" = "move container to workspace 4";
+ "${mod}+Shift+5" = "move container to workspace 5";
+ "${mod}+Shift+6" = "move container to workspace 6";
+ "${mod}+Shift+7" = "move container to workspace 7";
+ "${mod}+Shift+8" = "move container to workspace 8";
+ "${mod}+Shift+9" = "move container to workspace 9";
+ "${mod}+Shift+0" = "move container to workspace 10";
};
- position = "bottom";
- statusCommand = "i3status";
- }
- ];
-
- gaps = {
- smartGaps = true;
- inner = 10;
- outer = 5;
- };
- window = {
- border = 1;
- titlebar = false;
- commands = [
+ bars = [
{
- criteria = {
- window_role = "About";
+ fonts = {
+ names = [ userOptions.fontName ];
+ style = "SemiBold";
+ size = 10.0;
};
- command = "floating enable";
+ position = "bottom";
+ statusCommand = "i3status";
}
];
+
+ gaps = {
+ smartGaps = true;
+ inner = 10;
+ outer = 5;
+ };
+
+ window = {
+ border = 1;
+ titlebar = false;
+ commands = [
+ {
+ criteria = {
+ window_role = "About";
+ };
+ command = "floating enable";
+ }
+ ];
+ };
};
};
};
@@ -173,4 +176,18 @@
programs.alacritty.settings.font.size = lib.mkForce 8;
services.gpg-agent.pinentry.package = pkgs.pinentry-curses;
programs.zsh.shellAliases.pbcopy = "xclip -selection clipboard";
+
+ services.sctd-amir = {
+ enable = true;
+ latitude = 53.3498;
+ longitude = -6.2603;
+ };
+
+ home.keyboard = {
+ layout = "us,ir";
+ options = [
+ "grp:shifts_toggle"
+ "caps:swapescape"
+ ];
+ };
}