Compare commits

..

3 Commits

7 changed files with 136 additions and 95 deletions

View File

@@ -1,50 +1,51 @@
root := `pwd` set export
NH := "IMPURE_ROOT=" + root + " nh"
IMPURE_ROOT := `pwd`
all: fmt switch all: fmt switch
switch: @switch:
@echo "Rebuilding NixOS..." echo "Rebuilding NixOS..."
@{{NH}} os switch . --impure nh os switch . --impure
switch-offline: @switch-offline:
@echo "Rebuilding NixOS without net..." echo "Rebuilding NixOS without net..."
@{{NH}} os switch . --impure --no-net nh os switch . --impure --no-net
alias offline := switch-offline alias offline := switch-offline
boot: @boot:
@echo "Rebuilding NixOS..." echo "Rebuilding NixOS..."
@{{NH}} os boot . --impure nh os boot . --impure
test: @test:
@echo "Rebuilding NixOS..." echo "Rebuilding NixOS..."
@{{NH}} os test . --impure nh os test . --impure
vm: @vm:
@echo "Building NixOS VM..." echo "Building NixOS VM..."
@{{NH}} os build-vm . --impure nh os build-vm . --impure
update: @update:
@echo "Updating flakes..." echo "Updating flakes..."
@nix flake update nix flake update
repl: @repl:
@nixos-rebuild repl --flake . nixos-rebuild repl --flake .
cleandry: @cleandry:
@echo "Listing all generations older than 15 days..." echo "Listing all generations older than 15 days..."
@sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --dry-run --older-than 15d sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --dry-run --older-than 15d
@nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --dry-run --older-than 15d nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --dry-run --older-than 15d
clean: @clean:
@echo "Removing all generations older than 15 days..." echo "Removing all generations older than 15 days..."
@sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 15d sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 15d
@nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --older-than 15d nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --older-than 15d
gc: @gc:
@nix store gc --debug nix store gc --debug
fmt: @fmt:
@echo "Formatting nix files..." echo "Formatting files..."
@nix fmt nix fmt

104
flake.lock generated
View File

