From 8f87b5f474366cd528f3cf8766a475875829aa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sat, 7 Mar 2026 23:59:41 +0300 Subject: [PATCH 01/13] nixos: load `ddcci` instead of `ddcci-backlight` ... as the former should load the latter when needed. --- hosts/mephistopheles/hardware/monitor.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/mephistopheles/hardware/monitor.nix b/hosts/mephistopheles/hardware/monitor.nix index 2b29d10..5a4ca37 100644 --- a/hosts/mephistopheles/hardware/monitor.nix +++ b/hosts/mephistopheles/hardware/monitor.nix @@ -11,7 +11,7 @@ ]; boot.extraModulePackages = with config.boot.kernelPackages; [ ddcci-driver ]; - boot.kernelModules = [ "ddcci-backlight" ]; + boot.kernelModules = [ "ddcci" ]; services.udev.extraRules = let # https://wiki.nixos.org/wiki/Backlight#Via_ddcci-driver From 43ee85a50d471183c9936029a692f3675d4387ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 00:01:12 +0300 Subject: [PATCH 02/13] nixos: prefer `false` over `"no"` in `systemd.services` --- hosts/mephistopheles/impermanence.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/mephistopheles/impermanence.nix b/hosts/mephistopheles/impermanence.nix index f748fc7..54bfd58 100644 --- a/hosts/mephistopheles/impermanence.nix +++ b/hosts/mephistopheles/impermanence.nix @@ -17,7 +17,7 @@ "sysroot.mount" ]; - unitConfig.DefaultDependencies = "no"; + unitConfig.DefaultDependencies = false; serviceConfig.Type = "oneshot"; script = '' mkdir /btrfs_tmp From 7e430f294f84afa54c874b953a3091604ca60364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 00:03:17 +0300 Subject: [PATCH 03/13] inputs: add optional `patches` param to `patchInput` --- inputs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inputs/default.nix b/inputs/default.nix index b698513..2fddcf7 100644 --- a/inputs/default.nix +++ b/inputs/default.nix @@ -15,7 +15,7 @@ let mapAttrsToList ; - patchInput = { owner, repo, src, name, pulls }: + patchInput = { owner, repo, src, name, pulls, patches ? [ ] }: let mkPatch = number: sha256: { @@ -23,8 +23,8 @@ let name = "${owner}-${repo}-${number}.patch"; url = "https://github.com/${owner}/${repo}/pull/${number}.patch?full_index=1"; }; - patches = map fetchpatch2 (mapAttrsToList mkPatch pulls); - src' = applyPatches { inherit name src patches; }; + patches' = patches ++ map fetchpatch2 (mapAttrsToList mkPatch pulls); + src' = applyPatches { inherit name src; patches = patches'; }; flake = import "${src'}/flake.nix"; outputs = flake.outputs ({ inherit self; } // src.inputs); From 74fb0abd4c1c09d380ca30e813d80b8eb0df6789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 00:03:43 +0300 Subject: [PATCH 04/13] inputs.nixpkgs: update hash of PR `494001` patch --- inputs/nixpkgs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputs/nixpkgs.nix b/inputs/nixpkgs.nix index c2f19a2..5739f4d 100644 --- a/inputs/nixpkgs.nix +++ b/inputs/nixpkgs.nix @@ -9,6 +9,6 @@ name = "nixpkgs"; pulls = { "470359" = "sha256-33Vr0X+xhWjbkQhPCivRC8C9yQS1U6vct9U0H4Rtvxo="; # nixos/automatic-timezoned: Fix boot delays and systemd unit ordering - "494001" = "sha256-6dJgDCqmUx86kVgsqSXKSUF1v0GPvsA2hTKy/S7E2+I="; # nixos/envfs: fix compatibility with systemd in initrd + "494001" = "sha256-OP15IGdZLNhJIXLbZyA/nTZkaB2VVIm1R4vDeHQaLSs="; # nixos/envfs: fix compatibility with systemd in initrd }; } From a13e99dcbff065975c068da6cc67ae75324ee693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 00:44:37 +0300 Subject: [PATCH 05/13] modules/home: add `default-shell` --- hosts/mephistopheles/users.nix | 2 +- modules/home-manager/default-shell.nix | 20 +++++++++++++++++++ modules/home-manager/default.nix | 1 + users/ilkecan/command-line/shells/default.nix | 3 +++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 modules/home-manager/default-shell.nix diff --git a/hosts/mephistopheles/users.nix b/hosts/mephistopheles/users.nix index 5f60d99..58e4802 100644 --- a/hosts/mephistopheles/users.nix +++ b/hosts/mephistopheles/users.nix @@ -20,7 +20,7 @@ hashedPasswordFile = config.sops.secrets.ilkecan-hashed-password.path; isNormalUser = true; extraGroups = [ config.users.groups.wheel.name ]; - shell = userConfig.programs.zsh.package; + shell = userConfig.home.defaultShell; }; }; }; diff --git a/modules/home-manager/default-shell.nix b/modules/home-manager/default-shell.nix new file mode 100644 index 0000000..8e22fb7 --- /dev/null +++ b/modules/home-manager/default-shell.nix @@ -0,0 +1,20 @@ +{ + lib, + ... +}: + +let + inherit (lib) + mkOption + types + ; +in +{ + options = { + home.defaultShell = mkOption { + type = types.shellPackage; + readOnly = true; + description = "The user's default shell package."; + }; + }; +} diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 2ad1d4b..d23adf9 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -4,6 +4,7 @@ { imports = [ + ./default-shell.nix ./xdg-bin-home.nix ]; } diff --git a/users/ilkecan/command-line/shells/default.nix b/users/ilkecan/command-line/shells/default.nix index 7c10c54..6fe8f61 100644 --- a/users/ilkecan/command-line/shells/default.nix +++ b/users/ilkecan/command-line/shells/default.nix @@ -1,4 +1,5 @@ { + config, ... }: @@ -7,4 +8,6 @@ ./nushell.nix ./zsh ]; + + home.defaultShell = config.programs.zsh.package; } From 65346e47f01910f0918e9180a53b87b031f44762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 01:07:29 +0300 Subject: [PATCH 06/13] zellij: explicitly set `command` to shell for `pane` This makes it possible to "re-run" the pane if it exits. --- .zellij-layout.kdl | 2 +- users/ilkecan/utilities/zellij/layouts/code.nix | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.zellij-layout.kdl b/.zellij-layout.kdl index 6228919..3fbfed6 100644 --- a/.zellij-layout.kdl +++ b/.zellij-layout.kdl @@ -41,7 +41,7 @@ layout { tab name="terminal" { pane split_direction="vertical" { - pane + pane command="zsh" pane command="claude" { start_suspended true diff --git a/users/ilkecan/utilities/zellij/layouts/code.nix b/users/ilkecan/utilities/zellij/layouts/code.nix index 97d0ad9..a4edd63 100644 --- a/users/ilkecan/utilities/zellij/layouts/code.nix +++ b/users/ilkecan/utilities/zellij/layouts/code.nix @@ -1,4 +1,5 @@ { + config, ... }: @@ -27,7 +28,7 @@ pane = { _props.split_direction = "vertical"; _children = [ - { pane = { }; } + { pane._props.command = config.home.defaultShell.meta.mainProgram; } { pane._props = { command = "claude"; }; pane.start_suspended = true; } ]; }; From a7792644453b94a9ded670711393dbce1a71e178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 01:49:24 +0300 Subject: [PATCH 07/13] flake: update inputs --- flake.lock | 66 +++++++++++++++--------------- users/ilkecan/default.nix | 2 +- users/ilkecan/multimedia/video.nix | 2 +- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/flake.lock b/flake.lock index caf3210..2d0f92c 100644 --- a/flake.lock +++ b/flake.lock @@ -202,11 +202,11 @@ ] }, "locked": { - "lastModified": 1772586807, - "narHash": "sha256-cZdSLq02zoTC2rFISJ76hOY0J5ADD+NMC7JK1J3Jlto=", + "lastModified": 1772913452, + "narHash": "sha256-ViJzEi2rv0OPqKMWxxu1dR73EjuRoci1jxtp6O1PR+0=", "owner": "AvengeMedia", "repo": "dms-plugin-registry", - "rev": "961c1e55201d2fe041b857be4640db8eb1ec6ec4", + "rev": "547f10eae04b3cb3dbb16029d3ac38c45174f9e0", "type": "github" }, "original": { @@ -314,11 +314,11 @@ ] }, "locked": { - "lastModified": 1772665116, - "narHash": "sha256-XmjUDG/J8Z8lY5DVNVUf5aoZGc400FxcjsNCqHKiKtc=", + "lastModified": 1772893680, + "narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "39f53203a8458c330f61cc0759fe243f0ac0d198", + "rev": "8baab586afc9c9b57645a734c820e4ac0a604af9", "type": "github" }, "original": { @@ -448,11 +448,11 @@ ] }, "locked": { - "lastModified": 1772722494, - "narHash": "sha256-H8a7ykDwume9z4Y1JueO+FTGlzKS/+xsJh+13V20wLA=", + "lastModified": 1772894523, + "narHash": "sha256-GDjaSrB39dibyzaZHfxtOJBE4M0K9ws/DcJ8cLZmEjY=", "owner": "numtide", "repo": "llm-agents.nix", - "rev": "fc8bf0ae9c6ac6835d01d04cc58e1f9ec717815c", + "rev": "6de17762e82217f80633609f8fa8d8031a80d82f", "type": "github" }, "original": { @@ -517,11 +517,11 @@ ] }, "locked": { - "lastModified": 1772698812, - "narHash": "sha256-7+K/VaZ7TXUeUGSYshg8wC3UsRZHB+M4x6r38Q1B79c=", + "lastModified": 1772884214, + "narHash": "sha256-nl1U1E9Kk9ZmxWdqcwBuFaljxknbrwq8/bY+utQSajk=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "5641625ef950f024e3e0e3f38bb91f876290c0be", + "rev": "3fc5b3670ef77356173ca5f1fa5015e01204bc33", "type": "github" }, "original": { @@ -580,11 +580,11 @@ ] }, "locked": { - "lastModified": 1768501693, - "narHash": "sha256-H7PmIBB8BVnh9lpvoOAk+PfOMhhzVgkCyAz1KtvHIcQ=", - "rev": "d0b8b619d5e1b96fc71c321cb3d33a02b5f44d7a", + "lastModified": 1772735189, + "narHash": "sha256-3cFhkledgsDUXgGPCy3jufzRc8QAFEcCm4bu09jzGaM=", + "rev": "3447d1c43f79f45f48d979f4a3a204059e2577cf", "type": "tarball", - "url": "https://codeberg.org/api/v1/repos/tlater/nix-ast-lint/archive/d0b8b619d5e1b96fc71c321cb3d33a02b5f44d7a.tar.gz" + "url": "https://codeberg.org/api/v1/repos/tlater/nix-ast-lint/archive/3447d1c43f79f45f48d979f4a3a204059e2577cf.tar.gz" }, "original": { "type": "tarball", @@ -620,11 +620,11 @@ ] }, "locked": { - "lastModified": 1772678126, - "narHash": "sha256-MZVqAmjcTmicg4WP2SxtNksUXS6tigY+EwBatLxc1bM=", + "lastModified": 1772906589, + "narHash": "sha256-RF6tdst0P1es2yY0w1BjptAzBPYNVUIRbjJ6cKOvefI=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "aa9ba54128d03151f11e96b3213b3791a5496fe5", + "rev": "a2456108efbdb96c0a5c2d5f733bdf8704da8254", "type": "github" }, "original": { @@ -666,11 +666,11 @@ ] }, "locked": { - "lastModified": 1772671545, - "narHash": "sha256-7CFg6ppK000u+bd87+6HSVkFSC8PKm/N22MMZMtYla4=", + "lastModified": 1772891434, + "narHash": "sha256-+MUN+5lOvWS6T4pvIZBGL4AKJkflLXGgVRYTlNeZEiE=", "owner": "kaylorben", "repo": "nixcord", - "rev": "9c048e21aa13ab529f00ab1f13c3793ba0b49b7c", + "rev": "fc63af2dbc92cdcfeb6c650d986280057b0f135c", "type": "github" }, "original": { @@ -726,11 +726,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1772598333, - "narHash": "sha256-moEOncpKtz4qAmFW1mX1ArxARit17pU/r1xtEzp8XqQ=", - "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239", + "lastModified": 1772822230, + "narHash": "sha256-uKkU4cS3lkh3zlnUf+QRX6zd5LHOM0mrqhEvZ5fqqHM=", + "rev": "71caefce12ba78d84fe618cf61644dce01cf3a96", "type": "tarball", - "url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.6913.fabb8c9deee2/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.7198.71caefce12ba/nixexprs.tar.xz" }, "original": { "type": "tarball", @@ -739,11 +739,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1772624091, - "narHash": "sha256-kx4m0PT8acdAYUXesEkNtGJaZbarQn/C//NNbV4weX8=", - "rev": "80bdc1e5ce51f56b19791b52b2901187931f5353", + "lastModified": 1772773019, + "narHash": "sha256-nbKkTH2oRlWaAjeDh/QMraqjfj/C2xJFa53twFzRd8o=", + "rev": "aca4d95fce4914b3892661bcb80b8087293536c6", "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre958232.80bdc1e5ce51/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre958961.aca4d95fce49/nixexprs.tar.xz" }, "original": { "type": "tarball", @@ -760,11 +760,11 @@ ] }, "locked": { - "lastModified": 1772734784, - "narHash": "sha256-BtSMyLW7/QpAEIXE1qiB5nuguoNTGbClkbDYVu9wFKI=", + "lastModified": 1772917034, + "narHash": "sha256-bf8GOnmGrrXd3NpCa+zuY6ets3QGBnbnIhBaMsVteIg=", "owner": "nix-community", "repo": "NUR", - "rev": "3effc466908b02989fa1c94f03c4e0e510708a85", + "rev": "9f4b9e8a48b7f7f14b26796bac9a982a40386ce7", "type": "github" }, "original": { diff --git a/users/ilkecan/default.nix b/users/ilkecan/default.nix index e627a54..9b348cc 100644 --- a/users/ilkecan/default.nix +++ b/users/ilkecan/default.nix @@ -46,7 +46,7 @@ in unstable.overskride pwvucontrol wasistlos - telegram-desktop + unstable.telegram-desktop # https://github.com/NixOS/nixpkgs/issues/497549 ruffle # https://github.com/ruffle-rs/ruffle ast-grep # https://github.com/ast-grep/ast-grep diff --git a/users/ilkecan/multimedia/video.nix b/users/ilkecan/multimedia/video.nix index 23d3231..54d6552 100644 --- a/users/ilkecan/multimedia/video.nix +++ b/users/ilkecan/multimedia/video.nix @@ -6,7 +6,7 @@ { home.packages = with pkgs; [ ffmpeg-full - # stremio # https://github.com/NixOS/nixpkgs/pull/468728 + unstable.stremio-linux-shell vlc ]; From bb092321e2ba77b730fd331333139e975e8890e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 02:04:53 +0300 Subject: [PATCH 08/13] flake: add `nix-fast-build` app --- flake/per-system/apps.nix | 25 +++++++++++++++++++++++++ flake/per-system/default.nix | 1 + users/ilkecan/nix/default.nix | 4 ++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 flake/per-system/apps.nix diff --git a/flake/per-system/apps.nix b/flake/per-system/apps.nix new file mode 100644 index 0000000..7c79f2e --- /dev/null +++ b/flake/per-system/apps.nix @@ -0,0 +1,25 @@ +{ + lib, + ... +}: + +let + inherit (lib) + getExe + ; + + mkApp = pkg: + { + type = "app"; + program = getExe pkg; + inherit (pkg) meta; + }; +in +{ + perSystem = { self', pkgs, ... }: { + apps = { + default = self'.apps.nix-fast-build; + nix-fast-build = mkApp pkgs.unstable.nix-fast-build; + }; + }; +} diff --git a/flake/per-system/default.nix b/flake/per-system/default.nix index 241214e..aaac1cd 100644 --- a/flake/per-system/default.nix +++ b/flake/per-system/default.nix @@ -4,6 +4,7 @@ { imports = [ + ./apps.nix ./args ./dev-shells.nix ./pre-commit.nix diff --git a/users/ilkecan/nix/default.nix b/users/ilkecan/nix/default.nix index 4a7e7b9..98c4570 100644 --- a/users/ilkecan/nix/default.nix +++ b/users/ilkecan/nix/default.nix @@ -33,8 +33,8 @@ in nix-alien # https://github.com/thiagokokada/nix-alien nix-diff # https://github.com/Gabriella439/nix-diff nix-du # https://github.com/symphorien/nix-du - nix-eval-jobs # https://github.com/nix-community/nix-eval-jobs - nix-fast-build # https://github.com/Mic92/nix-fast-build + unstable.nix-eval-jobs # https://github.com/nix-community/nix-eval-jobs + unstable.nix-fast-build # https://github.com/Mic92/nix-fast-build nix-melt # https://github.com/nix-community/nix-melt nix-output-monitor # https://github.com/maralorn/nix-output-monitor nix-tree # https://github.com/utdemir/nix-tree From f5e2c13865744ff0d2a9b90727f829025d8f4226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 02:05:27 +0300 Subject: [PATCH 09/13] hm: leftover file --- users/ilkecan/nix.nix | 53 ----------------------------------- users/ilkecan/nix/default.nix | 2 -- 2 files changed, 55 deletions(-) delete mode 100644 users/ilkecan/nix.nix diff --git a/users/ilkecan/nix.nix b/users/ilkecan/nix.nix deleted file mode 100644 index 026171e..0000000 --- a/users/ilkecan/nix.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ - config, - inputs', - pkgs, - ... -}: - -let - inherit (config.home) - homeDirectory - ; -in -{ - nix.channels = { - inherit (inputs') - nixpkgs - nixpkgs-unstable - ; - }; - - home.sessionVariables = { - NH_NO_CHECKS = 1; - NIXPKGS_ALLOW_UNFREE = toString pkgs.config.allowUnfree; - }; - - home.packages = with pkgs; [ - cachix - dix # https://github.com/faukah/dix - nix-alien # https://github.com/thiagokokada/nix-alien - nix-diff # https://github.com/Gabriella439/nix-diff - nix-du # https://github.com/symphorien/nix-du - nix-eval-jobs # https://github.com/nix-community/nix-eval-jobs - nix-fast-build # https://github.com/Mic92/nix-fast-build - nix-melt # https://github.com/nix-community/nix-melt - nix-output-monitor # https://github.com/maralorn/nix-output-monitor - nix-tree # https://github.com/utdemir/nix-tree - nix-update # https://github.com/Mic92/nix-update/ - nixos-anywhere # https://github.com/nix-community/nixos-anywhere - nixos-facter # https://github.com/nix-community/nixos-facter - nixos-shell # https://github.com/Mic92/nixos-shell - unstable.nixpkgs-review # https://github.com/Mic92/nixpkgs-review - ]; - - programs = { - nh = { - enable = true; - package = pkgs.unstable.nh; - flake = "${homeDirectory}/repos/git/github.com/ilkecan/config"; - }; - nix-index.enable = true; - nix-index-database.comma.enable = true; # https://github.com/nix-community/comma - }; -} diff --git a/users/ilkecan/nix/default.nix b/users/ilkecan/nix/default.nix index 98c4570..b9e7c44 100644 --- a/users/ilkecan/nix/default.nix +++ b/users/ilkecan/nix/default.nix @@ -42,9 +42,7 @@ in nixos-anywhere # https://github.com/nix-community/nixos-anywhere nixos-facter # https://github.com/nix-community/nixos-facter nixos-shell # https://github.com/Mic92/nixos-shell - notashelf.flint # https://github.com/NotAShelf/flint unstable.nixpkgs-review # https://github.com/Mic92/nixpkgs-review - vulnix # https://github.com/nix-community/vulnix ]; programs = { From 4fc897a1700d297bd85c00ee01005cd6fe964a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 18:36:06 +0300 Subject: [PATCH 10/13] flake: replace `nix-fast-build` app with `ci` --- flake/per-system/apps.nix | 25 ------------------------- flake/per-system/apps/ci.nix | 13 +++++++++++++ flake/per-system/apps/default.nix | 22 ++++++++++++++++++++++ flake/per-system/default.nix | 2 +- 4 files changed, 36 insertions(+), 26 deletions(-) delete mode 100644 flake/per-system/apps.nix create mode 100644 flake/per-system/apps/ci.nix create mode 100644 flake/per-system/apps/default.nix diff --git a/flake/per-system/apps.nix b/flake/per-system/apps.nix deleted file mode 100644 index 7c79f2e..0000000 --- a/flake/per-system/apps.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - lib, - ... -}: - -let - inherit (lib) - getExe - ; - - mkApp = pkg: - { - type = "app"; - program = getExe pkg; - inherit (pkg) meta; - }; -in -{ - perSystem = { self', pkgs, ... }: { - apps = { - default = self'.apps.nix-fast-build; - nix-fast-build = mkApp pkgs.unstable.nix-fast-build; - }; - }; -} diff --git a/flake/per-system/apps/ci.nix b/flake/per-system/apps/ci.nix new file mode 100644 index 0000000..10420fe --- /dev/null +++ b/flake/per-system/apps/ci.nix @@ -0,0 +1,13 @@ +{ + pkgs, +}: + +pkgs.writeShellApplication { + name = "ci"; + + runtimeInputs = with pkgs; [ unstable.nix-fast-build ]; + + text = '' + nix-fast-build --no-nom --skip-cached "$@" + ''; +} diff --git a/flake/per-system/apps/default.nix b/flake/per-system/apps/default.nix new file mode 100644 index 0000000..455cb57 --- /dev/null +++ b/flake/per-system/apps/default.nix @@ -0,0 +1,22 @@ +{ + lib, + ... +}: + +let + inherit (lib) getExe; + + mkApp = drv: { + type = "app"; + program = getExe drv; + inherit (drv) meta; + }; +in +{ + perSystem = { self', pkgs, ... }: { + apps = { + ci = mkApp (import ./ci.nix { inherit pkgs; }); + default = self'.apps.ci; + }; + }; +} diff --git a/flake/per-system/default.nix b/flake/per-system/default.nix index aaac1cd..51a00aa 100644 --- a/flake/per-system/default.nix +++ b/flake/per-system/default.nix @@ -4,7 +4,7 @@ { imports = [ - ./apps.nix + ./apps ./args ./dev-shells.nix ./pre-commit.nix From 25b4e7020f9cd79d1099295656a4189458f30fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Sun, 8 Mar 2026 23:19:15 +0300 Subject: [PATCH 11/13] gh: add `ci` workflow as status check for PRs --- .github/workflows/ci.yaml | 24 ++++++++++++++++++++++++ flake/per-system/apps/ci.nix | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..f24a368 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,24 @@ +name: check the PR + +on: + pull_request: + branches: + - main + +jobs: + check: + runs-on: ubuntu-latest + permissions: + contents: read # required for `actions/checkout` + steps: + - uses: actions/checkout@v6 + + - uses: wimpysworld/nothing-but-nix@v10 + with: + nix-permission-edict: true + + - uses: nixbuild/nix-quick-install-action@v34 + + - run: nix run + env: + CACHIX_AUTH_TOKEN: "${{ secrets.CACHIX_AUTH_TOKEN }}" diff --git a/flake/per-system/apps/ci.nix b/flake/per-system/apps/ci.nix index 10420fe..97763b8 100644 --- a/flake/per-system/apps/ci.nix +++ b/flake/per-system/apps/ci.nix @@ -8,6 +8,6 @@ pkgs.writeShellApplication { runtimeInputs = with pkgs; [ unstable.nix-fast-build ]; text = '' - nix-fast-build --no-nom --skip-cached "$@" + nix-fast-build --no-nom --skip-cached --cachix-cache ilkecan "$@" ''; } From f99eccbf1bdffc3505956cf69642c38831bb7ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Mon, 9 Mar 2026 01:45:31 +0300 Subject: [PATCH 12/13] hm.nvim: add `claudecode-nvim` plugin --- .zellij-layout.kdl | 1 + .../neovim/plugins/claudecode-nvim.nix | 71 +++++++++++++++++++ .../text-editors/neovim/plugins/default.nix | 1 + 3 files changed, 73 insertions(+) create mode 100644 users/ilkecan/text-editors/neovim/plugins/claudecode-nvim.nix diff --git a/.zellij-layout.kdl b/.zellij-layout.kdl index 3fbfed6..8bb240a 100644 --- a/.zellij-layout.kdl +++ b/.zellij-layout.kdl @@ -44,6 +44,7 @@ layout { pane command="zsh" pane command="claude" { + args "--ide" start_suspended true } } diff --git a/users/ilkecan/text-editors/neovim/plugins/claudecode-nvim.nix b/users/ilkecan/text-editors/neovim/plugins/claudecode-nvim.nix new file mode 100644 index 0000000..1982419 --- /dev/null +++ b/users/ilkecan/text-editors/neovim/plugins/claudecode-nvim.nix @@ -0,0 +1,71 @@ +# https://github.com/coder/claudecode.nvim +{ + lib, + pkgs, + ... +}: + +let + inherit (lib.generators) + mkLuaInline + ; +in +{ + programs.nvf.settings.vim = { + extraPlugins = { + claudecode-nvim = { + package = pkgs.unstable.vimPlugins.claudecode-nvim; + setup = '' + require("claudecode").setup({ + terminal = { + provider = "none", + }, + }) + ''; + }; + }; + + autocmds = [ + { + event = [ "FileType" ]; + pattern = [ "NvimTree" "neo-tree" "oil" "minifiles" "netrw" ]; + callback = mkLuaInline '' + function() + vim.keymap.set("n", "as", vim.cmd.ClaudeCodeTreeAdd, { desc = "Add file", buffer = true }) + end + ''; + } + ]; + + keymaps = [ + { + desc = "Add current buffer"; + key = "ab"; + mode = [ "n" ]; + action = "function() vim.cmd.ClaudeCodeAdd('%') end"; + lua = true; + } + { + desc = "Send to Claude"; + key = "as"; + mode = [ "v" ]; + action = "vim.cmd.ClaudeCodeSend"; + lua = true; + } + { + desc = "Accept diff"; + key = "aa"; + mode = [ "n" ]; + action = "vim.cmd.ClaudeCodeDiffAccept"; + lua = true; + } + { + desc = "Deny diff"; + key = "ad"; + mode = [ "n" ]; + action = "vim.cmd.ClaudeCodeDiffDeny"; + lua = true; + } + ]; + }; +} diff --git a/users/ilkecan/text-editors/neovim/plugins/default.nix b/users/ilkecan/text-editors/neovim/plugins/default.nix index 89eceae..c4965cf 100644 --- a/users/ilkecan/text-editors/neovim/plugins/default.nix +++ b/users/ilkecan/text-editors/neovim/plugins/default.nix @@ -7,6 +7,7 @@ ./blink-cmp ./blink-indent.nix # ./blink-pairs.nix + ./claudecode-nvim.nix ./comment-nvim.nix ./direnv-nvim.nix ./flash-nvim.nix From ec820109ccf945304fe3082a05e86fd5b8251e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lkecan=20Bozdo=C4=9Fan?= Date: Mon, 9 Mar 2026 01:56:14 +0300 Subject: [PATCH 13/13] .zellij-layout.kdl: make Claude a floating pane --- .zellij-layout.kdl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.zellij-layout.kdl b/.zellij-layout.kdl index 8bb240a..039c412 100644 --- a/.zellij-layout.kdl +++ b/.zellij-layout.kdl @@ -31,23 +31,22 @@ layout { } } - tab focus=true name="Neovim" { + tab focus=true name="Neovim" hide_floating_panes=true { pane command="nvim" + floating_panes { + pane command="claude" x="10%" y="10%" width="80%" height="80%" { + args "--ide" + } + } + pane size=1 borderless=true { plugin location="zellij:compact-bar" } } - tab name="terminal" { - pane split_direction="vertical" { - pane command="zsh" - - pane command="claude" { - args "--ide" - start_suspended true - } - } + tab name="shell" { + pane command="zsh" pane size=1 borderless=true { plugin location="zellij:compact-bar"