From 233a37c1e09345ac7a772d01bf467e71c59ac450 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 10 Apr 2025 00:20:07 +0900 Subject: [PATCH 01/34] chore: add configs for new mac Signed-off-by: San Nguyen --- machines/parallels/disko-config.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/machines/parallels/disko-config.nix b/machines/parallels/disko-config.nix index 591a0803..0cf3b342 100644 --- a/machines/parallels/disko-config.nix +++ b/machines/parallels/disko-config.nix @@ -7,7 +7,7 @@ type = "gpt"; partitions = { ESP = { - size = "1G"; + size = "2G"; type = "EF00"; content = { type = "filesystem"; @@ -36,7 +36,7 @@ }; }; }; - work = { + home = { type = "disk"; content = { type = "gpt"; @@ -48,9 +48,9 @@ format = "ext4"; extraArgs = [ "-L" - "work" + "home" ]; - mountpoint = "/home/sand/Work"; + mountpoint = "/home/sand"; mountOptions = [ "noatime" ]; From 54a90bc0315bad904ce66ca6f37e5c137a9d2932 Mon Sep 17 00:00:00 2001 From: sandangel Date: Wed, 9 Apr 2025 16:56:59 +0000 Subject: [PATCH 02/34] add disks --- flake.nix | 4 ++-- machines/parallels/disko-config.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 1e076b4c..48a24e93 100644 --- a/flake.nix +++ b/flake.nix @@ -113,8 +113,8 @@ ./machines/parallels/disko-config.nix ./machines/common.nix { - disko.devices.disk.main.device = "/dev/sdc"; - disko.devices.disk.work.device = "/dev/sdb"; + disko.devices.disk.main.device = "/dev/sda"; + disko.devices.disk.main.device = "/dev/sdb"; environment.systemPackages = [ ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default diff --git a/machines/parallels/disko-config.nix b/machines/parallels/disko-config.nix index 0cf3b342..8caee646 100644 --- a/machines/parallels/disko-config.nix +++ b/machines/parallels/disko-config.nix @@ -50,7 +50,7 @@ "-L" "home" ]; - mountpoint = "/home/sand"; + mountpoint = "/home"; mountOptions = [ "noatime" ]; From 3287b418df8168dac68542a1d6cd8ba6178456ef Mon Sep 17 00:00:00 2001 From: sandangel Date: Wed, 9 Apr 2025 17:28:32 +0000 Subject: [PATCH 03/34] fix --- flake.nix | 2 +- machines/parallels/disko-config.nix | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 48a24e93..fd14c383 100644 --- a/flake.nix +++ b/flake.nix @@ -114,7 +114,7 @@ ./machines/common.nix { disko.devices.disk.main.device = "/dev/sda"; - disko.devices.disk.main.device = "/dev/sdb"; + disko.devices.disk.home.device = "/dev/sdb"; environment.systemPackages = [ ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default diff --git a/machines/parallels/disko-config.nix b/machines/parallels/disko-config.nix index 8caee646..6c2e76f5 100644 --- a/machines/parallels/disko-config.nix +++ b/machines/parallels/disko-config.nix @@ -3,6 +3,7 @@ disk = { main = { type = "disk"; + device = "/dev/sda"; content = { type = "gpt"; partitions = { @@ -12,13 +13,18 @@ content = { type = "filesystem"; format = "vfat"; + extraArgs = [ + "-n" + "boot" + ]; mountpoint = "/boot"; mountOptions = [ "defaults" + "umask=0077" ]; }; }; - ext4 = { + root = { size = "100%"; content = { type = "filesystem"; @@ -38,10 +44,11 @@ }; home = { type = "disk"; + device = "/dev/sdb"; content = { type = "gpt"; partitions = { - ext4 = { + home = { size = "100%"; content = { type = "filesystem"; From bcdc7b665e31186e20cc6274a86f256acad48f9b Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 10 Apr 2025 03:12:54 +0900 Subject: [PATCH 04/34] fix sha --- machines/parallels/disko-config.nix | 2 -- modules/gnome/default.nix | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/machines/parallels/disko-config.nix b/machines/parallels/disko-config.nix index 6c2e76f5..20b2b4a3 100644 --- a/machines/parallels/disko-config.nix +++ b/machines/parallels/disko-config.nix @@ -3,7 +3,6 @@ disk = { main = { type = "disk"; - device = "/dev/sda"; content = { type = "gpt"; partitions = { @@ -44,7 +43,6 @@ }; home = { type = "disk"; - device = "/dev/sdb"; content = { type = "gpt"; partitions = { diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix index c9c99209..133a4c70 100644 --- a/modules/gnome/default.nix +++ b/modules/gnome/default.nix @@ -13,7 +13,7 @@ let owner = "vinceliuice"; repo = "Fluent-gtk-theme"; rev = "master"; - hash = "sha256-JW4ed7I1rxAlWj+hJEfWIRE7zaWvF7Ym3W3bqljwkMY="; + hash = "sha256-dgzKTU+eHSWC7qocUfp4KFDlJHGIaiaACQDEvoc4W7Y="; }; }); gtk-theme = "Fluent-Dark"; From b50a70f90cb104d5aee9e1287e478e5cb7742669 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 10 Apr 2025 19:23:56 +0900 Subject: [PATCH 05/34] add neovide config Signed-off-by: San Nguyen --- Makefile | 2 +- flake.lock | 30 +++++++++++++++--------------- flake.nix | 2 +- pkgs/nvchad/lua/options.lua | 4 ++++ 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 323ba381..71483dad 100644 --- a/Makefile +++ b/Makefile @@ -28,12 +28,12 @@ NIXNAME ?= vm-aarch64 SSH_OPTIONS=-o PubkeyAuthentication=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no switch: + rsync -av $(MAKEFILE_DIR)/modules/karabiner/mbp_m1_woven_planet/* /media/psf/Home/.config/karabiner nixos-rebuild switch --use-remote-sudo --impure --flake ".#parallels-desktop" # nix store gc # nix store optimise # nixos-rebuild switch --use-remote-sudo --impure --flake ".#vmware-fusion" # /home/$(NIXUSER)/.nix-profile/bin/home-manager switch --impure --flake ".#$(NIXUSER)" -b backup - # rsync -av $(MAKEFILE_DIR)/users/$(NIXUSER)/karabiner/mbp_m1_woven_planet/* /media/psf/Home/.config/karabiner # bootstrap a brand new VM. The VM should have NixOS ISO on the CD drive # and just set the password of the root user to "root". This will install diff --git a/flake.lock b/flake.lock index 568f043a..9bc06cfd 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1743783972, - "narHash": "sha256-5wPsNCnWmeLpLxavsftA9L7tnYgtlexV7FwLegxtpy4=", + "lastModified": 1744228912, + "narHash": "sha256-TOQIOeJ8R2KotgFgFA6ag65/kAj11CqIQP+gAB5jRqs=", "owner": "cachix", "repo": "devenv", - "rev": "2f53e2f867e0c2ba18b880e66169366e5f8ca554", + "rev": "e077ae7326e3867e6857247da9de951cb57d66a4", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1743598667, - "narHash": "sha256-ViE7NoFWytYO2uJONTAX35eGsvTYXNHjWALeHAg8OQY=", + "lastModified": 1744145203, + "narHash": "sha256-I2oILRiJ6G+BOSjY+0dGrTPe080L3pbKpc+gCV3Nmyk=", "owner": "nix-community", "repo": "disko", - "rev": "329d3d7e8bc63dd30c39e14e6076db590a6eabe6", + "rev": "76c0a6dba345490508f36c1aa3c7ba5b6b460989", "type": "github" }, "original": { @@ -207,11 +207,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1743820100, - "narHash": "sha256-URg5DLo0IvpTLNGrWA9f6U4pl21JxsQWSJUpjvALyxs=", + "lastModified": 1744158770, + "narHash": "sha256-2APOaRQd3ppQRgDPJAKluSu83XA78/b+0qghQp95kXU=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "6f7977fef186faa9b9afe7707dc21a2eff59883b", + "rev": "046e92865b4f2863815b7f7af52aab75d4bac63a", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1743869639, - "narHash": "sha256-Xhe3whfRW/Ay05z9m1EZ1/AkbV1yo0tm1CbgjtCi4rQ=", + "lastModified": 1744223888, + "narHash": "sha256-reYpe0J1J+wH34JFs7KKp0G5nP7+XSQ5z0ZLFJcfJr8=", "owner": "nix-community", "repo": "home-manager", - "rev": "d094c6763c6ddb860580e7d3b4201f8f496a6836", + "rev": "79461936709b12e17adb9c91dd02d1c66d577f09", "type": "github" }, "original": { @@ -570,11 +570,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1743689281, - "narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=", + "lastModified": 1744096231, + "narHash": "sha256-kUfx3FKU1Etnua3EaKvpeuXs7zoFiAcli1gBwkPvGSs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2bfc080955153be0be56724be6fa5477b4eefabb", + "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fd14c383..fcbb7fa5 100644 --- a/flake.nix +++ b/flake.nix @@ -132,7 +132,7 @@ ./machines/common.nix { disko.devices.disk.main.device = "/dev/nvme0n3"; - disko.devices.disk.work.device = "/dev/nvme0n4"; + disko.devices.disk.home.device = "/dev/nvme0n4"; environment.systemPackages = [ ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default diff --git a/pkgs/nvchad/lua/options.lua b/pkgs/nvchad/lua/options.lua index df4206de..684da1ae 100644 --- a/pkgs/nvchad/lua/options.lua +++ b/pkgs/nvchad/lua/options.lua @@ -150,3 +150,7 @@ vim.api.nvim_create_autocmd("FocusGained", { }) vim.lsp.log.set_level(vim.log.levels.OFF) + +vim.g.neovide_opacity = 0.8 +vim.g.neovide_normal_opacity = 0.8 +vim.g.neovide_background_color = "#292A37" From 640e399eeb0010c827a2d82bd5e4762668d449d0 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Tue, 15 Apr 2025 19:45:48 +0900 Subject: [PATCH 06/34] add aider Signed-off-by: San Nguyen --- .gitignore | 4 +++- modules/aider/.aider.conf.yml | 15 +++++++++++++++ modules/aider/.aider.model.settings.yml | 13 +++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 modules/aider/.aider.conf.yml create mode 100644 modules/aider/.aider.model.settings.yml diff --git a/.gitignore b/.gitignore index 5f606824..38d9f4e1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ result .direnv .devenv -.aider* +.aider.chat.history.md +.aider.input.history +.aider.tags.cache.v3 diff --git a/modules/aider/.aider.conf.yml b/modules/aider/.aider.conf.yml new file mode 100644 index 00000000..f532c8b4 --- /dev/null +++ b/modules/aider/.aider.conf.yml @@ -0,0 +1,15 @@ +--- +auto-commits: false +auto-lint: false +chat-mode: architect +auto-accept-architect: false +code-theme: github-dark +openai-api-base: http://localhost:5000/openai/v1 +stream: true +watch-files: true +pretty: true +model: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0 +editor-model: bedrock/us.anthropic.claude-3-5-haiku-20241022-v1:0 +edit-format: udiff +git: false +cache-prompts: true diff --git a/modules/aider/.aider.model.settings.yml b/modules/aider/.aider.model.settings.yml new file mode 100644 index 00000000..fdfe9feb --- /dev/null +++ b/modules/aider/.aider.model.settings.yml @@ -0,0 +1,13 @@ +--- +- name: aider/extra_params + extra_params: + extra_headers: + openai-project: '288' +- name: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0 + edit_format: diff + use_temperature: false + extra_params: + max_tokens: 64000 + thinking: + type: enabled + budget_tokens: 32000 From 829bb67fd6af6a83f5e9f2cd57d38c329886f09a Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Tue, 22 Apr 2025 00:27:22 +0900 Subject: [PATCH 07/34] update flakes Signed-off-by: San Nguyen --- flake.lock | 62 ++++++++++++++++---------------- flake.nix | 5 +++ modules/aider/default.nix | 5 +++ modules/misc/default.nix | 6 +++- modules/zsh/default.nix | 5 ++- pkgs/nvchad/lua/plugins/init.lua | 40 ++++++++++----------- users/sand/home.nix | 1 + 7 files changed, 69 insertions(+), 55 deletions(-) create mode 100644 modules/aider/default.nix diff --git a/flake.lock b/flake.lock index 9bc06cfd..34a8fa8d 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1744228912, - "narHash": "sha256-TOQIOeJ8R2KotgFgFA6ag65/kAj11CqIQP+gAB5jRqs=", + "lastModified": 1745020394, + "narHash": "sha256-045veG11u/fdRjYI+9dc19/u/14j7UFitwKWisE11Iw=", "owner": "cachix", "repo": "devenv", - "rev": "e077ae7326e3867e6857247da9de951cb57d66a4", + "rev": "6599a8c6d02c1d37fe5b7804f70a39c262298729", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1744145203, - "narHash": "sha256-I2oILRiJ6G+BOSjY+0dGrTPe080L3pbKpc+gCV3Nmyk=", + "lastModified": 1744940522, + "narHash": "sha256-TNoetfICvd29DhxRPpmyKItQBDlqSvKcV+wGNkn14jk=", "owner": "nix-community", "repo": "disko", - "rev": "76c0a6dba345490508f36c1aa3c7ba5b6b460989", + "rev": "51d33bbb7f1e74ba5f9d9a77357735149da99081", "type": "github" }, "original": { @@ -207,11 +207,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1744158770, - "narHash": "sha256-2APOaRQd3ppQRgDPJAKluSu83XA78/b+0qghQp95kXU=", + "lastModified": 1745071599, + "narHash": "sha256-6VCYCOLfSKzbUHCaZTe7mHuOfDIM63jLreHMzJJco9Q=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "046e92865b4f2863815b7f7af52aab75d4bac63a", + "rev": "4e10f972df556ecdf5b97090ef605f83188a23d7", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1744223888, - "narHash": "sha256-reYpe0J1J+wH34JFs7KKp0G5nP7+XSQ5z0ZLFJcfJr8=", + "lastModified": 1745071558, + "narHash": "sha256-bvcatss0xodcdxXm0LUSLPd2jjrhqO3yFSu3stOfQXg=", "owner": "nix-community", "repo": "home-manager", - "rev": "79461936709b12e17adb9c91dd02d1c66d577f09", + "rev": "9676e8a52a177d80c8a42f66566362a6d74ecf78", "type": "github" }, "original": { @@ -377,12 +377,12 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1743102273, - "narHash": "sha256-psXrRgGjZfpEbUgn6tEoeTa8L97KFV4mYon9ZGAZwxE=", - "rev": "86b8996bd44189799c2c4862945698b2495c8ed3", - "revCount": 125, + "lastModified": 1744405241, + "narHash": "sha256-/WA+SmhMndoF1/8lIkZtj9e0XsSeL8uRwmxFXbZGDmw=", + "rev": "83ae59b410a8d9667d8fe730c4f63aef6fb82abf", + "revCount": 129, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.27.1/0195d93a-2d08-756f-907c-440f7aa4c901/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.28.1/019626aa-8514-73c6-bbe3-694124fe468d/source.tar.gz" }, "original": { "type": "tarball", @@ -399,16 +399,16 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1742824067, - "narHash": "sha256-rBPulEBpn4IiqkPsetuh7BRzT2iGCzZYnogTAsbrvhU=", - "rev": "9cb662df7442a1e2c4600fb8ecb2ad613ebc5a95", - "revCount": 19496, + "lastModified": 1744012653, + "narHash": "sha256-R+HAPvD+AjiyRHZP/elkvka33G499EKT8ntyF/EPPRI=", + "rev": "e3a8e43600c2bf17ce72d04b5235397a8725817b", + "revCount": 19621, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.27.1/0195c8c5-1964-7a31-b025-ebf9bfeef991/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.28.1/01960f78-0dae-7f47-8634-b8166a3aac66/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.27.1" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.28.1" } }, "nixpkgs": { @@ -556,12 +556,12 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1742937945, - "narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=", - "rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7", - "revCount": 716288, + "lastModified": 1744309437, + "narHash": "sha256-QZnNHM823am8apCqKSPdtnzPGTy2ZB4zIXOVoBp5+W0=", + "rev": "f9ebe33a928b5d529c895202263a5ce46bdf12f7", + "revCount": 716906, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.716288%2Brev-d02d88f8de5b882ccdde0465d8fa2db3aa1169f7/0195d574-d7fe-7866-9aa3-2e5ea0618cf6/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.716906%2Brev-f9ebe33a928b5d529c895202263a5ce46bdf12f7/01962516-8e8a-7dcf-a403-62dfeef93d76/source.tar.gz" }, "original": { "type": "tarball", @@ -570,11 +570,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1744096231, - "narHash": "sha256-kUfx3FKU1Etnua3EaKvpeuXs7zoFiAcli1gBwkPvGSs=", + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fcbb7fa5..49535f47 100644 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,11 @@ disko.nixosModules.disko ./machines/parallels/disko-config.nix ./machines/common.nix + { + nixpkgs.config.permittedInsecurePackages = [ + "beekeeper-studio-5.1.5" + ]; + } { disko.devices.disk.main.device = "/dev/sda"; disko.devices.disk.home.device = "/dev/sdb"; diff --git a/modules/aider/default.nix b/modules/aider/default.nix new file mode 100644 index 00000000..ce8facbe --- /dev/null +++ b/modules/aider/default.nix @@ -0,0 +1,5 @@ +{ ... }: +{ + home.file.".aider.conf.yml".source = ./.aider.conf.yml; + home.file.".aider.model.settings.yml".source = ./.aider.model.settings.yml; +} diff --git a/modules/misc/default.nix b/modules/misc/default.nix index b7c4b754..d2b8f816 100644 --- a/modules/misc/default.nix +++ b/modules/misc/default.nix @@ -34,8 +34,12 @@ chafa # Python toolchain - rye + # rye # hatch + uv + + # DB + beekeeper-studio ] ); diff --git a/modules/zsh/default.nix b/modules/zsh/default.nix index 495d15b1..399ce2ec 100644 --- a/modules/zsh/default.nix +++ b/modules/zsh/default.nix @@ -20,9 +20,6 @@ . $HOME/.config/zsh/plugins/zsh-abbr/share/zsh/zsh-abbr/zsh-abbr.plugin.zsh . $HOME/.config/zsh/config/utils.zsh - export PATH=$HOME/.rye/shims:$PATH - source <(${pkgs.rye}/bin/rye self completion) - if [ -f /opt/homebrew/bin/brew ]; then eval "$(/opt/homebrew/bin/brew shellenv)" fi @@ -33,6 +30,8 @@ if command -v uvx &> /dev/null; then eval "$(uvx --generate-shell-completion zsh)" fi + + export PATH=$HOME/.local/bin:$PATH ''; zsh-abbr.enable = true; zsh-abbr.abbreviations = { diff --git a/pkgs/nvchad/lua/plugins/init.lua b/pkgs/nvchad/lua/plugins/init.lua index f35ee92f..762a7e2d 100644 --- a/pkgs/nvchad/lua/plugins/init.lua +++ b/pkgs/nvchad/lua/plugins/init.lua @@ -150,26 +150,26 @@ local plugins = { -- }, -- config = true, -- }, - -- { - -- 'zbirenbaum/copilot.lua', - -- event = 'VeryLazy', - -- dependencies = { { 'zbirenbaum/copilot-cmp', config = true, }, 'hrsh7th/nvim-cmp', }, - -- config = function() - -- require 'copilot'.setup { - -- panel = { - -- enabled = false, - -- }, - -- suggestion = { - -- enabled = false, - -- }, - -- filetypes = { - -- yaml = true, - -- markdown = true, - -- gitcommit = true, - -- }, - -- } - -- end, - -- }, + { + 'zbirenbaum/copilot.lua', + event = 'VeryLazy', + dependencies = { { 'zbirenbaum/copilot-cmp', config = true, }, 'hrsh7th/nvim-cmp', }, + config = function() + require 'copilot'.setup { + panel = { + enabled = false, + }, + suggestion = { + enabled = false, + }, + filetypes = { + yaml = true, + markdown = true, + gitcommit = true, + }, + } + end, + }, { 'rust-lang/rust.vim', ft = 'rust', diff --git a/users/sand/home.nix b/users/sand/home.nix index a8a907ec..f4383c67 100644 --- a/users/sand/home.nix +++ b/users/sand/home.nix @@ -88,6 +88,7 @@ }; imports = [ + ../../modules/aider ../../modules/hyprland ../../modules/alacritty ../../modules/cloud From 0fd2f9abb201fa6011150adcc01c0e7f34564773 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Wed, 23 Apr 2025 20:25:52 +0900 Subject: [PATCH 08/34] update ghostty Signed-off-by: San Nguyen --- flake.lock | 30 ++++++++++---------- modules/hyprland/hyprland.conf | 4 +-- modules/hyprland/scripts/hypr-cwd.sh | 14 --------- modules/hyprland/scripts/hypr-toggle-term.sh | 2 +- 4 files changed, 18 insertions(+), 32 deletions(-) delete mode 100755 modules/hyprland/scripts/hypr-cwd.sh diff --git a/flake.lock b/flake.lock index 34a8fa8d..08acf31e 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1745020394, - "narHash": "sha256-045veG11u/fdRjYI+9dc19/u/14j7UFitwKWisE11Iw=", + "lastModified": 1745308208, + "narHash": "sha256-IYXp208XmaFs0MRHZ0XaoKVFT3uBBrC4k0GSzTmi33Y=", "owner": "cachix", "repo": "devenv", - "rev": "6599a8c6d02c1d37fe5b7804f70a39c262298729", + "rev": "5ae341b148d0b486bdc82b8aca68706392a13c74", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1744940522, - "narHash": "sha256-TNoetfICvd29DhxRPpmyKItQBDlqSvKcV+wGNkn14jk=", + "lastModified": 1745224732, + "narHash": "sha256-0OWgbEKhpMLpk3WQi3ugOwxWW4Y6JVpKiQ+o0nuNzus=", "owner": "nix-community", "repo": "disko", - "rev": "51d33bbb7f1e74ba5f9d9a77357735149da99081", + "rev": "1770bf1ae5da05564f86b969ef21c7228cc1a70b", "type": "github" }, "original": { @@ -207,11 +207,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1745071599, - "narHash": "sha256-6VCYCOLfSKzbUHCaZTe7mHuOfDIM63jLreHMzJJco9Q=", + "lastModified": 1745271588, + "narHash": "sha256-SFLX31xOna07vZKEu2VtJ/5PmtYi1VOzHEjP4Xvn7eE=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "4e10f972df556ecdf5b97090ef605f83188a23d7", + "rev": "7ef9c24e3f200342b13be777718f1cf278dca1eb", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1745071558, - "narHash": "sha256-bvcatss0xodcdxXm0LUSLPd2jjrhqO3yFSu3stOfQXg=", + "lastModified": 1745272532, + "narHash": "sha256-+sFbKw1vFkulKYxsAbz84N0V/goSg808IgFh8iWe/As=", "owner": "nix-community", "repo": "home-manager", - "rev": "9676e8a52a177d80c8a42f66566362a6d74ecf78", + "rev": "81541ea36d1fead4be7797e826ee325d4c19308b", "type": "github" }, "original": { @@ -570,11 +570,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "lastModified": 1744868846, + "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c", "type": "github" }, "original": { diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index 5b54601e..fb6b849b 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -25,7 +25,7 @@ monitor=,4112x2572,auto,2 # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use -$terminal = ghostty -e "cd $(~/.nix-config/modules/hyprland/scripts/hypr-cwd.sh) && zsh" +$terminal = ghostty" $fileManager = nautilus $menu = wofi -p Search $nvim_nav = ~/.nix-config/modules/hyprland/scripts/hypr-nvim-nav.sh @@ -242,7 +242,7 @@ $mainMod = SUPER bind = Alt_R, T, exec, $toggle_term bind = Alt_R, W, workspace, emptym # Open terminal on new empty workspace bind = Alt_R, W, exec, $terminal -bind = CTRL_SHIFT, Return, exec, $terminal +bind = CTRL_SHIFT, Return, exec, $terminal --window-inherit-working-directory bind = Alt_R, Q, killactive, # bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager diff --git a/modules/hyprland/scripts/hypr-cwd.sh b/modules/hyprland/scripts/hypr-cwd.sh deleted file mode 100755 index fe2d950f..00000000 --- a/modules/hyprland/scripts/hypr-cwd.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -pid=$(hyprctl activewindow -j | jq '.pid') -cmdline=$(cat /proc/${pid}/cmdline | xargs -0 echo) - -# change to if the cmdline not including zsh -if [[ "$cmdline" != *"zsh"* ]]; then - dir=$(readlink /proc/"$pid"/cwd || echo "$HOME") -else - ppid=$(pgrep --newest --parent "$pid") - dir=$(readlink /proc/"$ppid"/cwd || echo "$HOME") -fi - -[ -d "$dir" ] && echo "$dir" || echo "$HOME" diff --git a/modules/hyprland/scripts/hypr-toggle-term.sh b/modules/hyprland/scripts/hypr-toggle-term.sh index 3342ceb0..7ec1294d 100755 --- a/modules/hyprland/scripts/hypr-toggle-term.sh +++ b/modules/hyprland/scripts/hypr-toggle-term.sh @@ -8,7 +8,7 @@ active_win_id=$(hyprctl activewindow -j | jq -r '.address') if [[ "$active_win_id" == "$nvim_win_id" ]]; then if [[ $win_count -eq 1 ]]; then - hyprctl dispatch -- exec "ghostty -e 'cd $(~/.nix-config/modules/hyprland/scripts/hypr-cwd.sh) && zsh'" + hyprctl dispatch -- exec "ghostty --window-inherit-working-directory" else if [[ "$is_zoomed" == "true" ]]; then hyprctl dispatch fullscreen 1 From 5d2d8a5a972db4e10855ab75a79591346580a049 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Wed, 7 May 2025 19:28:52 +0900 Subject: [PATCH 09/34] update changes Signed-off-by: San Nguyen --- flake.lock | 68 ++++++++++---------- modules/direnv/default.nix | 51 ++------------- modules/ghostty/config | 2 + modules/hyprland/hyprland.conf | 16 ++--- modules/hyprland/scripts/hypr-cwd.sh | 19 ++++++ modules/hyprland/scripts/hypr-toggle-term.sh | 2 +- modules/zsh/default.nix | 4 +- pkgs/nvchad/lua/plugins/init.lua | 2 +- 8 files changed, 69 insertions(+), 95 deletions(-) create mode 100755 modules/hyprland/scripts/hypr-cwd.sh diff --git a/flake.lock b/flake.lock index 08acf31e..bc5cdcb8 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1745308208, - "narHash": "sha256-IYXp208XmaFs0MRHZ0XaoKVFT3uBBrC4k0GSzTmi33Y=", + "lastModified": 1746276326, + "narHash": "sha256-uli6ejJFQ0z6QkFGOiNR98Nc/HklUpTEHgmP8nCUZzs=", "owner": "cachix", "repo": "devenv", - "rev": "5ae341b148d0b486bdc82b8aca68706392a13c74", + "rev": "0133867ecb206f1d9cedc3c5872d2a4eb2d8ff29", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1745224732, - "narHash": "sha256-0OWgbEKhpMLpk3WQi3ugOwxWW4Y6JVpKiQ+o0nuNzus=", + "lastModified": 1745812220, + "narHash": "sha256-hotBG0EJ9VmAHJYF0yhWuTVZpENHvwcJ2SxvIPrXm+g=", "owner": "nix-community", "repo": "disko", - "rev": "1770bf1ae5da05564f86b969ef21c7228cc1a70b", + "rev": "d0c543d740fad42fe2c035b43c9d41127e073c78", "type": "github" }, "original": { @@ -207,11 +207,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1745271588, - "narHash": "sha256-SFLX31xOna07vZKEu2VtJ/5PmtYi1VOzHEjP4Xvn7eE=", + "lastModified": 1746309933, + "narHash": "sha256-+NoXOpVFuqIC3EiPBkOT8RVS2RkWSpA5ghBIR3QaGTM=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "7ef9c24e3f200342b13be777718f1cf278dca1eb", + "rev": "b6f338065eb45935627a51a7d9102019aaeae1c0", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1745272532, - "narHash": "sha256-+sFbKw1vFkulKYxsAbz84N0V/goSg808IgFh8iWe/As=", + "lastModified": 1746317522, + "narHash": "sha256-/jZ4Wd4HHUEWPSlNj48k1E4Mh+1fUbwI/vSlPPIMG3U=", "owner": "nix-community", "repo": "home-manager", - "rev": "81541ea36d1fead4be7797e826ee325d4c19308b", + "rev": "621986fed37c5d0cb8df010ed8369694dc47c09b", "type": "github" }, "original": { @@ -357,11 +357,11 @@ ] }, "locked": { - "lastModified": 1741798497, - "narHash": "sha256-E3j+3MoY8Y96mG1dUIiLFm2tZmNbRvSiyN7CrSKuAVg=", + "lastModified": 1745930071, + "narHash": "sha256-bYyjarS3qSNqxfgc89IoVz8cAFDkF9yPE63EJr+h50s=", "owner": "domenkozar", "repo": "nix", - "rev": "f3f44b2baaf6c4c6e179de8cbb1cc6db031083cd", + "rev": "b455edf3505f1bf0172b39a735caef94687d0d9c", "type": "github" }, "original": { @@ -377,12 +377,12 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1744405241, - "narHash": "sha256-/WA+SmhMndoF1/8lIkZtj9e0XsSeL8uRwmxFXbZGDmw=", - "rev": "83ae59b410a8d9667d8fe730c4f63aef6fb82abf", - "revCount": 129, + "lastModified": 1745615134, + "narHash": "sha256-mMvahO6hUxk0mK+dKotugyLyrvxSmzZODRyehtxD3Jg=", + "rev": "3e538038e4135ebb40398eba71048cc8d4ee20f5", + "revCount": 130, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.28.1/019626aa-8514-73c6-bbe3-694124fe468d/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.28.2/01966ec7-f85d-7680-a2e0-43bf19f73fdc/source.tar.gz" }, "original": { "type": "tarball", @@ -399,16 +399,16 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1744012653, - "narHash": "sha256-R+HAPvD+AjiyRHZP/elkvka33G499EKT8ntyF/EPPRI=", - "rev": "e3a8e43600c2bf17ce72d04b5235397a8725817b", - "revCount": 19621, + "lastModified": 1744743986, + "narHash": "sha256-yl+hlZ/VFHIZwPIDEs4ysOYgprW4VEORfSyvScF7Cwg=", + "rev": "8a7b8dce5f5ca10d9cd5d09b97b72d38ae9d10f3", + "revCount": 19668, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.28.1/01960f78-0dae-7f47-8634-b8166a3aac66/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.28.2/019643a0-4305-734c-a138-899baa980ef5/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.28.1" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.28.2" } }, "nixpkgs": { @@ -556,12 +556,12 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1744309437, - "narHash": "sha256-QZnNHM823am8apCqKSPdtnzPGTy2ZB4zIXOVoBp5+W0=", - "rev": "f9ebe33a928b5d529c895202263a5ce46bdf12f7", - "revCount": 716906, + "lastModified": 1745487689, + "narHash": "sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw=", + "rev": "5630cf13cceac06cefe9fc607e8dfa8fb342dde3", + "revCount": 717296, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.716906%2Brev-f9ebe33a928b5d529c895202263a5ce46bdf12f7/01962516-8e8a-7dcf-a403-62dfeef93d76/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717296%2Brev-5630cf13cceac06cefe9fc607e8dfa8fb342dde3/01966926-f6e4-7d61-879f-3f882bea5328/source.tar.gz" }, "original": { "type": "tarball", @@ -570,11 +570,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1744868846, - "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", + "lastModified": 1746269363, + "narHash": "sha256-Q0lKWway9OmZnkDTpAoAE9VLXHOHqCqdJ3N0tkSM99g=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c", + "rev": "b6aef6c3553f849e1e6c08f1bcd3061df2b69fc4", "type": "github" }, "original": { diff --git a/modules/direnv/default.nix b/modules/direnv/default.nix index 774e0f4d..cc2ad2de 100644 --- a/modules/direnv/default.nix +++ b/modules/direnv/default.nix @@ -2,6 +2,12 @@ { programs.direnv.enable = true; programs.direnv.nix-direnv.enable = true; + programs.direnv.config = { + global = { + log_format = "-"; + log_filter = "^$"; + }; + }; programs.direnv.stdlib = '' : ''${XDG_CACHE_HOME:=$HOME/.cache} declare -A direnv_layout_dirs @@ -13,50 +19,5 @@ echo "$XDG_CACHE_HOME/direnv/layouts/$hash-$path" )}" } - - use_flake() { - watch_file flake.nix - watch_file flake.lock - eval "$(nix print-dev-env --profile "$(direnv_layout_dir)/flake-profile")" - } - - layout_poetry() { - if has poetry; then - if [[ ! -f pyproject.toml ]]; then - echo 'No pyproject.toml found. Use `poetry init` to create one first.' - poetry init - fi - - # create venv if it doesn't exist - poetry run true - - export VIRTUAL_ENV=$(poetry env info --path) - export POETRY_ACTIVE=1 - PATH_add "$VIRTUAL_ENV/bin" - fi - } - - layout_pdm() { - if has pdm; then - # create venv if it doesn't exist - if [[ ! -d .venv ]]; then - pdm venv create - fi - - if [[ ! -f pyproject.toml ]]; then - echo 'No pyproject.toml found. Use `pdm init` to create one first.' - pdm init - fi - - if [[ "$VIRTUAL_ENV" == "" ]]; then - pdm use -q --venv in-project - eval $(pdm venv activate in-project) - - export VIRTUAL_ENV=$(pwd)/.venv - export PYTHONPATH=$VIRTUAL_ENV/lib/$(command ls $VIRTUAL_ENV/lib | head -1)/site-packages:$PYTHONPATH - PATH_add "$VIRTUAL_ENV/bin" - fi - fi - } ''; } diff --git a/modules/ghostty/config b/modules/ghostty/config index 05ddc8e1..a8b7738b 100644 --- a/modules/ghostty/config +++ b/modules/ghostty/config @@ -56,6 +56,7 @@ macos-option-as-alt = right shell-integration = zsh shell-integration-features = sudo,cursor,title scrollback-limit = 1_000_000_000 +window-inherit-working-directory = true keybind = clear keybind = ctrl+v=paste_from_clipboard @@ -63,6 +64,7 @@ keybind = ctrl+v=paste_from_clipboard keybind = ctrl+shift+zero=reset_font_size keybind = ctrl+shift+plus=increase_font_size:1 keybind = ctrl+shift+minus=decrease_font_size:1 +keybind = ctrl+shift+enter=new_window background = #292A37 foreground = #ffffff diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index fb6b849b..164df91c 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -25,7 +25,7 @@ monitor=,4112x2572,auto,2 # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use -$terminal = ghostty" +$terminal = ghostty $fileManager = nautilus $menu = wofi -p Search $nvim_nav = ~/.nix-config/modules/hyprland/scripts/hypr-nvim-nav.sh @@ -242,7 +242,7 @@ $mainMod = SUPER bind = Alt_R, T, exec, $toggle_term bind = Alt_R, W, workspace, emptym # Open terminal on new empty workspace bind = Alt_R, W, exec, $terminal -bind = CTRL_SHIFT, Return, exec, $terminal --window-inherit-working-directory +bindn = CTRL_SHIFT, Return, execr, [ "$(hyprctl activewindow -j | jq -r '.class')" == "neovide" ] && $terminal -e ~/.nix-config/modules/hyprland/scripts/hypr-cwd.sh bind = Alt_R, Q, killactive, # bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager @@ -300,7 +300,7 @@ bind = Control_L, L, exec, $nvim_nav r bind = Control_L, K, exec, $nvim_nav u bind = Control_L, J, exec, $nvim_nav d -bind = CTRL_SHIFT, V, exec, [float] ghostty -e 'clipse' +bind = CTRL_SHIFT, V, exec, [float] $terminal -e 'clipse' bindn = CTRL_SHIFT, Return, execr, [ "$(hyprctl activeworkspace -j | jq -r '.hasfullscreen')" == "true" ] && hyprctl dispatch fullscreen 1 binde = CTRL_SHIFT, equal, execr, $set_font_size_all binde = CTRL_SHIFT, minus, execr, $set_font_size_all @@ -336,13 +336,6 @@ bind = $mainMod, B, workspace, -1 # windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. -# Parallels Shared Clipboard will create a tile window when switching to Host -# So we set window rules to not showing. -# windowrulev2 = float, title:^(Parallels Shared Clipboard)$ -# windowrulev2 = size 0 0, title:^(Parallels Shared Clipboard)$ -# windowrulev2 = maxsize 0 0, title:^(Parallels Shared Clipboard)$ -# windowrulev2 = opacity 0, title:^(Parallels Shared Clipboard)$ - # Style fullscreen window differently windowrulev2 = bordercolor rgb(FA0DED) rgb(3292F3) 45deg, fullscreen:1 @@ -354,7 +347,8 @@ windowrulev2 = bordercolor rgb(FA0DED) rgb(3292F3) 45deg, fullscreen:1 bindn = Alt_L, BackSpace, sendshortcut, Control_L, BackSpace, ^(firefox)$ bindn = Alt_L, BackSpace, sendshortcut, Control_L, BackSpace, ^(floorp)$ -# Hide empty window of Parallels Shared Clipboard +# Parallels Shared Clipboard will create a tile window when switching to Host +# So we set window rules to not showing. windowrulev2 = float, title:(Parallels Shared Clipboard) windowrulev2 = size 0 0, title:(Parallels Shared Clipboard) windowrulev2 = opacity 0, title:(Parallels Shared Clipboard) diff --git a/modules/hyprland/scripts/hypr-cwd.sh b/modules/hyprland/scripts/hypr-cwd.sh new file mode 100755 index 00000000..3659d956 --- /dev/null +++ b/modules/hyprland/scripts/hypr-cwd.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +pid=$(hyprctl activewindow -j | jq '.pid') +cmdline="" +if [[ "$pid" != "null" ]]; then + cmdline=$(cat /proc/${pid}/cmdline | xargs -0 echo) +fi + +# change to if the cmdline not including ghostty +if [[ "$cmdline" != *"ghostty"* ]]; then + dir=$(readlink /proc/"$pid"/cwd || echo "$HOME") +else + ppid=$(pgrep --newest --parent "$pid") + dir=$(readlink /proc/"$ppid"/cwd || echo "$HOME") +fi + +[ -d "$dir" ] && cd $dir + +zsh diff --git a/modules/hyprland/scripts/hypr-toggle-term.sh b/modules/hyprland/scripts/hypr-toggle-term.sh index 7ec1294d..7ef2332c 100755 --- a/modules/hyprland/scripts/hypr-toggle-term.sh +++ b/modules/hyprland/scripts/hypr-toggle-term.sh @@ -8,7 +8,7 @@ active_win_id=$(hyprctl activewindow -j | jq -r '.address') if [[ "$active_win_id" == "$nvim_win_id" ]]; then if [[ $win_count -eq 1 ]]; then - hyprctl dispatch -- exec "ghostty --window-inherit-working-directory" + hyprctl dispatch -- exec "ghostty -e ~/.nix-config/modules/hyprland/scripts/hypr-cwd.sh" else if [[ "$is_zoomed" == "true" ]]; then hyprctl dispatch fullscreen 1 diff --git a/modules/zsh/default.nix b/modules/zsh/default.nix index 399ce2ec..a3aa0cd7 100644 --- a/modules/zsh/default.nix +++ b/modules/zsh/default.nix @@ -8,9 +8,7 @@ defaultKeymap = "emacs"; history.path = "${config.xdg.configHome}/zsh/.zsh_history"; completionInit = ""; - initExtra = '' - export DIRENV_LOG_FORMAT= - + initContent = '' # Set fzf folder for z4h so it won't install another fzf __fzf_dir=${pkgs.fzf} . $HOME/.config/zsh/config/init.zsh diff --git a/pkgs/nvchad/lua/plugins/init.lua b/pkgs/nvchad/lua/plugins/init.lua index 762a7e2d..a71fe5f4 100644 --- a/pkgs/nvchad/lua/plugins/init.lua +++ b/pkgs/nvchad/lua/plugins/init.lua @@ -126,7 +126,7 @@ local plugins = { config = function() require("nvim_aider").setup({ -- Command line arguments passed to aider - aider_cmd = "AWS_PROFILE=wovey-dev-admin aider", + aider_cmd = "eval $(wovey-cli aws shell --profile genai-dev-admin) && aider", args = { "--no-auto-commits", "--pretty", From a1a5834256c996a5e59866d5a03e2534db426c1b Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 8 May 2025 01:00:24 +0000 Subject: [PATCH 10/34] update install instruction --- README.md | 27 +++++++++++++++++++++++++++ flake.nix | 4 ++-- machines/parallels/disko-config.nix | 6 ++++-- modules/gnome/default.nix | 2 +- pkgs/comic-code/default.nix | 2 +- 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 57c01f63..e12c2f28 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,28 @@ sudo vim /etc/rpm-ostreed.conf # AutomaticUpdatePolicy=stage ``` +## Setup NixOS + +Boot from NixOS iso image, then run + +```sh +nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#gh +gh auth login +gh clone sandangel/nixos-config ~/.nix-config +cd ~/.nix-config +gh clone sandangel/artifacts + +cp artifacts/comic-code.tar.gz pkgs/comic-code/ +vim pkgs/comic-code/default.nix # change /home/sand to /home/nixos + +# Format disk +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount ./machines/parallels/disko-config.nix + +# Install NixOS +cd /mnt +sudo nixos-install --flake '/home/nixos/.nix-config#parallels-desktop' --impure +``` + ## Setup Arch Linux ```sh @@ -324,4 +346,9 @@ mount /dev/nvme0n2p1 /mnt btrfs filesystem resize max /mnt ``` + +To sync data from VM and Host + +```sh rsync -ahr --no-links --exclude=".Trash-1000" --exclude=".pnpm-store" --exclude=".devenv" --exclude="node_modules" --exclude=".venv" --exclude=".cache" --exclude=".pdm-build" --exclude=".mypy_cache" --exclude=".ruff_cache" --exclude="dist" --exclude=".pytest_cache" --exclude="target" --exclude=".terraform" ~/Work /host/Downloads/ +``` diff --git a/flake.nix b/flake.nix index 49535f47..8abd0ea3 100644 --- a/flake.nix +++ b/flake.nix @@ -118,8 +118,8 @@ ]; } { - disko.devices.disk.main.device = "/dev/sda"; - disko.devices.disk.home.device = "/dev/sdb"; + disko.devices.disk.primary.device = "/dev/sda"; + disko.devices.disk.secondary.device = "/dev/sdb"; environment.systemPackages = [ ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default diff --git a/machines/parallels/disko-config.nix b/machines/parallels/disko-config.nix index 20b2b4a3..c1b7183c 100644 --- a/machines/parallels/disko-config.nix +++ b/machines/parallels/disko-config.nix @@ -1,8 +1,9 @@ { disko.devices = { disk = { - main = { + primary = { type = "disk"; + device = "/dev/sda"; content = { type = "gpt"; partitions = { @@ -41,8 +42,9 @@ }; }; }; - home = { + secondary = { type = "disk"; + device = "/dev/sdb"; content = { type = "gpt"; partitions = { diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix index 133a4c70..e1eb0122 100644 --- a/modules/gnome/default.nix +++ b/modules/gnome/default.nix @@ -13,7 +13,7 @@ let owner = "vinceliuice"; repo = "Fluent-gtk-theme"; rev = "master"; - hash = "sha256-dgzKTU+eHSWC7qocUfp4KFDlJHGIaiaACQDEvoc4W7Y="; + hash = "sha256-AaFj9lG9lWg0a0ksJ0ufoUpsunR3uDhcdb7oSrvAmPI="; }; }); gtk-theme = "Fluent-Dark"; diff --git a/pkgs/comic-code/default.nix b/pkgs/comic-code/default.nix index 6ec04647..e3464a3b 100644 --- a/pkgs/comic-code/default.nix +++ b/pkgs/comic-code/default.nix @@ -4,7 +4,7 @@ stdenvNoCC.mkDerivation { version = "0.1.0"; src = if stdenv.isLinux then - /home/sand/.nix-config/pkgs/comic-code/comic-code.tar.gz + /home/nixos/.nix-config/pkgs/comic-code/comic-code.tar.gz else /Users/nix-config/pkgs/comic-code/comic-code.tar.gz; phases = [ From 1be7d33ef087fc47fa046ab90830416ded3c461e Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 8 May 2025 15:43:02 +0900 Subject: [PATCH 11/34] fix user name Signed-off-by: San Nguyen --- pkgs/comic-code/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/comic-code/default.nix b/pkgs/comic-code/default.nix index e3464a3b..6ec04647 100644 --- a/pkgs/comic-code/default.nix +++ b/pkgs/comic-code/default.nix @@ -4,7 +4,7 @@ stdenvNoCC.mkDerivation { version = "0.1.0"; src = if stdenv.isLinux then - /home/nixos/.nix-config/pkgs/comic-code/comic-code.tar.gz + /home/sand/.nix-config/pkgs/comic-code/comic-code.tar.gz else /Users/nix-config/pkgs/comic-code/comic-code.tar.gz; phases = [ From d985433cff9c58d5f196682704d421066c87cec0 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 8 May 2025 23:20:43 +0900 Subject: [PATCH 12/34] chore update lockfile Signed-off-by: San Nguyen --- flake.lock | 62 +++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/flake.lock b/flake.lock index bc5cdcb8..577fe782 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1746276326, - "narHash": "sha256-uli6ejJFQ0z6QkFGOiNR98Nc/HklUpTEHgmP8nCUZzs=", + "lastModified": 1746707904, + "narHash": "sha256-j1BAUl+NYtWWWVkuDLfSE0wlF7FlkwhrcJxDISXAVvE=", "owner": "cachix", "repo": "devenv", - "rev": "0133867ecb206f1d9cedc3c5872d2a4eb2d8ff29", + "rev": "fada79d97f2066c444766d039b0a62affd3e3cab", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1745812220, - "narHash": "sha256-hotBG0EJ9VmAHJYF0yhWuTVZpENHvwcJ2SxvIPrXm+g=", + "lastModified": 1746695594, + "narHash": "sha256-pAAWYs3S+/tY65vemHZdVSXpeIz4JINEJZoPoBjr8JU=", "owner": "nix-community", "repo": "disko", - "rev": "d0c543d740fad42fe2c035b43c9d41127e073c78", + "rev": "6bb82b77ce140137177e30df067759931ab60a73", "type": "github" }, "original": { @@ -207,11 +207,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1746309933, - "narHash": "sha256-+NoXOpVFuqIC3EiPBkOT8RVS2RkWSpA5ghBIR3QaGTM=", + "lastModified": 1746649518, + "narHash": "sha256-ogOT0WwOy8rY5vhJ5JfVOa3qc6sbDxRAMQAQIjCz1gk=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "b6f338065eb45935627a51a7d9102019aaeae1c0", + "rev": "bcff488095cab023f26bb7bbfaf674cb0086ef87", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1746317522, - "narHash": "sha256-/jZ4Wd4HHUEWPSlNj48k1E4Mh+1fUbwI/vSlPPIMG3U=", + "lastModified": 1746710194, + "narHash": "sha256-r2zE8+rWZieU05LMKixeU5SsMy9I4truiTPKchTPNaw=", "owner": "nix-community", "repo": "home-manager", - "rev": "621986fed37c5d0cb8df010ed8369694dc47c09b", + "rev": "cea975d46d08293eae3ad0d9f16207f1ce2dfc81", "type": "github" }, "original": { @@ -377,12 +377,12 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1745615134, - "narHash": "sha256-mMvahO6hUxk0mK+dKotugyLyrvxSmzZODRyehtxD3Jg=", - "rev": "3e538038e4135ebb40398eba71048cc8d4ee20f5", - "revCount": 130, + "lastModified": 1746451726, + "narHash": "sha256-6onSFZCkNvvzO0i1EK6d8a3n318A9ofLbwNU+q3iBqg=", + "rev": "ed867150b942b00331ee7c08808857849c16e878", + "revCount": 131, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.28.2/01966ec7-f85d-7680-a2e0-43bf19f73fdc/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.28.3/0196a0a5-8c1d-74b8-a870-afc7dbaa5f5d/source.tar.gz" }, "original": { "type": "tarball", @@ -399,16 +399,16 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1744743986, - "narHash": "sha256-yl+hlZ/VFHIZwPIDEs4ysOYgprW4VEORfSyvScF7Cwg=", - "rev": "8a7b8dce5f5ca10d9cd5d09b97b72d38ae9d10f3", - "revCount": 19668, + "lastModified": 1745826512, + "narHash": "sha256-TjZp5ITSUvNRAzNznmkZRQxNRzMLiSAplz4bV2T8cbs=", + "rev": "4d4a91ab8d29cdf986db37d4712dd86fbfdb0fde", + "revCount": 19691, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.28.2/019643a0-4305-734c-a138-899baa980ef5/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.28.3/0196831d-0b17-7bc1-99b9-932f928dfd27/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.28.2" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.28.3" } }, "nixpkgs": { @@ -556,12 +556,12 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1745487689, - "narHash": "sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw=", - "rev": "5630cf13cceac06cefe9fc607e8dfa8fb342dde3", - "revCount": 717296, + "lastModified": 1746422338, + "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", + "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", + "revCount": 717703, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717296%2Brev-5630cf13cceac06cefe9fc607e8dfa8fb342dde3/01966926-f6e4-7d61-879f-3f882bea5328/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717703%2Brev-5b35d248e9206c1f3baf8de6a7683fee126364aa/01969fd3-4335-7c69-b5e3-2a7800baaab9/source.tar.gz" }, "original": { "type": "tarball", @@ -570,11 +570,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1746269363, - "narHash": "sha256-Q0lKWway9OmZnkDTpAoAE9VLXHOHqCqdJ3N0tkSM99g=", + "lastModified": 1746576598, + "narHash": "sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b6aef6c3553f849e1e6c08f1bcd3061df2b69fc4", + "rev": "b3582c75c7f21ce0b429898980eddbbf05c68e55", "type": "github" }, "original": { From e0bec9ffbea449d5e3918089289affbb6f4bf8d6 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 8 May 2025 23:22:11 +0900 Subject: [PATCH 13/34] fix deprecated Signed-off-by: San Nguyen --- modules/hyprland/default.nix | 2 +- modules/kitty/default.nix | 2 +- modules/programs/kubeswitch.nix | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index 8782aa5d..f27fbb25 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -19,7 +19,7 @@ in wayland.windowManager.hyprland.systemd.enable = true; wayland.windowManager.hyprland.systemd.variables = [ "--all" ]; programs.zsh = { - initExtra = '' + initContent = '' . $HOME/.nix-config/modules/hyprland/hyprland.zsh ''; }; diff --git a/modules/kitty/default.nix b/modules/kitty/default.nix index 9740e6ef..1afac49e 100644 --- a/modules/kitty/default.nix +++ b/modules/kitty/default.nix @@ -4,7 +4,7 @@ lib.mkMerge [ xdg.configFile."kitty".source = ./.; xdg.configFile."kitty".recursive = true; programs.zsh = { - initExtra = '' + initContent = '' . $HOME/.config/kitty/kitty.zsh ''; }; diff --git a/modules/programs/kubeswitch.nix b/modules/programs/kubeswitch.nix index 7a879034..4bbc83b5 100644 --- a/modules/programs/kubeswitch.nix +++ b/modules/programs/kubeswitch.nix @@ -40,12 +40,12 @@ in lib.mkIf cfg.enable { home.packages = [ cfg.package ]; - programs.bash.initExtra = '' + programs.bash.initContent = '' source ${shell_files}/share/${cfg.command}_init.bash source ${shell_files}/share/${cfg.command}_completion.bash ''; - programs.zsh.initExtra = '' + programs.zsh.initContent = '' autoload -U +X compinit && compinit source ${shell_files}/share/${cfg.command}_init.zsh From 5a2840bbd025af98425ca2f35cd22549c4e05341 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 8 May 2025 23:22:45 +0900 Subject: [PATCH 14/34] fix bash Signed-off-by: San Nguyen --- modules/programs/kubeswitch.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/kubeswitch.nix b/modules/programs/kubeswitch.nix index 4bbc83b5..5a7bb687 100644 --- a/modules/programs/kubeswitch.nix +++ b/modules/programs/kubeswitch.nix @@ -40,7 +40,7 @@ in lib.mkIf cfg.enable { home.packages = [ cfg.package ]; - programs.bash.initContent = '' + programs.bash.initExtra = '' source ${shell_files}/share/${cfg.command}_init.bash source ${shell_files}/share/${cfg.command}_completion.bash ''; From 65ddae84f61e1382a4fc116624960f387581e45c Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sun, 18 May 2025 14:31:54 +0900 Subject: [PATCH 15/34] chore: switch to alacritty instead of ghostty Signed-off-by: San Nguyen --- flake.lock | 48 +++++++++---------- modules/alacritty/alacritty.toml | 37 +++++++------- modules/hyprland/hyprland.conf | 6 +-- modules/hyprland/scripts/hypr-cwd.sh | 2 +- .../scripts/hypr-set-font-size-all.sh | 2 +- modules/hyprland/scripts/hypr-toggle-term.sh | 4 +- modules/hyprland/wofi/default.nix | 2 +- 7 files changed, 51 insertions(+), 50 deletions(-) diff --git a/flake.lock b/flake.lock index 577fe782..ceddb7a5 100644 --- a/flake.lock +++ b/flake.lock @@ -14,11 +14,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1742042642, - "narHash": "sha256-D0gP8srrX0qj+wNYNPdtVJsQuFzIng3q43thnHXQ/es=", + "lastModified": 1744206633, + "narHash": "sha256-pb5aYkE8FOoa4n123slgHiOf1UbNSnKe5pEZC+xXD5g=", "owner": "cachix", "repo": "cachix", - "rev": "a624d3eaf4b1d225f918de8543ed739f2f574203", + "rev": "8a60090640b96f9df95d1ab99e5763a586be1404", "type": "github" }, "original": { @@ -37,11 +37,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1746707904, - "narHash": "sha256-j1BAUl+NYtWWWVkuDLfSE0wlF7FlkwhrcJxDISXAVvE=", + "lastModified": 1747482870, + "narHash": "sha256-ydkvT7+C85KAafJlO9j3w8+v38qYlS5dq8kUzeEVh4E=", "owner": "cachix", "repo": "devenv", - "rev": "fada79d97f2066c444766d039b0a62affd3e3cab", + "rev": "7ea7b397c958ffa14c6a26e73d88620bc6e3d83d", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1746695594, - "narHash": "sha256-pAAWYs3S+/tY65vemHZdVSXpeIz4JINEJZoPoBjr8JU=", + "lastModified": 1747274630, + "narHash": "sha256-87RJwXbfOHyzTB9LYagAQ6vOZhszCvd8Gvudu+gf3qo=", "owner": "nix-community", "repo": "disko", - "rev": "6bb82b77ce140137177e30df067759931ab60a73", + "rev": "ec7c109a4f794fce09aad87239eab7f66540b888", "type": "github" }, "original": { @@ -207,11 +207,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1746649518, - "narHash": "sha256-ogOT0WwOy8rY5vhJ5JfVOa3qc6sbDxRAMQAQIjCz1gk=", + "lastModified": 1747426608, + "narHash": "sha256-ygRFvCVdVEAU95tH2EMMacYH/T42tC3mtDkt5lBJT9U=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "bcff488095cab023f26bb7bbfaf674cb0086ef87", + "rev": "b1af4a597f359491f4b3197a845b39ec86db475a", "type": "github" }, "original": { @@ -232,11 +232,11 @@ ] }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1746537231, + "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1746710194, - "narHash": "sha256-r2zE8+rWZieU05LMKixeU5SsMy9I4truiTPKchTPNaw=", + "lastModified": 1747439237, + "narHash": "sha256-5rCGrnkglKKj4cav1U3HC+SIUNJh08pqOK4spQv9RjA=", "owner": "nix-community", "repo": "home-manager", - "rev": "cea975d46d08293eae3ad0d9f16207f1ce2dfc81", + "rev": "ae755329092c87369b9e9a1510a8cf1ce2b1c708", "type": "github" }, "original": { @@ -524,11 +524,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1733477122, - "narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=", + "lastModified": 1746807397, + "narHash": "sha256-zU2z0jlkJGWLhdNr/8AJSxqK8XD0IlQgHp3VZcP56Aw=", "owner": "cachix", "repo": "devenv-nixpkgs", - "rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857", + "rev": "c5208b594838ea8e6cca5997fbf784b7cca1ca90", "type": "github" }, "original": { @@ -570,11 +570,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1746576598, - "narHash": "sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0=", + "lastModified": 1747426788, + "narHash": "sha256-N4cp0asTsJCnRMFZ/k19V9akkxb7J/opG+K+jU57JGc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b3582c75c7f21ce0b429898980eddbbf05c68e55", + "rev": "12a55407652e04dcf2309436eb06fef0d3713ef3", "type": "github" }, "original": { diff --git a/modules/alacritty/alacritty.toml b/modules/alacritty/alacritty.toml index d55a10c2..fe3079da 100644 --- a/modules/alacritty/alacritty.toml +++ b/modules/alacritty/alacritty.toml @@ -13,34 +13,32 @@ bold = { family = "Comic Code Ligatures", style = "Regular" } italic = { family = "Comic Code Ligatures", style = "Italic" } bold_italic = { family = "Comic Code Ligatures", style = "Italic" } -# Colors (Ayu Dark) - # Default colors [colors.primary] background = '#0A0E14' -foreground = '#B3B1AD' +foreground = '#d9e0ee' # Normal colors [colors.normal] -black = '#01060E' -red = '#EA6C73' -green = '#91B362' -yellow = '#F9AF4F' -blue = '#53BDFA' -magenta = '#FAE994' -cyan = '#90E1C6' -white = '#C7C7C7' +black = '#272734' +red = '#ec6a88' +green = '#3FDAA4' +yellow = '#e1c697' +blue = '#78a9ff' +magenta = '#be95ff' +cyan = '#09deda' +white = '#d9e0ee' # Bright colors [colors.bright] -black = '#686868' -red = '#F07178' -green = '#C2D94C' -yellow = '#FFB454' -blue = '#59C2FF' -magenta = '#FFEE99' -cyan = '#95E6CB' -white = '#FFFFFF' +black = '#67698a' +red = '#ff7eb6' +green = '#08bdba' +yellow = '#e8d4b0' +blue = '#3fc6de' +magenta = '#936fdc' +cyan = '#6be6e6' +white = '#ffffff' [selection] save_to_clipboard = true @@ -51,6 +49,7 @@ vi_mode_style = { shape = "Block", blinking = "Off" } [keyboard] bindings = [ + { key = "[", mods = "Control", action = "ToggleViMode" }, { key = "V", mods = "Control", mode = "~Vi", action = "Paste" }, { key = "Enter", mods = "Control|Shift", action = "CreateNewWindow" }, { key = "+", mods = "Control|Shift", action = "IncreaseFontSize" }, diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index 164df91c..a2567ff6 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -25,7 +25,7 @@ monitor=,4112x2572,auto,2 # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use -$terminal = ghostty +$terminal = alacritty $fileManager = nautilus $menu = wofi -p Search $nvim_nav = ~/.nix-config/modules/hyprland/scripts/hypr-nvim-nav.sh @@ -242,7 +242,7 @@ $mainMod = SUPER bind = Alt_R, T, exec, $toggle_term bind = Alt_R, W, workspace, emptym # Open terminal on new empty workspace bind = Alt_R, W, exec, $terminal -bindn = CTRL_SHIFT, Return, execr, [ "$(hyprctl activewindow -j | jq -r '.class')" == "neovide" ] && $terminal -e ~/.nix-config/modules/hyprland/scripts/hypr-cwd.sh +bind = CTRL_SHIFT, Return, execr, pid=$(hyprctl activewindow -j | jq '.pid'); [ "$(hyprctl activewindow -j | jq -r '.class')" == "neovide" ] && dir=$(readlink /proc/"$pid"/cwd); [ "$(hyprctl activewindow -j | jq -r '.class')" != "neovide" ] && ppid=$(pgrep --newest --parent "$pid") && dir=$(readlink /proc/"$ppid"/cwd); $terminal --working-directory $dir bind = Alt_R, Q, killactive, # bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager @@ -301,7 +301,7 @@ bind = Control_L, K, exec, $nvim_nav u bind = Control_L, J, exec, $nvim_nav d bind = CTRL_SHIFT, V, exec, [float] $terminal -e 'clipse' -bindn = CTRL_SHIFT, Return, execr, [ "$(hyprctl activeworkspace -j | jq -r '.hasfullscreen')" == "true" ] && hyprctl dispatch fullscreen 1 +bind = CTRL_SHIFT, Return, execr, [ "$(hyprctl activeworkspace -j | jq -r '.hasfullscreen')" == "true" ] && hyprctl dispatch fullscreen 1 binde = CTRL_SHIFT, equal, execr, $set_font_size_all binde = CTRL_SHIFT, minus, execr, $set_font_size_all binde = CTRL_SHIFT, 0, execr, $set_font_size_all diff --git a/modules/hyprland/scripts/hypr-cwd.sh b/modules/hyprland/scripts/hypr-cwd.sh index 3659d956..d4a2b999 100755 --- a/modules/hyprland/scripts/hypr-cwd.sh +++ b/modules/hyprland/scripts/hypr-cwd.sh @@ -7,7 +7,7 @@ if [[ "$pid" != "null" ]]; then fi # change to if the cmdline not including ghostty -if [[ "$cmdline" != *"ghostty"* ]]; then +if [[ "$cmdline" != *"alacritty"* ]]; then dir=$(readlink /proc/"$pid"/cwd || echo "$HOME") else ppid=$(pgrep --newest --parent "$pid") diff --git a/modules/hyprland/scripts/hypr-set-font-size-all.sh b/modules/hyprland/scripts/hypr-set-font-size-all.sh index dad5a9ef..c11090f7 100755 --- a/modules/hyprland/scripts/hypr-set-font-size-all.sh +++ b/modules/hyprland/scripts/hypr-set-font-size-all.sh @@ -1,7 +1,7 @@ #!/bin/sh active_workspace_id=$(hyprctl activeworkspace -j | jq -r '.id') -initialClass="com.mitchellh.ghostty" +initialClass="Alacritty" win_ids=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id == $active_workspace_id) | .address") # for win_id in $win_ids; do diff --git a/modules/hyprland/scripts/hypr-toggle-term.sh b/modules/hyprland/scripts/hypr-toggle-term.sh index 7ef2332c..08f6e855 100755 --- a/modules/hyprland/scripts/hypr-toggle-term.sh +++ b/modules/hyprland/scripts/hypr-toggle-term.sh @@ -8,7 +8,9 @@ active_win_id=$(hyprctl activewindow -j | jq -r '.address') if [[ "$active_win_id" == "$nvim_win_id" ]]; then if [[ $win_count -eq 1 ]]; then - hyprctl dispatch -- exec "ghostty -e ~/.nix-config/modules/hyprland/scripts/hypr-cwd.sh" + pid=$(hyprctl activewindow -j | jq '.pid') + dir=$(readlink /proc/"$pid"/cwd || echo "$HOME") + hyprctl dispatch -- exec "alacritty --working-directory $dir" else if [[ "$is_zoomed" == "true" ]]; then hyprctl dispatch fullscreen 1 diff --git a/modules/hyprland/wofi/default.nix b/modules/hyprland/wofi/default.nix index 2d2244a4..a130a7e7 100644 --- a/modules/hyprland/wofi/default.nix +++ b/modules/hyprland/wofi/default.nix @@ -19,7 +19,7 @@ allow_images=true image_size=28 gtk_dark=true - term=ghostty + term=alacritty ''; "wofi/style.css".text = builtins.readFile ./style.css; From d6d56d10be2362b02fc422bd43ff4cffee7714a0 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 22 May 2025 18:51:17 +0900 Subject: [PATCH 16/34] fix alacritty keymap Signed-off-by: San Nguyen --- flake.lock | 30 +++++++++++++++--------------- flake.nix | 2 +- modules/alacritty/alacritty.toml | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index ceddb7a5..c53f58d3 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1747482870, - "narHash": "sha256-ydkvT7+C85KAafJlO9j3w8+v38qYlS5dq8kUzeEVh4E=", + "lastModified": 1747717470, + "narHash": "sha256-tk2mRZAf8C5uOkMVJHemJ3ld09CYVp/z94/lHqsQ8ZA=", "owner": "cachix", "repo": "devenv", - "rev": "7ea7b397c958ffa14c6a26e73d88620bc6e3d83d", + "rev": "c7f2256ee4a4a4ee9cbf1e82a6e49b253c374995", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1747274630, - "narHash": "sha256-87RJwXbfOHyzTB9LYagAQ6vOZhszCvd8Gvudu+gf3qo=", + "lastModified": 1747742835, + "narHash": "sha256-kYL4GCwwznsypvsnA20oyvW8zB/Dvn6K5G/tgMjVMT4=", "owner": "nix-community", "repo": "disko", - "rev": "ec7c109a4f794fce09aad87239eab7f66540b888", + "rev": "df522e787fdffc4f32ed3e1fca9ed0968a384d62", "type": "github" }, "original": { @@ -207,11 +207,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1747426608, - "narHash": "sha256-ygRFvCVdVEAU95tH2EMMacYH/T42tC3mtDkt5lBJT9U=", + "lastModified": 1747866154, + "narHash": "sha256-nMWY6YqdXZ9VGjgvqCREabaJ4Oy6UNRY77PX3UpIyBQ=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "b1af4a597f359491f4b3197a845b39ec86db475a", + "rev": "a2f52b08e5ad43420aab4e5cf5b2733cefb05845", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1747439237, - "narHash": "sha256-5rCGrnkglKKj4cav1U3HC+SIUNJh08pqOK4spQv9RjA=", + "lastModified": 1747875884, + "narHash": "sha256-tdVx4kghhdy62LKuTnwE2RytOe8o88tah/yhpyuL0D4=", "owner": "nix-community", "repo": "home-manager", - "rev": "ae755329092c87369b9e9a1510a8cf1ce2b1c708", + "rev": "f9186c64fcc6ee5f0114547acf9e814c806a640b", "type": "github" }, "original": { @@ -570,11 +570,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1747426788, - "narHash": "sha256-N4cp0asTsJCnRMFZ/k19V9akkxb7J/opG+K+jU57JGc=", + "lastModified": 1747852984, + "narHash": "sha256-q2PmaOxyR3zqOF54a3E1Cj1gh0sDu8APX9b+OkX4J5s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "12a55407652e04dcf2309436eb06fef0d3713ef3", + "rev": "8c441601c43232976179eac52dde704c8bdf81ed", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 8abd0ea3..56458c46 100644 --- a/flake.nix +++ b/flake.nix @@ -114,7 +114,7 @@ ./machines/common.nix { nixpkgs.config.permittedInsecurePackages = [ - "beekeeper-studio-5.1.5" + "beekeeper-studio-5.2.9" ]; } { diff --git a/modules/alacritty/alacritty.toml b/modules/alacritty/alacritty.toml index fe3079da..e1b944f0 100644 --- a/modules/alacritty/alacritty.toml +++ b/modules/alacritty/alacritty.toml @@ -54,5 +54,5 @@ bindings = [ { key = "Enter", mods = "Control|Shift", action = "CreateNewWindow" }, { key = "+", mods = "Control|Shift", action = "IncreaseFontSize" }, { key = "_", mods = "Control|Shift", action = "DecreaseFontSize" }, - { key = "0", mods = "Control|Shift", action = "ResetFontSize" }, + { key = ")", mods = "Control|Shift", action = "ResetFontSize" }, ] From c733e2802cca9e3e807c06d056ff0e9ba37b5e5f Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Mon, 2 Jun 2025 06:52:48 +0000 Subject: [PATCH 17/34] chore: upgrade nixos with claude Signed-off-by: San Nguyen --- CLAUDE.md | 61 +++++++++++ flake.lock | 144 +++++++++++--------------- modules/aider/.aider.conf.yml | 4 +- modules/zsh/default.nix | 2 +- pkgs/comic-code/default.nix | 2 +- pkgs/nvchad/lua/configs/lspconfig.lua | 83 ++++++++------- pkgs/nvchad/lua/options.lua | 10 ++ pkgs/nvchad/lua/plugins/init.lua | 70 +++++++++---- 8 files changed, 237 insertions(+), 139 deletions(-) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..73a6b14f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,61 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Repository Overview + +This is a personal Nix configuration repository for development environments using NixOS and home-manager. It supports both Linux (primarily in VMs) and macOS systems with a focus on VM-based development workflows. + +## Common Commands + +### System Management +- `make switch` - Rebuild and switch to the new configuration (main command for applying changes) +- `sudo nixos-rebuild switch --flake .#` - Alternative to make switch on NixOS +- `home-manager switch --flake .#sand` - Apply home-manager changes for Linux user +- `home-manager switch --flake .#san.nguyen` - Apply home-manager changes for macOS user + +### Flake Management +- `nix flake update` - Update all flake inputs +- `nix flake lock --update-input ` - Update specific input + +## Architecture + +### Directory Structure +- `modules/` - Home-manager modules for individual programs/tools +- `pkgs/` - Custom package definitions (e.g., nvchad configuration) +- `machines/` - Machine-specific NixOS configurations +- `users/` - User-specific home-manager configurations +- `overlays/` - Nix overlays for package modifications + +### Key Configuration Patterns +1. **Modular Design**: Each tool/program has its own module in `modules/` that can be enabled/disabled +2. **User Separation**: Configurations are split between `sand` (Linux) and `san.nguyen` (macOS) +3. **VM Platform Support**: Specific configurations for VMware Fusion and Parallels Desktop +4. **Flake-based**: All dependencies are pinned through flake.lock for reproducibility + +### Important Files +- `flake.nix` - Main entry point defining inputs and outputs +- `configuration.nix` - Base NixOS system configuration +- `home.nix` - Base home-manager configuration +- `machines/parallels-desktop.nix` and `machines/vmware-fusion.nix` - VM-specific configs + +### Module System +Modules typically follow this pattern: +```nix +{ config, lib, pkgs, ... }: { + programs.toolname = { + enable = true; + # tool-specific configuration + }; + # or + home.file.".config/toolname" = { + source = ./config; + }; +} +``` + +### Git Configuration +The repository uses conditional git includes for work directories: +- Work repos assumed to be in `~/Work/` +- Personal repos elsewhere +- Separate git identities for work/personal commits diff --git a/flake.lock b/flake.lock index c53f58d3..59c04348 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1747717470, - "narHash": "sha256-tk2mRZAf8C5uOkMVJHemJ3ld09CYVp/z94/lHqsQ8ZA=", + "lastModified": 1748688634, + "narHash": "sha256-S9J86Dn05c1Skk1dpOEUM2AgO+tkiAyaGXT2PZLMcRM=", "owner": "cachix", "repo": "devenv", - "rev": "c7f2256ee4a4a4ee9cbf1e82a6e49b253c374995", + "rev": "df38744269cc4ea8cee9e36fe882e9ef786df11b", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1747742835, - "narHash": "sha256-kYL4GCwwznsypvsnA20oyvW8zB/Dvn6K5G/tgMjVMT4=", + "lastModified": 1748225455, + "narHash": "sha256-AzlJCKaM4wbEyEpV3I/PUq5mHnib2ryEy32c+qfj6xk=", "owner": "nix-community", "repo": "disko", - "rev": "df522e787fdffc4f32ed3e1fca9ed0968a384d62", + "rev": "a894f2811e1ee8d10c50560551e50d6ab3c392ba", "type": "github" }, "original": { @@ -89,11 +89,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -201,17 +201,16 @@ "inputs": { "flake-compat": "flake-compat_2", "flake-utils": "flake-utils", - "nixpkgs-stable": "nixpkgs-stable", - "nixpkgs-unstable": "nixpkgs-unstable", + "nixpkgs": "nixpkgs_4", "zig": "zig", "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1747866154, - "narHash": "sha256-nMWY6YqdXZ9VGjgvqCREabaJ4Oy6UNRY77PX3UpIyBQ=", + "lastModified": 1748672231, + "narHash": "sha256-9DwoMa9VvwATvK3lolyUwJBfiF+y28EKmGj9FyEaJWo=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "a2f52b08e5ad43420aab4e5cf5b2733cefb05845", + "rev": "1ff91625981ef92add92624c01b6b9095c365ed1", "type": "github" }, "original": { @@ -309,11 +308,11 @@ ] }, "locked": { - "lastModified": 1747875884, - "narHash": "sha256-tdVx4kghhdy62LKuTnwE2RytOe8o88tah/yhpyuL0D4=", + "lastModified": 1748737919, + "narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "f9186c64fcc6ee5f0114547acf9e814c806a640b", + "rev": "5675a9686851d9626560052a032c4e14e533c1fa", "type": "github" }, "original": { @@ -374,15 +373,15 @@ "nix_2": { "inputs": { "nix": "nix_3", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1746451726, - "narHash": "sha256-6onSFZCkNvvzO0i1EK6d8a3n318A9ofLbwNU+q3iBqg=", - "rev": "ed867150b942b00331ee7c08808857849c16e878", - "revCount": 131, + "lastModified": 1747956878, + "narHash": "sha256-we7sjiJf5djYVpTuiFSNMZhXrHD2js5pg4CTLLAYXF0=", + "rev": "87407f66de4ddc252dba46a26c17ed2c6625c50d", + "revCount": 132, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.28.3/0196a0a5-8c1d-74b8-a870-afc7dbaa5f5d/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.29.0/0196fa5c-7773-7cde-94df-4174d0ceb324/source.tar.gz" }, "original": { "type": "tarball", @@ -394,21 +393,21 @@ "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_3", "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1745826512, - "narHash": "sha256-TjZp5ITSUvNRAzNznmkZRQxNRzMLiSAplz4bV2T8cbs=", - "rev": "4d4a91ab8d29cdf986db37d4712dd86fbfdb0fde", - "revCount": 19691, + "lastModified": 1747665997, + "narHash": "sha256-fkbE3RCIUPFjS9A6SoEJbgMW3Rs98cs0ZZV/eTtJjaU=", + "rev": "0cd1fce3c3fde7dade50b23a19d9cdea0e6e2137", + "revCount": 20033, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.28.3/0196831d-0b17-7bc1-99b9-932f928dfd27/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.29.0/0196f80b-f2ef-7a65-8473-29dda5008aa0/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.28.3" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.29.0" } }, "nixpkgs": { @@ -474,38 +473,6 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1741992157, - "narHash": "sha256-nlIfTsTrMSksEJc1f7YexXiPVuzD1gOfeN1ggwZyUoc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "da4b122f63095ca1199bd4d526f9e26426697689", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1741865919, - "narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1717432640, @@ -540,41 +507,54 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1734359947, - "narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=", + "lastModified": 1748189127, + "narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=", + "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.802491.7c43f080a7f2/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1747179050, + "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a", + "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-24.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { - "lastModified": 1746422338, - "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", - "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", - "revCount": 717703, + "lastModified": 1747676747, + "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", + "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", + "revCount": 718112, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717703%2Brev-5b35d248e9206c1f3baf8de6a7683fee126364aa/01969fd3-4335-7c69-b5e3-2a7800baaab9/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.718112%2Brev-72841a4a8761d1aed92ef6169a636872c986c76d/0196eed4-afc5-7adf-84bd-d3331f09ffe7/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { - "lastModified": 1747852984, - "narHash": "sha256-q2PmaOxyR3zqOF54a3E1Cj1gh0sDu8APX9b+OkX4J5s=", + "lastModified": 1748662220, + "narHash": "sha256-7gGa49iB9nCnFk4h/g9zwjlQAyjtpgcFkODjcOQS0Es=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8c441601c43232976179eac52dde704c8bdf81ed", + "rev": "59138c7667b7970d205d6a05a8bfa2d78caa3643", "type": "github" }, "original": { @@ -592,7 +572,7 @@ "ghostty": "ghostty", "home-manager": "home-manager", "nix": "nix_2", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" } }, "systems": { @@ -621,15 +601,15 @@ ], "nixpkgs": [ "ghostty", - "nixpkgs-stable" + "nixpkgs" ] }, "locked": { - "lastModified": 1741825901, - "narHash": "sha256-aeopo+aXg5I2IksOPFN79usw7AeimH1+tjfuMzJHFdk=", + "lastModified": 1748261582, + "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "0b14285e283f5a747f372fb2931835dd937c4383", + "rev": "aafb1b093fb838f7a02613b719e85ec912914221", "type": "github" }, "original": { @@ -646,7 +626,7 @@ ], "nixpkgs": [ "ghostty", - "nixpkgs-unstable" + "nixpkgs" ] }, "locked": { diff --git a/modules/aider/.aider.conf.yml b/modules/aider/.aider.conf.yml index f532c8b4..ae7b1c0c 100644 --- a/modules/aider/.aider.conf.yml +++ b/modules/aider/.aider.conf.yml @@ -8,8 +8,8 @@ openai-api-base: http://localhost:5000/openai/v1 stream: true watch-files: true pretty: true -model: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0 -editor-model: bedrock/us.anthropic.claude-3-5-haiku-20241022-v1:0 +model: bedrock/us.anthropic.claude-opus-4-20250514-v1:0 +editor-model: bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0 edit-format: udiff git: false cache-prompts: true diff --git a/modules/zsh/default.nix b/modules/zsh/default.nix index a3aa0cd7..a7542f96 100644 --- a/modules/zsh/default.nix +++ b/modules/zsh/default.nix @@ -29,7 +29,7 @@ eval "$(uvx --generate-shell-completion zsh)" fi - export PATH=$HOME/.local/bin:$PATH + export PATH=$HOME/.local/bin:$HOME/.cache/.bun/bin:$PATH ''; zsh-abbr.enable = true; zsh-abbr.abbreviations = { diff --git a/pkgs/comic-code/default.nix b/pkgs/comic-code/default.nix index 6ec04647..3595965c 100644 --- a/pkgs/comic-code/default.nix +++ b/pkgs/comic-code/default.nix @@ -4,7 +4,7 @@ stdenvNoCC.mkDerivation { version = "0.1.0"; src = if stdenv.isLinux then - /home/sand/.nix-config/pkgs/comic-code/comic-code.tar.gz + /mnt/home/sand/.nix-config/pkgs/comic-code/comic-code.tar.gz else /Users/nix-config/pkgs/comic-code/comic-code.tar.gz; phases = [ diff --git a/pkgs/nvchad/lua/configs/lspconfig.lua b/pkgs/nvchad/lua/configs/lspconfig.lua index e070e47f..9bb018c7 100644 --- a/pkgs/nvchad/lua/configs/lspconfig.lua +++ b/pkgs/nvchad/lua/configs/lspconfig.lua @@ -18,16 +18,17 @@ local on_attach = function(client, bufnr) group = group, buffer = bufnr, callback = function() - local prettier = require('null-ls.builtins.formatting.prettier') - local ft = vim.bo[bufnr].filetype - if vim.tbl_contains({ 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' }, ft) then - vim.cmd "EslintFixAll" - end - if vim.tbl_contains(prettier.filetypes, ft) then - vim.lsp.buf.format { async = false, filter = function() return client.name == 'null-ls' end } - else - vim.lsp.buf.format { async = false } - end + require("conform").format({ bufnr = bufnr }) + -- local prettier = require('null-ls.builtins.formatting.prettier') + -- local ft = vim.bo[bufnr].filetype + -- if vim.tbl_contains({ 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' }, ft) then + -- vim.cmd "EslintFixAll" + -- end + -- if vim.tbl_contains(prettier.filetypes, ft) then + -- vim.lsp.buf.format { async = false, filter = function() return client.name == 'null-ls' end } + -- else + -- vim.lsp.buf.format { async = false } + -- end end, }) end @@ -55,7 +56,7 @@ local servers = { end, require 'lspconfig.configs.yamlls'.default_config.filetypes), settings = { yaml = { - format = { enable = true, printWidth = 120, singleQuote = true, proseWrap = 'always', }, + format = { enable = true }, keyOrdering = false, hover = true, completion = true, @@ -103,6 +104,18 @@ local servers = { runtime = { version = 'LuaJIT', }, + workspace = { + checkThirdParty = false, + library = { + vim.fn.expand "$VIMRUNTIME/lua", + vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types", + vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy", + vim.fn.stdpath "data" .. "/lazy/noice.nvim/lua/noice/types", + vim.fn.stdpath "data" .. "/lazy/snacks.nvim/lua/snacks", + vim.fn.stdpath "data" .. "/lazy/conform.nvim/lua/conform", + "${3rd}/luv/library", + } + }, telemetry = { enable = false }, }, }, @@ -117,32 +130,32 @@ for name, opts in pairs(servers) do lspconfig[name].setup(opts) end -local null_ls = require 'null-ls' -local h = require 'null-ls.helpers' +-- local null_ls = require 'null-ls' +-- local h = require 'null-ls.helpers' -- Need to set root_dir to `.git` for pyproject because there might be -- multiple pyproject files in a python monorepo. So by default we only -- check the pyproject at root to avoid config duplication. -null_ls.setup { - on_attach = on_attach, - capabilities = capabilities, - root_dir = root_pattern '.git', - sources = { - null_ls.builtins.diagnostics.codespell.with { - cwd = h.cache.by_bufnr(function(params) - return (root_pattern '.git')(params.bufname) - end), - }, - null_ls.builtins.diagnostics.actionlint, - null_ls.builtins.diagnostics.stylelint, - null_ls.builtins.diagnostics.yamllint, - - null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.nixfmt, - null_ls.builtins.formatting.terraform_fmt, - - require 'none-ls.formatting.ruff', - require 'none-ls.formatting.ruff_format', - }, -} +-- null_ls.setup { +-- on_attach = on_attach, +-- capabilities = capabilities, +-- root_dir = root_pattern '.git', +-- sources = { +-- null_ls.builtins.diagnostics.codespell.with { +-- cwd = h.cache.by_bufnr(function(params) +-- return (root_pattern '.git')(params.bufname) +-- end), +-- }, +-- null_ls.builtins.diagnostics.actionlint, +-- null_ls.builtins.diagnostics.stylelint, +-- null_ls.builtins.diagnostics.yamllint, +-- +-- null_ls.builtins.formatting.prettier, +-- null_ls.builtins.formatting.nixfmt, +-- null_ls.builtins.formatting.terraform_fmt, +-- +-- require 'none-ls.formatting.ruff', +-- require 'none-ls.formatting.ruff_format', +-- }, +-- } diff --git a/pkgs/nvchad/lua/options.lua b/pkgs/nvchad/lua/options.lua index 684da1ae..49238821 100644 --- a/pkgs/nvchad/lua/options.lua +++ b/pkgs/nvchad/lua/options.lua @@ -44,6 +44,16 @@ vim.api.nvim_create_autocmd('TextYankPost', { command = 'silent! lua vim.highlight.on_yank({ higroup="IncSearch", timeout=700 })', }) +vim.api.nvim_create_autocmd('BufEnter', { + group = 'NeoVimUser', + pattern = '*', + callback = function() + if vim.fn.filereadable(vim.fn.expand('%')) == 1 then + vim.cmd('checktime') + end + end, +}) + local enable_providers = { 'python3_provider', 'node_provider', diff --git a/pkgs/nvchad/lua/plugins/init.lua b/pkgs/nvchad/lua/plugins/init.lua index a71fe5f4..67c0a8cd 100644 --- a/pkgs/nvchad/lua/plugins/init.lua +++ b/pkgs/nvchad/lua/plugins/init.lua @@ -86,20 +86,16 @@ local plugins = { { "GeorgesAlkhouri/nvim-aider", cmd = { - "AiderTerminalToggle", - "AiderTerminalSend", - "AiderQuickSendCommand", - "AiderQuickSendBuffer", + "Aider", "AiderTreeAddFile", - "AiderTreeDropFiles", + "AiderTreeDropFile", }, keys = { - { "a/", "AiderTerminalToggle", desc = "Aider Open" }, - { "as", "AiderTerminalSend", desc = "Aider Send", mode = { "n", "x" } }, - { "ac", "AiderQuickSendCommand", desc = "Aider Send Command" }, - { "ab", "AiderQuickSendBuffer", desc = "Aider Send Buffer" }, - { "=", "AiderTreeAddFile", desc = "Aider Add File in NvimTree", ft = "NvimTree" }, - { "-", "AiderTreeDropFile", desc = "Aider Drop File in NvimTree", ft = "NvimTree" }, + { "a/", "Aider toggle", desc = "Aider Open" }, + { "as", "Aider send", desc = "Aider Send", mode = { "n", "x" } }, + { "ab", "Aider buffer", desc = "Aider Send Buffer" }, + { "=", "AiderTreeAddFile", desc = "Aider Add File in NvimTree", ft = "NvimTree" }, + { "-", "AiderTreeDropFile", desc = "Aider Drop File in NvimTree", ft = "NvimTree" }, }, dependencies = { { @@ -109,6 +105,7 @@ local plugins = { ---@type table styles = { terminal = { + relative = "editor", bo = { filetype = "snacks_terminal", }, @@ -126,13 +123,7 @@ local plugins = { config = function() require("nvim_aider").setup({ -- Command line arguments passed to aider - aider_cmd = "eval $(wovey-cli aws shell --profile genai-dev-admin) && aider", - args = { - "--no-auto-commits", - "--pretty", - "--stream", - "--watch-files", - }, + aider_cmd = "AWS_PROFILE=genai-dev-admin aider", win = { style = "nvim_aider", position = "left", @@ -140,6 +131,49 @@ local plugins = { }) end, }, + { + "coder/claudecode.nvim", + dependencies = { + "folke/snacks.nvim", -- Optional dependency for enhanced terminal + }, + opts = { + -- Configuration for claudecode main + terminal_cmd = "claude", + + -- Configuration for the interactive terminal: + terminal = { + split_side = "left", + split_width_percentage = 0.4, + provider = "snacks", + show_native_term_exit_tip = true, + }, + }, + config = true, + keys = { + { "ac", "ClaudeCode", mode = { "n", "x" }, desc = "Toggle Claude Terminal" }, + { "ak", "ClaudeCodeSend", mode = { "x" }, desc = "Send to Claude Code" }, + }, + }, + { + 'stevearc/conform.nvim', + ---@type conform.setupOpts + opts = { + formatters_by_ft = { + -- Use the "*" filetype to run formatters on all filetypes. + python = { "ruff_format", "ruff_fix", "ruff_organize_imports", lsp_format = "fallback" }, + typescriptreact = { "prettier", lsp_format = "fallback" }, + ["*"] = { "trim_whitespace" }, + }, + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 500, + lsp_format = "prefer", + }, + default_format_opts = { + lsp_format = "prefer", + } + }, + }, -- { -- "olimorris/codecompanion.nvim", -- event = 'VeryLazy', From 8525105f3c842dabf41bb8c26fc3324bdae4388b Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Mon, 2 Jun 2025 06:54:10 +0000 Subject: [PATCH 18/34] reset mnt path Signed-off-by: San Nguyen --- pkgs/comic-code/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/comic-code/default.nix b/pkgs/comic-code/default.nix index 3595965c..6ec04647 100644 --- a/pkgs/comic-code/default.nix +++ b/pkgs/comic-code/default.nix @@ -4,7 +4,7 @@ stdenvNoCC.mkDerivation { version = "0.1.0"; src = if stdenv.isLinux then - /mnt/home/sand/.nix-config/pkgs/comic-code/comic-code.tar.gz + /home/sand/.nix-config/pkgs/comic-code/comic-code.tar.gz else /Users/nix-config/pkgs/comic-code/comic-code.tar.gz; phases = [ From 554d5c673b686a338a645958eaa008bebff1c442 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sat, 21 Jun 2025 08:53:42 +0900 Subject: [PATCH 19/34] chore: update nixos and AI code editor Signed-off-by: San Nguyen --- Makefile | 2 +- flake.lock | 158 ++++++++++-------------- flake.nix | 2 +- machines/common.nix | 4 +- modules/aider/.aider.conf.yml | 5 +- modules/aider/.aider.model.settings.yml | 2 +- modules/litellm/config.yaml | 11 ++ pkgs/nvchad/lua/options.lua | 2 +- 8 files changed, 85 insertions(+), 101 deletions(-) create mode 100644 modules/litellm/config.yaml diff --git a/Makefile b/Makefile index 71483dad..3c97ed2c 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ SSH_OPTIONS=-o PubkeyAuthentication=no -o UserKnownHostsFile=/dev/null -o Strict switch: rsync -av $(MAKEFILE_DIR)/modules/karabiner/mbp_m1_woven_planet/* /media/psf/Home/.config/karabiner - nixos-rebuild switch --use-remote-sudo --impure --flake ".#parallels-desktop" + nixos-rebuild switch --sudo --impure --flake ".#parallels-desktop" # nix store gc # nix store optimise # nixos-rebuild switch --use-remote-sudo --impure --flake ".#vmware-fusion" diff --git a/flake.lock b/flake.lock index 59c04348..66593470 100644 --- a/flake.lock +++ b/flake.lock @@ -9,16 +9,20 @@ "devenv" ], "git-hooks": [ - "devenv" + "devenv", + "git-hooks" ], - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "devenv", + "nixpkgs" + ] }, "locked": { - "lastModified": 1744206633, - "narHash": "sha256-pb5aYkE8FOoa4n123slgHiOf1UbNSnKe5pEZC+xXD5g=", + "lastModified": 1748883665, + "narHash": "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=", "owner": "cachix", "repo": "cachix", - "rev": "8a60090640b96f9df95d1ab99e5763a586be1404", + "rev": "f707778d902af4d62d8dd92c269f8e70de09acbe", "type": "github" }, "original": { @@ -34,14 +38,14 @@ "flake-compat": "flake-compat", "git-hooks": "git-hooks", "nix": "nix", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1748688634, - "narHash": "sha256-S9J86Dn05c1Skk1dpOEUM2AgO+tkiAyaGXT2PZLMcRM=", + "lastModified": 1750437384, + "narHash": "sha256-3m00pI4ZdYDenFSKeWfMNjM0npdoHu5ssWRW+n577Fk=", "owner": "cachix", "repo": "devenv", - "rev": "df38744269cc4ea8cee9e36fe882e9ef786df11b", + "rev": "3bd127d022e00c6656440732a1839df6798ac946", "type": "github" }, "original": { @@ -57,11 +61,11 @@ ] }, "locked": { - "lastModified": 1748225455, - "narHash": "sha256-AzlJCKaM4wbEyEpV3I/PUq5mHnib2ryEy32c+qfj6xk=", + "lastModified": 1750040002, + "narHash": "sha256-KrC9iOVYIn6ukpVlHbqSA4hYCZ6oDyJKrcLqv4c5v84=", "owner": "nix-community", "repo": "disko", - "rev": "a894f2811e1ee8d10c50560551e50d6ab3c392ba", + "rev": "7f1857b31522062a6a00f88cbccf86b43acceed1", "type": "github" }, "original": { @@ -73,11 +77,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -127,11 +131,11 @@ ] }, "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -145,11 +149,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", "type": "github" }, "original": { @@ -201,16 +205,16 @@ "inputs": { "flake-compat": "flake-compat_2", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "zig": "zig", "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1748672231, - "narHash": "sha256-9DwoMa9VvwATvK3lolyUwJBfiF+y28EKmGj9FyEaJWo=", + "lastModified": 1750453314, + "narHash": "sha256-/mT9nssL6CMGCjETqvYKTE9vX1uSh0Xj2MxQtwa9yV0=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "1ff91625981ef92add92624c01b6b9095c365ed1", + "rev": "f55c77bc817f0d28992e34db54408da388b172a6", "type": "github" }, "original": { @@ -222,7 +226,8 @@ "git-hooks": { "inputs": { "flake-compat": [ - "devenv" + "devenv", + "flake-compat" ], "gitignore": "gitignore", "nixpkgs": [ @@ -231,11 +236,10 @@ ] }, "locked": { - "lastModified": 1746537231, - "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", + "lastModified": 1749636823, "owner": "cachix", "repo": "git-hooks.nix", - "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", + "rev": "623c56286de5a3193aa38891a6991b28f9bab056", "type": "github" }, "original": { @@ -289,7 +293,6 @@ }, "locked": { "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", @@ -308,11 +311,11 @@ ] }, "locked": { - "lastModified": 1748737919, - "narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=", + "lastModified": 1750304462, + "narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=", "owner": "nix-community", "repo": "home-manager", - "rev": "5675a9686851d9626560052a032c4e14e533c1fa", + "rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c", "type": "github" }, "original": { @@ -321,51 +324,36 @@ "type": "github" } }, - "libgit2": { - "flake": false, - "locked": { - "lastModified": 1697646580, - "narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=", - "owner": "libgit2", - "repo": "libgit2", - "rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5", - "type": "github" - }, - "original": { - "owner": "libgit2", - "repo": "libgit2", - "type": "github" - } - }, "nix": { "inputs": { "flake-compat": [ - "devenv" + "devenv", + "flake-compat" ], "flake-parts": "flake-parts", - "libgit2": "libgit2", - "nixpkgs": "nixpkgs_2", + "git-hooks-nix": [ + "devenv", + "git-hooks" + ], + "nixpkgs": "nixpkgs", "nixpkgs-23-11": [ "devenv" ], "nixpkgs-regression": [ "devenv" - ], - "pre-commit-hooks": [ - "devenv" ] }, "locked": { - "lastModified": 1745930071, - "narHash": "sha256-bYyjarS3qSNqxfgc89IoVz8cAFDkF9yPE63EJr+h50s=", - "owner": "domenkozar", + "lastModified": 1750117611, + "narHash": "sha256-LTwASICtyN3AjzlF9l2ZNAIVZqclio3yRcwwZy3QSJA=", + "owner": "cachix", "repo": "nix", - "rev": "b455edf3505f1bf0172b39a735caef94687d0d9c", + "rev": "9e4fc95c388e2223d47da865503dee20d179776a", "type": "github" }, "original": { - "owner": "domenkozar", - "ref": "devenv-2.24", + "owner": "cachix", + "ref": "devenv-2.30", "repo": "nix", "type": "github" } @@ -373,7 +361,7 @@ "nix_2": { "inputs": { "nix": "nix_3", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1747956878, @@ -393,7 +381,7 @@ "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_3", "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression" }, @@ -412,11 +400,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1733212471, - "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", + "lastModified": 1747179050, + "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", + "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", "type": "github" }, "original": { @@ -444,11 +432,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", "type": "github" }, "original": { @@ -474,22 +462,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1717432640, - "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "88269ab3044128b7c2f4c7d68448b2fb50456870", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1746807397, "narHash": "sha256-zU2z0jlkJGWLhdNr/8AJSxqK8XD0IlQgHp3VZcP56Aw=", @@ -505,7 +477,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1748189127, "narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=", @@ -518,7 +490,7 @@ "url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1747179050, "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", @@ -534,7 +506,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1747676747, "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", @@ -548,13 +520,13 @@ "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" } }, - "nixpkgs_7": { + "nixpkgs_6": { "locked": { - "lastModified": 1748662220, - "narHash": "sha256-7gGa49iB9nCnFk4h/g9zwjlQAyjtpgcFkODjcOQS0Es=", + "lastModified": 1750215678, + "narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=", "owner": "nixos", "repo": "nixpkgs", - "rev": "59138c7667b7970d205d6a05a8bfa2d78caa3643", + "rev": "5395fb3ab3f97b9b7abca147249fa2e8ed27b192", "type": "github" }, "original": { @@ -572,7 +544,7 @@ "ghostty": "ghostty", "home-manager": "home-manager", "nix": "nix_2", - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_6" } }, "systems": { diff --git a/flake.nix b/flake.nix index 56458c46..7615703d 100644 --- a/flake.nix +++ b/flake.nix @@ -114,7 +114,7 @@ ./machines/common.nix { nixpkgs.config.permittedInsecurePackages = [ - "beekeeper-studio-5.2.9" + "beekeeper-studio-5.2.12" ]; } { diff --git a/machines/common.nix b/machines/common.nix index e37534a8..6f458ddd 100644 --- a/machines/common.nix +++ b/machines/common.nix @@ -86,8 +86,8 @@ in services.xserver.enable = true; # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; + services.displayManager.gdm.enable = true; + services.desktopManager.gnome.enable = true; services.xserver.excludePackages = [ pkgs.xterm ]; programs.hyprland.enable = true; diff --git a/modules/aider/.aider.conf.yml b/modules/aider/.aider.conf.yml index ae7b1c0c..4a80ee4f 100644 --- a/modules/aider/.aider.conf.yml +++ b/modules/aider/.aider.conf.yml @@ -8,8 +8,9 @@ openai-api-base: http://localhost:5000/openai/v1 stream: true watch-files: true pretty: true -model: bedrock/us.anthropic.claude-opus-4-20250514-v1:0 -editor-model: bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0 +model: vertex_ai/gemini-2.5-pro +editor-model: vertex_ai/gemini-2.5-flash +weak-model: vertex_ai/gemini-2.5-flash edit-format: udiff git: false cache-prompts: true diff --git a/modules/aider/.aider.model.settings.yml b/modules/aider/.aider.model.settings.yml index fdfe9feb..cceaa60e 100644 --- a/modules/aider/.aider.model.settings.yml +++ b/modules/aider/.aider.model.settings.yml @@ -2,7 +2,7 @@ - name: aider/extra_params extra_params: extra_headers: - openai-project: '288' + openai-project: "288" - name: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0 edit_format: diff use_temperature: false diff --git a/modules/litellm/config.yaml b/modules/litellm/config.yaml new file mode 100644 index 00000000..ad7a216f --- /dev/null +++ b/modules/litellm/config.yaml @@ -0,0 +1,11 @@ +model_list: + - model_name: gemini-2.5-pro + litellm_params: + model: vertex_ai/gemini-2.5-pro + vertex_project: wp-dev-wovey-yev1 + vertex_location: us-central1 + - model_name: gemini-2.5-flash + litellm_params: + model: vertex_ai/gemini-2.5-flash + vertex_project: wp-dev-wovey-yev1 + vertex_location: us-central1 diff --git a/pkgs/nvchad/lua/options.lua b/pkgs/nvchad/lua/options.lua index 49238821..c09c7841 100644 --- a/pkgs/nvchad/lua/options.lua +++ b/pkgs/nvchad/lua/options.lua @@ -122,7 +122,7 @@ vim.api.nvim_create_autocmd("UIEnter", { map( { 'i', 'c', 't' }, '', - function() vim.api.nvim_paste(vim.fn.getreg('+'), true, -1) end, + function() vim.api.nvim_paste(vim.fn.getreg('*'), true, -1) end, { silent = true, desc = "Neovide Paste in GUI" } ) map({ 'n', 'i', 'x' }, '', 'lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1', { From a657f97f4258571473cfbaad0cacd75d2f530e9a Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 10 Jul 2025 14:48:11 +0700 Subject: [PATCH 20/34] upgrade version Signed-off-by: San Nguyen --- flake.lock | 225 ++++-------------- flake.nix | 14 +- machines/parallels/hardware-configuration.nix | 1 + modules/kubernetes/default.nix | 2 +- modules/nvim/default.nix | 4 +- users/sand/home.nix | 52 ++-- 6 files changed, 80 insertions(+), 218 deletions(-) diff --git a/flake.lock b/flake.lock index 66593470..ae3f82a3 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1750437384, - "narHash": "sha256-3m00pI4ZdYDenFSKeWfMNjM0npdoHu5ssWRW+n577Fk=", + "lastModified": 1751727024, + "narHash": "sha256-0+3JCO+22Ud2395GeEnp+WZedC3f2B3KspH5t+1AUX4=", "owner": "cachix", "repo": "devenv", - "rev": "3bd127d022e00c6656440732a1839df6798ac946", + "rev": "e33639c0535a8f18db417fd9fb36f180e8a7d27e", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1750040002, - "narHash": "sha256-KrC9iOVYIn6ukpVlHbqSA4hYCZ6oDyJKrcLqv4c5v84=", + "lastModified": 1751607816, + "narHash": "sha256-5PtrwjqCIJ4DKQhzYdm8RFePBuwb+yTzjV52wWoGSt4=", "owner": "nix-community", "repo": "disko", - "rev": "7f1857b31522062a6a00f88cbccf86b43acceed1", + "rev": "da6109c917b48abc1f76dd5c9bf3901c8c80f662", "type": "github" }, "original": { @@ -91,22 +91,6 @@ } }, "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { "flake": false, "locked": { "lastModified": 1733328505, @@ -149,11 +133,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1749398372, - "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", "type": "github" }, "original": { @@ -183,46 +167,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "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" - } - }, - "ghostty": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_3", - "zig": "zig", - "zon2nix": "zon2nix" - }, - "locked": { - "lastModified": 1750453314, - "narHash": "sha256-/mT9nssL6CMGCjETqvYKTE9vX1uSh0Xj2MxQtwa9yV0=", - "owner": "ghostty-org", - "repo": "ghostty", - "rev": "f55c77bc817f0d28992e34db54408da388b172a6", - "type": "github" - }, - "original": { - "owner": "ghostty-org", - "repo": "ghostty", - "type": "github" - } - }, "git-hooks": { "inputs": { "flake-compat": [ @@ -311,11 +255,11 @@ ] }, "locked": { - "lastModified": 1750304462, - "narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=", + "lastModified": 1751760902, + "narHash": "sha256-qBGNn7T/zOgUDQTo/RM/D2oxMkB2x36j3ajvpVanEVs=", "owner": "nix-community", "repo": "home-manager", - "rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c", + "rev": "8b0180dde1d6f4cf632e046309e8f963924dfbd0", "type": "github" }, "original": { @@ -344,11 +288,11 @@ ] }, "locked": { - "lastModified": 1750117611, - "narHash": "sha256-LTwASICtyN3AjzlF9l2ZNAIVZqclio3yRcwwZy3QSJA=", + "lastModified": 1750955511, + "narHash": "sha256-IDB/oh/P63ZTdhgSkey2LZHzeNhCdoKk+4j7AaPe1SE=", "owner": "cachix", "repo": "nix", - "rev": "9e4fc95c388e2223d47da865503dee20d179776a", + "rev": "afa41b08df4f67b8d77a8034b037ac28c71c77df", "type": "github" }, "original": { @@ -361,15 +305,15 @@ "nix_2": { "inputs": { "nix": "nix_3", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1747956878, - "narHash": "sha256-we7sjiJf5djYVpTuiFSNMZhXrHD2js5pg4CTLLAYXF0=", - "rev": "87407f66de4ddc252dba46a26c17ed2c6625c50d", - "revCount": 132, + "lastModified": 1750778204, + "narHash": "sha256-LnR7z7CYBMiIBHrnbQEZ3EnRCD651FS/5H1WNYVX/WI=", + "rev": "ee43c1ba4b1769fe859dffcf14cd383dc7aa908d", + "revCount": 140, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.29.0/0196fa5c-7773-7cde-94df-4174d0ceb324/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.29.1/0197a287-08f8-7c52-8cf3-a95e538d978b/source.tar.gz" }, "original": { "type": "tarball", @@ -378,24 +322,24 @@ }, "nix_3": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_3", "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1747665997, - "narHash": "sha256-fkbE3RCIUPFjS9A6SoEJbgMW3Rs98cs0ZZV/eTtJjaU=", - "rev": "0cd1fce3c3fde7dade50b23a19d9cdea0e6e2137", - "revCount": 20033, + "lastModified": 1750773912, + "narHash": "sha256-rCL3l4t20jtMeNjCq6fMaTzWvBKgj+qw1zglLrniRfY=", + "rev": "5d78f74fe42f68078c15dcd6f2db4719603a86ae", + "revCount": 20052, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.29.0/0196f80b-f2ef-7a65-8473-29dda5008aa0/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.29.1/0197a278-1b18-7f2c-abe9-74ca6b2ff426/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.29.0" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.29.1" } }, "nixpkgs": { @@ -432,11 +376,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1748740939, - "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", + "lastModified": 1751159883, + "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "656a64127e9d791a334452c6b6606d17539476e2", + "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", "type": "github" }, "original": { @@ -478,19 +422,6 @@ } }, "nixpkgs_3": { - "locked": { - "lastModified": 1748189127, - "narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=", - "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", - "type": "tarball", - "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.802491.7c43f080a7f2/nixexprs.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1747179050, "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", @@ -506,27 +437,27 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1747676747, - "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", - "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", - "revCount": 718112, + "lastModified": 1750622754, + "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", + "rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1", + "revCount": 804570, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.718112%2Brev-72841a4a8761d1aed92ef6169a636872c986c76d/0196eed4-afc5-7adf-84bd-d3331f09ffe7/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.804570%2Brev-c7ab75210cb8cb16ddd8f290755d9558edde7ee1/0197a074-d3d4-7f91-83c9-3179faa97f62/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { - "lastModified": 1750215678, - "narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=", + "lastModified": 1751625545, + "narHash": "sha256-4E7wWftF1ExK5ZEDzj41+9mVgxtuRV3wWCId7QAYMAU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5395fb3ab3f97b9b7abca147249fa2e8ed27b192", + "rev": "c860cf0b3a0829f0f6cf344ca8de83a2bbfab428", "type": "github" }, "original": { @@ -541,79 +472,9 @@ "devenv": "devenv", "disko": "disko", "flake-parts": "flake-parts_2", - "ghostty": "ghostty", "home-manager": "home-manager", "nix": "nix_2", - "nixpkgs": "nixpkgs_6" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "zig": { - "inputs": { - "flake-compat": [ - "ghostty" - ], - "flake-utils": [ - "ghostty", - "flake-utils" - ], - "nixpkgs": [ - "ghostty", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748261582, - "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=", - "owner": "mitchellh", - "repo": "zig-overlay", - "rev": "aafb1b093fb838f7a02613b719e85ec912914221", - "type": "github" - }, - "original": { - "owner": "mitchellh", - "repo": "zig-overlay", - "type": "github" - } - }, - "zon2nix": { - "inputs": { - "flake-utils": [ - "ghostty", - "flake-utils" - ], - "nixpkgs": [ - "ghostty", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742104771, - "narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=", - "owner": "jcollie", - "repo": "zon2nix", - "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", - "type": "github" - }, - "original": { - "owner": "jcollie", - "ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613", - "repo": "zon2nix", - "type": "github" + "nixpkgs": "nixpkgs_5" } } }, diff --git a/flake.nix b/flake.nix index 7615703d..23b8531c 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ inputs = { # Mirroring nixpkgs unstable nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - ghostty.url = "github:ghostty-org/ghostty"; + # ghostty.url = "github:ghostty-org/ghostty"; # ghostty.inputs.nixpkgs-stable.follows = "nixpkgs"; # ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs"; disko.url = "github:nix-community/disko"; @@ -40,7 +40,7 @@ flake-parts, home-manager, nixpkgs, - ghostty, + # ghostty, disko, # neovim, # devenv, @@ -62,12 +62,12 @@ nix.settings.extra-trusted-public-keys = [ "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" - "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + # "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" ]; nix.settings.extra-trusted-substituters = [ "https://devenv.cachix.org" "https://cache.flox.dev" - "https://ghostty.cachix.org" + # "https://ghostty.cachix.org" ]; } ./users/${user}/home.nix @@ -88,7 +88,7 @@ devenv.shells.default = { languages.nix.enable = true; }; - packages.default = ghostty.packages.${system}.ghostty; + # packages.default = ghostty.packages.${system}.ghostty; }; flake.overlays.default = final: prev: { @@ -121,7 +121,7 @@ disko.devices.disk.primary.device = "/dev/sda"; disko.devices.disk.secondary.device = "/dev/sdb"; environment.systemPackages = [ - ghostty.packages.${system}.ghostty + # ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default ]; } @@ -139,7 +139,7 @@ disko.devices.disk.main.device = "/dev/nvme0n3"; disko.devices.disk.home.device = "/dev/nvme0n4"; environment.systemPackages = [ - ghostty.packages.${system}.ghostty + # ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default ]; } diff --git a/machines/parallels/hardware-configuration.nix b/machines/parallels/hardware-configuration.nix index 162f520d..a8412859 100644 --- a/machines/parallels/hardware-configuration.nix +++ b/machines/parallels/hardware-configuration.nix @@ -28,5 +28,6 @@ nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; hardware.parallels.enable = true; + services.timesyncd.enable = lib.mkForce true; # Disable time sync from Mac nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "prl-tools" ]; } diff --git a/modules/kubernetes/default.nix b/modules/kubernetes/default.nix index df4f90b3..0a94b992 100644 --- a/modules/kubernetes/default.nix +++ b/modules/kubernetes/default.nix @@ -14,7 +14,7 @@ # vcluster ]; - imports = [ ../programs/kubeswitch.nix ]; + # imports = [ ../programs/kubeswitch.nix ]; programs.kubeswitch.enable = true; diff --git a/modules/nvim/default.nix b/modules/nvim/default.nix index 4789d50a..2994a267 100644 --- a/modules/nvim/default.nix +++ b/modules/nvim/default.nix @@ -13,7 +13,7 @@ in codespell corepack nixfmt-rfc-style - nodejs + # nodejs nvchad stylelint tflint @@ -39,7 +39,7 @@ in # rust-analyzer terraform-ls tree-sitter - tailwindcss-language-server + # tailwindcss-language-server docker-compose-language-service ] ++ (with nodePackages; [ diff --git a/users/sand/home.nix b/users/sand/home.nix index f4383c67..b04dab05 100644 --- a/users/sand/home.nix +++ b/users/sand/home.nix @@ -47,21 +47,21 @@ ); }; }; - timezone-update = { - Unit = { - Description = "Update timezone on startup"; - }; - Service = { - Type = "oneshot"; - ExecStart = toString ( - pkgs.writeShellScript "timezone-update-sh" '' - set -eou pipefail - # Set timezone based on IP, since automatic timezone on gnome is not working - timedatectl set-timezone "$(curl --fail https://ipapi.co/timezone)" - '' - ); - }; - }; + # timezone-update = { + # Unit = { + # Description = "Update timezone on startup"; + # }; + # Service = { + # Type = "oneshot"; + # ExecStart = toString ( + # pkgs.writeShellScript "timezone-update-sh" '' + # set -eou pipefail + # # Set timezone based on IP, since automatic timezone on gnome is not working + # timedatectl set-timezone "$(curl --fail https://ipapi.co/timezone)" + # '' + # ); + # }; + # }; }; systemd.user.timers = { @@ -74,17 +74,17 @@ }; Install.WantedBy = [ "timers.target" ]; }; - timezone-update = { - Unit = { - Description = "Timer for timezone-update service"; - }; - Timer = { - OnBootSec = "1min"; - Unit = "timezone-update.service"; - OnCalendar = "hourly"; - }; - Install.WantedBy = [ "timers.target" ]; - }; + # timezone-update = { + # Unit = { + # Description = "Timer for timezone-update service"; + # }; + # Timer = { + # OnBootSec = "1min"; + # Unit = "timezone-update.service"; + # OnCalendar = "hourly"; + # }; + # Install.WantedBy = [ "timers.target" ]; + # }; }; imports = [ From beb19957e42d915019719403d154bf851bb42789 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sat, 2 Aug 2025 12:05:26 +0700 Subject: [PATCH 21/34] chore: add vscode Signed-off-by: San Nguyen --- flake.lock | 129 ++++++++++++++++++--------------------- modules/misc/default.nix | 2 + 2 files changed, 61 insertions(+), 70 deletions(-) diff --git a/flake.lock b/flake.lock index ae3f82a3..a84bfaac 100644 --- a/flake.lock +++ b/flake.lock @@ -38,14 +38,14 @@ "flake-compat": "flake-compat", "git-hooks": "git-hooks", "nix": "nix", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1751727024, - "narHash": "sha256-0+3JCO+22Ud2395GeEnp+WZedC3f2B3KspH5t+1AUX4=", + "lastModified": 1753981111, + "narHash": "sha256-uBJOyMxOkGRmxhD2M5rbN2aV6oP1T2AKq5oBaHHC4mw=", "owner": "cachix", "repo": "devenv", - "rev": "e33639c0535a8f18db417fd9fb36f180e8a7d27e", + "rev": "d4d70df706b153b601a87ab8e81c88a0b1a373b6", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1751607816, - "narHash": "sha256-5PtrwjqCIJ4DKQhzYdm8RFePBuwb+yTzjV52wWoGSt4=", + "lastModified": 1753140376, + "narHash": "sha256-7lrVrE0jSvZHrxEzvnfHFE/Wkk9DDqb+mYCodI5uuB8=", "owner": "nix-community", "repo": "disko", - "rev": "da6109c917b48abc1f76dd5c9bf3901c8c80f662", + "rev": "545aba02960caa78a31bd9a8709a0ad4b6320a5c", "type": "github" }, "original": { @@ -133,11 +133,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1751413152, - "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", + "lastModified": 1754091436, + "narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", + "rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd", "type": "github" }, "original": { @@ -180,10 +180,11 @@ ] }, "locked": { - "lastModified": 1749636823, + "lastModified": 1750779888, + "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "623c56286de5a3193aa38891a6991b28f9bab056", + "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", "type": "github" }, "original": { @@ -237,6 +238,7 @@ }, "locked": { "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", @@ -255,11 +257,11 @@ ] }, "locked": { - "lastModified": 1751760902, - "narHash": "sha256-qBGNn7T/zOgUDQTo/RM/D2oxMkB2x36j3ajvpVanEVs=", + "lastModified": 1754085240, + "narHash": "sha256-kVHCrTWEe8B1thAhFag1bk4QPY0ZP45V9vPbrwPHoNo=", "owner": "nix-community", "repo": "home-manager", - "rev": "8b0180dde1d6f4cf632e046309e8f963924dfbd0", + "rev": "e102920c1becb114645c6f92fe14edc0b05cc229", "type": "github" }, "original": { @@ -279,7 +281,10 @@ "devenv", "git-hooks" ], - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "devenv", + "nixpkgs" + ], "nixpkgs-23-11": [ "devenv" ], @@ -288,11 +293,11 @@ ] }, "locked": { - "lastModified": 1750955511, - "narHash": "sha256-IDB/oh/P63ZTdhgSkey2LZHzeNhCdoKk+4j7AaPe1SE=", + "lastModified": 1752773918, + "narHash": "sha256-dOi/M6yNeuJlj88exI+7k154z+hAhFcuB8tZktiW7rg=", "owner": "cachix", "repo": "nix", - "rev": "afa41b08df4f67b8d77a8034b037ac28c71c77df", + "rev": "031c3cf42d2e9391eee373507d8c12e0f9606779", "type": "github" }, "original": { @@ -305,15 +310,15 @@ "nix_2": { "inputs": { "nix": "nix_3", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1750778204, - "narHash": "sha256-LnR7z7CYBMiIBHrnbQEZ3EnRCD651FS/5H1WNYVX/WI=", - "rev": "ee43c1ba4b1769fe859dffcf14cd383dc7aa908d", - "revCount": 140, + "lastModified": 1753735677, + "narHash": "sha256-Kq/sdSVzZdd2hmOO+v0ertpku8MQbckAUzHvzSzR1S8=", + "rev": "89cff851dc853cdac7a97c0558d2a59cc25d811e", + "revCount": 143, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.29.1/0197a287-08f8-7c52-8cf3-a95e538d978b/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.30.2/019852ce-56c2-7a02-bafc-6ed2aea7f445/source.tar.gz" }, "original": { "type": "tarball", @@ -325,36 +330,36 @@ "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_3", "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1750773912, - "narHash": "sha256-rCL3l4t20jtMeNjCq6fMaTzWvBKgj+qw1zglLrniRfY=", - "rev": "5d78f74fe42f68078c15dcd6f2db4719603a86ae", - "revCount": 20052, + "lastModified": 1753380114, + "narHash": "sha256-U46fAs+j2PfWWqP1zNi1odhnV4030SQ0RoEC8Eah1OQ=", + "rev": "ffcf5b369f2effae43a12160e9d1b2380069919c", + "revCount": 20379, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.29.1/0197a278-1b18-7f2c-abe9-74ca6b2ff426/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.30.2/019842ac-bca3-782c-811a-6d2ed79b301f/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.29.1" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.30.2" } }, "nixpkgs": { "locked": { - "lastModified": 1747179050, - "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", + "lastModified": 1750441195, + "narHash": "sha256-yke+pm+MdgRb6c0dPt8MgDhv7fcBbdjmv1ZceNTyzKg=", + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "0ceffe312871b443929ff3006960d29b120dc627", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", "type": "github" } }, @@ -376,11 +381,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1751159883, - "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", + "lastModified": 1753579242, + "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", + "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", "type": "github" }, "original": { @@ -406,22 +411,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1746807397, - "narHash": "sha256-zU2z0jlkJGWLhdNr/8AJSxqK8XD0IlQgHp3VZcP56Aw=", - "owner": "cachix", - "repo": "devenv-nixpkgs", - "rev": "c5208b594838ea8e6cca5997fbf784b7cca1ca90", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "rolling", - "repo": "devenv-nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1747179050, "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", @@ -437,27 +426,27 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1750622754, - "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", - "rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1", - "revCount": 804570, + "lastModified": 1753489912, + "narHash": "sha256-uDCFHeXdRIgJpYmtcUxGEsZ+hYlLPBhR83fdU+vbC1s=", + "rev": "13e8d35b7d6028b7198f8186bc0347c6abaa2701", + "revCount": 807117, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.804570%2Brev-c7ab75210cb8cb16ddd8f290755d9558edde7ee1/0197a074-d3d4-7f91-83c9-3179faa97f62/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.807117%2Brev-13e8d35b7d6028b7198f8186bc0347c6abaa2701/0198521f-ea34-74ff-8d51-3e0180a60d94/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1751625545, - "narHash": "sha256-4E7wWftF1ExK5ZEDzj41+9mVgxtuRV3wWCId7QAYMAU=", + "lastModified": 1754060105, + "narHash": "sha256-di5L6e5Iiv+oegS07j9h23FdqEpXn0ZQqMlDOEMw1EY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c860cf0b3a0829f0f6cf344ca8de83a2bbfab428", + "rev": "e7eabdc701d7dbb810fd91a97ec358caa4c1fc50", "type": "github" }, "original": { @@ -474,7 +463,7 @@ "flake-parts": "flake-parts_2", "home-manager": "home-manager", "nix": "nix_2", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" } } }, diff --git a/modules/misc/default.nix b/modules/misc/default.nix index d2b8f816..98c65c0b 100644 --- a/modules/misc/default.nix +++ b/modules/misc/default.nix @@ -73,6 +73,8 @@ programs.zoxide.enable = true; programs.fzf.enable = true; + programs.vscode.enable = true; + programs.eza.enable = true; programs.eza.icons = "auto"; programs.eza.git = true; From bfe09a9e74535d660fa718021436403cea72ce58 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sun, 24 Aug 2025 07:14:58 +0900 Subject: [PATCH 22/34] update mappings for ctrl+v Signed-off-by: San Nguyen --- flake.lock | 36 ++++++++++++++++++------------------ modules/zsh/default.nix | 2 +- pkgs/nvchad/lua/mappings.lua | 2 ++ pkgs/nvchad/lua/options.lua | 6 ------ 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index a84bfaac..6a3733ff 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1753981111, - "narHash": "sha256-uBJOyMxOkGRmxhD2M5rbN2aV6oP1T2AKq5oBaHHC4mw=", + "lastModified": 1755961020, + "narHash": "sha256-Fs0CWiUA78Qgbc9zVk+zUN7pEkMPffnd//JsDtUUWBM=", "owner": "cachix", "repo": "devenv", - "rev": "d4d70df706b153b601a87ab8e81c88a0b1a373b6", + "rev": "abb198476023189fc45a01bd6502f5ca6ea62bd0", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1753140376, - "narHash": "sha256-7lrVrE0jSvZHrxEzvnfHFE/Wkk9DDqb+mYCodI5uuB8=", + "lastModified": 1755519972, + "narHash": "sha256-bU4nqi3IpsUZJeyS8Jk85ytlX61i4b0KCxXX9YcOgVc=", "owner": "nix-community", "repo": "disko", - "rev": "545aba02960caa78a31bd9a8709a0ad4b6320a5c", + "rev": "4073ff2f481f9ef3501678ff479ed81402caae6d", "type": "github" }, "original": { @@ -133,11 +133,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1754091436, - "narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=", + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "type": "github" }, "original": { @@ -257,11 +257,11 @@ ] }, "locked": { - "lastModified": 1754085240, - "narHash": "sha256-kVHCrTWEe8B1thAhFag1bk4QPY0ZP45V9vPbrwPHoNo=", + "lastModified": 1755914636, + "narHash": "sha256-VJ+Gm6YsHlPfUCpmRQxvdiZW7H3YPSrdVOewQHAhZN8=", "owner": "nix-community", "repo": "home-manager", - "rev": "e102920c1becb114645c6f92fe14edc0b05cc229", + "rev": "8b55a6ac58b678199e5bba701aaff69e2b3281c0", "type": "github" }, "original": { @@ -293,11 +293,11 @@ ] }, "locked": { - "lastModified": 1752773918, - "narHash": "sha256-dOi/M6yNeuJlj88exI+7k154z+hAhFcuB8tZktiW7rg=", + "lastModified": 1755029779, + "narHash": "sha256-3+GHIYGg4U9XKUN4rg473frIVNn8YD06bjwxKS1IPrU=", "owner": "cachix", "repo": "nix", - "rev": "031c3cf42d2e9391eee373507d8c12e0f9606779", + "rev": "b0972b0eee6726081d10b1199f54de6d2917f861", "type": "github" }, "original": { @@ -442,11 +442,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1754060105, - "narHash": "sha256-di5L6e5Iiv+oegS07j9h23FdqEpXn0ZQqMlDOEMw1EY=", + "lastModified": 1755829505, + "narHash": "sha256-4/Jd+LkQ2ssw8luQVkqVs9spDBVE6h/u/hC/tzngsPo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e7eabdc701d7dbb810fd91a97ec358caa4c1fc50", + "rev": "f937f8ecd1c70efd7e9f90ba13dfb400cf559de4", "type": "github" }, "original": { diff --git a/modules/zsh/default.nix b/modules/zsh/default.nix index a7542f96..e1a07d8e 100644 --- a/modules/zsh/default.nix +++ b/modules/zsh/default.nix @@ -3,7 +3,7 @@ programs.zsh = { enable = true; envExtra = builtins.readFile ./zshenv; - dotDir = ".config/zsh"; + dotDir = "${config.xdg.configHome}/zsh"; enableCompletion = true; defaultKeymap = "emacs"; history.path = "${config.xdg.configHome}/zsh/.zsh_history"; diff --git a/pkgs/nvchad/lua/mappings.lua b/pkgs/nvchad/lua/mappings.lua index 0c41fbf3..cef974fd 100644 --- a/pkgs/nvchad/lua/mappings.lua +++ b/pkgs/nvchad/lua/mappings.lua @@ -37,10 +37,12 @@ M.General = { i = { [''] = { '', 'Move one word left', }, [''] = { '', 'Move one word right', }, + [''] = { 'norm! "+p', 'Paste from clipboard', }, }, t = { [''] = { '', 'Move one word left', }, [''] = { '', 'Move one word right', }, + [''] = { vim.api.nvim_replace_termcodes('', true, true, true) .. '"+pi', 'Paste from clipboard', }, [''] = { vim.api.nvim_replace_termcodes('', true, true, true), 'Escape terminal mode', }, }, } diff --git a/pkgs/nvchad/lua/options.lua b/pkgs/nvchad/lua/options.lua index c09c7841..20fe0998 100644 --- a/pkgs/nvchad/lua/options.lua +++ b/pkgs/nvchad/lua/options.lua @@ -119,12 +119,6 @@ vim.api.nvim_create_autocmd("UIEnter", { callback = function() if vim.g.neovide then local map = vim.keymap.set - map( - { 'i', 'c', 't' }, - '', - function() vim.api.nvim_paste(vim.fn.getreg('*'), true, -1) end, - { silent = true, desc = "Neovide Paste in GUI" } - ) map({ 'n', 'i', 'x' }, '', 'lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1', { silent = true, desc = 'Neovide Increase scale', From 9f4eed7b33dea0e824f9eaf7e9dc6753bb2a5237 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sun, 24 Aug 2025 19:51:02 +0900 Subject: [PATCH 23/34] chore: add ghostty back Signed-off-by: San Nguyen --- flake.lock | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++--- flake.nix | 20 +++---- 2 files changed, 156 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 6a3733ff..4515cf60 100644 --- a/flake.lock +++ b/flake.lock @@ -91,6 +91,22 @@ } }, "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1733328505, @@ -167,6 +183,46 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "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" + } + }, + "ghostty": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2", + "zig": "zig", + "zon2nix": "zon2nix" + }, + "locked": { + "lastModified": 1756026621, + "narHash": "sha256-dw1sAVXzHBb3ZRSjVucKXQe65u0k2lsZ9FB3l6evpRY=", + "owner": "ghostty-org", + "repo": "ghostty", + "rev": "95bc181c986e91ea14db18eb9f300984e1f6ebdb", + "type": "github" + }, + "original": { + "owner": "ghostty-org", + "repo": "ghostty", + "type": "github" + } + }, "git-hooks": { "inputs": { "flake-compat": [ @@ -310,7 +366,7 @@ "nix_2": { "inputs": { "nix": "nix_3", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1753735677, @@ -327,10 +383,10 @@ }, "nix_3": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_3", "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression" }, @@ -411,6 +467,19 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1748189127, + "narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=", + "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.802491.7c43f080a7f2/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1747179050, "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", @@ -426,7 +495,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1753489912, "narHash": "sha256-uDCFHeXdRIgJpYmtcUxGEsZ+hYlLPBhR83fdU+vbC1s=", @@ -440,7 +509,7 @@ "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1755829505, "narHash": "sha256-4/Jd+LkQ2ssw8luQVkqVs9spDBVE6h/u/hC/tzngsPo=", @@ -461,9 +530,80 @@ "devenv": "devenv", "disko": "disko", "flake-parts": "flake-parts_2", + "ghostty": "ghostty", "home-manager": "home-manager", "nix": "nix_2", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "zig": { + "inputs": { + "flake-compat": [ + "ghostty", + "flake-compat" + ], + "flake-utils": [ + "ghostty", + "flake-utils" + ], + "nixpkgs": [ + "ghostty", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748261582, + "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=", + "owner": "mitchellh", + "repo": "zig-overlay", + "rev": "aafb1b093fb838f7a02613b719e85ec912914221", + "type": "github" + }, + "original": { + "owner": "mitchellh", + "repo": "zig-overlay", + "type": "github" + } + }, + "zon2nix": { + "inputs": { + "flake-utils": [ + "ghostty", + "flake-utils" + ], + "nixpkgs": [ + "ghostty", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742104771, + "narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=", + "owner": "jcollie", + "repo": "zon2nix", + "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "type": "github" + }, + "original": { + "owner": "jcollie", + "repo": "zon2nix", + "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 23b8531c..776f6515 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,9 @@ inputs = { # Mirroring nixpkgs unstable nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - # ghostty.url = "github:ghostty-org/ghostty"; - # ghostty.inputs.nixpkgs-stable.follows = "nixpkgs"; - # ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs"; + ghostty.url = "github:ghostty-org/ghostty"; + ghostty.inputs.nixpkgs-stable.follows = "nixpkgs"; + ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs"; disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; @@ -40,7 +40,7 @@ flake-parts, home-manager, nixpkgs, - # ghostty, + ghostty, disko, # neovim, # devenv, @@ -62,12 +62,12 @@ nix.settings.extra-trusted-public-keys = [ "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" - # "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" ]; nix.settings.extra-trusted-substituters = [ "https://devenv.cachix.org" "https://cache.flox.dev" - # "https://ghostty.cachix.org" + "https://ghostty.cachix.org" ]; } ./users/${user}/home.nix @@ -88,7 +88,7 @@ devenv.shells.default = { languages.nix.enable = true; }; - # packages.default = ghostty.packages.${system}.ghostty; + packages.default = ghostty.packages.${system}.ghostty; }; flake.overlays.default = final: prev: { @@ -97,7 +97,7 @@ # nvchad = prev.callPackage ./pkgs/nvchad { }; # devenv = devenv.packages.${final.stdenv.system}.default; # flox = flox.packages.${final.stdenv.system}.default; - # ghostty = ghostty.packages.${final.stdenv.system}.ghostty; + ghostty = ghostty.packages.${final.stdenv.system}.ghostty; }; flake.overlays.linux = final: prev: { @@ -121,7 +121,7 @@ disko.devices.disk.primary.device = "/dev/sda"; disko.devices.disk.secondary.device = "/dev/sdb"; environment.systemPackages = [ - # ghostty.packages.${system}.ghostty + ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default ]; } @@ -139,7 +139,7 @@ disko.devices.disk.main.device = "/dev/nvme0n3"; disko.devices.disk.home.device = "/dev/nvme0n4"; environment.systemPackages = [ - # ghostty.packages.${system}.ghostty + ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default ]; } From dc41a65425681ac68c3d4ed2748a22c59293e9a7 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Mon, 1 Sep 2025 12:54:11 +0900 Subject: [PATCH 24/34] chore: add deps Signed-off-by: San Nguyen --- flake.lock | 97 +++++++++++++-------------- flake.nix | 3 +- modules/cloud/default.nix | 2 +- pkgs/nvchad/lua/configs/lspconfig.lua | 23 +++++-- pkgs/nvchad/lua/plugins/init.lua | 40 +++++------ 5 files changed, 88 insertions(+), 77 deletions(-) diff --git a/flake.lock b/flake.lock index 4515cf60..ecc77581 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1755961020, - "narHash": "sha256-Fs0CWiUA78Qgbc9zVk+zUN7pEkMPffnd//JsDtUUWBM=", + "lastModified": 1756415044, + "narHash": "sha256-Oj4Tvk1Za5CqGxZ43IoGWBySgfN0/JK+rfb1Tmk59QQ=", "owner": "cachix", "repo": "devenv", - "rev": "abb198476023189fc45a01bd6502f5ca6ea62bd0", + "rev": "c570189b38b549141179647da3ddde249ac50fec", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1755519972, - "narHash": "sha256-bU4nqi3IpsUZJeyS8Jk85ytlX61i4b0KCxXX9YcOgVc=", + "lastModified": 1756115622, + "narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=", "owner": "nix-community", "repo": "disko", - "rev": "4073ff2f481f9ef3501678ff479ed81402caae6d", + "rev": "bafad29f89e83b2d861b493aa23034ea16595560", "type": "github" }, "original": { @@ -205,16 +205,18 @@ "inputs": { "flake-compat": "flake-compat_2", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "nixpkgs" + ], "zig": "zig", "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1756026621, - "narHash": "sha256-dw1sAVXzHBb3ZRSjVucKXQe65u0k2lsZ9FB3l6evpRY=", + "lastModified": 1756476506, + "narHash": "sha256-RMPUnaCPUTnUPa1KJ4t7MVm0T3OYofrW0x69j7ziXQo=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "95bc181c986e91ea14db18eb9f300984e1f6ebdb", + "rev": "b0d9b0dee0ed34b2732933a29bfd173290c2577b", "type": "github" }, "original": { @@ -313,11 +315,11 @@ ] }, "locked": { - "lastModified": 1755914636, - "narHash": "sha256-VJ+Gm6YsHlPfUCpmRQxvdiZW7H3YPSrdVOewQHAhZN8=", + "lastModified": 1756496801, + "narHash": "sha256-IYIsnPy+cJxe8RbDHBrCtfJY0ry2bG2H7WvMcewiGS8=", "owner": "nix-community", "repo": "home-manager", - "rev": "8b55a6ac58b678199e5bba701aaff69e2b3281c0", + "rev": "77a71380c38fb2a440b4b5881bbc839f6230e1cb", "type": "github" }, "original": { @@ -369,12 +371,12 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1753735677, - "narHash": "sha256-Kq/sdSVzZdd2hmOO+v0ertpku8MQbckAUzHvzSzR1S8=", - "rev": "89cff851dc853cdac7a97c0558d2a59cc25d811e", - "revCount": 143, + "lastModified": 1756240194, + "narHash": "sha256-RI6v0stiiMNUuUEmIeDIg2s282kSMabkskcogvGCe/w=", + "rev": "e59e0d5de0b06a218a592b8225025af52aac4716", + "revCount": 144, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.30.2/019852ce-56c2-7a02-bafc-6ed2aea7f445/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.31.0/0198e816-39a3-7b8f-9478-5e3d68f83d31/source.tar.gz" }, "original": { "type": "tarball", @@ -391,16 +393,16 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1753380114, - "narHash": "sha256-U46fAs+j2PfWWqP1zNi1odhnV4030SQ0RoEC8Eah1OQ=", - "rev": "ffcf5b369f2effae43a12160e9d1b2380069919c", - "revCount": 20379, + "lastModified": 1755964981, + "narHash": "sha256-5JYyijH2q/uQCDIZCCyQEBsZ0VPNP2SS1wgZ4+qeIWM=", + "rev": "ec6ba866d1a75f04a43d3ac4061a3b0277be842b", + "revCount": 20736, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.30.2/019842ac-bca3-782c-811a-6d2ed79b301f/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.31.0/0198e057-fe9f-7d26-a4c1-80c025dd6628/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.30.2" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.31.0" } }, "nixpkgs": { @@ -468,41 +470,41 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1748189127, - "narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=", - "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", + "lastModified": 1755972213, + "narHash": "sha256-VYK7aDAv8H1enXn1ECRHmGbeY6RqLnNwUJkOwloIsko=", + "rev": "73e96df7cff5783f45e21342a75a1540c4eddce4", "type": "tarball", - "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.802491.7c43f080a7f2/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixos/unstable-small/nixos-25.11pre850642.73e96df7cff5/nixexprs.tar.xz" }, "original": { "type": "tarball", - "url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz" + "url": "https://channels.nixos.org/nixos-unstable-small/nixexprs.tar.xz" } }, "nixpkgs_3": { "locked": { - "lastModified": 1747179050, - "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", + "lastModified": 1755442223, + "narHash": "sha256-VtMQg02B3kt1oejwwrGn50U9Xbjgzfbb5TV5Wtx8dKI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", + "rev": "cd32a774ac52caaa03bcfc9e7591ac8c18617ced", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-25.05-small", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_4": { "locked": { - "lastModified": 1753489912, - "narHash": "sha256-uDCFHeXdRIgJpYmtcUxGEsZ+hYlLPBhR83fdU+vbC1s=", - "rev": "13e8d35b7d6028b7198f8186bc0347c6abaa2701", - "revCount": 807117, + "lastModified": 1755922037, + "narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=", + "rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c", + "revCount": 808723, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.807117%2Brev-13e8d35b7d6028b7198f8186bc0347c6abaa2701/0198521f-ea34-74ff-8d51-3e0180a60d94/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808723%2Brev-b1b3291469652d5a2edb0becc4ef0246fff97a7c/0198daf7-011a-7703-95d7-57146e794342/source.tar.gz" }, "original": { "type": "tarball", @@ -511,11 +513,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1755829505, - "narHash": "sha256-4/Jd+LkQ2ssw8luQVkqVs9spDBVE6h/u/hC/tzngsPo=", + "lastModified": 1756381814, + "narHash": "sha256-tzo7YvAsGlzo4WiIHT0ooR59VHu+aKRQdHk7sIyoia4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f937f8ecd1c70efd7e9f90ba13dfb400cf559de4", + "rev": "aca2499b79170038df0dbaec8bf2f689b506ad32", "type": "github" }, "original": { @@ -586,23 +588,20 @@ "ghostty", "flake-utils" ], - "nixpkgs": [ - "ghostty", - "nixpkgs" - ] + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1742104771, - "narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=", + "lastModified": 1756000480, + "narHash": "sha256-fR5pdcjO0II5MNdCzqvyokyuFkmff7/FyBAjUS6sMfA=", "owner": "jcollie", "repo": "zon2nix", - "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "rev": "d9dc9ef1ab9ae45b5c9d80c6a747cc9968ee0c60", "type": "github" }, "original": { "owner": "jcollie", "repo": "zon2nix", - "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "rev": "d9dc9ef1ab9ae45b5c9d80c6a747cc9968ee0c60", "type": "github" } } diff --git a/flake.nix b/flake.nix index 776f6515..1f1f10a9 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,7 @@ # Mirroring nixpkgs unstable nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; ghostty.url = "github:ghostty-org/ghostty"; - ghostty.inputs.nixpkgs-stable.follows = "nixpkgs"; - ghostty.inputs.nixpkgs-unstable.follows = "nixpkgs"; + ghostty.inputs.nixpkgs.follows = "nixpkgs"; disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/cloud/default.nix b/modules/cloud/default.nix index 8051b82a..2e0b6e6a 100644 --- a/modules/cloud/default.nix +++ b/modules/cloud/default.nix @@ -3,7 +3,7 @@ { home.packages = with pkgs; [ # Cloud - azure-cli + # azure-cli google-cloud-sdk awscli2 ssm-session-manager-plugin diff --git a/pkgs/nvchad/lua/configs/lspconfig.lua b/pkgs/nvchad/lua/configs/lspconfig.lua index 9bb018c7..a63561c0 100644 --- a/pkgs/nvchad/lua/configs/lspconfig.lua +++ b/pkgs/nvchad/lua/configs/lspconfig.lua @@ -35,9 +35,9 @@ local on_attach = function(client, bufnr) end local servers = { - cssls = {}, + -- cssls = {}, dockerls = {}, - eslint = {}, + -- eslint = {}, gopls = {}, golangci_lint_ls = {}, helm_ls = {}, @@ -96,8 +96,17 @@ local servers = { terraformls = { root_dir = root_pattern('.git', '.terraform', 'main.tf', '.terraform.lock.hcl'), }, - ts_ls = {}, - tailwindcss = {}, + ty = { + settings = { + ty = { + disableLanguageServices = true, + diagnosticMode = 'workspace', + }, + }, + }, + vtsls = {}, + -- ts_ls = {}, + -- tailwindcss = {}, lua_ls = { settings = { Lua = { @@ -127,7 +136,11 @@ for name, opts in pairs(servers) do opts.on_attach = on_attach opts.capabilities = capabilities - lspconfig[name].setup(opts) + if next(opts) ~= nil then + vim.lsp.config(name, opts) + end + + vim.lsp.enable(name) end -- local null_ls = require 'null-ls' diff --git a/pkgs/nvchad/lua/plugins/init.lua b/pkgs/nvchad/lua/plugins/init.lua index 67c0a8cd..e5894b9b 100644 --- a/pkgs/nvchad/lua/plugins/init.lua +++ b/pkgs/nvchad/lua/plugins/init.lua @@ -184,26 +184,26 @@ local plugins = { -- }, -- config = true, -- }, - { - 'zbirenbaum/copilot.lua', - event = 'VeryLazy', - dependencies = { { 'zbirenbaum/copilot-cmp', config = true, }, 'hrsh7th/nvim-cmp', }, - config = function() - require 'copilot'.setup { - panel = { - enabled = false, - }, - suggestion = { - enabled = false, - }, - filetypes = { - yaml = true, - markdown = true, - gitcommit = true, - }, - } - end, - }, + -- { + -- 'zbirenbaum/copilot.lua', + -- event = 'VeryLazy', + -- dependencies = { { 'zbirenbaum/copilot-cmp', config = true, }, 'hrsh7th/nvim-cmp', }, + -- config = function() + -- require 'copilot'.setup { + -- panel = { + -- enabled = false, + -- }, + -- suggestion = { + -- enabled = false, + -- }, + -- filetypes = { + -- yaml = true, + -- markdown = true, + -- gitcommit = true, + -- }, + -- } + -- end, + -- }, { 'rust-lang/rust.vim', ft = 'rust', From 930698fce99d293e6a084a87ce6d3d913ce40db9 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sat, 13 Sep 2025 23:21:38 +0900 Subject: [PATCH 25/34] update Signed-off-by: San Nguyen --- flake.lock | 225 +++++++-------------------------- flake.nix | 22 ++-- modules/hyprland/hyprland.conf | 5 - 3 files changed, 54 insertions(+), 198 deletions(-) diff --git a/flake.lock b/flake.lock index ecc77581..2302fa70 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1756415044, - "narHash": "sha256-Oj4Tvk1Za5CqGxZ43IoGWBySgfN0/JK+rfb1Tmk59QQ=", + "lastModified": 1757570236, + "narHash": "sha256-Gy15+KtKc/MyT4L9Ad/2wkXQvDiMkhtKy9Tnn3+kPww=", "owner": "cachix", "repo": "devenv", - "rev": "c570189b38b549141179647da3ddde249ac50fec", + "rev": "c57bded76fa6a885ab1dee2c75216cc23d58b311", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1756115622, - "narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=", + "lastModified": 1757508292, + "narHash": "sha256-7lVWL5bC6xBIMWWDal41LlGAG+9u2zUorqo3QCUL4p4=", "owner": "nix-community", "repo": "disko", - "rev": "bafad29f89e83b2d861b493aa23034ea16595560", + "rev": "146f45bee02b8bd88812cfce6ffc0f933788875a", "type": "github" }, "original": { @@ -91,22 +91,6 @@ } }, "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { "flake": false, "locked": { "lastModified": 1733328505, @@ -149,11 +133,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1754487366, - "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "rev": "4524271976b625a4a605beefd893f270620fd751", "type": "github" }, "original": { @@ -183,48 +167,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "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" - } - }, - "ghostty": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "zig": "zig", - "zon2nix": "zon2nix" - }, - "locked": { - "lastModified": 1756476506, - "narHash": "sha256-RMPUnaCPUTnUPa1KJ4t7MVm0T3OYofrW0x69j7ziXQo=", - "owner": "ghostty-org", - "repo": "ghostty", - "rev": "b0d9b0dee0ed34b2732933a29bfd173290c2577b", - "type": "github" - }, - "original": { - "owner": "ghostty-org", - "repo": "ghostty", - "type": "github" - } - }, "git-hooks": { "inputs": { "flake-compat": [ @@ -315,11 +257,11 @@ ] }, "locked": { - "lastModified": 1756496801, - "narHash": "sha256-IYIsnPy+cJxe8RbDHBrCtfJY0ry2bG2H7WvMcewiGS8=", + "lastModified": 1757698511, + "narHash": "sha256-UqHHGydF/q3jfYXCpvYLA0TWtvByOp1NwOKCUjhYmPs=", "owner": "nix-community", "repo": "home-manager", - "rev": "77a71380c38fb2a440b4b5881bbc839f6230e1cb", + "rev": "a3fcc92180c7462082cd849498369591dfb20855", "type": "github" }, "original": { @@ -368,15 +310,15 @@ "nix_2": { "inputs": { "nix": "nix_3", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1756240194, - "narHash": "sha256-RI6v0stiiMNUuUEmIeDIg2s282kSMabkskcogvGCe/w=", - "rev": "e59e0d5de0b06a218a592b8225025af52aac4716", - "revCount": 144, + "lastModified": 1756839793, + "narHash": "sha256-Lpz/ELngcv7oUIdbEeglB+9+3G6aiOWeNKnE1YSrJ0I=", + "rev": "2ae87b6cb55070f15bbb20ef78e05d6d837e978f", + "revCount": 145, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.31.0/0198e816-39a3-7b8f-9478-5e3d68f83d31/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.31.1/01990bd3-63ed-708c-9cd9-d7171ab0a635/source.tar.gz" }, "original": { "type": "tarball", @@ -385,24 +327,24 @@ }, "nix_3": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_3", "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1755964981, - "narHash": "sha256-5JYyijH2q/uQCDIZCCyQEBsZ0VPNP2SS1wgZ4+qeIWM=", - "rev": "ec6ba866d1a75f04a43d3ac4061a3b0277be842b", - "revCount": 20736, + "lastModified": 1756713144, + "narHash": "sha256-p7GXuu9OyQ1etTYl5egWIk2Ck7CdpXj80CqkhfE4H0c=", + "rev": "4006d0fe119eb6b7c76f8d447d3095a2b5f7ecbb", + "revCount": 20751, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.31.0/0198e057-fe9f-7d26-a4c1-80c025dd6628/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.31.1/019909bd-8a43-7c3c-b0a9-c98f5640e0fd/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.31.0" + "url": "https://flakehub.com/f/NixOS/nix/%3D2.31.1" } }, "nixpkgs": { @@ -439,11 +381,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1753579242, - "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", + "lastModified": 1754788789, + "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", + "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", "type": "github" }, "original": { @@ -470,24 +412,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1755972213, - "narHash": "sha256-VYK7aDAv8H1enXn1ECRHmGbeY6RqLnNwUJkOwloIsko=", - "rev": "73e96df7cff5783f45e21342a75a1540c4eddce4", - "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable-small/nixos-25.11pre850642.73e96df7cff5/nixexprs.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable-small/nixexprs.tar.xz" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1755442223, - "narHash": "sha256-VtMQg02B3kt1oejwwrGn50U9Xbjgzfbb5TV5Wtx8dKI=", + "lastModified": 1756178832, + "narHash": "sha256-O2CIn7HjZwEGqBrwu9EU76zlmA5dbmna7jL1XUmAId8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cd32a774ac52caaa03bcfc9e7591ac8c18617ced", + "rev": "d98ce345cdab58477ca61855540999c86577d19d", "type": "github" }, "original": { @@ -497,27 +426,27 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1755922037, - "narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=", - "rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c", - "revCount": 808723, + "lastModified": 1756754095, + "narHash": "sha256-9Rsn9XEWINExosFkKEqdp8EI6Mujr1gmQiyrEcts2ls=", + "rev": "7c815e513adbf03c9098b2bd230c1e0525c8a7f9", + "revCount": 809261, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808723%2Brev-b1b3291469652d5a2edb0becc4ef0246fff97a7c/0198daf7-011a-7703-95d7-57146e794342/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.809261%2Brev-7c815e513adbf03c9098b2bd230c1e0525c8a7f9/01990983-b955-725c-8944-65db1dca2de0/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1756381814, - "narHash": "sha256-tzo7YvAsGlzo4WiIHT0ooR59VHu+aKRQdHk7sIyoia4=", + "lastModified": 1757746433, + "narHash": "sha256-fEvTiU4s9lWgW7mYEU/1QUPirgkn+odUBTaindgiziY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "aca2499b79170038df0dbaec8bf2f689b506ad32", + "rev": "6d7ec06d6868ac6d94c371458fc2391ded9ff13d", "type": "github" }, "original": { @@ -532,77 +461,9 @@ "devenv": "devenv", "disko": "disko", "flake-parts": "flake-parts_2", - "ghostty": "ghostty", "home-manager": "home-manager", "nix": "nix_2", - "nixpkgs": "nixpkgs_5" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "zig": { - "inputs": { - "flake-compat": [ - "ghostty", - "flake-compat" - ], - "flake-utils": [ - "ghostty", - "flake-utils" - ], - "nixpkgs": [ - "ghostty", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748261582, - "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=", - "owner": "mitchellh", - "repo": "zig-overlay", - "rev": "aafb1b093fb838f7a02613b719e85ec912914221", - "type": "github" - }, - "original": { - "owner": "mitchellh", - "repo": "zig-overlay", - "type": "github" - } - }, - "zon2nix": { - "inputs": { - "flake-utils": [ - "ghostty", - "flake-utils" - ], - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1756000480, - "narHash": "sha256-fR5pdcjO0II5MNdCzqvyokyuFkmff7/FyBAjUS6sMfA=", - "owner": "jcollie", - "repo": "zon2nix", - "rev": "d9dc9ef1ab9ae45b5c9d80c6a747cc9968ee0c60", - "type": "github" - }, - "original": { - "owner": "jcollie", - "repo": "zon2nix", - "rev": "d9dc9ef1ab9ae45b5c9d80c6a747cc9968ee0c60", - "type": "github" + "nixpkgs": "nixpkgs_4" } } }, diff --git a/flake.nix b/flake.nix index 1f1f10a9..ed31c38d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,8 @@ inputs = { # Mirroring nixpkgs unstable nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - ghostty.url = "github:ghostty-org/ghostty"; - ghostty.inputs.nixpkgs.follows = "nixpkgs"; + # ghostty.url = "github:ghostty-org/ghostty"; + # ghostty.inputs.nixpkgs.follows = "nixpkgs"; disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; @@ -39,7 +39,7 @@ flake-parts, home-manager, nixpkgs, - ghostty, + # ghostty, disko, # neovim, # devenv, @@ -82,12 +82,12 @@ imports = [ inputs.devenv.flakeModule ]; perSystem = - { system, ... }: + { ... }: { devenv.shells.default = { languages.nix.enable = true; }; - packages.default = ghostty.packages.${system}.ghostty; + # packages.default = ghostty.packages.${system}.ghostty; }; flake.overlays.default = final: prev: { @@ -96,7 +96,7 @@ # nvchad = prev.callPackage ./pkgs/nvchad { }; # devenv = devenv.packages.${final.stdenv.system}.default; # flox = flox.packages.${final.stdenv.system}.default; - ghostty = ghostty.packages.${final.stdenv.system}.ghostty; + # ghostty = ghostty.packages.${final.stdenv.system}.ghostty; }; flake.overlays.linux = final: prev: { @@ -104,7 +104,7 @@ # ld-floxlib = ld-floxlib.packages.${final.stdenv.system}.ld-floxlib; }; - flake.nixosConfigurations.parallels-desktop = nixpkgs.lib.nixosSystem rec { + flake.nixosConfigurations.parallels-desktop = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; modules = [ ./machines/parallels/configuration.nix @@ -113,21 +113,21 @@ ./machines/common.nix { nixpkgs.config.permittedInsecurePackages = [ - "beekeeper-studio-5.2.12" + "beekeeper-studio-5.3.4" ]; } { disko.devices.disk.primary.device = "/dev/sda"; disko.devices.disk.secondary.device = "/dev/sdb"; environment.systemPackages = [ - ghostty.packages.${system}.ghostty + # ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default ]; } home-manager.nixosModules.home-manager ]; }; - flake.nixosConfigurations.vmware-fusion = nixpkgs.lib.nixosSystem rec { + flake.nixosConfigurations.vmware-fusion = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; modules = [ ./machines/vmware-fusion/configuration.nix @@ -138,7 +138,7 @@ disko.devices.disk.main.device = "/dev/nvme0n3"; disko.devices.disk.home.device = "/dev/nvme0n4"; environment.systemPackages = [ - ghostty.packages.${system}.ghostty + # ghostty.packages.${system}.ghostty # nixGL.packages.${system}.default ]; } diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index a2567ff6..9b7be573 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -211,11 +211,6 @@ input { } } -# https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = false -} - # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more device { From 9f90b13b5a5b67fc1456969130e6569086ef45a9 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sun, 14 Sep 2025 01:10:38 +0900 Subject: [PATCH 26/34] update service Signed-off-by: San Nguyen --- machines/common.nix | 14 +-- modules/nvim/default.nix | 11 ++- modules/zsh/default.nix | 2 +- pkgs/nvchad/lua/configs/lspconfig.lua | 2 +- pkgs/nvchad/lua/plugins/init.lua | 127 +++++++++++++++----------- 5 files changed, 84 insertions(+), 72 deletions(-) diff --git a/machines/common.nix b/machines/common.nix index 6f458ddd..727c14f8 100644 --- a/machines/common.nix +++ b/machines/common.nix @@ -103,17 +103,6 @@ in "org.freedesktop.portal.FileChooser" = [ "xdg-desktop-portal-gtk" ]; }; }; - systemd.user.services = { - prlcc = { - wantedBy = lib.mkForce [ ]; - }; - prldnd = { - wantedBy = lib.mkForce [ ]; - }; - prlsga = { - wantedBy = lib.mkForce [ ]; - }; - }; services.gnome.gnome-keyring.enable = true; security.pam.services.login.enableGnomeKeyring = true; @@ -146,7 +135,8 @@ in fonts.packages = [ comic-code - ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); + ] + ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; diff --git a/modules/nvim/default.nix b/modules/nvim/default.nix index 2994a267..243323d5 100644 --- a/modules/nvim/default.nix +++ b/modules/nvim/default.nix @@ -13,7 +13,7 @@ in codespell corepack nixfmt-rfc-style - # nodejs + nodejs nvchad stylelint tflint @@ -21,7 +21,7 @@ in trash-cli # yamlfmt yamllint - # helm-ls + helm-ls lua-language-server # prettierd # https://github.com/mantoni/eslint_d.js/issues/287 @@ -35,16 +35,17 @@ in nixd vscode-langservers-extracted yaml-language-server + vtsls # gopls # rust-analyzer terraform-ls tree-sitter - # tailwindcss-language-server + tailwindcss-language-server docker-compose-language-service ] ++ (with nodePackages; [ - typescript-language-server - dockerfile-language-server-nodejs + # typescript-language-server + dockerfile-language-server ]) ); diff --git a/modules/zsh/default.nix b/modules/zsh/default.nix index e1a07d8e..80cf8a09 100644 --- a/modules/zsh/default.nix +++ b/modules/zsh/default.nix @@ -29,7 +29,7 @@ eval "$(uvx --generate-shell-completion zsh)" fi - export PATH=$HOME/.local/bin:$HOME/.cache/.bun/bin:$PATH + export PATH=$PATH:$HOME/.local/bin:$HOME/.cache/.bun/bin ''; zsh-abbr.enable = true; zsh-abbr.abbreviations = { diff --git a/pkgs/nvchad/lua/configs/lspconfig.lua b/pkgs/nvchad/lua/configs/lspconfig.lua index a63561c0..aa33289a 100644 --- a/pkgs/nvchad/lua/configs/lspconfig.lua +++ b/pkgs/nvchad/lua/configs/lspconfig.lua @@ -106,7 +106,7 @@ local servers = { }, vtsls = {}, -- ts_ls = {}, - -- tailwindcss = {}, + tailwindcss = {}, lua_ls = { settings = { Lua = { diff --git a/pkgs/nvchad/lua/plugins/init.lua b/pkgs/nvchad/lua/plugins/init.lua index e5894b9b..683877f7 100644 --- a/pkgs/nvchad/lua/plugins/init.lua +++ b/pkgs/nvchad/lua/plugins/init.lua @@ -131,29 +131,29 @@ local plugins = { }) end, }, - { - "coder/claudecode.nvim", - dependencies = { - "folke/snacks.nvim", -- Optional dependency for enhanced terminal - }, - opts = { - -- Configuration for claudecode main - terminal_cmd = "claude", - - -- Configuration for the interactive terminal: - terminal = { - split_side = "left", - split_width_percentage = 0.4, - provider = "snacks", - show_native_term_exit_tip = true, - }, - }, - config = true, - keys = { - { "ac", "ClaudeCode", mode = { "n", "x" }, desc = "Toggle Claude Terminal" }, - { "ak", "ClaudeCodeSend", mode = { "x" }, desc = "Send to Claude Code" }, - }, - }, + -- { + -- "coder/claudecode.nvim", + -- dependencies = { + -- "folke/snacks.nvim", -- Optional dependency for enhanced terminal + -- }, + -- opts = { + -- -- Configuration for claudecode main + -- terminal_cmd = "claude", + -- + -- -- Configuration for the interactive terminal: + -- terminal = { + -- split_side = "left", + -- split_width_percentage = 0.4, + -- provider = "snacks", + -- show_native_term_exit_tip = true, + -- }, + -- }, + -- config = true, + -- keys = { + -- { "ac", "ClaudeCode", mode = { "n", "x" }, desc = "Toggle Claude Terminal" }, + -- { "ak", "ClaudeCodeSend", mode = { "x" }, desc = "Send to Claude Code" }, + -- }, + -- }, { 'stevearc/conform.nvim', ---@type conform.setupOpts @@ -174,36 +174,57 @@ local plugins = { } }, }, - -- { - -- "olimorris/codecompanion.nvim", - -- event = 'VeryLazy', - -- dependencies = { - -- "nvim-lua/plenary.nvim", - -- "nvim-treesitter/nvim-treesitter", - -- { "MeanderingProgrammer/render-markdown.nvim", ft = { "markdown", "codecompanion" } }, - -- }, - -- config = true, - -- }, - -- { - -- 'zbirenbaum/copilot.lua', - -- event = 'VeryLazy', - -- dependencies = { { 'zbirenbaum/copilot-cmp', config = true, }, 'hrsh7th/nvim-cmp', }, - -- config = function() - -- require 'copilot'.setup { - -- panel = { - -- enabled = false, - -- }, - -- suggestion = { - -- enabled = false, - -- }, - -- filetypes = { - -- yaml = true, - -- markdown = true, - -- gitcommit = true, - -- }, - -- } - -- end, - -- }, + { + "olimorris/codecompanion.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + { "MeanderingProgrammer/render-markdown.nvim", ft = { "markdown", "codecompanion" } }, + }, + opts = { + strategies = { + chat = { + adapter = "gemini_cli", + } + }, + adapters = { + acp = { + gemini_cli = function() + return require("codecompanion.adapters").extend("gemini_cli", { + env = { + GOOGLE_CLOUD_PROJECT = "wp-dev-wovey-yev1", + GOOGLE_CLOUD_LOCATION = "us-central1", + GOOGLE_GENAI_USE_VERTEXAI = "true", + }, + }) + end, + }, + }, + }, + keys = { + { "ac", "CodeCompanionChat Toggle", mode = { "n", "x" }, desc = "Toggle Code Companion Chat" }, + }, + }, + { + 'zbirenbaum/copilot.lua', + event = 'VeryLazy', + dependencies = { { 'zbirenbaum/copilot-cmp', config = true, }, 'hrsh7th/nvim-cmp', }, + config = function() + require 'copilot'.setup { + panel = { + enabled = false, + }, + suggestion = { + enabled = false, + }, + filetypes = { + yaml = true, + markdown = true, + gitcommit = true, + }, + } + end, + }, { 'rust-lang/rust.vim', ft = 'rust', From 3b8363046786f678a0c5302d83e43fe98265729e Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Mon, 15 Sep 2025 01:14:41 +0900 Subject: [PATCH 27/34] feat: add prlcc service and update claudecode config Signed-off-by: San Nguyen --- flake.lock | 6 +- machines/common.nix | 9 +++ pkgs/nvchad/lua/plugins/init.lua | 94 ++++++++++++++++++-------------- 3 files changed, 66 insertions(+), 43 deletions(-) diff --git a/flake.lock b/flake.lock index 2302fa70..91fc6ede 100644 --- a/flake.lock +++ b/flake.lock @@ -257,11 +257,11 @@ ] }, "locked": { - "lastModified": 1757698511, - "narHash": "sha256-UqHHGydF/q3jfYXCpvYLA0TWtvByOp1NwOKCUjhYmPs=", + "lastModified": 1757784838, + "narHash": "sha256-6aHo1++bAFdW1z+0tfuxM9EmxHvon90mHo8/+izXMcY=", "owner": "nix-community", "repo": "home-manager", - "rev": "a3fcc92180c7462082cd849498369591dfb20855", + "rev": "6e28513cf2ee9a985c339fcef24d44f43d23456b", "type": "github" }, "original": { diff --git a/machines/common.nix b/machines/common.nix index 727c14f8..92cccad5 100644 --- a/machines/common.nix +++ b/machines/common.nix @@ -104,6 +104,15 @@ in }; }; + systemd.user.services = { + prlcc = { + serviceConfig = { + RestartSec = "1"; + Restart = "always"; + }; + }; + }; + services.gnome.gnome-keyring.enable = true; security.pam.services.login.enableGnomeKeyring = true; diff --git a/pkgs/nvchad/lua/plugins/init.lua b/pkgs/nvchad/lua/plugins/init.lua index 683877f7..d59da74b 100644 --- a/pkgs/nvchad/lua/plugins/init.lua +++ b/pkgs/nvchad/lua/plugins/init.lua @@ -131,29 +131,35 @@ local plugins = { }) end, }, - -- { - -- "coder/claudecode.nvim", - -- dependencies = { - -- "folke/snacks.nvim", -- Optional dependency for enhanced terminal - -- }, - -- opts = { - -- -- Configuration for claudecode main - -- terminal_cmd = "claude", - -- - -- -- Configuration for the interactive terminal: - -- terminal = { - -- split_side = "left", - -- split_width_percentage = 0.4, - -- provider = "snacks", - -- show_native_term_exit_tip = true, - -- }, - -- }, - -- config = true, - -- keys = { - -- { "ac", "ClaudeCode", mode = { "n", "x" }, desc = "Toggle Claude Terminal" }, - -- { "ak", "ClaudeCodeSend", mode = { "x" }, desc = "Send to Claude Code" }, - -- }, - -- }, + { + "coder/claudecode.nvim", + dependencies = { + "folke/snacks.nvim", -- Optional dependency for enhanced terminal + }, + opts = { + -- Configuration for claudecode main + terminal_cmd = "claude --resume", + terminal = { + provider = "external", + provider_opts = { + external_terminal_cmd = "alacritty --working-directory %s -e %s", + }, + }, + + -- Configuration for the interactive terminal: + -- terminal = { + -- split_side = "left", + -- split_width_percentage = 0.4, + -- provider = "snacks", + -- show_native_term_exit_tip = true, + -- }, + }, + config = true, + keys = { + { "ac", "ClaudeCode", mode = { "n", "x" }, desc = "Toggle Claude Terminal" }, + { "ak", "ClaudeCodeSend", mode = { "x" }, desc = "Send to Claude Code" }, + }, + }, { 'stevearc/conform.nvim', ---@type conform.setupOpts @@ -176,34 +182,42 @@ local plugins = { }, { "olimorris/codecompanion.nvim", + event = "VeryLazy", dependencies = { "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter", { "MeanderingProgrammer/render-markdown.nvim", ft = { "markdown", "codecompanion" } }, }, opts = { - strategies = { + display = { chat = { - adapter = "gemini_cli", - } + window = { + position = 'left', + width = 0.4, + }, + }, }, - adapters = { - acp = { - gemini_cli = function() - return require("codecompanion.adapters").extend("gemini_cli", { - env = { - GOOGLE_CLOUD_PROJECT = "wp-dev-wovey-yev1", - GOOGLE_CLOUD_LOCATION = "us-central1", - GOOGLE_GENAI_USE_VERTEXAI = "true", - }, - }) - end, + chat = { + strategies = { + chat = { + adapter = "gemini_cli", + } + }, + adapters = { + acp = { + gemini_cli = function() + return require("codecompanion.adapters").extend("gemini_cli", { + env = { + GOOGLE_CLOUD_PROJECT = "wp-dev-wovey-yev1", + GOOGLE_CLOUD_LOCATION = "us-central1", + GOOGLE_GENAI_USE_VERTEXAI = "true", + }, + }) + end, + }, }, }, }, - keys = { - { "ac", "CodeCompanionChat Toggle", mode = { "n", "x" }, desc = "Toggle Code Companion Chat" }, - }, }, { 'zbirenbaum/copilot.lua', From 5bc66c1aa82109f1bece4cca0192a84503117158 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sat, 20 Sep 2025 15:30:45 +0900 Subject: [PATCH 28/34] start using niri Signed-off-by: San Nguyen --- flake.lock | 527 +++++++++++++++++- flake.nix | 42 ++ machines/common.nix | 43 +- modules/gnome/default.nix | 33 +- modules/gnome/qt5ct.conf | 28 + modules/gnome/qt6ct.conf | 28 + modules/hyprland/default.nix | 13 +- modules/niri/default.nix | 335 +++++++++++ modules/niri/niri.zsh | 29 + modules/niri/scripts/niri-cwd.sh | 19 + modules/niri/scripts/niri-nvim-nav.sh | 20 + modules/niri/scripts/niri-toggle-term.sh | 25 + modules/{hyprland => }/waybar/config | 0 modules/{hyprland => }/waybar/default.nix | 0 .../waybar/scripts/check_battery.sh | 0 modules/{hyprland => }/waybar/scripts/wttr.py | 0 modules/{hyprland => }/waybar/style.css | 0 modules/{hyprland => }/wofi/default.nix | 0 modules/{hyprland => }/wofi/style.css | 0 pkgs/nvchad/lua/options.lua | 35 +- programs/clipsync/default.nix | 79 +++ programs/clipsync/scripts/clipsync.sh | 107 ++++ {modules/programs => programs}/kubeswitch.nix | 0 users/sand/home.nix | 5 +- 24 files changed, 1314 insertions(+), 54 deletions(-) create mode 100644 modules/gnome/qt5ct.conf create mode 100644 modules/gnome/qt6ct.conf create mode 100644 modules/niri/default.nix create mode 100644 modules/niri/niri.zsh create mode 100755 modules/niri/scripts/niri-cwd.sh create mode 100755 modules/niri/scripts/niri-nvim-nav.sh create mode 100755 modules/niri/scripts/niri-toggle-term.sh rename modules/{hyprland => }/waybar/config (100%) rename modules/{hyprland => }/waybar/default.nix (100%) rename modules/{hyprland => }/waybar/scripts/check_battery.sh (100%) rename modules/{hyprland => }/waybar/scripts/wttr.py (100%) rename modules/{hyprland => }/waybar/style.css (100%) rename modules/{hyprland => }/wofi/default.nix (100%) rename modules/{hyprland => }/wofi/style.css (100%) create mode 100644 programs/clipsync/default.nix create mode 100755 programs/clipsync/scripts/clipsync.sh rename {modules/programs => programs}/kubeswitch.nix (100%) diff --git a/flake.lock b/flake.lock index 91fc6ede..915f2de6 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,72 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1752979451, + "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, "cachix": { "inputs": { "devenv": [ @@ -32,20 +99,44 @@ "type": "github" } }, + "dankshell": { + "inputs": { + "dgop": "dgop", + "dms-cli": "dms-cli", + "nixpkgs": [ + "nixpkgs" + ], + "quickshell": "quickshell" + }, + "locked": { + "lastModified": 1758315669, + "narHash": "sha256-zaWWc0Nd3fmtycQq39sdCvCzmAgoTAPa7Td13/bLH2o=", + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "rev": "3376dc893dad02ea9565f3e92be7edc3bef3cbbf", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "type": "github" + } + }, "devenv": { "inputs": { "cachix": "cachix", "flake-compat": "flake-compat", + "flake-parts": "flake-parts", "git-hooks": "git-hooks", "nix": "nix", "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1757570236, - "narHash": "sha256-Gy15+KtKc/MyT4L9Ad/2wkXQvDiMkhtKy9Tnn3+kPww=", + "lastModified": 1758261927, + "narHash": "sha256-GO5boIJnmJtPMYa0b98vO9v8l44E2uCROJYpIJuz244=", "owner": "cachix", "repo": "devenv", - "rev": "c57bded76fa6a885ab1dee2c75216cc23d58b311", + "rev": "12fed1a4f8e1b14d45cd56085c73373db6c8742d", "type": "github" }, "original": { @@ -54,6 +145,27 @@ "type": "github" } }, + "dgop": { + "inputs": { + "nixpkgs": [ + "dankshell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1757252286, + "narHash": "sha256-QwWQzlxAGvIi6VAc8DQ6ONCKKwtPyaHQW1cQyGbP7Og=", + "owner": "AvengeMedia", + "repo": "dgop", + "rev": "a65a02ddf8bade9c109d055e644e4bd851183bd5", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "dgop", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": [ @@ -61,11 +173,11 @@ ] }, "locked": { - "lastModified": 1757508292, - "narHash": "sha256-7lVWL5bC6xBIMWWDal41LlGAG+9u2zUorqo3QCUL4p4=", + "lastModified": 1758160037, + "narHash": "sha256-fXelTdjdILspZ1IUU9aICB1+PXwSFiF8j+7ujwo1VpQ=", "owner": "nix-community", "repo": "disko", - "rev": "146f45bee02b8bd88812cfce6ffc0f933788875a", + "rev": "4f554162fff88e77655073d352eec0cea71103a2", "type": "github" }, "original": { @@ -74,6 +186,43 @@ "type": "github" } }, + "dms-cli": { + "inputs": { + "nixpkgs": [ + "dankshell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1757296630, + "narHash": "sha256-3H236F5oIKkqpfnwrvZQs4Y5imKb6JCMFGDkHs8VDjQ=", + "owner": "AvengeMedia", + "repo": "danklinux", + "rev": "dac591711ab30d6b071a5cec674a3d2e04665ee1", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "danklinux", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1756083905, + "narHash": "sha256-UqYGTBgI5ypGh0Kf6zZjom/vABg7HQocB4gmxzl12uo=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "b655eaf16d4cbec9c3472f62eee285d4b419a808", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -110,16 +259,15 @@ "inputs": { "nixpkgs-lib": [ "devenv", - "nix", "nixpkgs" ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "4524271976b625a4a605beefd893f270620fd751", "type": "github" }, "original": { @@ -167,6 +315,43 @@ "type": "github" } }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "4524271976b625a4a605beefd893f270620fd751", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "git-hooks": { "inputs": { "flake-compat": [ @@ -250,6 +435,23 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "48.2", + "repo": "gnome-shell", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -257,11 +459,11 @@ ] }, "locked": { - "lastModified": 1757784838, - "narHash": "sha256-6aHo1++bAFdW1z+0tfuxM9EmxHvon90mHo8/+izXMcY=", + "lastModified": 1758250706, + "narHash": "sha256-Jv/V+PNi5RyqCUK2V6YJ0iCqdLPutU69LZas85EBUaU=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e28513cf2ee9a985c339fcef24d44f43d23456b", + "rev": "363007f12930caf8b0ea59c0bf5be109c52ad0ef", "type": "github" }, "original": { @@ -270,13 +472,74 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1758251980, + "narHash": "sha256-oa50ioKncFPD4cKFGOpxKKWgXN5dcUNLPLj5s7BqI9M=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "39001987447c9b4bafbff22ba997f6b128b1f201", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1758183971, + "narHash": "sha256-rZpQqXa9LIwWulScUEHMqtcJqlidx5OfEfEr/iVC+AM=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "d9648e6bde1d2fc4a568dec93ba65c11073192a3", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nix": { "inputs": { "flake-compat": [ "devenv", "flake-compat" ], - "flake-parts": "flake-parts", + "flake-parts": [ + "devenv", + "flake-parts" + ], "git-hooks-nix": [ "devenv", "git-hooks" @@ -410,6 +673,22 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1758070117, + "narHash": "sha256-uLwwHFCZnT1c3N3biVe/0hCkag2GSrf9+M56+Okf+WY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9b7f2ff62b35f711568b1f0866243c7c302028d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1756178832, @@ -442,11 +721,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1757746433, - "narHash": "sha256-fEvTiU4s9lWgW7mYEU/1QUPirgkn+odUBTaindgiziY=", + "lastModified": 1758213207, + "narHash": "sha256-rqoqF0LEi+6ZT59tr+hTQlxVwrzQsET01U4uUdmqRtM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6d7ec06d6868ac6d94c371458fc2391ded9ff13d", + "rev": "f4b140d5b253f5e2a1ff4e5506edbf8267724bde", "type": "github" }, "original": { @@ -456,14 +735,226 @@ "type": "github" } }, + "nur": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756961635, + "narHash": "sha256-hETvQcILTg5kChjYNns1fD5ELdsYB/VVgVmBtqKQj9A=", + "owner": "nix-community", + "repo": "NUR", + "rev": "6ca27b2654ac55e3f6e0ca434c1b4589ae22b370", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "dankshell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756981260, + "narHash": "sha256-GhuD9QVimjynHI0OOyZsqJsnlXr2orowh9H+HYz4YMs=", + "ref": "refs/heads/master", + "rev": "6eb12551baf924f8fdecdd04113863a754259c34", + "revCount": 672, + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + } + }, "root": { "inputs": { + "dankshell": "dankshell", "devenv": "devenv", "disko": "disko", "flake-parts": "flake-parts_2", "home-manager": "home-manager", + "niri": "niri", "nix": "nix_2", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_4", + "stylix": "stylix" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": "flake-parts_4", + "gnome-shell": "gnome-shell", + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur", + "systems": "systems", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1757956156, + "narHash": "sha256-f0W7qbsCqpi6swQ5w8H+0YrAbNwsHgCFDkNRMTJjqrE=", + "owner": "nix-community", + "repo": "stylix", + "rev": "0ce0103b498bb22f899ed8862d8d7f9503ed9cdb", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1754779259, + "narHash": "sha256-8KG2lXGaXLUE0F/JVwLQe7kOVm21IDfNEo0gfga5P4M=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "097d751b9e3c8b97ce158e7d141e5a292545b502", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1754788770, + "narHash": "sha256-LAu5nBr7pM/jD9jwFc6/kyFY4h7Us4bZz7dvVvehuwo=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "fb2175accef8935f6955503ec9dd3c973eec385c", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1755613540, + "narHash": "sha256-zBFrrTxHLDMDX/OYxkCwGGbAhPXLi8FrnLhYLsSOKeY=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "937bada16cd3200bdbd3a2f5776fc3b686d5cba0", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1757179758, + "narHash": "sha256-TIvyWzRt1miQj6Cf5Wy8Qz43XIZX7c4vTVwRLAT5S4Y=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "970728d0d9d1eada342bb8860af214b601139e58", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index ed31c38d..260d0f68 100644 --- a/flake.nix +++ b/flake.nix @@ -2,14 +2,27 @@ inputs = { # Mirroring nixpkgs unstable nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + # ghostty.url = "github:ghostty-org/ghostty"; # ghostty.inputs.nixpkgs.follows = "nixpkgs"; + disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; # Updating nix itself nix.url = "https://flakehub.com/f/DeterminateSystems/nix/2.0"; + niri.url = "github:sodiboo/niri-flake"; + niri.inputs.nixpkgs.follows = "nixpkgs"; + + dankshell.url = "github:AvengeMedia/DankMaterialShell"; + dankshell.inputs.nixpkgs.follows = "nixpkgs"; + + stylix = { + url = "github:nix-community/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # For running GUI apps # nixGL.url = "github:nix-community/nixGL"; # nixGL.inputs.nixpkgs.follows = "nixpkgs"; @@ -40,6 +53,9 @@ home-manager, nixpkgs, # ghostty, + stylix, + dankshell, + niri, disko, # neovim, # devenv, @@ -109,13 +125,38 @@ modules = [ ./machines/parallels/configuration.nix disko.nixosModules.disko + stylix.nixosModules.stylix + niri.nixosModules.niri ./machines/parallels/disko-config.nix ./machines/common.nix { + nixpkgs.overlays = [ + self.overlays.default + self.overlays.linux + # fenix.overlays.default + niri.overlays.niri + ]; nixpkgs.config.permittedInsecurePackages = [ "beekeeper-studio-5.3.4" ]; } + ( + { pkgs, ... }: + { + stylix.enable = true; + stylix.image = ./images/wall.png; + stylix.polarity = "dark"; + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml"; + stylix.autoEnable = false; + } + ) + { + home-manager.users.${linux-user} = { + imports = [ + dankshell.homeModules.dankMaterialShell + ]; + }; + } { disko.devices.disk.primary.device = "/dev/sda"; disko.devices.disk.secondary.device = "/dev/sdb"; @@ -132,6 +173,7 @@ modules = [ ./machines/vmware-fusion/configuration.nix disko.nixosModules.disko + stylix.nixosModules.stylix ./machines/vmware-fusion/disko-config.nix ./machines/common.nix { diff --git a/machines/common.nix b/machines/common.nix index 92cccad5..d7ff6e3b 100644 --- a/machines/common.nix +++ b/machines/common.nix @@ -90,19 +90,34 @@ in services.desktopManager.gnome.enable = true; services.xserver.excludePackages = [ pkgs.xterm ]; - programs.hyprland.enable = true; - programs.hyprland.withUWSM = true; - programs.hyprland.systemd.setPath.enable = true; - xdg.portal.config = { - common = { - default = [ - "xdph" - "gtk" - ]; - "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; - "org.freedesktop.portal.FileChooser" = [ "xdg-desktop-portal-gtk" ]; - }; - }; + services.gnome.core-apps.enable = false; + services.gnome.core-developer-tools.enable = false; + services.gnome.games.enable = false; + environment.gnome.excludePackages = with pkgs; [ + gnome-tour + gnome-user-docs + ]; + + programs.niri.enable = true; + programs.niri.package = pkgs.niri-unstable; + + programs.hyprland.enable = false; + programs.hyprland.withUWSM = false; + programs.hyprland.systemd.setPath.enable = false; + # For Hyprland + # xdg.portal.config = { + # common = { + # default = [ + # "xdph" + # "gtk" + # ]; + # "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; + # "org.freedesktop.portal.FileChooser" = [ "xdg-desktop-portal-gtk" ]; + # }; + # }; + + # services.desktopManager.cosmic.enable = true; + # services.desktopManager.cosmic.xwayland.enable = true; systemd.user.services = { prlcc = { @@ -200,7 +215,7 @@ in # Development alacritty git - kitty + # kitty wget neovim diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix index e1eb0122..64313a18 100644 --- a/modules/gnome/default.nix +++ b/modules/gnome/default.nix @@ -25,9 +25,20 @@ in home.file.".icons".source = "${fluent-icon-theme}/share/icons"; + # Also symlink to .local/share for better compatibility + home.file.".local/share/themes".source = "${fluent-gtk-theme}/share/themes"; + home.file.".local/share/icons".source = "${fluent-icon-theme}/share/icons"; + + # Qt theme configuration + home.file.".config/qt6ct/qt6ct.conf".source = ./qt6ct.conf; + home.file.".config/qt5ct/qt5ct.conf".source = ./qt5ct.conf; + home.sessionVariables = { XDG_SESSION_TYPE = "wayland"; + # GTK theme settings + GTK_THEME = gtk-theme; + GDK_BACKEND = "wayland,x11"; GDK_SCALE = "1"; @@ -36,6 +47,10 @@ in QT_QPA_PLATFORMTHEME = "qt6ct"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + # Ensure icon themes are found + XCURSOR_PATH = "$HOME/.icons:$XCURSOR_PATH"; + XCURSOR_THEME = "Fluent-dark-cursors"; + SDL_VIDEODRIVER = "wayland"; CLUTTER_BACKEND = "wayland"; @@ -46,6 +61,10 @@ in }; home.packages = with pkgs; [ gnome-tweaks + qt6ct + libsForQt5.qt5ct + adwaita-qt + adwaita-qt6 ]; gtk = { enable = true; @@ -60,12 +79,22 @@ in package = fluent-gtk-theme; }; + gtk2.extraConfig = '' + gtk-theme-name="${gtk-theme}" + gtk-icon-theme-name="${icon-theme}" + gtk-application-prefer-dark-theme=1 + ''; + gtk3.extraConfig = { gtk-application-prefer-dark-theme = 1; + gtk-theme-name = gtk-theme; + gtk-icon-theme-name = icon-theme; }; gtk4.extraConfig = { gtk-application-prefer-dark-theme = 1; + gtk-theme-name = gtk-theme; + gtk-icon-theme-name = icon-theme; }; }; @@ -80,6 +109,8 @@ in clock-show-weekday = true; color-scheme = "prefer-dark"; enable-hot-corners = false; + icon-theme = icon-theme; + gtk-theme = gtk-theme; }; "org/gnome/desktop/peripherals/keyboard" = { @@ -88,7 +119,7 @@ in }; "org/gnome/desktop/peripherals/mouse" = { - natural-scroll = false; + natural-scroll = true; speed = 1.0; }; diff --git a/modules/gnome/qt5ct.conf b/modules/gnome/qt5ct.conf new file mode 100644 index 00000000..09602f77 --- /dev/null +++ b/modules/gnome/qt5ct.conf @@ -0,0 +1,28 @@ +[Appearance] +icon_theme=Fluent-dark +style=Fluent-dark + +[Fonts] +general="Adwaita Sans,11" + +[Interface] +activate_item_on_single_click=1 +buttonbox_layout=0 +cursor_flash_time=1000 +dialog_buttons_have_icons=1 +double_click_interval=400 +gui_effects=@Invalid() +keyboard_scheme=2 +menus_have_icons=true +show_shortcuts_in_context_menus=true +stylesheets=@Invalid() +toolbutton_style=4 +underline_shortcut=1 +wheel_scroll_lines=3 + +[SettingsWindow] +geometry=@ByteArray() + +[Troubleshooting] +force_raster_widgets=1 +ignored_applications=@Invalid() diff --git a/modules/gnome/qt6ct.conf b/modules/gnome/qt6ct.conf new file mode 100644 index 00000000..09602f77 --- /dev/null +++ b/modules/gnome/qt6ct.conf @@ -0,0 +1,28 @@ +[Appearance] +icon_theme=Fluent-dark +style=Fluent-dark + +[Fonts] +general="Adwaita Sans,11" + +[Interface] +activate_item_on_single_click=1 +buttonbox_layout=0 +cursor_flash_time=1000 +dialog_buttons_have_icons=1 +double_click_interval=400 +gui_effects=@Invalid() +keyboard_scheme=2 +menus_have_icons=true +show_shortcuts_in_context_menus=true +stylesheets=@Invalid() +toolbutton_style=4 +underline_shortcut=1 +wheel_scroll_lines=3 + +[SettingsWindow] +geometry=@ByteArray() + +[Troubleshooting] +force_raster_widgets=1 +ignored_applications=@Invalid() diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index f27fbb25..74c03fc2 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -1,7 +1,4 @@ { pkgs, ... }: -let - clipsync = pkgs.writeShellScriptBin "clipsync" (builtins.readFile ./scripts/hypr-clipsync.sh); -in { home.packages = with pkgs; [ hyprpaper @@ -9,7 +6,6 @@ in lxqt.lxqt-policykit clipse socat - clipsync libnotify ]; xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf; @@ -20,13 +16,16 @@ in wayland.windowManager.hyprland.systemd.variables = [ "--all" ]; programs.zsh = { initContent = '' - . $HOME/.nix-config/modules/hyprland/hyprland.zsh + if [[ -n $HYPRLAND_INSTANCE_SIGNATURE ]]; then + . $HOME/.nix-config/modules/hyprland/hyprland.zsh + fi ''; }; + programs.clipsync.enable = true; imports = [ # ./dunst - ./waybar - ./wofi + ../waybar + ../wofi # ./swaync ]; } diff --git a/modules/niri/default.nix b/modules/niri/default.nix new file mode 100644 index 00000000..8bc13641 --- /dev/null +++ b/modules/niri/default.nix @@ -0,0 +1,335 @@ +{ pkgs, config, ... }: + +{ + # Add xwayland-satellite package + home.packages = with pkgs; [ + xwayland-satellite + nautilus + ]; + + programs.dankMaterialShell = { + enable = true; + enableKeybinds = false; + enableSystemd = true; + enableSpawn = false; + enableVPN = false; + enableNightMode = false; + enableBrightnessControl = false; + }; + + programs.niri = { + settings = { + # Enable xwayland-satellite integration + xwayland-satellite.enable = true; + + # Input configuration + input = { + keyboard = { + xkb = { + layout = "us"; + }; + repeat-delay = 220; + repeat-rate = 150; + track-layout = "global"; + }; + + mouse = { + # natural-scroll = true; + }; + + # Focus windows and outputs automatically when moving the mouse into them + focus-follows-mouse.max-scroll-amount = "0%"; + }; + + # Output configuration for Virtual-1 + outputs."Virtual-1" = { + scale = 2.0; + }; + + # Layout settings + layout = { + gaps = 8; + center-focused-column = "never"; + + preset-column-widths = [ + { proportion = 0.33333; } + { proportion = 0.5; } + { proportion = 0.66667; } + ]; + + # Default width of new windows + default-column-width = { + proportion = 0.5; + }; + + # Disable focus ring + focus-ring.enable = false; + + # Border configuration + border = with config.lib.stylix.colors.withHashtag; { + # https://github.com/tinted-theming/schemes/blob/spec-0.11/base16/onedark.yaml + enable = true; + width = 2; + active.gradient = { + from = base08; + to = base0D; + angle = 45; + in' = "oklch longer hue"; + }; + inactive.gradient = { + from = base0D; + to = base0E; + angle = 45; + }; + }; + + struts = { }; + + tab-indicator = { + place-within-column = true; + corner-radius = 12; + gaps-between-tabs = 8; + }; + }; + + prefer-no-csd = true; + + spawn-at-startup = [ + { argv = [ "alacritty" ]; } + ]; + + # Hotkey overlay + hotkey-overlay = { + skip-at-startup = true; + }; + + # Screenshot path + screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"; + + # Animation settings + animations = { + enable = true; + + workspace-switch = { + kind.spring = { + damping-ratio = 1.0; + stiffness = 1000; + epsilon = 0.0001; + }; + }; + + window-open = { + kind.easing = { + duration-ms = 150; + curve = "ease-out-expo"; + }; + }; + + window-close = { + kind.easing = { + duration-ms = 150; + curve = "ease-out-quad"; + }; + }; + + horizontal-view-movement = { + kind.spring = { + damping-ratio = 1.0; + stiffness = 800; + epsilon = 0.0001; + }; + }; + + window-movement = { + kind.spring = { + damping-ratio = 1.0; + stiffness = 800; + epsilon = 0.0001; + }; + }; + + window-resize = { + kind.spring = { + damping-ratio = 1.0; + stiffness = 800; + epsilon = 0.0001; + }; + }; + + config-notification-open-close = { + kind.spring = { + damping-ratio = 0.6; + stiffness = 1000; + epsilon = 0.001; + }; + }; + + exit-confirmation-open-close = { + kind.spring = { + damping-ratio = 0.6; + stiffness = 500; + epsilon = 0.01; + }; + }; + + overview-open-close = { + kind.spring = { + damping-ratio = 1.0; + stiffness = 800; + epsilon = 0.0001; + }; + }; + }; + + # Window rules + window-rules = [ + # Work around WezTerm's initial configure bug + { + matches = [ + { + app-id = "^org\\.wezfurlong\\.wezterm$"; + } + ]; + default-column-width = { }; + } + { + matches = [ + { + app-id = "neovide"; + } + ]; + open-maximized = true; + } + # Open Firefox picture-in-picture as floating + { + matches = [ + { + app-id = "firefox$"; + title = "^Picture-in-Picture$"; + } + ]; + open-floating = true; + } + # Default window rule for all windows + { + geometry-corner-radius = { + top-left = 12.0; + top-right = 12.0; + bottom-left = 12.0; + bottom-right = 12.0; + }; + clip-to-geometry = true; + } + ]; + + # Key bindings + binds = + with config.lib.niri.actions; + let + dms-ipc = spawn "dms" "ipc"; + in + { + # Terminal and app launcher + "Alt+W".action.spawn-sh = "niri msg action focus-workspace-down && alacritty"; + "Alt+T".action.spawn-sh = "~/.nix-config/modules/niri/scripts/niri-toggle-term.sh"; + "Mod+G" = { + action = dms-ipc "spotlight" "toggle"; + hotkey-overlay.title = "Toggle Application Launcher"; + }; + "Ctrl+Shift+V" = { + action = dms-ipc "clipboard" "toggle"; + hotkey-overlay.title = "Toggle Clipboard Manager"; + }; + "Ctrl+Shift+Return".action.spawn-sh = "alacritty -e ~/.nix-config/modules/niri/scripts/niri-cwd.sh"; + + # Overview + "Mod+O" = { + action.toggle-overview = { }; + repeat = false; + }; + + # Window management + "Alt+Q" = { + action.close-window = { }; + repeat = false; + }; + + # Focus navigation + "Ctrl+H".action.spawn-sh = "~/.nix-config/modules/niri/scripts/niri-nvim-nav.sh column-left"; + "Ctrl+L".action.spawn-sh = "~/.nix-config/modules/niri/scripts/niri-nvim-nav.sh column-right"; + "Ctrl+J".action.spawn-sh = "~/.nix-config/modules/niri/scripts/niri-nvim-nav.sh window-down"; + "Ctrl+K".action.spawn-sh = "~/.nix-config/modules/niri/scripts/niri-nvim-nav.sh window-up"; + "Ctrl+Shift+K".action.move-window-up-or-to-workspace-up = { }; + "Ctrl+Shift+J".action.move-window-down-or-to-workspace-down = { }; + + "Mod+F".action.focus-column-right = { }; + "Mod+B".action.focus-column-left = { }; + + "Alt+5".action.focus-column = 5; + "Alt+4".action.focus-column = 4; + "Alt+3".action.focus-column = 3; + "Alt+2".action.focus-column = 2; + "Alt+1".action.focus-column-first = { }; + "Alt+0".action.focus-column-last = { }; + + # Workspace navigation with mouse wheel + "Mod+Alt+Ctrl+Shift+WheelScrollDown" = { + action.focus-workspace-down = { }; + cooldown-ms = 150; + }; + "Mod+Alt+Ctrl+Shift+WheelScrollUp" = { + action.focus-workspace-up = { }; + cooldown-ms = 150; + }; + + # Column navigation with mouse wheel + "Ctrl+Shift+WheelScrollRight" = { + action.focus-column-right = { }; + cooldown-ms = 150; + }; + "Ctrl+Shift+WheelScrollLeft" = { + action.focus-column-left = { }; + cooldown-ms = 150; + }; + + # Window in/out of column + "Alt+B" = { + action.consume-or-expel-window-left = { }; + cooldown-ms = 150; + }; + "Alt+F" = { + action.consume-or-expel-window-right = { }; + cooldown-ms = 150; + }; + "Shift+Right".action.swap-window-right = { }; + "Shift+Left".action.swap-window-left = { }; + "Shift+Up".action.move-window-up = { }; + "Shift+Down".action.move-window-down = { }; + + "Alt+Z".action.maximize-column = { }; + "Alt+D".action.move-column-to-workspace-down = { }; + + # Width adjustments + "Mod+Minus".action.set-column-width = "-10%"; + "Mod+Equal".action.set-column-width = "+10%"; + + # Height adjustments + "Mod+Shift+Minus".action.set-window-height = "-10%"; + "Mod+Shift+Equal".action.set-window-height = "+10%"; + + # Tabbed display + "Mod+W".action.toggle-column-tabbed-display = { }; + }; + }; + }; + + programs.zsh = { + initContent = '' + if [[ -n $NIRI_SOCKET ]]; then + . $HOME/.nix-config/modules/niri/niri.zsh + fi + ''; + }; + + programs.clipsync.enable = true; +} diff --git a/modules/niri/niri.zsh b/modules/niri/niri.zsh new file mode 100644 index 00000000..f7bc94e0 --- /dev/null +++ b/modules/niri/niri.zsh @@ -0,0 +1,29 @@ +function nvim() { + if [[ -z $NIRI_SOCKET ]]; then + command nvim $@ + return 0 + fi + + workspace_id=$(niri msg -j focused-window | jq -r '.workspace_id') + nvim_addr=/tmp/nvim-niri-$workspace_id + neovide_window_id=$(niri msg -j windows | jq -r "first(.[] | select(.workspace_id == $workspace_id) | select(.app_id == \"neovide\")).id") + + [[ ! $neovide_window_id && -e $nvim_addr ]] && rm -rf $nvim_addr + + if [[ $# -eq 0 && ! -e $nvim_addr ]]; then + command nvim --listen $nvim_addr --headless > /dev/null 2>&1 0< /dev/null &! + command neovide --server $nvim_addr + elif [[ $# -eq 0 && -e $nvim_addr ]]; then + niri msg action focus-window --id $neovide_window_id >/dev/null 2>&1 + elif [[ $# -gt 0 && ! -e $nvim_addr ]]; then + command nvim --listen $nvim_addr --headless > /dev/null 2>&1 0< /dev/null &! + command neovide --server $nvim_addr + elif [[ $# -gt 0 && -e $nvim_addr ]]; then + niri msg action focus-window --id $neovide_window_id >/dev/null 2>&1 + command nvim --server $nvim_addr --remote $@ + else + command nvim --listen $nvim_addr --headless > /dev/null 2>&1 0< /dev/null &! + command neovide --server $nvim_addr + fi +} + diff --git a/modules/niri/scripts/niri-cwd.sh b/modules/niri/scripts/niri-cwd.sh new file mode 100755 index 00000000..f265823b --- /dev/null +++ b/modules/niri/scripts/niri-cwd.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +pid=$(niri msg -j focused-window | jq -r '.pid') +cmdline="" +if [[ "$pid" != "null" ]]; then + cmdline=$(cat /proc/${pid}/cmdline | xargs -0 echo) +fi + +# change to if the cmdline not including ghostty +if [[ "$cmdline" != *"alacritty"* ]]; then + dir=$(readlink /proc/"$pid"/cwd || echo "$HOME") +else + ppid=$(pgrep --newest --parent "$pid") + dir=$(readlink /proc/"$ppid"/cwd || echo "$HOME") +fi + +[ -d "$dir" ] && cd $dir + +zsh diff --git a/modules/niri/scripts/niri-nvim-nav.sh b/modules/niri/scripts/niri-nvim-nav.sh new file mode 100755 index 00000000..18e33541 --- /dev/null +++ b/modules/niri/scripts/niri-nvim-nav.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +dir="$1" +NVIM_ADDR="/tmp/nvim-niri-$(niri msg -j focused-window | jq -r ".workspace_id")" + +case "$dir" in + "window-up") ;; + "column-right") ;; + "window-down") ;; + "column-left") ;; + *) + echo "USAGE: $0 window-up|column-right|window-down|column-left" + exit 1 +esac + +if [[ -e "$NVIM_ADDR" ]] && [[ "$(niri msg -j focused-window | jq -r '.app_id')" == "neovide" ]]; then + command nvim --server $NVIM_ADDR --remote-send "NiriNavigate $dir" >/dev/null 2>&1 && exit 0 +fi + +niri msg action focus-$dir diff --git a/modules/niri/scripts/niri-toggle-term.sh b/modules/niri/scripts/niri-toggle-term.sh new file mode 100755 index 00000000..ce76fec3 --- /dev/null +++ b/modules/niri/scripts/niri-toggle-term.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +active_workspace_id=$(niri msg -j focused-window | jq -r '.workspace_id') +win_count=$(niri msg -j windows | jq -r "map(select(.workspace_id == $active_workspace_id)) | length") +is_zoomed=$(niri msg -j windows | jq -r "any(.[] | select(.workspace_id == $active_workspace_id); .layout.window_size[0] > 2000)") +nvim_win_id=$(niri msg -j windows | jq -r "first(.[] | select(.workspace_id == $active_workspace_id) | select(.app_id == \"neovide\")).id") +active_win_id=$(niri msg -j focused-window | jq -r '.id') + +if [[ "$active_win_id" == "$nvim_win_id" ]]; then + if [[ $win_count -eq 1 ]]; then + pid=$(niri msg -j focused-window | jq -r '.pid') + dir=$(readlink /proc/"$pid"/cwd || echo "$HOME") + niri msg action spawn-sh -- "alacritty --working-directory $dir" + else + if [[ "$is_zoomed" == "true" ]]; then + niri msg action maximize-column + niri msg action focus-column-right + else + niri msg action maximize-column + fi + fi +elif [[ $win_count -gt 1 && "$active_win_id" != "$nvim_win_id" ]]; then + niri msg action focus-window --id $nvim_win_id + niri msg action maximize-column +fi diff --git a/modules/hyprland/waybar/config b/modules/waybar/config similarity index 100% rename from modules/hyprland/waybar/config rename to modules/waybar/config diff --git a/modules/hyprland/waybar/default.nix b/modules/waybar/default.nix similarity index 100% rename from modules/hyprland/waybar/default.nix rename to modules/waybar/default.nix diff --git a/modules/hyprland/waybar/scripts/check_battery.sh b/modules/waybar/scripts/check_battery.sh similarity index 100% rename from modules/hyprland/waybar/scripts/check_battery.sh rename to modules/waybar/scripts/check_battery.sh diff --git a/modules/hyprland/waybar/scripts/wttr.py b/modules/waybar/scripts/wttr.py similarity index 100% rename from modules/hyprland/waybar/scripts/wttr.py rename to modules/waybar/scripts/wttr.py diff --git a/modules/hyprland/waybar/style.css b/modules/waybar/style.css similarity index 100% rename from modules/hyprland/waybar/style.css rename to modules/waybar/style.css diff --git a/modules/hyprland/wofi/default.nix b/modules/wofi/default.nix similarity index 100% rename from modules/hyprland/wofi/default.nix rename to modules/wofi/default.nix diff --git a/modules/hyprland/wofi/style.css b/modules/wofi/style.css similarity index 100% rename from modules/hyprland/wofi/style.css rename to modules/wofi/style.css diff --git a/pkgs/nvchad/lua/options.lua b/pkgs/nvchad/lua/options.lua index 20fe0998..403ee5b1 100644 --- a/pkgs/nvchad/lua/options.lua +++ b/pkgs/nvchad/lua/options.lua @@ -111,6 +111,17 @@ vim.api.nvim_create_user_command("HyprNavigate", function(opts) end end, { nargs = '?' }) +vim.api.nvim_create_user_command("NiriNavigate", function(opts) + local direction = opts.args + local mappings = { ['column-left'] = 'h', ['window-down'] = 'j', ['window-up'] = 'k', ['column-right'] = 'l' } + local flag = mappings[direction] + if vim.fn.winnr() == vim.fn.winnr(flag) then + vim.fn.jobstart({ 'niri', 'msg', 'action', 'focus-' .. direction }) + else + vim.cmd('wincmd ' .. flag) + end +end, { nargs = '?' }) + -- Workaround for neovide when attaching to remote server -- https://github.com/neovide/neovide/issues/1868 vim.api.nvim_create_autocmd("UIEnter", { @@ -135,26 +146,26 @@ vim.api.nvim_create_autocmd("UIEnter", { end }) ---Use FocusGained to make sure Neovide window is created +-- Use FocusGained to make sure Neovide window is created vim.api.nvim_create_autocmd("FocusGained", { group = "neovide", pattern = '*', callback = function() if vim.g.neovide then - local workspace_id = vim.fn.system('hyprctl activeworkspace -j | jq -r ".id"') - local neovide_window_id = vim.fn.system('hyprctl clients -j | jq -r "first(.[] | select(.workspace.id == ' .. - workspace_id .. ') | select(.class == \\"neovide\\")).address"') - local master_window_id = vim.fn.system('hyprctl clients -j | jq -r "[.[] | select (.workspace.id == ' .. - workspace_id .. ')] | min_by(.at[1]) | .address"') - if neovide_window_id ~= master_window_id then - vim.cmd('silent! !hyprctl dispatch swapwindow u') - end + vim.cmd('silent! !niri msg action move-column-to-first') + -- local workspace_id = vim.fn.system('hyprctl activeworkspace -j | jq -r ".id"') + -- local neovide_window_id = vim.fn.system('hyprctl clients -j | jq -r "first(.[] | select(.workspace.id == ' .. + -- workspace_id .. ') | select(.class == \\"neovide\\")).address"') + -- local master_window_id = vim.fn.system('hyprctl clients -j | jq -r "[.[] | select (.workspace.id == ' .. + -- workspace_id .. ')] | min_by(.at[1]) | .address"') + -- if neovide_window_id ~= master_window_id then + -- vim.cmd('silent! !hyprctl dispatch swapwindow u') + -- end end end }) vim.lsp.log.set_level(vim.log.levels.OFF) -vim.g.neovide_opacity = 0.8 -vim.g.neovide_normal_opacity = 0.8 -vim.g.neovide_background_color = "#292A37" +vim.g.neovide_opacity = 0.9 +vim.g.neovide_normal_opacity = 0.9 diff --git a/programs/clipsync/default.nix b/programs/clipsync/default.nix new file mode 100644 index 00000000..37330333 --- /dev/null +++ b/programs/clipsync/default.nix @@ -0,0 +1,79 @@ +{ + config, + pkgs, + lib, + ... +}: +let + cfg = config.programs.clipsync; + clipsync = pkgs.writeShellScriptBin "clipsync" (builtins.readFile ./scripts/clipsync.sh); + deps = with pkgs; [ + xclip + wl-clipboard + clipnotify + ]; +in +{ + options = { + programs.clipsync = { + enable = lib.mkEnableOption "clipsync"; + enableClipboardManager = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Add Clipboard Manager sync"; + }; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = deps ++ [ clipsync ]; + + systemd.user.services = lib.mkMerge [ + (lib.mkIf cfg.enableClipboardManager { + clipboard-manager = { + Unit = { + Description = "Sync clipboard to Clipboard Manager"; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.cliphist}/bin/cliphist store"; + }; + }; + }) + { + wl-x11-sync = { + Unit = { + Description = "Sync Wayland clipboard to X11"; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + Service = { + Environment = [ + "PATH=$PATH:${lib.makeBinPath (deps ++ [ clipsync ])}" + ]; + ExecStart = "${clipsync}/bin/clipsync start wl-clipboard"; + ExecStop = "${clipsync}/bin/clipsync stop"; + }; + }; + x11-wl-sync = { + Unit = { + Description = "Sync X11 clipboard to Wayland"; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + Service = { + Environment = [ + "PATH=$PATH:${lib.makeBinPath (deps ++ [ clipsync ])}" + ]; + ExecStart = "${clipsync}/bin/clipsync start xclip"; + ExecStop = "${clipsync}/bin/clipsync stop"; + }; + }; + } + ]; + }; +} diff --git a/programs/clipsync/scripts/clipsync.sh b/programs/clipsync/scripts/clipsync.sh new file mode 100755 index 00000000..ba28a2a2 --- /dev/null +++ b/programs/clipsync/scripts/clipsync.sh @@ -0,0 +1,107 @@ +#!/usr/bin/env sh + +insert() { + value=$(cat) + if [ -z "$value" ]; then + exit 0 + fi + + wValue=$(wl-paste -n 2>/dev/null || echo "") + xValue=$(xclip -o -selection clipboard 2>/dev/null || echo "") + + if [ "$value" != "$wValue" ]; then + echo -n "$value" | wl-copy + fi + + if [ "$value" != "$xValue" ]; then + echo -n "$value" | xclip -i -selection clipboard + fi +} + +start() { + case "$2" in + "wl-clipboard") + wl-paste --watch bash -c "clipsync insert" + ;; + "xclip") + xhost +SI:localuser:root + while clipnotify; do + xclip -o -selection clipboard 2>/dev/null | clipsync insert + done + ;; + *) + echo "Usage: $1 {wl-clipboard|xclip}" + exit 1 + ;; + esac +} + +# Watch for clipboard changes and synchronize between Wayland and X11 +# Usage: clipsync watch +watch() { + # Add a small delay to ensure clipboard services are initialized + sleep 1 + + # Wayland -> X11 + wl-paste --watch bash -c "clipsync insert" & + + # X11 -> Wayland + while clipnotify; do + xclip -o -selection clipboard 2>/dev/null | clipsync insert + done & +} + +# Kill all background processes related to clipsync +stop() { + pkill -f "wl-paste --watch" + pkill clipnotify + pkill -f "xclip -selection clipboard" + pkill -f "clipsync insert" +} + +help() { + cat << EOF +clipsync - Two-way clipboard synchronization between Wayland and X11, with clipse support + +Usage: + clipsync watch + Run clipboard synchronization in the background. + + clipsync start + Run clipboard synchronization individually. + + clipsync stop + Stop all background processes related to clipsync. + + echo -n "text" | clipsync insert + Insert clipboard content from stdin. + + clipsync help + Display this help information. + +Requirements: wl-clipboard, xclip, clipnotify +EOF +} + +case "$1" in + watch) + watch + ;; + stop) + stop + ;; + insert) + insert + ;; + start) + start "$@" + ;; + help) + help + ;; + *) + echo "Usage: $0 {watch|insert|stop|help}" + echo "Run '$0 help' for more information." + exit 1 + ;; +esac diff --git a/modules/programs/kubeswitch.nix b/programs/kubeswitch.nix similarity index 100% rename from modules/programs/kubeswitch.nix rename to programs/kubeswitch.nix diff --git a/users/sand/home.nix b/users/sand/home.nix index b04dab05..486beec5 100644 --- a/users/sand/home.nix +++ b/users/sand/home.nix @@ -88,8 +88,9 @@ }; imports = [ + ../../programs/clipsync ../../modules/aider - ../../modules/hyprland + # ../../modules/hyprland ../../modules/alacritty ../../modules/cloud ../../modules/direnv @@ -97,7 +98,7 @@ ../../modules/ghostty ../../modules/git ../../modules/gnome - ../../modules/kitty + ../../modules/niri ../../modules/kubernetes ../../modules/misc ../../modules/nvim From 185aa4c0d35b0669ccb08a5523db053b4da01a79 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Mon, 22 Sep 2025 08:45:53 +0900 Subject: [PATCH 29/34] chore: update niri version Signed-off-by: San Nguyen --- flake.lock | 48 ++++++++++++++++++++-------------------- modules/niri/default.nix | 4 ++++ 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 915f2de6..c86e2910 100644 --- a/flake.lock +++ b/flake.lock @@ -109,11 +109,11 @@ "quickshell": "quickshell" }, "locked": { - "lastModified": 1758315669, - "narHash": "sha256-zaWWc0Nd3fmtycQq39sdCvCzmAgoTAPa7Td13/bLH2o=", + "lastModified": 1758392533, + "narHash": "sha256-H5lHwJeUMgVmUQ8XXgwor/pYdJZahDtrMFhXlyCEiYs=", "owner": "AvengeMedia", "repo": "DankMaterialShell", - "rev": "3376dc893dad02ea9565f3e92be7edc3bef3cbbf", + "rev": "d4816bd174901cb5582151dac6ead636cf96090d", "type": "github" }, "original": { @@ -132,11 +132,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1758261927, - "narHash": "sha256-GO5boIJnmJtPMYa0b98vO9v8l44E2uCROJYpIJuz244=", + "lastModified": 1758366037, + "narHash": "sha256-5PK0eHAWMtwaexQ7PR68gzpeo5WjMY9hq2BcEBHjSLA=", "owner": "cachix", "repo": "devenv", - "rev": "12fed1a4f8e1b14d45cd56085c73373db6c8742d", + "rev": "ebb56bfe1aa0936de2f8a68c616dabff1285e905", "type": "github" }, "original": { @@ -173,11 +173,11 @@ ] }, "locked": { - "lastModified": 1758160037, - "narHash": "sha256-fXelTdjdILspZ1IUU9aICB1+PXwSFiF8j+7ujwo1VpQ=", + "lastModified": 1758287904, + "narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=", "owner": "nix-community", "repo": "disko", - "rev": "4f554162fff88e77655073d352eec0cea71103a2", + "rev": "67ff9807dd148e704baadbd4fd783b54282ca627", "type": "github" }, "original": { @@ -459,11 +459,11 @@ ] }, "locked": { - "lastModified": 1758250706, - "narHash": "sha256-Jv/V+PNi5RyqCUK2V6YJ0iCqdLPutU69LZas85EBUaU=", + "lastModified": 1758375677, + "narHash": "sha256-BLtD+6qWz7fQjPk2wpwyXQLGI0E30Ikgf2ppn2nVadI=", "owner": "nix-community", "repo": "home-manager", - "rev": "363007f12930caf8b0ea59c0bf5be109c52ad0ef", + "rev": "edc7468e12be92e926847cb02418e649b02b59dd", "type": "github" }, "original": { @@ -484,11 +484,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1758251980, - "narHash": "sha256-oa50ioKncFPD4cKFGOpxKKWgXN5dcUNLPLj5s7BqI9M=", + "lastModified": 1758375815, + "narHash": "sha256-IAr+n58c+nfxGXmX4NRjfVfV8i5baHnB8LCWlB7XYHo=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "39001987447c9b4bafbff22ba997f6b128b1f201", + "rev": "a6b5a4263b1d6b5d1e07babd59bc66e91f492190", "type": "github" }, "original": { @@ -517,11 +517,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1758183971, - "narHash": "sha256-rZpQqXa9LIwWulScUEHMqtcJqlidx5OfEfEr/iVC+AM=", + "lastModified": 1758370089, + "narHash": "sha256-0C7695SLx4hU9m3VW4fCrZdvyIY+3kFQTWELHA4hxRQ=", "owner": "YaLTeR", "repo": "niri", - "rev": "d9648e6bde1d2fc4a568dec93ba65c11073192a3", + "rev": "a1dccedbb72da372d2a8a84022f37ccaa4d4a6e6", "type": "github" }, "original": { @@ -675,11 +675,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1758070117, - "narHash": "sha256-uLwwHFCZnT1c3N3biVe/0hCkag2GSrf9+M56+Okf+WY=", + "lastModified": 1758216857, + "narHash": "sha256-h1BW2y7CY4LI9w61R02wPaOYfmYo82FyRqHIwukQ6SY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e9b7f2ff62b35f711568b1f0866243c7c302028d", + "rev": "d2ed99647a4b195f0bcc440f76edfa10aeb3b743", "type": "github" }, "original": { @@ -721,11 +721,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1758213207, - "narHash": "sha256-rqoqF0LEi+6ZT59tr+hTQlxVwrzQsET01U4uUdmqRtM=", + "lastModified": 1758262103, + "narHash": "sha256-aBGl3XEOsjWw6W3AHiKibN7FeoG73dutQQEqnd/etR8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f4b140d5b253f5e2a1ff4e5506edbf8267724bde", + "rev": "12bd230118a1901a4a5d393f9f56b6ad7e571d01", "type": "github" }, "original": { diff --git a/modules/niri/default.nix b/modules/niri/default.nix index 8bc13641..fc3b8b80 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -265,6 +265,10 @@ "Mod+F".action.focus-column-right = { }; "Mod+B".action.focus-column-left = { }; + "Alt+9".action.focus-column = 9; + "Alt+8".action.focus-column = 8; + "Alt+7".action.focus-column = 7; + "Alt+6".action.focus-column = 6; "Alt+5".action.focus-column = 5; "Alt+4".action.focus-column = 4; "Alt+3".action.focus-column = 3; From eaf6a0d2c7d878872455811eddb5ac517b82ddf6 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Mon, 22 Sep 2025 09:08:00 +0900 Subject: [PATCH 30/34] fix neovide launch crashes when nvim is not ready Signed-off-by: San Nguyen --- modules/niri/niri.zsh | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/modules/niri/niri.zsh b/modules/niri/niri.zsh index f7bc94e0..b2fdd9ce 100644 --- a/modules/niri/niri.zsh +++ b/modules/niri/niri.zsh @@ -1,3 +1,20 @@ +function wait_for_nvim_server() { + local nvim_addr=$1 + local max_attempts=50 # 50 * 20ms = 1 second max + local attempt=0 + + # Much faster: just check if socket file exists and is a socket + while [[ $attempt -lt $max_attempts ]]; do + if [[ -S $nvim_addr ]]; then + return 0 + fi + sleep 0.02 # 20ms intervals + ((attempt++)) + done + + return 1 +} + function nvim() { if [[ -z $NIRI_SOCKET ]]; then command nvim $@ @@ -12,18 +29,33 @@ function nvim() { if [[ $# -eq 0 && ! -e $nvim_addr ]]; then command nvim --listen $nvim_addr --headless > /dev/null 2>&1 0< /dev/null &! - command neovide --server $nvim_addr + if wait_for_nvim_server $nvim_addr; then + command neovide --server $nvim_addr + else + echo "Error: nvim server failed to start" >&2 + return 1 + fi elif [[ $# -eq 0 && -e $nvim_addr ]]; then niri msg action focus-window --id $neovide_window_id >/dev/null 2>&1 elif [[ $# -gt 0 && ! -e $nvim_addr ]]; then command nvim --listen $nvim_addr --headless > /dev/null 2>&1 0< /dev/null &! - command neovide --server $nvim_addr + if wait_for_nvim_server $nvim_addr; then + command neovide --server $nvim_addr + else + echo "Error: nvim server failed to start" >&2 + return 1 + fi elif [[ $# -gt 0 && -e $nvim_addr ]]; then niri msg action focus-window --id $neovide_window_id >/dev/null 2>&1 command nvim --server $nvim_addr --remote $@ else command nvim --listen $nvim_addr --headless > /dev/null 2>&1 0< /dev/null &! - command neovide --server $nvim_addr + if wait_for_nvim_server $nvim_addr; then + command neovide --server $nvim_addr + else + echo "Error: nvim server failed to start" >&2 + return 1 + fi fi } From 75c6dba09da121d44b1ffb660126f8254453d0ba Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Sun, 28 Sep 2025 09:10:54 +0900 Subject: [PATCH 31/34] chore: update dank shell and lsp config Signed-off-by: San Nguyen --- flake.lock | 345 ++++++++++++++------------ flake.nix | 12 +- machines/common.nix | 8 +- modules/niri/default.nix | 25 +- modules/zsh/utils.zsh | 2 +- pkgs/nvchad/lua/configs/lspconfig.lua | 19 +- 6 files changed, 218 insertions(+), 193 deletions(-) diff --git a/flake.lock b/flake.lock index c86e2910..d9e096b9 100644 --- a/flake.lock +++ b/flake.lock @@ -85,11 +85,11 @@ ] }, "locked": { - "lastModified": 1748883665, - "narHash": "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=", + "lastModified": 1752264895, + "narHash": "sha256-1zBPE/PNAkPNUsOWFET4J0cjlvziH8DOekesDmjND+w=", "owner": "cachix", "repo": "cachix", - "rev": "f707778d902af4d62d8dd92c269f8e70de09acbe", + "rev": "47053aef762f452e816e44eb9a23fbc3827b241a", "type": "github" }, "original": { @@ -109,11 +109,11 @@ "quickshell": "quickshell" }, "locked": { - "lastModified": 1758392533, - "narHash": "sha256-H5lHwJeUMgVmUQ8XXgwor/pYdJZahDtrMFhXlyCEiYs=", + "lastModified": 1758978521, + "narHash": "sha256-Dg4RbnfCP0B2uEK454GRvcC60d+4pWB/INaW1oG8IE8=", "owner": "AvengeMedia", "repo": "DankMaterialShell", - "rev": "d4816bd174901cb5582151dac6ead636cf96090d", + "rev": "b45837ff5c34d11ab625f4d3d878bb4a7facaddf", "type": "github" }, "original": { @@ -122,21 +122,82 @@ "type": "github" } }, + "determinate": { + "inputs": { + "determinate-nixd-aarch64-darwin": "determinate-nixd-aarch64-darwin", + "determinate-nixd-aarch64-linux": "determinate-nixd-aarch64-linux", + "determinate-nixd-x86_64-darwin": [ + "determinate", + "determinate-nixd-aarch64-darwin" + ], + "determinate-nixd-x86_64-linux": "determinate-nixd-x86_64-linux", + "nix": "nix", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1757699119, + "narHash": "sha256-iOOoVdrkcyk95Xg68TuPeAwpz+v80mgZCqil0jpPZuY=", + "rev": "1e16c8f8a44573bb0648c76b6c98352436f5171e", + "revCount": 304, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.11.2/01993f0b-1215-7072-ac1a-f2b27b566115/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/determinate/%2A" + } + }, + "determinate-nixd-aarch64-darwin": { + "flake": false, + "locked": { + "narHash": "sha256-q1tqDvmfjDgLk/wbYf4pRhyHDS94iY85Q79FPBtcv7g=", + "type": "file", + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/macOS" + }, + "original": { + "type": "file", + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/macOS" + } + }, + "determinate-nixd-aarch64-linux": { + "flake": false, + "locked": { + "narHash": "sha256-E1vGfcQ5dqtRG9EDP6eOQWCnCIRB2XFkFBp2C4FgQ8c=", + "type": "file", + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/aarch64-linux" + }, + "original": { + "type": "file", + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/aarch64-linux" + } + }, + "determinate-nixd-x86_64-linux": { + "flake": false, + "locked": { + "narHash": "sha256-GtxtkI0cOC2A30Xw6gCDTN7JxN1zJGh7/eIXr6AlTSA=", + "type": "file", + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/x86_64-linux" + }, + "original": { + "type": "file", + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/x86_64-linux" + } + }, "devenv": { "inputs": { "cachix": "cachix", - "flake-compat": "flake-compat", - "flake-parts": "flake-parts", + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", - "nix": "nix", - "nixpkgs": "nixpkgs" + "nix": "nix_2", + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1758366037, - "narHash": "sha256-5PK0eHAWMtwaexQ7PR68gzpeo5WjMY9hq2BcEBHjSLA=", + "lastModified": 1759013194, + "narHash": "sha256-U6YyQR9y08q/4BbfN1Ysn/MuFZK134MY8Nt/MMJvYiE=", "owner": "cachix", "repo": "devenv", - "rev": "ebb56bfe1aa0936de2f8a68c616dabff1285e905", + "rev": "b5be22e2b4623db53daad317345ae95c93a35b59", "type": "github" }, "original": { @@ -226,11 +287,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -242,11 +303,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -258,27 +319,30 @@ "flake-parts": { "inputs": { "nixpkgs-lib": [ - "devenv", + "determinate", + "nix", "nixpkgs" ] }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", - "type": "github" + "lastModified": 1748821116, + "narHash": "sha256-F82+gS044J1APL0n4hH50GYdPRv/5JWm34oCJYmVKdE=", + "rev": "49f0870db23e8c1ca0b5259734a02cd9e1e371a1", + "revCount": 377, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/hercules-ci/flake-parts/0.1.377%2Brev-49f0870db23e8c1ca0b5259734a02cd9e1e371a1/01972f28-554a-73f8-91f4-d488cc502f08/source.tar.gz" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/hercules-ci/flake-parts/0.1" } }, "flake-parts_2": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib" + "nixpkgs-lib": [ + "devenv", + "nixpkgs" + ] }, "locked": { "lastModified": 1756770412, @@ -289,24 +353,21 @@ "type": "github" }, "original": { - "id": "flake-parts", - "type": "indirect" + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" } }, "flake-parts_3": { "inputs": { - "nixpkgs-lib": [ - "nix", - "nix", - "nixpkgs" - ] + "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "4524271976b625a4a605beefd893f270620fd751", "type": "github" }, "original": { @@ -365,11 +426,11 @@ ] }, "locked": { - "lastModified": 1750779888, - "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", + "lastModified": 1758108966, + "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", "type": "github" }, "original": { @@ -380,37 +441,28 @@ }, "git-hooks-nix": { "inputs": { - "flake-compat": [ - "nix", - "nix" - ], + "flake-compat": "flake-compat", "gitignore": [ - "nix", + "determinate", "nix" ], "nixpkgs": [ - "nix", - "nix", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nix", + "determinate", "nix", "nixpkgs" ] }, "locked": { - "lastModified": 1734279981, - "narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785", - "type": "github" + "lastModified": 1747372754, + "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", + "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", + "revCount": 1026, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/cachix/git-hooks.nix/0.1.1026%2Brev-80479b6ec16fefd9c1db3ea13aeb038c60530f46/0196d79a-1b35-7b8e-a021-c894fb62163d/source.tar.gz" }, "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941" } }, "gitignore": { @@ -459,11 +511,11 @@ ] }, "locked": { - "lastModified": 1758375677, - "narHash": "sha256-BLtD+6qWz7fQjPk2wpwyXQLGI0E30Ikgf2ppn2nVadI=", + "lastModified": 1758997081, + "narHash": "sha256-c4SbPEbR9yP5erODj4niMO7N+2ONEoGnWnt5hauAHRg=", "owner": "nix-community", "repo": "home-manager", - "rev": "edc7468e12be92e926847cb02418e649b02b59dd", + "rev": "26ace005b720b7628fdf2d4923e7feecdd1631c4", "type": "github" }, "original": { @@ -484,11 +536,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1758375815, - "narHash": "sha256-IAr+n58c+nfxGXmX4NRjfVfV8i5baHnB8LCWlB7XYHo=", + "lastModified": 1758901074, + "narHash": "sha256-R7XQL6ixYywDsGkorX05KnTlsIeQr9DzQ3geD9Ba6kU=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "a6b5a4263b1d6b5d1e07babd59bc66e91f492190", + "rev": "397234705a9fa05464107c58286a8308be0c50c2", "type": "github" }, "original": { @@ -517,11 +569,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1758370089, - "narHash": "sha256-0C7695SLx4hU9m3VW4fCrZdvyIY+3kFQTWELHA4hxRQ=", + "lastModified": 1758691861, + "narHash": "sha256-CYgoGrY/Fx+hjzp8graTxJw1M7mn1f2jBkK26M04T0s=", "owner": "YaLTeR", "repo": "niri", - "rev": "a1dccedbb72da372d2a8a84022f37ccaa4d4a6e6", + "rev": "e837e39623457dc5ad29c34a5ce4d4616e5fbf1e", "type": "github" }, "original": { @@ -531,6 +583,27 @@ } }, "nix": { + "inputs": { + "flake-parts": "flake-parts", + "git-hooks-nix": "git-hooks-nix", + "nixpkgs": "nixpkgs", + "nixpkgs-23-11": "nixpkgs-23-11", + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1757694985, + "narHash": "sha256-3Ia+y7Hbwnzcuf1hyuVnFtbnSR6ErQeFjemHdVxjCNE=", + "rev": "766f43aa6acb1b3578db488c19fbbedf04ed9f24", + "revCount": 22340, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.11.2/01993ee9-f8e7-7b80-80df-ec0a20a32514/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/nix-src/%2A" + } + }, + "nix_2": { "inputs": { "flake-compat": [ "devenv", @@ -556,74 +629,32 @@ ] }, "locked": { - "lastModified": 1755029779, - "narHash": "sha256-3+GHIYGg4U9XKUN4rg473frIVNn8YD06bjwxKS1IPrU=", + "lastModified": 1758763079, + "narHash": "sha256-Bx1A+lShhOWwMuy3uDzZQvYiBKBFcKwy6G6NEohhv6A=", "owner": "cachix", "repo": "nix", - "rev": "b0972b0eee6726081d10b1199f54de6d2917f861", + "rev": "6f0140527c2b0346df4afad7497baa08decb929f", "type": "github" }, "original": { "owner": "cachix", - "ref": "devenv-2.30", + "ref": "devenv-2.30.5", "repo": "nix", "type": "github" } }, - "nix_2": { - "inputs": { - "nix": "nix_3", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1756839793, - "narHash": "sha256-Lpz/ELngcv7oUIdbEeglB+9+3G6aiOWeNKnE1YSrJ0I=", - "rev": "2ae87b6cb55070f15bbb20ef78e05d6d837e978f", - "revCount": 145, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix/2.31.1/01990bd3-63ed-708c-9cd9-d7171ab0a635/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/nix/2.0" - } - }, - "nix_3": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_3", - "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs_2", - "nixpkgs-23-11": "nixpkgs-23-11", - "nixpkgs-regression": "nixpkgs-regression" - }, + "nixpkgs": { "locked": { - "lastModified": 1756713144, - "narHash": "sha256-p7GXuu9OyQ1etTYl5egWIk2Ck7CdpXj80CqkhfE4H0c=", - "rev": "4006d0fe119eb6b7c76f8d447d3095a2b5f7ecbb", - "revCount": 20751, + "lastModified": 1755922037, + "narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=", + "rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c", + "revCount": 808723, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.31.1/019909bd-8a43-7c3c-b0a9-c98f5640e0fd/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808723%2Brev-b1b3291469652d5a2edb0becc4ef0246fff97a7c/0198daf7-011a-7703-95d7-57146e794342/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.31.1" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1750441195, - "narHash": "sha256-yke+pm+MdgRb6c0dPt8MgDhv7fcBbdjmv1ZceNTyzKg=", - "owner": "cachix", - "repo": "devenv-nixpkgs", - "rev": "0ceffe312871b443929ff3006960d29b120dc627", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "rolling", - "repo": "devenv-nixpkgs", - "type": "github" + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2505" } }, "nixpkgs-23-11": { @@ -675,11 +706,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1758216857, - "narHash": "sha256-h1BW2y7CY4LI9w61R02wPaOYfmYo82FyRqHIwukQ6SY=", + "lastModified": 1758791193, + "narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2ed99647a4b195f0bcc440f76edfa10aeb3b743", + "rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01", "type": "github" }, "original": { @@ -691,41 +722,41 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1756178832, - "narHash": "sha256-O2CIn7HjZwEGqBrwu9EU76zlmA5dbmna7jL1XUmAId8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d98ce345cdab58477ca61855540999c86577d19d", - "type": "github" + "lastModified": 1757034884, + "narHash": "sha256-PgLSZDBEWUHpfTRfFyklmiiLBE1i1aGCtz4eRA3POao=", + "rev": "ca77296380960cd497a765102eeb1356eb80fed0", + "revCount": 856744, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.856744%2Brev-ca77296380960cd497a765102eeb1356eb80fed0/01992cf9-9347-761a-8963-9cbe43abe2fa/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixos-25.05-small", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/0.1" } }, "nixpkgs_3": { "locked": { - "lastModified": 1756754095, - "narHash": "sha256-9Rsn9XEWINExosFkKEqdp8EI6Mujr1gmQiyrEcts2ls=", - "rev": "7c815e513adbf03c9098b2bd230c1e0525c8a7f9", - "revCount": 809261, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.809261%2Brev-7c815e513adbf03c9098b2bd230c1e0525c8a7f9/01990983-b955-725c-8944-65db1dca2de0/source.tar.gz" + "lastModified": 1758532697, + "narHash": "sha256-bhop0bR3u7DCw9/PtLCwr7GwEWDlBSxHp+eVQhCW9t4=", + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "207a4cb0e1253c7658c6736becc6eb9cace1f25f", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" } }, "nixpkgs_4": { "locked": { - "lastModified": 1758262103, - "narHash": "sha256-aBGl3XEOsjWw6W3AHiKibN7FeoG73dutQQEqnd/etR8=", + "lastModified": 1758916627, + "narHash": "sha256-fB2ISCc+xn+9hZ6gOsABxSBcsCgLCjbJ5bC6U9bPzQ4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "12bd230118a1901a4a5d393f9f56b6ad7e571d01", + "rev": "53614373268559d054c080d070cfc732dbe68ac4", "type": "github" }, "original": { @@ -784,12 +815,12 @@ "root": { "inputs": { "dankshell": "dankshell", + "determinate": "determinate", "devenv": "devenv", "disko": "disko", - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "home-manager": "home-manager", "niri": "niri", - "nix": "nix_2", "nixpkgs": "nixpkgs_4", "stylix": "stylix" } @@ -815,11 +846,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1757956156, - "narHash": "sha256-f0W7qbsCqpi6swQ5w8H+0YrAbNwsHgCFDkNRMTJjqrE=", + "lastModified": 1758905463, + "narHash": "sha256-8ANQ3MxULwolfkJEdUYlL5usISAxtysWctqqeSiJ/OE=", "owner": "nix-community", "repo": "stylix", - "rev": "0ce0103b498bb22f899ed8862d8d7f9503ed9cdb", + "rev": "4aae0ebc2b0d37d4f90ace2c8bbadffadb2e2a97", "type": "github" }, "original": { @@ -944,11 +975,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1757179758, - "narHash": "sha256-TIvyWzRt1miQj6Cf5Wy8Qz43XIZX7c4vTVwRLAT5S4Y=", + "lastModified": 1758577423, + "narHash": "sha256-sB2GAOjhjoWnjU6A/uHNJiY6O3UeztV5pJAN2g1FkXU=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "970728d0d9d1eada342bb8860af214b601139e58", + "rev": "03368548ba745e17a85bd631613a59cb2d8469a4", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 260d0f68..2217edd0 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,9 @@ inputs = { # Mirroring nixpkgs unstable nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*"; + + flake-parts.url = "github:hercules-ci/flake-parts"; # ghostty.url = "github:ghostty-org/ghostty"; # ghostty.inputs.nixpkgs.follows = "nixpkgs"; @@ -9,9 +12,6 @@ disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; - # Updating nix itself - nix.url = "https://flakehub.com/f/DeterminateSystems/nix/2.0"; - niri.url = "github:sodiboo/niri-flake"; niri.inputs.nixpkgs.follows = "nixpkgs"; @@ -52,6 +52,7 @@ flake-parts, home-manager, nixpkgs, + determinate, # ghostty, stylix, dankshell, @@ -86,7 +87,6 @@ ]; } ./users/${user}/home.nix - inputs.nix.homeManagerModules.default ]; in flake-parts.lib.mkFlake { inherit inputs; } ( @@ -127,6 +127,7 @@ disko.nixosModules.disko stylix.nixosModules.stylix niri.nixosModules.niri + determinate.nixosModules.default ./machines/parallels/disko-config.nix ./machines/common.nix { @@ -153,7 +154,8 @@ { home-manager.users.${linux-user} = { imports = [ - dankshell.homeModules.dankMaterialShell + dankshell.homeModules.dankMaterialShell.default + dankshell.homeModules.dankMaterialShell.niri ]; }; } diff --git a/machines/common.nix b/machines/common.nix index d7ff6e3b..7c3f82ec 100644 --- a/machines/common.nix +++ b/machines/common.nix @@ -14,17 +14,12 @@ let in { boot.kernelParams = [ "video=Virtual-1:4112x2572" ]; - nix.package = pkgs.nixVersions.stable; - nix.extraOptions = '' - experimental-features = nix-command flakes - trusted-users = root ${username} - ''; nix.nixPath = [ "nixpkgs=flake:nixpkgs" "nixos-config=/etc/nixos/configuration.nix" ]; nix.settings = { - auto-optimise-store = true; + eval-cores = 2; substituters = [ "https://hyprland.cachix.org" "https://devenv.cachix.org" @@ -166,6 +161,7 @@ in # services.xserver.libinput.enable = true; programs.zsh.enable = true; + programs.bash.enable = true; programs.nix-ld.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. diff --git a/modules/niri/default.nix b/modules/niri/default.nix index fc3b8b80..745520c7 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -9,11 +9,7 @@ programs.dankMaterialShell = { enable = true; - enableKeybinds = false; enableSystemd = true; - enableSpawn = false; - enableVPN = false; - enableNightMode = false; enableBrightnessControl = false; }; @@ -34,7 +30,12 @@ }; mouse = { - # natural-scroll = true; + accel-speed = 1.0; + accel-profile = "adaptive"; + scroll-factor = { + vertical = 1.0; + horizontal = 1.0; + }; }; # Focus windows and outputs automatically when moving the mouse into them @@ -222,6 +223,10 @@ } ]; + overview = { + zoom = 1.0; + }; + # Key bindings binds = with config.lib.niri.actions; @@ -230,7 +235,7 @@ in { # Terminal and app launcher - "Alt+W".action.spawn-sh = "niri msg action focus-workspace-down && alacritty"; + "Alt+W".action.spawn-sh = "niri msg action focus-workspace -- 255 && alacritty"; "Alt+T".action.spawn-sh = "~/.nix-config/modules/niri/scripts/niri-toggle-term.sh"; "Mod+G" = { action = dms-ipc "spotlight" "toggle"; @@ -243,7 +248,7 @@ "Ctrl+Shift+Return".action.spawn-sh = "alacritty -e ~/.nix-config/modules/niri/scripts/niri-cwd.sh"; # Overview - "Mod+O" = { + "Alt+O" = { action.toggle-overview = { }; repeat = false; }; @@ -262,8 +267,8 @@ "Ctrl+Shift+K".action.move-window-up-or-to-workspace-up = { }; "Ctrl+Shift+J".action.move-window-down-or-to-workspace-down = { }; - "Mod+F".action.focus-column-right = { }; - "Mod+B".action.focus-column-left = { }; + "Mod+F".action.focus-workspace-down = { }; + "Mod+B".action.focus-workspace-up = { }; "Alt+9".action.focus-column = 9; "Alt+8".action.focus-column = 8; @@ -311,7 +316,7 @@ "Shift+Down".action.move-window-down = { }; "Alt+Z".action.maximize-column = { }; - "Alt+D".action.move-column-to-workspace-down = { }; + "Alt+D".action.move-window-to-workspace = 255; # Width adjustments "Mod+Minus".action.set-column-width = "-10%"; diff --git a/modules/zsh/utils.zsh b/modules/zsh/utils.zsh index 21ec0759..551bcccf 100644 --- a/modules/zsh/utils.zsh +++ b/modules/zsh/utils.zsh @@ -2,7 +2,7 @@ function pbcopy() { if [[ $(uname -s) == *"Darwin"* ]]; then command pbcopy $1 else - cat - | xclip -selection clipboard + cat - | wl-copy fi } diff --git a/pkgs/nvchad/lua/configs/lspconfig.lua b/pkgs/nvchad/lua/configs/lspconfig.lua index aa33289a..53abdbfb 100644 --- a/pkgs/nvchad/lua/configs/lspconfig.lua +++ b/pkgs/nvchad/lua/configs/lspconfig.lua @@ -1,7 +1,6 @@ dofile(vim.g.base46_cache .. 'lsp') require 'nvchad.lsp' -local lspconfig = require 'lspconfig' local root_pattern = require 'lspconfig.util'.root_pattern local on_init = require 'nvchad.configs.lspconfig'.on_init @@ -12,7 +11,7 @@ local group = vim.api.nvim_create_augroup('LspFormatting', {}) ---@param client vim.lsp.Client ---@param bufnr integer local on_attach = function(client, bufnr) - if client.supports_method 'textDocument/formatting' then + if client:supports_method 'textDocument/formatting' then vim.api.nvim_clear_autocmds { group = group, buffer = bufnr, } vim.api.nvim_create_autocmd('BufWritePre', { group = group, @@ -43,12 +42,8 @@ local servers = { helm_ls = {}, nixd = {}, rust_analyzer = {}, - ruff = { - root_dir = root_pattern '.git', - }, - pyright = { - root_dir = root_pattern '.git', - }, + ruff = {}, + pyright = {}, yamlls = { filetypes = vim.tbl_filter(function(ft) -- Not start with Helm files @@ -90,12 +85,8 @@ local servers = { }, }, }, - tflint = { - root_dir = root_pattern('.git', '.terraform', 'main.tf', '.terraform.lock.hcl'), - }, - terraformls = { - root_dir = root_pattern('.git', '.terraform', 'main.tf', '.terraform.lock.hcl'), - }, + tflint = {}, + terraformls = {}, ty = { settings = { ty = { From 538b36173526e461de604ae4d78219a7c7c7275a Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Thu, 16 Oct 2025 11:30:26 +0900 Subject: [PATCH 32/34] chore: upgrade nixos and do not use devenv Signed-off-by: San Nguyen --- .gitignore | 11 ++ README.md | 2 +- flake.lock | 187 ++++++++++++-------------- flake.nix | 8 +- modules/kubernetes/default.nix | 4 +- modules/kubernetes/switch-config.yaml | 5 + modules/misc/default.nix | 1 + modules/niri/default.nix | 11 +- modules/nvim/default.nix | 1 + pkgs/nvchad/lua/configs/nvim-tree.lua | 2 +- pkgs/nvchad/lua/options.lua | 5 +- pkgs/nvchad/lua/plugins/init.lua | 76 ++++------- 12 files changed, 149 insertions(+), 164 deletions(-) diff --git a/.gitignore b/.gitignore index 38d9f4e1..08c06ecd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,14 @@ result .aider.chat.history.md .aider.input.history .aider.tags.cache.v3 + +# Devenv +.devenv* +devenv.local.nix +devenv.local.yaml + +# direnv +.direnv + +# pre-commit +.pre-commit-config.yaml diff --git a/README.md b/README.md index e12c2f28..6a6a73a7 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Boot from NixOS iso image, then run ```sh nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#gh gh auth login -gh clone sandangel/nixos-config ~/.nix-config +gh clone sandangel/nixos-config ~/.nix-config cd ~/.nix-config gh clone sandangel/artifacts diff --git a/flake.lock b/flake.lock index d9e096b9..0844688e 100644 --- a/flake.lock +++ b/flake.lock @@ -21,16 +21,17 @@ "base16-fish": { "flake": false, "locked": { - "lastModified": 1622559957, - "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "lastModified": 1754405784, + "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", "owner": "tomyun", "repo": "base16-fish", - "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" }, "original": { "owner": "tomyun", "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" } }, @@ -109,11 +110,11 @@ "quickshell": "quickshell" }, "locked": { - "lastModified": 1758978521, - "narHash": "sha256-Dg4RbnfCP0B2uEK454GRvcC60d+4pWB/INaW1oG8IE8=", + "lastModified": 1760494887, + "narHash": "sha256-roaH+ME+qUYZ84HjeWySOxvr5uOp7VcJ91UjwIj1SbE=", "owner": "AvengeMedia", "repo": "DankMaterialShell", - "rev": "b45837ff5c34d11ab625f4d3d878bb4a7facaddf", + "rev": "058c7408d1d2b98b488fb8aea8f90952b0905838", "type": "github" }, "original": { @@ -135,12 +136,12 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1757699119, - "narHash": "sha256-iOOoVdrkcyk95Xg68TuPeAwpz+v80mgZCqil0jpPZuY=", - "rev": "1e16c8f8a44573bb0648c76b6c98352436f5171e", - "revCount": 304, + "lastModified": 1760032600, + "narHash": "sha256-h/JQLcAfRNAo3QSobPxzTY/KxSwEmwmFJmUd5dGchQw=", + "rev": "a3becf5149650592a821daeb2b63d26597506652", + "revCount": 305, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.11.2/01993f0b-1215-7072-ac1a-f2b27b566115/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.11.3/0199ca21-1b70-7110-891b-829db1f1e850/source.tar.gz" }, "original": { "type": "tarball", @@ -150,37 +151,37 @@ "determinate-nixd-aarch64-darwin": { "flake": false, "locked": { - "narHash": "sha256-q1tqDvmfjDgLk/wbYf4pRhyHDS94iY85Q79FPBtcv7g=", + "narHash": "sha256-Nug8jpanW4BbUfzq508ZWtCG24YGvyO8AOeTAyDMOKQ=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/macOS" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/macOS" } }, "determinate-nixd-aarch64-linux": { "flake": false, "locked": { - "narHash": "sha256-E1vGfcQ5dqtRG9EDP6eOQWCnCIRB2XFkFBp2C4FgQ8c=", + "narHash": "sha256-kRAuNurPaJBhuOq1SpcCBmDOqCXvGDMKuMAb5vJRqtk=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/aarch64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/aarch64-linux" } }, "determinate-nixd-x86_64-linux": { "flake": false, "locked": { - "narHash": "sha256-GtxtkI0cOC2A30Xw6gCDTN7JxN1zJGh7/eIXr6AlTSA=", + "narHash": "sha256-7AF8O33I/xlMengDU6tHvmPVvXJZF7XQEdAbjfTPJ6s=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/x86_64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.2/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/x86_64-linux" } }, "devenv": { @@ -190,14 +191,16 @@ "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "nix": "nix_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1759013194, - "narHash": "sha256-U6YyQR9y08q/4BbfN1Ysn/MuFZK134MY8Nt/MMJvYiE=", + "lastModified": 1760495267, + "narHash": "sha256-jFVHgeRMB0xkda2JuDj85yTwTj/CIgN/8mdJdcnqyzI=", "owner": "cachix", "repo": "devenv", - "rev": "b5be22e2b4623db53daad317345ae95c93a35b59", + "rev": "3a021379d8c262206f5b9f87375efa20670c9572", "type": "github" }, "original": { @@ -214,11 +217,11 @@ ] }, "locked": { - "lastModified": 1757252286, - "narHash": "sha256-QwWQzlxAGvIi6VAc8DQ6ONCKKwtPyaHQW1cQyGbP7Og=", + "lastModified": 1760238269, + "narHash": "sha256-7CeGZM/Z/5Qt3AYByCRohGYGR1MRuXYzTTbkV/JxyAs=", "owner": "AvengeMedia", "repo": "dgop", - "rev": "a65a02ddf8bade9c109d055e644e4bd851183bd5", + "rev": "95acdfce2d323e28fa8f5a4f345160962034f2b5", "type": "github" }, "original": { @@ -255,11 +258,11 @@ ] }, "locked": { - "lastModified": 1757296630, - "narHash": "sha256-3H236F5oIKkqpfnwrvZQs4Y5imKb6JCMFGDkHs8VDjQ=", + "lastModified": 1760241259, + "narHash": "sha256-DlLGn+4M6tIafoDsHr2WhHG2hrHrC24S2IL3+KAvjEU=", "owner": "AvengeMedia", "repo": "danklinux", - "rev": "dac591711ab30d6b071a5cec674a3d2e04665ee1", + "rev": "dae4c3ff4ce0feb930361c399747edb29d081775", "type": "github" }, "original": { @@ -271,11 +274,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1756083905, - "narHash": "sha256-UqYGTBgI5ypGh0Kf6zZjom/vABg7HQocB4gmxzl12uo=", + "lastModified": 1758112371, + "narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "b655eaf16d4cbec9c3472f62eee285d4b419a808", + "rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d", "type": "github" }, "original": { @@ -363,11 +366,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1759362264, + "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", "type": "github" }, "original": { @@ -511,11 +514,11 @@ ] }, "locked": { - "lastModified": 1758997081, - "narHash": "sha256-c4SbPEbR9yP5erODj4niMO7N+2ONEoGnWnt5hauAHRg=", + "lastModified": 1760479847, + "narHash": "sha256-xOwdvpPSHw767aXyeo3GG8DjFbZ9YyRIVSr4TXADQ48=", "owner": "nix-community", "repo": "home-manager", - "rev": "26ace005b720b7628fdf2d4923e7feecdd1631c4", + "rev": "ed1eb4cfddba1be85cb16702d7a42803d1ff55e8", "type": "github" }, "original": { @@ -536,11 +539,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1758901074, - "narHash": "sha256-R7XQL6ixYywDsGkorX05KnTlsIeQr9DzQ3geD9Ba6kU=", + "lastModified": 1760488691, + "narHash": "sha256-8XmmEapvvWwOVK6jUlxg9zzWdF99xBYXFN9jVvscqDE=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "397234705a9fa05464107c58286a8308be0c50c2", + "rev": "33a33ee27371f684cc7940a9255ee8b81a5446b3", "type": "github" }, "original": { @@ -569,11 +572,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1758691861, - "narHash": "sha256-CYgoGrY/Fx+hjzp8graTxJw1M7mn1f2jBkK26M04T0s=", + "lastModified": 1760426302, + "narHash": "sha256-HEeX0wTT2DTRAgADnOmcyk7k/J8KlFosBpFp0yIVfm0=", "owner": "YaLTeR", "repo": "niri", - "rev": "e837e39623457dc5ad29c34a5ce4d4616e5fbf1e", + "rev": "87dc96fa69738b5d57562a0a556efa7def138539", "type": "github" }, "original": { @@ -591,12 +594,12 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1757694985, - "narHash": "sha256-3Ia+y7Hbwnzcuf1hyuVnFtbnSR6ErQeFjemHdVxjCNE=", - "rev": "766f43aa6acb1b3578db488c19fbbedf04ed9f24", - "revCount": 22340, + "lastModified": 1760027527, + "narHash": "sha256-1aMQb+eSrGDbTrX7PvtpD142CniIvKFxej9hZxBWeMY=", + "rev": "80d3406e25c753bb5144bef45afe980e6a642c29", + "revCount": 22421, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.11.2/01993ee9-f8e7-7b80-80df-ec0a20a32514/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.11.3/0199c9f4-3aa1-723c-a5e0-be7fb957ff9f/source.tar.gz" }, "original": { "type": "tarball", @@ -706,11 +709,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1758791193, - "narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=", + "lastModified": 1760423683, + "narHash": "sha256-Tb+NYuJhWZieDZUxN6PgglB16yuqBYQeMJyYBGCXlt8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01", + "rev": "a493e93b4a259cd9fea8073f89a7ed9b1c5a1da2", "type": "github" }, "original": { @@ -722,12 +725,12 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1757034884, - "narHash": "sha256-PgLSZDBEWUHpfTRfFyklmiiLBE1i1aGCtz4eRA3POao=", - "rev": "ca77296380960cd497a765102eeb1356eb80fed0", - "revCount": 856744, + "lastModified": 1759632233, + "narHash": "sha256-krgZxGAIIIKFJS+UB0l8do3sYUDWJc75M72tepmVMzE=", + "rev": "d7f52a7a640bc54c7bb414cca603835bf8dd4b10", + "revCount": 871443, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.856744%2Brev-ca77296380960cd497a765102eeb1356eb80fed0/01992cf9-9347-761a-8963-9cbe43abe2fa/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.871443%2Brev-d7f52a7a640bc54c7bb414cca603835bf8dd4b10/0199bd2b-6c92-7223-94cf-69e43f5561ee/source.tar.gz" }, "original": { "type": "tarball", @@ -736,27 +739,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1758532697, - "narHash": "sha256-bhop0bR3u7DCw9/PtLCwr7GwEWDlBSxHp+eVQhCW9t4=", - "owner": "cachix", - "repo": "devenv-nixpkgs", - "rev": "207a4cb0e1253c7658c6736becc6eb9cace1f25f", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "rolling", - "repo": "devenv-nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1758916627, - "narHash": "sha256-fB2ISCc+xn+9hZ6gOsABxSBcsCgLCjbJ5bC6U9bPzQ4=", + "lastModified": 1760349414, + "narHash": "sha256-W4Ri1ZwYuNcBzqQQa7NnWfrv0wHMo7rduTWjIeU9dZk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "53614373268559d054c080d070cfc732dbe68ac4", + "rev": "c12c63cd6c5eb34c7b4c3076c6a99e00fcab86ec", "type": "github" }, "original": { @@ -778,11 +765,11 @@ ] }, "locked": { - "lastModified": 1756961635, - "narHash": "sha256-hETvQcILTg5kChjYNns1fD5ELdsYB/VVgVmBtqKQj9A=", + "lastModified": 1758998580, + "narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=", "owner": "nix-community", "repo": "NUR", - "rev": "6ca27b2654ac55e3f6e0ca434c1b4589ae22b370", + "rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728", "type": "github" }, "original": { @@ -799,11 +786,11 @@ ] }, "locked": { - "lastModified": 1756981260, - "narHash": "sha256-GhuD9QVimjynHI0OOyZsqJsnlXr2orowh9H+HYz4YMs=", + "lastModified": 1760228179, + "narHash": "sha256-4Z6k7lv3Zcgk3K+4h60LpqB9wCkR+utkYERU735U068=", "ref": "refs/heads/master", - "rev": "6eb12551baf924f8fdecdd04113863a754259c34", - "revCount": 672, + "rev": "c9d3ffb6043c5bf3f3009202bad7e0e5132c4a25", + "revCount": 693, "type": "git", "url": "https://git.outfoxxed.me/quickshell/quickshell" }, @@ -821,7 +808,7 @@ "flake-parts": "flake-parts_3", "home-manager": "home-manager", "niri": "niri", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "stylix": "stylix" } }, @@ -846,11 +833,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1758905463, - "narHash": "sha256-8ANQ3MxULwolfkJEdUYlL5usISAxtysWctqqeSiJ/OE=", + "lastModified": 1760472212, + "narHash": "sha256-4C3I/ssFsq8EgaUmZP0xv5V7RV0oCHgL/Rx+MUkuE+E=", "owner": "nix-community", "repo": "stylix", - "rev": "4aae0ebc2b0d37d4f90ace2c8bbadffadb2e2a97", + "rev": "8d008296a1b3be9b57ad570f7acea00dd2fc92db", "type": "github" }, "original": { @@ -910,11 +897,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1754779259, - "narHash": "sha256-8KG2lXGaXLUE0F/JVwLQe7kOVm21IDfNEo0gfga5P4M=", + "lastModified": 1757716333, + "narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=", "owner": "tinted-theming", "repo": "schemes", - "rev": "097d751b9e3c8b97ce158e7d141e5a292545b502", + "rev": "317a5e10c35825a6c905d912e480dfe8e71c7559", "type": "github" }, "original": { @@ -926,11 +913,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1754788770, - "narHash": "sha256-LAu5nBr7pM/jD9jwFc6/kyFY4h7Us4bZz7dvVvehuwo=", + "lastModified": 1757811970, + "narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "fb2175accef8935f6955503ec9dd3c973eec385c", + "rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e", "type": "github" }, "original": { @@ -942,11 +929,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1755613540, - "narHash": "sha256-zBFrrTxHLDMDX/OYxkCwGGbAhPXLi8FrnLhYLsSOKeY=", + "lastModified": 1757811247, + "narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "937bada16cd3200bdbd3a2f5776fc3b686d5cba0", + "rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e", "type": "github" }, "original": { @@ -975,11 +962,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1758577423, - "narHash": "sha256-sB2GAOjhjoWnjU6A/uHNJiY6O3UeztV5pJAN2g1FkXU=", + "lastModified": 1759707084, + "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "03368548ba745e17a85bd631613a59cb2d8469a4", + "rev": "a9188e70bd748118b4d56a529871b9de5adb9988", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2217edd0..ade11401 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ # nixGL.inputs.nixpkgs.follows = "nixpkgs"; devenv.url = "github:cachix/devenv"; + devenv.inputs.nixpkgs.follows = "nixpkgs"; # Fix static linking issues # flox.url = "github:flox/flox"; @@ -74,6 +75,11 @@ { user }: [ { + + nix.settings.auto-optimise-store = true; + nix.gc.automatic = true; + nix.gc.dates = "daily"; + nix.gc.options = "--delete-older-than +5"; nix.settings.extra-trusted-users = [ user ]; nix.settings.extra-trusted-public-keys = [ "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" @@ -101,7 +107,7 @@ { ... }: { devenv.shells.default = { - languages.nix.enable = true; + # languages.nix.enable = true; }; # packages.default = ghostty.packages.${system}.ghostty; }; diff --git a/modules/kubernetes/default.nix b/modules/kubernetes/default.nix index 0a94b992..4eb6e442 100644 --- a/modules/kubernetes/default.nix +++ b/modules/kubernetes/default.nix @@ -3,14 +3,14 @@ { home.packages = with pkgs; [ k9s - # kind + kind kubectl kubectx stern kubernetes-helm kustomize pinniped - # skaffold + skaffold # vcluster ]; diff --git a/modules/kubernetes/switch-config.yaml b/modules/kubernetes/switch-config.yaml index a24bf317..850824e0 100644 --- a/modules/kubernetes/switch-config.yaml +++ b/modules/kubernetes/switch-config.yaml @@ -13,3 +13,8 @@ kubeconfigStores: showPrefix: false paths: - ~/.kube/mtfuji/ + - kind: filesystem + kubeconfigName: 'abctl.kubeconfig' + showPrefix: false + paths: + - ~/.airbyte/abctl/abctl.kubeconfig diff --git a/modules/misc/default.nix b/modules/misc/default.nix index 98c65c0b..ed7accdf 100644 --- a/modules/misc/default.nix +++ b/modules/misc/default.nix @@ -11,6 +11,7 @@ vim binutils bind + yq # Fonts # comic-code diff --git a/modules/niri/default.nix b/modules/niri/default.nix index 745520c7..31a9c2f4 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -60,7 +60,7 @@ # Default width of new windows default-column-width = { - proportion = 0.5; + proportion = 0.66667; }; # Disable focus ring @@ -97,6 +97,7 @@ spawn-at-startup = [ { argv = [ "alacritty" ]; } + { argv = [ "prlcp" ]; } ]; # Hotkey overlay @@ -193,14 +194,6 @@ ]; default-column-width = { }; } - { - matches = [ - { - app-id = "neovide"; - } - ]; - open-maximized = true; - } # Open Firefox picture-in-picture as floating { matches = [ diff --git a/modules/nvim/default.nix b/modules/nvim/default.nix index 243323d5..6ba1c857 100644 --- a/modules/nvim/default.nix +++ b/modules/nvim/default.nix @@ -19,6 +19,7 @@ in tflint # tfsec trash-cli + scooter # yamlfmt yamllint helm-ls diff --git a/pkgs/nvchad/lua/configs/nvim-tree.lua b/pkgs/nvchad/lua/configs/nvim-tree.lua index 5053c3ba..2d3f0af3 100644 --- a/pkgs/nvchad/lua/configs/nvim-tree.lua +++ b/pkgs/nvchad/lua/configs/nvim-tree.lua @@ -36,7 +36,7 @@ return vim.tbl_deep_extend('force', require 'nvchad.configs.nvimtree', { end, view = { width = {}, -- Adaptive size - side = 'right', + side = 'left', }, trash = { cmd = 'trash', diff --git a/pkgs/nvchad/lua/options.lua b/pkgs/nvchad/lua/options.lua index 403ee5b1..a3842608 100644 --- a/pkgs/nvchad/lua/options.lua +++ b/pkgs/nvchad/lua/options.lua @@ -1,6 +1,5 @@ vim.o.breakindent = true vim.o.clipboard = '' -vim.o.foldexpr = 'nvim_treesitter#foldexpr()' vim.o.linebreak = true vim.o.list = true vim.o.scrolloff = 5 @@ -13,7 +12,9 @@ vim.o.signcolumn = 'yes:2' vim.o.swapfile = false vim.o.virtualedit = 'all' vim.o.writebackup = false -vim.wo.foldenable = false +vim.o.foldexpr = 'nvim_treesitter#foldexpr()' +vim.o.foldlevelstart = 99 +vim.wo.foldenable = true vim.wo.foldmethod = 'expr' vim.opt.dictionary:append '/usr/share/dict/words' diff --git a/pkgs/nvchad/lua/plugins/init.lua b/pkgs/nvchad/lua/plugins/init.lua index d59da74b..d027e5a9 100644 --- a/pkgs/nvchad/lua/plugins/init.lua +++ b/pkgs/nvchad/lua/plugins/init.lua @@ -83,54 +83,34 @@ local plugins = { cmd = { 'GithubPreviewToggle', }, config = true, }, - { - "GeorgesAlkhouri/nvim-aider", - cmd = { - "Aider", - "AiderTreeAddFile", - "AiderTreeDropFile", - }, - keys = { - { "a/", "Aider toggle", desc = "Aider Open" }, - { "as", "Aider send", desc = "Aider Send", mode = { "n", "x" } }, - { "ab", "Aider buffer", desc = "Aider Send Buffer" }, - { "=", "AiderTreeAddFile", desc = "Aider Add File in NvimTree", ft = "NvimTree" }, - { "-", "AiderTreeDropFile", desc = "Aider Drop File in NvimTree", ft = "NvimTree" }, - }, - dependencies = { - { - "folke/snacks.nvim", - ---@type snacks.Config - opts = { - ---@type table - styles = { - terminal = { - relative = "editor", - bo = { - filetype = "snacks_terminal", - }, - wo = {}, - keys = { - -- Override default keymap - term_normal = false, - }, - } - }, - }, - }, - "nvim-telescope/telescope.nvim", - }, - config = function() - require("nvim_aider").setup({ - -- Command line arguments passed to aider - aider_cmd = "AWS_PROFILE=genai-dev-admin aider", - win = { - style = "nvim_aider", - position = "left", - }, - }) - end, - }, + -- { + -- "GeorgesAlkhouri/nvim-aider", + -- cmd = { + -- "Aider", + -- "AiderTreeAddFile", + -- "AiderTreeDropFile", + -- }, + -- keys = { + -- { "a/", "Aider toggle", desc = "Aider Open" }, + -- { "as", "Aider send", desc = "Aider Send", mode = { "n", "x" } }, + -- { "ab", "Aider buffer", desc = "Aider Send Buffer" }, + -- { "=", "AiderTreeAddFile", desc = "Aider Add File in NvimTree", ft = "NvimTree" }, + -- { "-", "AiderTreeDropFile", desc = "Aider Drop File in NvimTree", ft = "NvimTree" }, + -- }, + -- dependencies = { + -- "nvim-telescope/telescope.nvim", + -- }, + -- config = function() + -- require("nvim_aider").setup({ + -- -- Command line arguments passed to aider + -- aider_cmd = "AWS_PROFILE=genai-dev-admin aider", + -- win = { + -- style = "nvim_aider", + -- position = "left", + -- }, + -- }) + -- end, + -- }, { "coder/claudecode.nvim", dependencies = { From 93ffe73afe30e7ac6c7d857e196115d8458a3231 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Fri, 31 Oct 2025 02:50:07 +0900 Subject: [PATCH 33/34] chore: upgrade nixos Signed-off-by: San Nguyen --- flake.lock | 239 ++++++++++++++++++------------- machines/common.nix | 2 +- modules/alacritty/alacritty.toml | 2 +- modules/git/default.nix | 32 ++--- modules/gnome/default.nix | 2 +- 5 files changed, 157 insertions(+), 120 deletions(-) diff --git a/flake.lock b/flake.lock index 0844688e..0081a376 100644 --- a/flake.lock +++ b/flake.lock @@ -74,7 +74,8 @@ "devenv" ], "flake-compat": [ - "devenv" + "devenv", + "flake-compat" ], "git-hooks": [ "devenv", @@ -86,11 +87,11 @@ ] }, "locked": { - "lastModified": 1752264895, - "narHash": "sha256-1zBPE/PNAkPNUsOWFET4J0cjlvziH8DOekesDmjND+w=", + "lastModified": 1760971495, + "narHash": "sha256-IwnNtbNVrlZIHh7h4Wz6VP0Furxg9Hh0ycighvL5cZc=", "owner": "cachix", "repo": "cachix", - "rev": "47053aef762f452e816e44eb9a23fbc3827b241a", + "rev": "c5bfd933d1033672f51a863c47303fc0e093c2d2", "type": "github" }, "original": { @@ -106,15 +107,14 @@ "dms-cli": "dms-cli", "nixpkgs": [ "nixpkgs" - ], - "quickshell": "quickshell" + ] }, "locked": { - "lastModified": 1760494887, - "narHash": "sha256-roaH+ME+qUYZ84HjeWySOxvr5uOp7VcJ91UjwIj1SbE=", + "lastModified": 1761684045, + "narHash": "sha256-y5hYQMqSXNsgZTSQr9X+cKwnFnZGTBQdmK1NaCRBVLg=", "owner": "AvengeMedia", "repo": "DankMaterialShell", - "rev": "058c7408d1d2b98b488fb8aea8f90952b0905838", + "rev": "59f98b151d1da4a356b72989c9edb2647de9f85f", "type": "github" }, "original": { @@ -136,12 +136,12 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1760032600, - "narHash": "sha256-h/JQLcAfRNAo3QSobPxzTY/KxSwEmwmFJmUd5dGchQw=", - "rev": "a3becf5149650592a821daeb2b63d26597506652", - "revCount": 305, + "lastModified": 1761251546, + "narHash": "sha256-I/TDYHCKui0K62f2cEk2UJf6N9rO/hdsa65kpEJMhSo=", + "rev": "70beec406153496943274f59cb2ded76be49fcd7", + "revCount": 306, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.11.3/0199ca21-1b70-7110-891b-829db1f1e850/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.12.0/019a12c8-c95c-7c68-8da4-d8cc92608fbf/source.tar.gz" }, "original": { "type": "tarball", @@ -151,37 +151,37 @@ "determinate-nixd-aarch64-darwin": { "flake": false, "locked": { - "narHash": "sha256-Nug8jpanW4BbUfzq508ZWtCG24YGvyO8AOeTAyDMOKQ=", + "narHash": "sha256-TORlljq+wwn8XWLoN0giLY15pNiIAXuU0igpIXjLhMY=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/macOS" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/macOS" } }, "determinate-nixd-aarch64-linux": { "flake": false, "locked": { - "narHash": "sha256-kRAuNurPaJBhuOq1SpcCBmDOqCXvGDMKuMAb5vJRqtk=", + "narHash": "sha256-1HEvUQcG0mVdEQrEqcLEdB9nHpMNbb39bdNxdvyizqk=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/aarch64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/aarch64-linux" } }, "determinate-nixd-x86_64-linux": { "flake": false, "locked": { - "narHash": "sha256-7AF8O33I/xlMengDU6tHvmPVvXJZF7XQEdAbjfTPJ6s=", + "narHash": "sha256-WrXQbrXVisAdZl/hh49PsErSPHwzks1Vw+O3jarVjDo=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/x86_64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.11.3/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/x86_64-linux" } }, "devenv": { @@ -196,11 +196,11 @@ ] }, "locked": { - "lastModified": 1760495267, - "narHash": "sha256-jFVHgeRMB0xkda2JuDj85yTwTj/CIgN/8mdJdcnqyzI=", + "lastModified": 1761686631, + "narHash": "sha256-OzyQkqtH4kenusXEquQvTHnAr/6lGVS2DqErIPlzCUs=", "owner": "cachix", "repo": "devenv", - "rev": "3a021379d8c262206f5b9f87375efa20670c9572", + "rev": "b59500b629c08829825d4f4eca68169ea3a8821f", "type": "github" }, "original": { @@ -237,11 +237,11 @@ ] }, "locked": { - "lastModified": 1758287904, - "narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=", + "lastModified": 1760701190, + "narHash": "sha256-y7UhnWlER8r776JsySqsbTUh2Txf7K30smfHlqdaIQw=", "owner": "nix-community", "repo": "disko", - "rev": "67ff9807dd148e704baadbd4fd783b54282ca627", + "rev": "3a9450b26e69dcb6f8de6e2b07b3fc1c288d85f5", "type": "github" }, "original": { @@ -252,17 +252,18 @@ }, "dms-cli": { "inputs": { + "gomod2nix": "gomod2nix", "nixpkgs": [ "dankshell", "nixpkgs" ] }, "locked": { - "lastModified": 1760241259, - "narHash": "sha256-DlLGn+4M6tIafoDsHr2WhHG2hrHrC24S2IL3+KAvjEU=", + "lastModified": 1761135910, + "narHash": "sha256-51m0k2BN6EjUKZI/tRs563HqGPhsM639kwuXcqxuniM=", "owner": "AvengeMedia", "repo": "danklinux", - "rev": "dae4c3ff4ce0feb930361c399747edb29d081775", + "rev": "d42b58f35c129e893819742746f11ef7e82be56f", "type": "github" }, "original": { @@ -306,11 +307,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "type": "github" }, "original": { @@ -348,11 +349,11 @@ ] }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "type": "github" }, "original": { @@ -366,11 +367,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1759362264, - "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "type": "github" }, "original": { @@ -400,6 +401,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "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" + } + }, "fromYaml": { "flake": false, "locked": { @@ -429,11 +448,11 @@ ] }, "locked": { - "lastModified": 1758108966, - "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", + "lastModified": 1760663237, + "narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", + "rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37", "type": "github" }, "original": { @@ -507,6 +526,30 @@ "type": "github" } }, + "gomod2nix": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "dankshell", + "dms-cli", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756047880, + "narHash": "sha256-JeuGh9kA1SPL70fnvpLxkIkCWpTjtoPaus3jzvdna0k=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "47d628dc3b506bd28632e47280c6b89d3496909d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v1.7.0", + "repo": "gomod2nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -514,11 +557,11 @@ ] }, "locked": { - "lastModified": 1760479847, - "narHash": "sha256-xOwdvpPSHw767aXyeo3GG8DjFbZ9YyRIVSr4TXADQ48=", + "lastModified": 1761666354, + "narHash": "sha256-fHr+tIYBJccNF8QWqgowfRmEAtAMSt1deZIRNKL8A7c=", "owner": "nix-community", "repo": "home-manager", - "rev": "ed1eb4cfddba1be85cb16702d7a42803d1ff55e8", + "rev": "ca2ab1d877a24d5a437dad62f56b8b2c02e964e9", "type": "github" }, "original": { @@ -539,11 +582,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1760488691, - "narHash": "sha256-8XmmEapvvWwOVK6jUlxg9zzWdF99xBYXFN9jVvscqDE=", + "lastModified": 1761724527, + "narHash": "sha256-nB500dSUaNBtOsu5JI1PDNmjuFD6Kdbkh648q0FoaIY=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "33a33ee27371f684cc7940a9255ee8b81a5446b3", + "rev": "1ff74954f559bb2da63e28b3fcffd3b09ec32842", "type": "github" }, "original": { @@ -572,11 +615,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1760426302, - "narHash": "sha256-HEeX0wTT2DTRAgADnOmcyk7k/J8KlFosBpFp0yIVfm0=", + "lastModified": 1761721311, + "narHash": "sha256-fXBALdA4CKAYslcuamjzQZLUTCNBIKWybj+/2rwe3Z0=", "owner": "YaLTeR", "repo": "niri", - "rev": "87dc96fa69738b5d57562a0a556efa7def138539", + "rev": "6e8fd153395036c2daa7c214695ed9baf2409a2e", "type": "github" }, "original": { @@ -594,12 +637,12 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1760027527, - "narHash": "sha256-1aMQb+eSrGDbTrX7PvtpD142CniIvKFxej9hZxBWeMY=", - "rev": "80d3406e25c753bb5144bef45afe980e6a642c29", - "revCount": 22421, + "lastModified": 1761238235, + "narHash": "sha256-BvEZ31+FQKJz2XH8PTXpJqGZ1eT9bhMQ2wBj2ehBYvM=", + "rev": "9512828397f684d0f732ea76b7631f69a0db34f7", + "revCount": 23138, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.11.3/0199c9f4-3aa1-723c-a5e0-be7fb957ff9f/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.12.0/019a1277-d4c6-7dca-9d55-ee5165fd0bf6/source.tar.gz" }, "original": { "type": "tarball", @@ -632,16 +675,16 @@ ] }, "locked": { - "lastModified": 1758763079, - "narHash": "sha256-Bx1A+lShhOWwMuy3uDzZQvYiBKBFcKwy6G6NEohhv6A=", + "lastModified": 1761648602, + "narHash": "sha256-H97KSB/luq/aGobKRuHahOvT1r7C03BgB6D5HBZsbN8=", "owner": "cachix", "repo": "nix", - "rev": "6f0140527c2b0346df4afad7497baa08decb929f", + "rev": "3e5644da6830ef65f0a2f7ec22830c46285bfff6", "type": "github" }, "original": { "owner": "cachix", - "ref": "devenv-2.30.5", + "ref": "devenv-2.30.6", "repo": "nix", "type": "github" } @@ -709,11 +752,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1760423683, - "narHash": "sha256-Tb+NYuJhWZieDZUxN6PgglB16yuqBYQeMJyYBGCXlt8=", + "lastModified": 1761468971, + "narHash": "sha256-vY2OLVg5ZTobdroQKQQSipSIkHlxOTrIF1fsMzPh8w8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a493e93b4a259cd9fea8073f89a7ed9b1c5a1da2", + "rev": "78e34d1667d32d8a0ffc3eba4591ff256e80576e", "type": "github" }, "original": { @@ -725,12 +768,12 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1759632233, - "narHash": "sha256-krgZxGAIIIKFJS+UB0l8do3sYUDWJc75M72tepmVMzE=", - "rev": "d7f52a7a640bc54c7bb414cca603835bf8dd4b10", - "revCount": 871443, + "lastModified": 1760965567, + "narHash": "sha256-0JDOal5P7xzzAibvD0yTE3ptyvoVOAL0rcELmDdtSKg=", + "rev": "cb82756ecc37fa623f8cf3e88854f9bf7f64af93", + "revCount": 880602, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.871443%2Brev-d7f52a7a640bc54c7bb414cca603835bf8dd4b10/0199bd2b-6c92-7223-94cf-69e43f5561ee/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.880602%2Brev-cb82756ecc37fa623f8cf3e88854f9bf7f64af93/019a0545-358b-78f4-97fe-88a7820eac2f/source.tar.gz" }, "original": { "type": "tarball", @@ -739,11 +782,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1760349414, - "narHash": "sha256-W4Ri1ZwYuNcBzqQQa7NnWfrv0wHMo7rduTWjIeU9dZk=", + "lastModified": 1761656231, + "narHash": "sha256-EiED5k6gXTWoAIS8yQqi5mAX6ojnzpHwAQTS3ykeYMg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c12c63cd6c5eb34c7b4c3076c6a99e00fcab86ec", + "rev": "e99366c665bdd53b7b500ccdc5226675cfc51f45", "type": "github" }, "original": { @@ -778,27 +821,6 @@ "type": "github" } }, - "quickshell": { - "inputs": { - "nixpkgs": [ - "dankshell", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1760228179, - "narHash": "sha256-4Z6k7lv3Zcgk3K+4h60LpqB9wCkR+utkYERU735U068=", - "ref": "refs/heads/master", - "rev": "c9d3ffb6043c5bf3f3009202bad7e0e5132c4a25", - "revCount": 693, - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" - }, - "original": { - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" - } - }, "root": { "inputs": { "dankshell": "dankshell", @@ -825,7 +847,7 @@ "nixpkgs" ], "nur": "nur", - "systems": "systems", + "systems": "systems_2", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -833,11 +855,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1760472212, - "narHash": "sha256-4C3I/ssFsq8EgaUmZP0xv5V7RV0oCHgL/Rx+MUkuE+E=", + "lastModified": 1761666531, + "narHash": "sha256-nKOOPeblDcebtYfBjHo+PHXHKNSNKuifn1EGcBEgKWs=", "owner": "nix-community", "repo": "stylix", - "rev": "8d008296a1b3be9b57ad570f7acea00dd2fc92db", + "rev": "f8f4e3c3658ee962f8f332a56720c8dfc2836f7a", "type": "github" }, "original": { @@ -861,6 +883,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -962,11 +999,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1759707084, - "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", + "lastModified": 1761622056, + "narHash": "sha256-fBrUszJXmB4MY+wf3QsCnqWHcz7u7fLq0QMAWCltIQg=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "a9188e70bd748118b4d56a529871b9de5adb9988", + "rev": "0728d59ff6463a502e001fb090f6eb92dbc04756", "type": "github" }, "original": { diff --git a/machines/common.nix b/machines/common.nix index 7c3f82ec..5930443c 100644 --- a/machines/common.nix +++ b/machines/common.nix @@ -204,7 +204,7 @@ in umount vim xdg-utils - glxinfo + mesa-demos gnumake gcc diff --git a/modules/alacritty/alacritty.toml b/modules/alacritty/alacritty.toml index e1b944f0..774be611 100644 --- a/modules/alacritty/alacritty.toml +++ b/modules/alacritty/alacritty.toml @@ -2,7 +2,7 @@ decorations = "None" opacity = 0.95 padding = { x = 10, y = 10 } -startup_mode = "Maximized" +# startup_mode = "Maximized" [scrolling] history = 100000 diff --git a/modules/git/default.nix b/modules/git/default.nix index 3cd5a853..50f29c8e 100644 --- a/modules/git/default.nix +++ b/modules/git/default.nix @@ -1,8 +1,21 @@ { ... }: { + programs.delta = { + enable = true; + options = { + decorations = { + commit-decoration-style = "bold yellow box ul"; + file-decoration-style = "none"; + file-style = "bold yellow ul"; + }; + features = "side-by-side decorations"; + whitespace-error-style = "22 reverse"; + navigate = true; + }; + }; programs.git = { enable = true; - extraConfig = { + settings = { github.user = "sandangel"; push.default = "tracking"; pull.ff = "only"; @@ -17,9 +30,9 @@ reflog = "delta"; show = "delta"; }; + user.name = "San Nguyen"; + user.email = "vinhsannguyen91@gmail.com"; }; - userName = "San Nguyen"; - userEmail = "vinhsannguyen91@gmail.com"; includes = [ { condition = "gitdir:~/Work/Woven/**"; @@ -30,18 +43,5 @@ } ]; lfs.enable = true; - delta = { - enable = true; - options = { - decorations = { - commit-decoration-style = "bold yellow box ul"; - file-decoration-style = "none"; - file-style = "bold yellow ul"; - }; - features = "side-by-side decorations"; - whitespace-error-style = "22 reverse"; - navigate = true; - }; - }; }; } diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix index 64313a18..09187508 100644 --- a/modules/gnome/default.nix +++ b/modules/gnome/default.nix @@ -61,7 +61,7 @@ in }; home.packages = with pkgs; [ gnome-tweaks - qt6ct + qt6Packages.qt6ct libsForQt5.qt5ct adwaita-qt adwaita-qt6 From 9dc251c59fd4aeff1095fd059a066b7c79e035e6 Mon Sep 17 00:00:00 2001 From: San Nguyen Date: Mon, 24 Nov 2025 10:39:51 +0900 Subject: [PATCH 34/34] chore: disable screen reader and upgrade Signed-off-by: San Nguyen --- flake.lock | 253 ++++++++++++------------------- flake.nix | 18 ++- machines/common.nix | 145 ++++++++++++++---- modules/gnome/default.nix | 26 ---- modules/niri/default.nix | 10 +- pkgs/nvchad/lua/plugins/init.lua | 16 ++ 6 files changed, 244 insertions(+), 224 deletions(-) diff --git a/flake.lock b/flake.lock index 0081a376..d9208537 100644 --- a/flake.lock +++ b/flake.lock @@ -104,17 +104,16 @@ "dankshell": { "inputs": { "dgop": "dgop", - "dms-cli": "dms-cli", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1761684045, - "narHash": "sha256-y5hYQMqSXNsgZTSQr9X+cKwnFnZGTBQdmK1NaCRBVLg=", + "lastModified": 1763788986, + "narHash": "sha256-uYgLhTSxWs9IRpia5Hxd7AMCaE0plr0+QhWBf26h9V0=", "owner": "AvengeMedia", "repo": "DankMaterialShell", - "rev": "59f98b151d1da4a356b72989c9edb2647de9f85f", + "rev": "58bf1899410536c4244b9d44c243426dc1b2a2c9", "type": "github" }, "original": { @@ -127,21 +126,17 @@ "inputs": { "determinate-nixd-aarch64-darwin": "determinate-nixd-aarch64-darwin", "determinate-nixd-aarch64-linux": "determinate-nixd-aarch64-linux", - "determinate-nixd-x86_64-darwin": [ - "determinate", - "determinate-nixd-aarch64-darwin" - ], "determinate-nixd-x86_64-linux": "determinate-nixd-x86_64-linux", "nix": "nix", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1761251546, - "narHash": "sha256-I/TDYHCKui0K62f2cEk2UJf6N9rO/hdsa65kpEJMhSo=", - "rev": "70beec406153496943274f59cb2ded76be49fcd7", - "revCount": 306, + "lastModified": 1763536872, + "narHash": "sha256-QCYGGghBya+qsY59f1zzgYzxEzz+N9S7YRkVWDIDbgo=", + "rev": "f4e598cbb10021c93f73dd4c0cf01ec791ea53f9", + "revCount": 315, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.12.0/019a12c8-c95c-7c68-8da4-d8cc92608fbf/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.13.2/019a9b01-c0c6-7e1c-959e-98ac5b7675de/source.tar.gz" }, "original": { "type": "tarball", @@ -151,37 +146,37 @@ "determinate-nixd-aarch64-darwin": { "flake": false, "locked": { - "narHash": "sha256-TORlljq+wwn8XWLoN0giLY15pNiIAXuU0igpIXjLhMY=", + "narHash": "sha256-g1r0dPwlUi1h96c4BuHzv9M2lWDqRy9bPDW9tRSq35I=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/macOS" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/macOS" } }, "determinate-nixd-aarch64-linux": { "flake": false, "locked": { - "narHash": "sha256-1HEvUQcG0mVdEQrEqcLEdB9nHpMNbb39bdNxdvyizqk=", + "narHash": "sha256-xn324irXG/EpUdUfUGFrlJNg23JN2cVArd5LsFPjGKc=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/aarch64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/aarch64-linux" } }, "determinate-nixd-x86_64-linux": { "flake": false, "locked": { - "narHash": "sha256-WrXQbrXVisAdZl/hh49PsErSPHwzks1Vw+O3jarVjDo=", + "narHash": "sha256-VPM5FOGwEjl56b7Edvg3sduvauPHCyXZ11fN9hcUdTU=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/x86_64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.12.0/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/x86_64-linux" } }, "devenv": { @@ -196,11 +191,11 @@ ] }, "locked": { - "lastModified": 1761686631, - "narHash": "sha256-OzyQkqtH4kenusXEquQvTHnAr/6lGVS2DqErIPlzCUs=", + "lastModified": 1763829850, + "narHash": "sha256-7dmfU7kGjyBwp1V01/1jH0uzcCs8s/rDcvy/eFJiCio=", "owner": "cachix", "repo": "devenv", - "rev": "b59500b629c08829825d4f4eca68169ea3a8821f", + "rev": "cdb6a64787ab77d7ec37c68d19de483a76f08173", "type": "github" }, "original": { @@ -217,11 +212,11 @@ ] }, "locked": { - "lastModified": 1760238269, - "narHash": "sha256-7CeGZM/Z/5Qt3AYByCRohGYGR1MRuXYzTTbkV/JxyAs=", + "lastModified": 1762435535, + "narHash": "sha256-QhzRn7pYN35IFpKjjxJAj3GPJECuC+VLhoGem3ezycc=", "owner": "AvengeMedia", "repo": "dgop", - "rev": "95acdfce2d323e28fa8f5a4f345160962034f2b5", + "rev": "6cf638dde818f9f8a2e26d0243179c43cb3458d7", "type": "github" }, "original": { @@ -237,11 +232,11 @@ ] }, "locked": { - "lastModified": 1760701190, - "narHash": "sha256-y7UhnWlER8r776JsySqsbTUh2Txf7K30smfHlqdaIQw=", + "lastModified": 1763651264, + "narHash": "sha256-8vvwZbw0s7YvBMJeyPVpWke6lg6ROgtts5N2/SMCcv4=", "owner": "nix-community", "repo": "disko", - "rev": "3a9450b26e69dcb6f8de6e2b07b3fc1c288d85f5", + "rev": "e86a89079587497174ccab6d0d142a65811a4fd9", "type": "github" }, "original": { @@ -250,28 +245,6 @@ "type": "github" } }, - "dms-cli": { - "inputs": { - "gomod2nix": "gomod2nix", - "nixpkgs": [ - "dankshell", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1761135910, - "narHash": "sha256-51m0k2BN6EjUKZI/tRs563HqGPhsM639kwuXcqxuniM=", - "owner": "AvengeMedia", - "repo": "danklinux", - "rev": "d42b58f35c129e893819742746f11ef7e82be56f", - "type": "github" - }, - "original": { - "owner": "AvengeMedia", - "repo": "danklinux", - "type": "github" - } - }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -367,11 +340,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1760948891, - "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", + "lastModified": 1763759067, + "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", + "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0", "type": "github" }, "original": { @@ -401,24 +374,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "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" - } - }, "fromYaml": { "flake": false, "locked": { @@ -512,42 +467,20 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1748186689, - "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "host": "gitlab.gnome.org", + "lastModified": 1762869044, + "narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", - "type": "github" + "rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad", + "type": "gitlab" }, "original": { + "host": "gitlab.gnome.org", "owner": "GNOME", - "ref": "48.2", + "ref": "gnome-49", "repo": "gnome-shell", - "type": "github" - } - }, - "gomod2nix": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "dankshell", - "dms-cli", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1756047880, - "narHash": "sha256-JeuGh9kA1SPL70fnvpLxkIkCWpTjtoPaus3jzvdna0k=", - "owner": "nix-community", - "repo": "gomod2nix", - "rev": "47d628dc3b506bd28632e47280c6b89d3496909d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "v1.7.0", - "repo": "gomod2nix", - "type": "github" + "type": "gitlab" } }, "home-manager": { @@ -557,11 +490,11 @@ ] }, "locked": { - "lastModified": 1761666354, - "narHash": "sha256-fHr+tIYBJccNF8QWqgowfRmEAtAMSt1deZIRNKL8A7c=", + "lastModified": 1763837297, + "narHash": "sha256-o60Q4UcjzYgF3BjC5moJEs7bPIYedHWPVcFjeRaH/JE=", "owner": "nix-community", "repo": "home-manager", - "rev": "ca2ab1d877a24d5a437dad62f56b8b2c02e964e9", + "rev": "f07573df41506a0890ae8529fa51fe60cf563f4a", "type": "github" }, "original": { @@ -582,11 +515,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1761724527, - "narHash": "sha256-nB500dSUaNBtOsu5JI1PDNmjuFD6Kdbkh648q0FoaIY=", + "lastModified": 1763835287, + "narHash": "sha256-8wPX0t4wM6uLVpbRnU8yBqV2e93eXiYPiAJYzS6HLNc=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "1ff74954f559bb2da63e28b3fcffd3b09ec32842", + "rev": "5e06972e46f11274ae3dcb5175c45dc5b9e85410", "type": "github" }, "original": { @@ -615,11 +548,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1761721311, - "narHash": "sha256-fXBALdA4CKAYslcuamjzQZLUTCNBIKWybj+/2rwe3Z0=", + "lastModified": 1763799335, + "narHash": "sha256-b6hgDHjrLgTp4Y8DD5woGChg0R+yH16m0ZWVi9BhjrA=", "owner": "YaLTeR", "repo": "niri", - "rev": "6e8fd153395036c2daa7c214695ed9baf2409a2e", + "rev": "cfc01b895c0c7cbb9692852488675cc46693bd2a", "type": "github" }, "original": { @@ -637,18 +570,34 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1761238235, - "narHash": "sha256-BvEZ31+FQKJz2XH8PTXpJqGZ1eT9bhMQ2wBj2ehBYvM=", - "rev": "9512828397f684d0f732ea76b7631f69a0db34f7", - "revCount": 23138, + "lastModified": 1763534330, + "narHash": "sha256-gTuB2qBdSKCKnZwENTqScs/pPBaZQOv6zZ1KJvV/ohk=", + "rev": "be871f9baf5366a220b5f25634eebab6f452a017", + "revCount": 23278, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.12.0/019a1277-d4c6-7dca-9d55-ee5165fd0bf6/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.13.2/019a9af6-3d7b-71bc-bccd-8b18e147ad77/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/DeterminateSystems/nix-src/%2A" } }, + "nix-flatpak": { + "locked": { + "lastModified": 1739444422, + "narHash": "sha256-iAVVHi7X3kWORftY+LVbRiStRnQEob2TULWyjMS6dWg=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "5e54c3ca05a7c7d968ae1ddeabe01d2a9bc1e177", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "latest", + "repo": "nix-flatpak", + "type": "github" + } + }, "nix_2": { "inputs": { "flake-compat": [ @@ -691,12 +640,12 @@ }, "nixpkgs": { "locked": { - "lastModified": 1755922037, - "narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=", - "rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c", - "revCount": 808723, + "lastModified": 1761597516, + "narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=", + "rev": "daf6dc47aa4b44791372d6139ab7b25269184d55", + "revCount": 811874, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808723%2Brev-b1b3291469652d5a2edb0becc4ef0246fff97a7c/0198daf7-011a-7703-95d7-57146e794342/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz" }, "original": { "type": "tarball", @@ -721,11 +670,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1754788789, - "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", + "lastModified": 1761765539, + "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", + "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc", "type": "github" }, "original": { @@ -752,11 +701,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1761468971, - "narHash": "sha256-vY2OLVg5ZTobdroQKQQSipSIkHlxOTrIF1fsMzPh8w8=", + "lastModified": 1763622513, + "narHash": "sha256-1jQnuyu82FpiSxowrF/iFK6Toh9BYprfDqfs4BB+19M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "78e34d1667d32d8a0ffc3eba4591ff256e80576e", + "rev": "c58bc7f5459328e4afac201c5c4feb7c818d604b", "type": "github" }, "original": { @@ -768,12 +717,12 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1760965567, - "narHash": "sha256-0JDOal5P7xzzAibvD0yTE3ptyvoVOAL0rcELmDdtSKg=", - "rev": "cb82756ecc37fa623f8cf3e88854f9bf7f64af93", - "revCount": 880602, + "lastModified": 1763375004, + "narHash": "sha256-e81Xfa7xhRZfqGB4s3xEvrg4p1v+fToM6CIQlXUyaX0=", + "rev": "8b6600824693a9c706ef09bd86711ca393703466", + "revCount": 897465, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.880602%2Brev-cb82756ecc37fa623f8cf3e88854f9bf7f64af93/019a0545-358b-78f4-97fe-88a7820eac2f/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.897465%2Brev-8b6600824693a9c706ef09bd86711ca393703466/019a9577-b407-75dd-b18b-3308def1c215/source.tar.gz" }, "original": { "type": "tarball", @@ -782,11 +731,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1761656231, - "narHash": "sha256-EiED5k6gXTWoAIS8yQqi5mAX6ojnzpHwAQTS3ykeYMg=", + "lastModified": 1763618868, + "narHash": "sha256-v5afmLjn/uyD9EQuPBn7nZuaZVV9r+JerayK/4wvdWA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e99366c665bdd53b7b500ccdc5226675cfc51f45", + "rev": "a8d610af3f1a5fb71e23e08434d8d61a466fc942", "type": "github" }, "original": { @@ -830,6 +779,7 @@ "flake-parts": "flake-parts_3", "home-manager": "home-manager", "niri": "niri", + "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs_3", "stylix": "stylix" } @@ -847,7 +797,7 @@ "nixpkgs" ], "nur": "nur", - "systems": "systems_2", + "systems": "systems", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -855,11 +805,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1761666531, - "narHash": "sha256-nKOOPeblDcebtYfBjHo+PHXHKNSNKuifn1EGcBEgKWs=", + "lastModified": 1763767967, + "narHash": "sha256-BMiqCHUxp2zoAjWCpvj5Scf0J+yTiXpkBlFuRo2nFIg=", "owner": "nix-community", "repo": "stylix", - "rev": "f8f4e3c3658ee962f8f332a56720c8dfc2836f7a", + "rev": "cd11c057b054609b8463c20e6065de424b30b89d", "type": "github" }, "original": { @@ -883,21 +833,6 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -999,11 +934,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1761622056, - "narHash": "sha256-fBrUszJXmB4MY+wf3QsCnqWHcz7u7fLq0QMAWCltIQg=", + "lastModified": 1763704521, + "narHash": "sha256-ceYEV6PnvUN8Zixao4gpPuN+VT3B0SlAXKuPNHZhqUY=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "0728d59ff6463a502e001fb090f6eb92dbc04756", + "rev": "f379ff5722a821212eb59ada9cf8e51cb3654aad", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ade11401..2899880b 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,8 @@ flake-parts.url = "github:hercules-ci/flake-parts"; + nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest"; + # ghostty.url = "github:ghostty-org/ghostty"; # ghostty.inputs.nixpkgs.follows = "nixpkgs"; @@ -59,6 +61,7 @@ dankshell, niri, disko, + nix-flatpak, # neovim, # devenv, # flox, @@ -71,15 +74,18 @@ linux-user = "sand"; mac-user = "san.nguyen"; + nix-options = { + nix.registry.nixpkgs.flake = nixpkgs; + nix.settings.auto-optimise-store = true; + nix.settings.warn-dirty = false; + nix.gc.automatic = true; + nix.gc.dates = "daily"; + nix.gc.options = "--delete-older-than +5"; + }; modules = { user }: [ { - - nix.settings.auto-optimise-store = true; - nix.gc.automatic = true; - nix.gc.dates = "daily"; - nix.gc.options = "--delete-older-than +5"; nix.settings.extra-trusted-users = [ user ]; nix.settings.extra-trusted-public-keys = [ "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" @@ -134,6 +140,8 @@ stylix.nixosModules.stylix niri.nixosModules.niri determinate.nixosModules.default + nix-flatpak.nixosModules.nix-flatpak + nix-options ./machines/parallels/disko-config.nix ./machines/common.nix { diff --git a/machines/common.nix b/machines/common.nix index 5930443c..442506ff 100644 --- a/machines/common.nix +++ b/machines/common.nix @@ -21,16 +21,16 @@ in nix.settings = { eval-cores = 2; substituters = [ - "https://hyprland.cachix.org" - "https://devenv.cachix.org" - "https://cache.flox.dev" - "https://ghostty.cachix.org" + # "https://hyprland.cachix.org" + # "https://devenv.cachix.org" + # "https://cache.flox.dev" + # "https://ghostty.cachix.org" ]; trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" - "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" - "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + # "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + # "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" + # "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" + # "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" ]; }; @@ -77,11 +77,22 @@ in LC_TIME = "en_US.UTF-8"; }; - # Enable the X11 windowing system. - services.xserver.enable = true; + services = { + # GTK theme config + dbus = { + enable = true; + packages = [ pkgs.dconf ]; + }; + }; + + # Disable Orca screen reader + services.orca.enable = false; # Enable the GNOME Desktop Environment. services.displayManager.gdm.enable = true; + # Gnome config + services.udev.packages = [ pkgs.gnome-settings-daemon ]; + services.desktopManager.gnome.enable = true; services.xserver.excludePackages = [ pkgs.xterm ]; @@ -93,8 +104,37 @@ in gnome-user-docs ]; - programs.niri.enable = true; - programs.niri.package = pkgs.niri-unstable; + programs = { + dconf.enable = true; + niri = { + enable = true; + package = pkgs.niri-unstable; + }; + }; + + xdg.portal = { + enable = true; + config = { + common = { + default = [ + "gtk" + "gnome" + ]; + }; + niri = { + default = [ + "gtk" + "gnome" + ]; + }; + }; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + xdg-desktop-portal-gnome + ]; + xdgOpenUsePortal = true; + }; programs.hyprland.enable = false; programs.hyprland.withUWSM = false; @@ -132,24 +172,29 @@ in variant = ""; }; - # Enable CUPS to print documents. services.printing.enable = false; + security.rtkit.enable = true; + services.openssh = { + enable = true; + ports = [ 22 ]; + settings = { + PasswordAuthentication = true; + AllowUsers = [ "sand" ]; + UseDns = true; + X11Forwarding = false; + PermitRootLogin = "no"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no" + }; + }; # Enable sound with pipewire. - # hardware.pulseaudio.enable = false; services.pulseaudio.enable = false; - security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; + # Prerequisite for screensharing + wireplumber.enable = true; }; fonts.packages = [ @@ -157,9 +202,6 @@ in ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - programs.zsh.enable = true; programs.bash.enable = true; programs.nix-ld.enable = true; @@ -192,6 +234,9 @@ in # Install firefox. programs.firefox.enable = true; + programs.firefox.package = ( + pkgs.wrapFirefox (pkgs.firefox-unwrapped.override { pipewireSupport = true; }) { } + ); # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -222,21 +267,69 @@ in xclip wl-clipboard clipnotify + + # Niri + wayland-utils + nautilus + chromium + xwayland-satellite ]; - services.flatpak.enable = true; + services.flatpak = { + enable = true; + update.onActivation = true; + packages = [ ]; + }; + + networking.firewall.allowedTCPPorts = [ + 22 # Port for SSH Tunnel + 8002 # ADK Web + 3000 # Livekit frontend + 7880 # Livekit RTC server + 5187 # UI + 8000 # Backend + 3005 # Backend with OAuth2 + ]; environment.sessionVariables = { NIXOS_OZONE_WL = "1"; LIBSEAT_BACKEND = "logind"; SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; EDITOR = "${pkgs.neovim}/bin/nvim"; + SHELL = "${pkgs.zsh}/bin/zsh"; + XDG_CURRENT_DESKTOP = "niri"; + XDG_SESSION_DESKTOP = "Wayland"; + XDG_SESSION_TYPE = "wayland"; + GDK_BACKEND = "wayland,x11"; + QT_QPA_PLATFORM = "wayland;xcb"; + + # GTK theme settings + GTK_THEME = "Fluent-Dark"; + + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + QT_QPA_PLATFORMTHEME = "qt6ct"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + + # Ensure icon themes are found + XCURSOR_THEME = "Fluent-dark-cursors"; + + MOZ_ENABLE_WAYLAND = "1"; + + ELECTRON_OZONE_PLATFORM_HINT = "auto"; + + CHROMIUM_USER_FLAGS = "--force-device-scale-factor=1"; }; hardware.graphics.enable = true; hardware.graphics.extraPackages = [ pkgs.mesa ]; - virtualisation.docker.enable = true; + virtualisation.docker = { + enable = true; + autoPrune = { + enable = true; + dates = "weekly"; + }; + }; # Allow apps to update firmware services.fwupd.enable = true; diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix index 09187508..fb426514 100644 --- a/modules/gnome/default.nix +++ b/modules/gnome/default.nix @@ -33,32 +33,6 @@ in home.file.".config/qt6ct/qt6ct.conf".source = ./qt6ct.conf; home.file.".config/qt5ct/qt5ct.conf".source = ./qt5ct.conf; - home.sessionVariables = { - XDG_SESSION_TYPE = "wayland"; - - # GTK theme settings - GTK_THEME = gtk-theme; - - GDK_BACKEND = "wayland,x11"; - GDK_SCALE = "1"; - - QT_AUTO_SCREEN_SCALE_FACTOR = "1"; - QT_QPA_PLATFORM = "wayland;xcb"; - QT_QPA_PLATFORMTHEME = "qt6ct"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - - # Ensure icon themes are found - XCURSOR_PATH = "$HOME/.icons:$XCURSOR_PATH"; - XCURSOR_THEME = "Fluent-dark-cursors"; - - SDL_VIDEODRIVER = "wayland"; - CLUTTER_BACKEND = "wayland"; - - MOZ_ENABLE_WAYLAND = "1"; - MOZ_USE_XINPUT2 = "1"; - - CHROMIUM_USER_FLAGS = "--force-device-scale-factor=1"; - }; home.packages = with pkgs; [ gnome-tweaks qt6Packages.qt6ct diff --git a/modules/niri/default.nix b/modules/niri/default.nix index 31a9c2f4..e2ecad10 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -1,15 +1,9 @@ -{ pkgs, config, ... }: +{ config, ... }: { - # Add xwayland-satellite package - home.packages = with pkgs; [ - xwayland-satellite - nautilus - ]; - programs.dankMaterialShell = { enable = true; - enableSystemd = true; + systemd.enable = true; enableBrightnessControl = false; }; diff --git a/pkgs/nvchad/lua/plugins/init.lua b/pkgs/nvchad/lua/plugins/init.lua index d027e5a9..59888e5f 100644 --- a/pkgs/nvchad/lua/plugins/init.lua +++ b/pkgs/nvchad/lua/plugins/init.lua @@ -83,6 +83,22 @@ local plugins = { cmd = { 'GithubPreviewToggle', }, config = true, }, + { + 'Juksuu/worktrees.nvim', + cmd = { + 'GitWorktreeCreate', + 'GitWorktreeSwitch', + 'GitWorktreeCreateExisting', + 'GitWorktreeRemove', + }, + dependencies = { + "nvim-telescope/telescope.nvim", + }, + config = function() + require("worktrees").setup() + require("telescope").load_extension("worktrees") + end, + }, -- { -- "GeorgesAlkhouri/nvim-aider", -- cmd = {