@@ -11,11 +11,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1766764785, "lastModified": 1767016572,
"narHash": "sha256-NM3tceHyqtkt/QBGBbB+vr6tRou0XSzMxKwshceIMgE=", "narHash": "sha256-cNxFSV35r03uHDMU/MBxq9A05R63GYcCCfkHls/853g=",
"owner": "linyinfeng", "owner": "linyinfeng",
"repo": "angrr", "repo": "angrr",
"rev": "d91ba9ce73ea615aea746e99206ad79d359ca6aa", "rev": "3c4776f7ff9c3c424bfb8a28940bd3102262344e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -193,11 +193,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1766731651, "lastModified": 1767163745,
"narHash": "sha256-Fx4vOweZNpfraHBx9n9JDnz6n2vv41UK1iTApFLS/HY=", "narHash": "sha256-sJXyT3AeB3rHPuK93VjnVI16hoLJazieFq7LP62cTHw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "7cbc19864b07a3e3c4bf6909a6b353cde9cc5d7f", "rev": "33e17a88166bba14f4017b3ee6cafe5b3376aef0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -225,11 +225,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1766661267, "lastModified": 1766929376,
"narHash": "sha256-QN1r/zNqvXHwWqlRAnRtFf4CQwIOJx58PtdExIzAw94=", "narHash": "sha256-Eyg78VjLzKNG2XkqLqylSvHGAwsP8gsvmUHtZxQwPq4=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "f275e157c50c3a9a682b4c9b4aa4db7a4cd3b5f2", "rev": "236f248441a986331cda53b039e7f9fd96e03635",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -544,11 +544,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766682973, "lastModified": 1767104570,
"narHash": "sha256-GKO35onS711ThCxwWcfuvbIBKXwriahGqs+WZuJ3v9E=", "narHash": "sha256-GKgwu5//R+cLdKysZjGqvUEEOGXXLdt93sNXeb2M/Lk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "91cdb0e2d574c64fae80d221f4bf09d5592e9ec2", "rev": "e4e78a2cbeaddd07ab7238971b16468cc1d14daf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -681,11 +681,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1766765523, "lastModified": 1767166320,
"narHash": "sha256-DCk3GKdKZNjpvNuDy9ZVfVwCy3tlm96/UZnYkJO7N44=", "narHash": "sha256-JhE7GgwcKCtkBmP4Gk7r27QmrlCV4As4Dq+fHESW+Ds=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "a3e638c75d07de759421e6f34bd69c3f9a0a3567", "rev": "947c5bc805ec346a305e00faa8cfe476b8a9c679",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -714,11 +714,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1766751930, "lastModified": 1767160009,
"narHash": "sha256-83/YSW6c58i/iwGzAFApuMy6MCgoIaROeCcoIGh+ViU=", "narHash": "sha256-aTj88rDBdhmzaGXoFPOsHjXYM2OjNttixsGftT/X0dI=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "b5640d5293ad8dca06cb447692ea7cbb21680eb1", "rev": "cf0b4bc0ca93ab5c18b562ada1d8609b67b3c4e3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -772,11 +772,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766524813, "lastModified": 1766784396,
"narHash": "sha256-N/sxS27+t9nGvGWqwwAceSMW/Y5ddcypS/aiTnZ7ScA=", "narHash": "sha256-rIlgatT0JtwxsEpzq+UrrIJCRfVAXgbYPzose1DmAcM=",
"owner": "nix-darwin", "owner": "nix-darwin",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "c2b36207f2c396c79dbed9d40536db221bd4e363", "rev": "f0c8e1f6feb562b5db09cee9fb566a2f989e6b55",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -858,11 +858,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1766815868, "lastModified": 1767182031,
"narHash": "sha256-cTpRd20EknSDkfpumLXIlO3UNnx0U3VmC3LUGVj1mRo=", "narHash": "sha256-79bV6wbOEfCZ8KsYrm75gq5njjG7PvJdxoIbSWKOdJg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "deefe7fae28c478ef2b0e0f72352233806fc6da2", "rev": "3a9542aaa5e82d21d37ae3e2d904454c42800b35",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -874,11 +874,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1766736597, "lastModified": 1767047869,
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=", "narHash": "sha256-tzYsEzXEVa7op1LTnrLSiPGrcCY6948iD0EcNLWcmzo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852", "rev": "89dbf01df72eb5ebe3b24a86334b12c27d68016a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -890,11 +890,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1766815707, "lastModified": 1767181686,
"narHash": "sha256-cGpp590DS4WFwtXU7N2Ouko1nIJkqltIAFYlzXjoJhk=", "narHash": "sha256-R/0xncyuqJGeib2w+cbuCIpKmmtDlHQG0tRh0EpGuyc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "afe1017bc34f91605981821c3e271fd7755864c4", "rev": "c730b6fd39ebd8e88191aea2ae37901a01f1078f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -906,11 +906,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1766651565, "lastModified": 1766902085,
"narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539", "rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -954,11 +954,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1766651565, "lastModified": 1766902085,
"narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539", "rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -975,16 +975,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766537508, "lastModified": 1767047420,
"narHash": "sha256-TBrsYS+n+8AsXRAP4wA3JNOdT604QmPo8yeSTT/p61I=", "narHash": "sha256-Bh4XcEyG6XRQugahL/2Vd42k/YeGK0f+yW3+Oc74Rp4=",
"owner": "noctalia-dev", "owner": "noctalia-dev",
"repo": "noctalia-shell", "repo": "noctalia-shell",
"rev": "a865af00357b9b240b3f760359f96413a086054f", "rev": "558433f9e9cc1fd75ab742b0f6fecd1c3474abc0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "noctalia-dev", "owner": "noctalia-dev",
"ref": "v3.7.5", "ref": "v3.8.0",
"repo": "noctalia-shell", "repo": "noctalia-shell",
"type": "github" "type": "github"
} }
@@ -1063,11 +1063,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1766657615, "lastModified": 1767092832,
"narHash": "sha256-HijBTq7UYd5Cb/xQM32vf714DuwUFX+JlN6YMrpDaF4=", "narHash": "sha256-cZFPNglcpjQuA9MXejYELyrIvPm67jR5CZ8Sq2o5P0w=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "9581ba4daf07124f28d5b6c335ffad4c88bfce0b", "rev": "2b4263b042d9bdee370e027e4b0ea0f6101709d0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1084,11 +1084,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766347346, "lastModified": 1766896955,
"narHash": "sha256-Am4X4r0WIe8wA3HFar1AuTxS4+op2pDaBPdT8CqEEN4=", "narHash": "sha256-BbAUnNjaBmfR7Mvho9BN0RfvDi5fpP19wd/Hs6DMX8k=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "51be135cf0fd5cee6a98ca2b127fb97ce8969c4f", "rev": "861c32b27cce26c4bb828dfd21bd23df0dba7df2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1250,11 +1250,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766000401, "lastModified": 1767122417,
"narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=", "narHash": "sha256-yOt/FTB7oSEKQH9EZMFMeuldK1HGpQs2eAzdS9hNS/o=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd", "rev": "dec15f37015ac2e774c84d0952d57fcdf169b54d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1325,11 +1325,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766697593, "lastModified": 1767119591,
"narHash": "sha256-mGZBEN67mxeOsBhplBRLm6L+y++8jU46EEUYgemG1aQ=", "narHash": "sha256-4LqJZvu+8i0cTtwz+N3nfIvVf6Ra4xIGw0UxOOHVKAc=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "98d8f48ba80a4b6e3b56addad850d57132301075", "rev": "379639ecac155c03975cd6608a146bb1dc168cf9",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -77,7 +77,7 @@
}; };
niri.url = "github:sodiboo/niri-flake"; niri.url = "github:sodiboo/niri-flake";
noctalia = { noctalia = {
url = "github:noctalia-dev/noctalia-shell/v3.7.5"; url = "github:noctalia-dev/noctalia-shell/v3.8.0";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
zen.inputs.nixpkgs.follows = "nixpkgs"; zen.inputs.nixpkgs.follows = "nixpkgs";

View File

@@ -15,8 +15,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
my.hm = { my.hm = {
xdg.configFile."nvim/init.lua".source = impure.mkImpureLink ./nvim/init.lua; xdg.configFile."nvim".source = impure.mkImpureLink ./nvim;
xdg.configFile."nvim/lua".source = impure.mkImpureLink ./nvim/lua;
programs.neovim = { programs.neovim = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;

View File

@@ -0,0 +1,45 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"gitsigns.nvim": { "branch": "main", "commit": "130beacf8a51f00aede9c31064c749136679a321" },
"glance.nvim": { "branch": "master", "commit": "bf86d8b79dce808e65fdb6e9269d0b4ed6d2eefc" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"inlay-hints.nvim": { "branch": "master", "commit": "12c48937702906f67dfbd7f64b1c0d8861635506" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"leap.nvim": { "branch": "main", "commit": "f19d43590c4b6d31188ee1ea2954d2b7558a9e11" },
"lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "41ceb6bba3a40128b7841f5b7f5a9dae7201e823" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-osc52": { "branch": "main", "commit": "04cfaba1865ae5c53b6f887c3ca7304973824fb2" },
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
"nvim-tree.lua": { "branch": "master", "commit": "b8b44b6a2494d086a9177251a119f9daec6cace8" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
"nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" },
"outline.nvim": { "branch": "main", "commit": "1967ef50036b0b1eac4977aeede55915a741afe0" },
"pest.vim": { "branch": "master", "commit": "7cfcb43f824e74d13dfe631359fff2ec23836a77" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "8aafe2cbd89cd4090f573a98cab6b20366576fde" },
"render-markdown.nvim": { "branch": "main", "commit": "07d088bf8bdadd159eb807b90eaee86a4778383f" },
"ripgrep": { "branch": "master", "commit": "0a88cccd5188074de96f54a4b6b44a63971ac157" },
"telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"tree-sitter-nu": { "branch": "main", "commit": "4c149627cc592560f77ead1c384e27ec85926407" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"vim-floaterm": { "branch": "master", "commit": "a11b930f55324e9b05e2ef16511fe713f1b456a7" },
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }
}

View File

@@ -63,7 +63,7 @@ function G.buf_kill(kill_command, bufnr, force)
else else
return return
end end
elseif api.nvim_buf_get_option(bufnr, "buftype") == "terminal" then elseif api.nvim_get_option_value("buftype", { buf = bufnr }) == "terminal" then
choice = fn.confirm(fmt([[Close "%s"?]], bufname), "&Yes\n&No\n&Cancel") choice = fn.confirm(fmt([[Close "%s"?]], bufname), "&Yes\n&No\n&Cancel")
if choice == 1 then if choice == 1 then
force = true force = true

View File

@@ -25,10 +25,6 @@ vim.diagnostic.config({
severity_sort = true, severity_sort = true,
}) })
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
border = "single",
})
local diag_config1 = { local diag_config1 = {
virtual_text = { virtual_text = {
severity = { severity = {