Compare commits

...

28 Commits

Author SHA1 Message Date
imxyy1soope1 12d2b3ff49 chore: update flake.lock 2026-07-01 14:14:35 +08:00
imxyy1soope1 02953206f7 tombi: move to modules/coding/langs/toml.nix 2026-07-01 14:14:35 +08:00
imxyy1soope1 84485d9e8a python: pyright -> pyrefly 2026-06-19 15:29:05 +08:00
imxyy1soope1 7a84ae3b7a chore: update flake.lock 2026-06-19 15:28:57 +08:00
imxyy1soope1 7dc99f00cc chore: update secrets 2026-06-13 19:19:36 +08:00
imxyy1soope1 6149a5119d chore: update flake.lock 2026-06-13 17:19:49 +08:00
imxyy1soope1 bd6643edaf update ly config 2026-06-13 11:57:10 +08:00
imxyy1soope1 577aec6587 fix corrupted ly display 2026-06-13 11:57:10 +08:00
imxyy1soope1 c79a19d5ee remove getty-autologin 2026-06-13 11:57:10 +08:00
imxyy1soope1 cfe29e07ac workaround for EDITOR="nano" 2026-06-13 11:57:06 +08:00
imxyy1soope1 2b773af620 add codex 2026-06-06 22:09:47 +08:00
imxyy1soope1 ee9e812579 chore: update secrets 2026-06-06 22:09:38 +08:00
imxyy1soope1 00fd2e7ab9 fix sudo configuration 2026-06-06 21:19:34 +08:00
imxyy1soope1 2f90d7f0d0 doas -> sudo 2026-06-06 21:13:10 +08:00
imxyy1soope1 be6c838f19 update neovim config 2026-06-06 19:48:11 +08:00
imxyy1soope1 8dc7a7b90a chore: update secrets 2026-06-06 17:07:05 +08:00
imxyy1soope1 a3433735b7 update flake.lock; sddm -> ly 2026-06-06 16:42:57 +08:00
imxyy1soope1 df37f04bdc refactor: eliminate "_2"s
script: https://gist.github.com/lxl66566/697db0cccd04b7247dc9a0cfb96d328c
2026-05-30 23:35:21 +08:00
imxyy1soope1 67ceb5faab neovim: use tombi 2026-05-30 16:19:38 +08:00
imxyy1soope1 51a6bd3367 chore: update flake.lock 2026-05-30 16:19:13 +08:00
imxyy1soope1 3d2c6297a6 chore: update flake.lock 2026-05-23 16:19:24 +08:00
imxyy1soope1 2c9b2dc2b6 chore: update flake.lock; fastfetch -> fastfetchMinimal 2026-05-17 11:06:43 +08:00
imxyy1soope1 6c216af91e revert noctalia-shell update 2026-05-16 20:38:39 +08:00
imxyy1soope1 8e6d52b6b5 chore: update flake.lock; update noctalia-shell 2026-05-16 20:14:59 +08:00
imxyy1soope1 dbd97e0034 use kde to manage qt style 2026-05-04 11:41:05 +08:00
imxyy1soope1 39a9318f11 enable carapace command-line completion 2026-05-03 15:23:45 +08:00
imxyy1soope1 9117816216 enable nix-direnv 2026-05-03 15:23:36 +08:00
imxyy1soope1 0207a9cf3e init nix-racer substituter proxy 2026-05-03 13:10:47 +08:00
41 changed files with 3140 additions and 798 deletions
Generated
+279 -517
View File
File diff suppressed because it is too large Load Diff
+43 -7
View File
@@ -20,6 +20,7 @@
nixos-wsl = { nixos-wsl = {
url = "github:nix-community/NixOS-WSL"; url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
}; };
# Flake organization tools # Flake organization tools
@@ -40,11 +41,11 @@
# Useful modules # Useful modules
# keep-sorted start block=yes # keep-sorted start block=yes
catppuccin = { impermanence = {
url = "github:catppuccin/nix"; url = "github:nix-community/impermanence";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
}; };
impermanence.url = "github:nix-community/impermanence";
# TODO: sops-nix: remove pr patch once merged # TODO: sops-nix: remove pr patch once merged
# https://github.com/Mic92/sops-nix/pull/779 # https://github.com/Mic92/sops-nix/pull/779
sops-nix = { sops-nix = {
@@ -54,6 +55,8 @@
stylix = { stylix = {
url = "github:danth/stylix"; url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
inputs.systems.follows = "systems";
}; };
system76-scheduler-niri = { system76-scheduler-niri = {
url = "github:Kirottu/system76-scheduler-niri"; url = "github:Kirottu/system76-scheduler-niri";
@@ -66,6 +69,9 @@
angrr = { angrr = {
url = "github:linyinfeng/angrr"; url = "github:linyinfeng/angrr";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
inputs.flake-parts.follows = "flake-parts";
inputs.treefmt-nix.follows = "treefmt";
}; };
darkly = { darkly = {
url = "github:Bali10050/Darkly"; url = "github:Bali10050/Darkly";
@@ -78,19 +84,35 @@
go-musicfox = { go-musicfox = {
url = "github:imxyy1soope1/go-musicfox"; url = "github:imxyy1soope1/go-musicfox";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
inputs.devenv.follows = "devenv";
inputs.nix2container.inputs.flake-utils.follows = "flake-utils";
}; };
llm-agents = { llm-agents = {
url = "github:numtide/llm-agents.nix"; url = "github:numtide/llm-agents.nix";
# Not followed intentionally (binary cache)
# inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
inputs.systems.follows = "systems";
inputs.treefmt-nix.follows = "treefmt";
};
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
}; };
niri.url = "github:sodiboo/niri-flake";
noctalia = { noctalia = {
url = "github:noctalia-dev/noctalia-shell/v4.7.5"; url = "github:noctalia-dev/noctalia-shell/v4.7.5";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.noctalia-qs.inputs.treefmt-nix.follows = ""; inputs.noctalia-qs.inputs.nixpkgs.follows = "nixpkgs";
inputs.noctalia-qs.inputs.systems.follows = "systems";
inputs.noctalia-qs.inputs.treefmt-nix.follows = "treefmt";
};
zen = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
}; };
zen.inputs.nixpkgs.follows = "nixpkgs";
zen.url = "github:0xc000022070/zen-browser-flake";
# keep-sorted end # keep-sorted end
# Misc # Misc
@@ -103,6 +125,20 @@
flake = false; flake = false;
}; };
my-templates.url = "git+https://git.imxyy.top/imxyy1soope1/flake-templates"; my-templates.url = "git+https://git.imxyy.top/imxyy1soope1/flake-templates";
# Flattened indirect dependencies
flake-compat.url = "github:edolstra/flake-compat";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
systems.url = "github:nix-systems/default";
devenv = {
url = "github:cachix/devenv";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
inputs.flake-compat.follows = "flake-compat";
};
}; };
outputs = outputs =
-1
View File
@@ -126,7 +126,6 @@ in
# Upstream modules # Upstream modules
# keep-sorted start # keep-sorted start
inputs.angrr.nixosModules.angrr inputs.angrr.nixosModules.angrr
inputs.catppuccin.nixosModules.catppuccin
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
inputs.impermanence.nixosModules.impermanence inputs.impermanence.nixosModules.impermanence
inputs.niri.nixosModules.niri inputs.niri.nixosModules.niri
-1
View File
@@ -14,7 +14,6 @@
inputs.fenix.overlays.default inputs.fenix.overlays.default
inputs.angrr.overlays.default inputs.angrr.overlays.default
(final: prev: { (final: prev: {
darkly-qt5 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt5;
darkly-qt6 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt6; darkly-qt6 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt6;
noctalia-shell = inputs.noctalia.packages.${final.stdenv.hostPlatform.system}.default; noctalia-shell = inputs.noctalia.packages.${final.stdenv.hostPlatform.system}.default;
-6
View File
@@ -78,12 +78,6 @@
}; };
my = { my = {
autologin = {
enable = true;
user = username;
ttys = [ 6 ];
};
gpg.enable = true; gpg.enable = true;
cli.all.enable = true; cli.all.enable = true;
coding.all.enable = true; coding.all.enable = true;
+1 -1
View File
@@ -67,7 +67,7 @@ in
aria2 aria2
bat bat
comma comma
fastfetch fastfetch.minimal
fd fd
fzf fzf
jq jq
+1
View File
@@ -12,6 +12,7 @@ in
zsh.enable = true; zsh.enable = true;
fish.enable = true; fish.enable = true;
starship.enable = true; starship.enable = true;
carapace.enable = true;
}; };
}; };
} }
+17
View File
@@ -0,0 +1,17 @@
{ config, lib, ... }:
let
cfg = config.my.cli.shell.carapace;
in
{
options.my.cli.shell.carapace = {
enable = lib.mkEnableOption "carapace completer";
};
config = lib.mkIf cfg.enable {
my.hm = {
programs.carapace = {
enable = true;
};
};
};
}
+1 -1
View File
@@ -32,7 +32,7 @@ in
shellAliases = { shellAliases = {
la = "lsd -lah"; la = "lsd -lah";
ls = "lsd"; ls = "lsd";
svim = "doasedit"; svim = "sudoedit";
nf = "fastfetch"; nf = "fastfetch";
}; };
interactiveShellInit = lib.mkBefore '' interactiveShellInit = lib.mkBefore ''
+1 -1
View File
@@ -51,7 +51,7 @@ in
}; };
shellAliases = { shellAliases = {
ls = "lsd"; ls = "lsd";
svim = "doasedit"; svim = "sudoedit";
nf = "fastfetch"; nf = "fastfetch";
}; };
}; };
+3
View File
@@ -15,6 +15,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
my.hm = { my.hm = {
home.packages = with pkgs.llm-agents; [ home.packages = with pkgs.llm-agents; [
codex
claude-code claude-code
opencode opencode
]; ];
@@ -25,6 +26,8 @@ in
".config/opencode" ".config/opencode"
".local/share/opencode" ".local/share/opencode"
".codex"
]; ];
homeFiles = [ homeFiles = [
".claude.json" ".claude.json"
+4 -1
View File
@@ -14,6 +14,8 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# workaround
environment.sessionVariables.EDITOR = "nvim";
my.hm = { my.hm = {
xdg.configFile."nvim".source = impure.mkImpureLink ./nvim; xdg.configFile."nvim".source = impure.mkImpureLink ./nvim;
programs.neovim = { programs.neovim = {
@@ -34,10 +36,11 @@ in
ripgrep # telescope ripgrep # telescope
# language servers
vscode-json-languageserver vscode-json-languageserver
vscode-langservers-extracted vscode-langservers-extracted
taplo
typos-lsp typos-lsp
# render-markdown.nvim # render-markdown.nvim
python3Packages.pylatexenc python3Packages.pylatexenc
]; ];
@@ -1,43 +1,43 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" }, "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" },
"blink.cmp": { "branch": "main", "commit": "456d38d1cd3743926f329204c2340f3e7840aad6" }, "blink.cmp": { "branch": "main", "commit": "3db7326f54b73df4789e0fd6274bedda33975fea" },
"blink.lib": { "branch": "main", "commit": "b127d48bf8e9ac9cf41f6e0fbead317503f76558" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "8d82c240f190fc33723d48c308ccc1ed8baad69d" }, "gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" },
"glance.nvim": { "branch": "master", "commit": "bf86d8b79dce808e65fdb6e9269d0b4ed6d2eefc" }, "glance.nvim": { "branch": "master", "commit": "bf86d8b79dce808e65fdb6e9269d0b4ed6d2eefc" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"inlay-hints.nvim": { "branch": "master", "commit": "11be32be3761c6263df2311afb6baa0de0863967" }, "inlay-hints.nvim": { "branch": "master", "commit": "297a65ab9543eb0850c1a55df4bb89e22cfec504" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"leap.nvim": { "branch": "main", "commit": "b960d5038c5c505c52e56a54490f9bbb1f0e6ef6" }, "leap.nvim": { "branch": "main", "commit": "d3641f9aa86e7460b14d9f4479e7454f88cc6b2d" },
"lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" }, "lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
"lualine.nvim": { "branch": "master", "commit": "f5d2a8570f8b736ddb9bb4be504355bcd6e15ec8" }, "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mini.nvim": { "branch": "main", "commit": "69b7433355664cf76898eb86a12a019f39bd86d1" }, "mini.nvim": { "branch": "main", "commit": "b2ac6522f7a54b475d9fad711b938eefc6d3d0a6" },
"neo-tree.nvim": { "branch": "main", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" }, "neo-tree.nvim": { "branch": "main", "commit": "83e7a2982fd12b9c3d35bc39dd5877cd91a02a61" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "cb5bc0b2b35a6d513e3298d285db81453e791f4f" }, "nvim-lspconfig": { "branch": "master", "commit": "229b79051b380377664edc4cbd534930154921a1" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" }, "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-osc52": { "branch": "main", "commit": "04cfaba1865ae5c53b6f887c3ca7304973824fb2" },
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
"nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" }, "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
"outline.nvim": { "branch": "main", "commit": "c293eb56db880a0539bf9d85b4a27816960b863e" }, "outline.nvim": { "branch": "main", "commit": "2a132953b944561d45b52e4541ebfff71934a742" },
"pest.vim": { "branch": "master", "commit": "60cae7ea1beb644ed40081a3ec213ea9061aba09" }, "pest.vim": { "branch": "master", "commit": "60cae7ea1beb644ed40081a3ec213ea9061aba09" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "aab6caaffd79b8def22ec4320a5344f7c42f58d2" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "a798325b7f36acc62741d1029930a7b96d4dd4bf" },
"registers": { "branch": "main", "commit": "c217f8f369e0886776cda6c94eab839b30a8940d" }, "registers": { "branch": "main", "commit": "c217f8f369e0886776cda6c94eab839b30a8940d" },
"render-markdown.nvim": { "branch": "main", "commit": "54d4b5431e9634ee3d8d30784e017239b5b89d41" }, "render-markdown.nvim": { "branch": "main", "commit": "5adf0895310c1904e5abfaad40a2baad7fe44a07" },
"ripgrep": { "branch": "master", "commit": "4519153e5e461527f4bca45b042fff45c4ec6fb9" }, "ripgrep": { "branch": "master", "commit": "82313cf95849bfe425109ad9506a52154879b1b1" },
"telescope.nvim": { "branch": "master", "commit": "f7c673b8e46e8f233ff581d3624a517d33a7e264" }, "telescope.nvim": { "branch": "master", "commit": "7d324792b7943e4aa16ad007212e6acc6f9fe335" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"vim-floaterm": { "branch": "master", "commit": "0ab5eb8135dc884bc543a819ac7033c15e72a76b" }, "vim-floaterm": { "branch": "master", "commit": "bb4ba7952e906408e1f83b215f55ffe57efcade6" },
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" } "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }
} }
@@ -80,8 +80,9 @@ local servers = {
html = {}, html = {},
java_language_server = {}, java_language_server = {},
jsonls = {}, jsonls = {},
pyright = {}, pyrefly = {},
taplo = {}, -- taplo = {},
tombi = {},
ts_ls = {}, ts_ls = {},
typos_lsp = {}, typos_lsp = {},
-- keep-sorted end -- keep-sorted end
@@ -95,14 +95,12 @@ local plugins = {
}, },
{ {
url = "https://gitlab.com/HiPhish/rainbow-delimiters.nvim", url = "https://gitlab.com/HiPhish/rainbow-delimiters.nvim",
event = "VeryLazy",
config = function() config = function()
require("plugins.rainbow-delimiters") require("plugins.rainbow-delimiters")
end, end,
}, },
{ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
event = "VeryLazy",
dependencies = { "https://gitlab.com/HiPhish/rainbow-delimiters.nvim" }, dependencies = { "https://gitlab.com/HiPhish/rainbow-delimiters.nvim" },
config = function() config = function()
require("ibl").setup(require("plugins.indent-blankline")) require("ibl").setup(require("plugins.indent-blankline"))
@@ -110,13 +108,11 @@ local plugins = {
}, },
{ {
"norcalli/nvim-colorizer.lua", "norcalli/nvim-colorizer.lua",
event = "VeryLazy",
opt = {}, opt = {},
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = { "saghen/blink.cmp" }, dependencies = { "saghen/blink.cmp" },
event = "VeryLazy",
config = function() config = function()
require("plugins.lsp.lspconfig") require("plugins.lsp.lspconfig")
require("plugins.lsp.others") require("plugins.lsp.others")
@@ -178,7 +174,6 @@ local plugins = {
}, },
{ {
"saghen/blink.cmp", "saghen/blink.cmp",
event = "VeryLazy",
dependencies = { dependencies = {
{ {
"L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",
@@ -198,6 +193,7 @@ local plugins = {
}, },
}, },
}, },
"saghen/blink.lib",
}, },
config = function() config = function()
require("blink.cmp").setup(require("plugins.cmp.cmp")) require("blink.cmp").setup(require("plugins.cmp.cmp"))
@@ -205,7 +201,6 @@ local plugins = {
}, },
{ {
"numToStr/Comment.nvim", "numToStr/Comment.nvim",
event = "VeryLazy",
opts = {}, opts = {},
}, },
{ {
@@ -221,7 +216,6 @@ local plugins = {
}, },
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
event = "VeryLazy",
config = function() config = function()
require("gitsigns").setup(require("plugins.gitsigns")) require("gitsigns").setup(require("plugins.gitsigns"))
end, end,
@@ -273,7 +267,6 @@ local plugins = {
}, },
{ {
"alexghergh/nvim-tmux-navigation", "alexghergh/nvim-tmux-navigation",
event = "VeryLazy",
config = function() config = function()
require("nvim-tmux-navigation").setup(require("plugins.tmuxnav")) require("nvim-tmux-navigation").setup(require("plugins.tmuxnav"))
end, end,
@@ -299,7 +292,6 @@ local plugins = {
}, },
{ {
"folke/noice.nvim", "folke/noice.nvim",
event = "VeryLazy",
dependencies = { dependencies = {
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
"rcarriga/nvim-notify", "rcarriga/nvim-notify",
@@ -314,31 +306,14 @@ local plugins = {
}, },
{ {
"voldikss/vim-floaterm", "voldikss/vim-floaterm",
event = "VeryLazy",
config = function() config = function()
require("plugins.floaterm") require("plugins.floaterm")
end, end,
}, },
{ {
"folke/todo-comments.nvim", "folke/todo-comments.nvim",
event = "VeryLazy",
opts = {}, opts = {},
}, },
{
"ojroques/nvim-osc52",
event = "VeryLazy",
config = function()
require("osc52").setup({
tmux_passthrough = true,
})
local function copy()
if vim.v.event.operator == "y" and vim.v.event.regname == "+" then
require("osc52").copy_register("+")
end
end
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
end,
},
{ {
"pest-parser/pest.vim", "pest-parser/pest.vim",
ft = "pest", ft = "pest",
@@ -351,7 +326,7 @@ local plugins = {
}, },
{ {
"tversteeg/registers.nvim", "https://codeberg.org/fosk/registers.nvim",
cmd = "Registers", cmd = "Registers",
config = true, config = true,
keys = { keys = {
+1 -4
View File
@@ -14,10 +14,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
my.hm = { my.hm = {
programs.vscode = { programs.vscodium.enable = true;
enable = true;
package = pkgs.vscodium-wayland or pkgs.vscodium;
};
}; };
my.persist.homeDirs = [ my.persist.homeDirs = [
".config/VSCodium" ".config/VSCodium"
+1
View File
@@ -18,6 +18,7 @@ in
java.enable = true; java.enable = true;
qml.enable = true; qml.enable = true;
typst.enable = true; typst.enable = true;
toml.enable = true;
}; };
}; };
} }
+1 -1
View File
@@ -16,7 +16,7 @@ in
my.hm.home.packages = with pkgs; [ my.hm.home.packages = with pkgs; [
python3 python3
uv uv
pyright pyrefly
]; ];
}; };
} }
+20
View File
@@ -0,0 +1,20 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.my.coding.langs.toml;
in
{
options.my.coding.langs.toml = {
enable = lib.mkEnableOption "TOML";
};
config = lib.mkIf cfg.enable {
my.hm.home.packages = with pkgs; [
tombi
];
};
}
+1
View File
@@ -21,6 +21,7 @@ in
]; ];
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true;
config = { config = {
global = { global = {
warn_timeout = 0; warn_timeout = 0;
+1
View File
@@ -0,0 +1 @@
/target
+2105
View File
File diff suppressed because it is too large Load Diff
+13
View File
@@ -0,0 +1,13 @@
[package]
name = "nix-racer"
version = "0.1.0"
edition = "2024"
[dependencies]
axum = "0.8"
reqwest = { version = "0.13", features = ["rustls"] }
serde = { version = "1.0.228", features = ["derive"] }
tokio = { version = "1.52", features = ["full"] }
toml = "1.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
+29
View File
@@ -0,0 +1,29 @@
{
lib,
rustPlatform,
}:
rustPlatform.buildRustPackage {
pname = "nix-racer";
version = "0.1.0";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./Cargo.toml
./Cargo.lock
./src
];
};
cargoLock = {
lockFile = ./Cargo.lock;
};
meta = {
description = "Nix substituter proxy with parallel cache queries and latency-aware selection";
mainProgram = "nix-racer";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
}
+64
View File
@@ -0,0 +1,64 @@
use reqwest::Url;
use serde::{Deserialize, Deserializer, de::Error};
use std::net::{SocketAddr, SocketAddrV4};
#[derive(Debug, Clone, Deserialize)]
pub struct AppConfig {
#[serde(default = "default_listen")]
pub listen: SocketAddr,
pub substituters: Vec<Substituter>,
}
impl Default for AppConfig {
fn default() -> Self {
Self {
listen: default_listen(),
substituters: vec![
Substituter {
url: "https://mirror.sjtu.edu.cn/nix-channels/store",
penalty: 0,
},
Substituter {
url: "https://mirrors.ustc.edu.cn/nix-channels/store",
penalty: 0,
},
Substituter {
url: "https://cache.nixos.org",
penalty: 100,
},
],
}
}
}
fn default_listen() -> SocketAddr {
SocketAddr::V4(SocketAddrV4::new([127, 0, 0, 1].into(), 2048))
}
#[derive(Debug, Clone)]
pub struct Substituter {
pub url: &'static str,
pub penalty: u32,
}
impl<'de> Deserialize<'de> for Substituter {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: Deserializer<'de>,
{
#[derive(Debug, Clone, Deserialize)]
struct ShadowSubstituter {
url: String,
#[serde(default)]
penalty: u32,
}
let sub = <ShadowSubstituter as Deserialize>::deserialize(deserializer);
sub.and_then(|ShadowSubstituter { url, penalty }| {
let url = match Url::parse(&url) {
Ok(url) => Ok(Box::leak(url.to_string().into_boxed_str())),
Err(err) => Err(<D::Error as Error>::custom(err.to_string())),
}?;
Ok(Substituter { url, penalty })
})
}
}
+212
View File
@@ -0,0 +1,212 @@
use std::{
collections::HashMap,
sync::Arc,
time::{Duration, Instant},
};
use axum::{
Router,
extract::{Path, State},
http::{StatusCode, header},
response::{IntoResponse, Redirect},
routing::get,
};
use reqwest::Client;
use tokio::task::JoinSet;
use tracing_subscriber::{EnvFilter, layer::SubscriberExt as _, util::SubscriberInitExt as _};
mod config;
use config::*;
#[derive(Clone)]
struct AppState {
client: Client,
config: Arc<AppConfig>,
}
#[tokio::main]
async fn main() {
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer())
.with(
EnvFilter::builder()
.with_env_var("NIX_RACER_LOG")
.with_default_directive("nix_racer=debug".parse().unwrap())
.from_env()
.unwrap(),
)
.init();
let config: Arc<AppConfig> = match std::fs::read_to_string("/etc/nix/nix-racer.toml") {
Ok(file) => toml::from_str::<AppConfig>(&file).unwrap_or_else(|x| {
tracing::warn!("Failed to parse config file ({x}), fallback to default configuration");
AppConfig::default()
}),
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {
tracing::info!("Config file not found, fallback to default configuration");
AppConfig::default()
}
Err(err) => {
tracing::warn!("Failed to read config file ({err}), fallback to default configuration");
AppConfig::default()
}
}
.into();
if config.substituters.is_empty() {
tracing::error!("No substituters found");
std::process::exit(1);
}
let listen = config.listen;
let client = Client::builder()
.timeout(Duration::from_secs(5))
.pool_idle_timeout(Duration::from_secs(90))
.build()
.unwrap();
let state = AppState { client, config };
let listener = tokio::net::TcpListener::bind(listen).await.unwrap();
let app = Router::new()
.route("/nix-cache-info", get(nix_cache_info_handler))
.route("/{*path}", get(proxy_handler))
.with_state(state);
tracing::info!("Smart Nix Proxy listening on http://{listen}");
axum::serve(listener, app).await.unwrap();
}
async fn nix_cache_info_handler() -> impl IntoResponse {
let info = "StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 30\n";
([(header::CONTENT_TYPE, "text/x-nix-cache-info")], info)
}
async fn proxy_handler(
Path(path): Path<String>,
State(state): State<AppState>,
) -> impl IntoResponse {
if !path.ends_with(".narinfo") {
let redirect_url = format!("{}/{}", state.config.substituters[0].url, path);
return Redirect::temporary(&redirect_url).into_response();
}
let start_time = Instant::now();
let mut set = JoinSet::new();
let mut penalties = HashMap::new();
for upstream in state.config.substituters.iter() {
let url = format!("{}/{}", upstream.url, path);
let client = state.client.clone();
let base_url = upstream.url;
let handle = set.spawn(async move {
let max_retries = 2;
let mut delay = Duration::from_millis(50);
for attempt in 0..=max_retries {
match client.get(&url).send().await {
Ok(resp) if resp.status().is_success() => {
let bytes = resp.bytes().await.map_err(|_| "Body error")?;
let text = String::from_utf8_lossy(&bytes);
let mut new_text = String::with_capacity(text.len() + 64);
for line in text.lines() {
if let Some(rel_url) = line.strip_prefix("URL: ") {
if rel_url.starts_with("http://") || rel_url.starts_with("https://")
{
new_text.push_str(line);
} else {
new_text.push_str(&format!("URL: {}/{}", base_url, rel_url));
}
} else {
new_text.push_str(line);
}
new_text.push('\n');
}
return Ok((new_text.into_bytes(), base_url));
}
Ok(resp) if resp.status() == StatusCode::NOT_FOUND => return Err("404"),
Err(_) => {
if attempt == max_retries {
return Err("Max retries");
}
tokio::time::sleep(delay).await;
delay *= 2;
}
_ => return Err("Other HTTP Error"),
}
}
Err("Unreachable")
});
penalties.insert(handle.id(), upstream.penalty);
}
struct ProxyResult {
score: Duration,
body: Vec<u8>,
url: &'static str,
}
let mut best_result: Option<ProxyResult> = None;
loop {
let min_active_penalty = penalties.values().min().copied();
if let Some(ProxyResult { score, .. }) = best_result {
if let Some(min_p) = min_active_penalty {
if start_time.elapsed() + Duration::from_millis(u64::from(min_p)) >= score {
break;
}
} else {
break;
}
} else if min_active_penalty.is_none() {
break;
}
let timeout_dur = if let Some(ProxyResult { score, .. }) = best_result {
score.saturating_sub(start_time.elapsed())
} else {
Duration::from_secs(86400)
};
if timeout_dur.is_zero() && best_result.is_some() {
break;
}
let res = tokio::time::timeout(timeout_dur, set.join_next_with_id()).await;
match res {
Ok(Some(Ok((task_id, task_res)))) => {
let penalty = penalties.remove(&task_id).unwrap();
if let Ok((body, url)) = task_res {
let score = start_time.elapsed() + Duration::from_millis(u64::from(penalty));
if best_result.as_ref().is_none_or(|best| score < best.score) {
best_result = Some(ProxyResult { score, body, url })
}
}
}
Ok(Some(Err(join_err))) => {
penalties.remove(&join_err.id());
}
Ok(None) => break,
Err(_) => break,
}
}
if let Some(ProxyResult { score, body, url }) = best_result {
tracing::debug!("Winner for {}: {} (Score: {:?})", path, url, score,);
(
StatusCode::OK,
[(header::CONTENT_TYPE, "text/x-nix-narinfo")],
body,
)
.into_response()
} else {
(StatusCode::NOT_FOUND, "Not Found").into_response()
}
}
+90 -10
View File
@@ -32,23 +32,103 @@ in
nh nh
]; ];
environment.etc = lib.mapAttrs' (name: value: { environment.etc =
name = "nix/path/${name}"; (lib.mapAttrs' (name: value: {
value.source = value.flake; name = "nix/path/${name}";
}) config.nix.registry; value.source = value.flake;
}) config.nix.registry)
// {
"nix/nix-racer.toml".source = (pkgs.formats.toml { }).generate "nix-racer.toml" {
listen = "127.0.0.1:2048";
substituters = [
# {
# penalty = 0;
# url = "https://mirror.sjtu.edu.cn/nix-channels/store";
# }
{
penalty = 0;
url = "https://mirrors.sjtug.sjtu.edu.cn/nix-channels/store";
}
{
penalty = 50;
url = "https://mirrors.ustc.edu.cn/nix-channels/store";
}
{
penalty = 0;
url = "https://nix-community.cachix.org";
}
{
penalty = 0;
url = "https://cache.numtide.com";
}
{
penalty = 100;
url = "https://cache.nixos.org";
}
];
};
};
systemd.services.nix-racer = {
description = "Nix substituter proxy with parallel cache queries and latency-aware selection";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${lib.getExe (pkgs.callPackage ./nix-racer/_package.nix { })}";
Restart = "on-failure";
RestartSec = 5;
DynamicUser = true;
CapabilityBoundingSet = [ "" ];
DeviceAllow = "";
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateTmp = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectSystem = "strict";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"~@resources"
"~@privileged"
];
UMask = "0077";
};
};
nix.settings = { nix.settings = {
experimental-features = "nix-command flakes pipe-operators"; experimental-features = "nix-command flakes pipe-operators";
substituters = [ substituters = lib.mkForce [
"https://mirrors.ustc.edu.cn/nix-channels/store" "http://127.0.0.1:2048"
"https://mirrors.sjtug.sjtu.edu.cn/nix-channels/store" "https://mirrors.sjtug.sjtu.edu.cn/nix-channels/store"
"https://mirror.sjtu.edu.cn/nix-channels/store" "https://cache.numtide.com"
"https://nix-community.cachix.org" "https://cache.nixos.org"
"https://cache.garnix.io"
# "https://mirrors.ustc.edu.cn/nix-channels/store"
# "https://mirrors.sjtug.sjtu.edu.cn/nix-channels/store"
# "https://nix-community.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" "niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
]; ];
download-buffer-size = 536870912; # 512 MiB download-buffer-size = 536870912; # 512 MiB
warn-dirty = false; warn-dirty = false;
+7 -55
View File
@@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
hostname,
username, username,
userdesc, userdesc,
secrets, secrets,
@@ -38,67 +39,18 @@ in
}; };
users.users.root.hashedPasswordFile = lib.mkDefault config.sops.secrets.imxyy-nix-hashed-password.path; users.users.root.hashedPasswordFile = lib.mkDefault config.sops.secrets.imxyy-nix-hashed-password.path;
security.sudo.enable = false; security.sudo = {
security.doas = {
enable = true; enable = true;
extraRules = [ extraRules = [
{ {
users = [ username ]; users = [ "imxyy" ];
noPass = true; commands = lib.singleton {
keepEnv = true; command = "ALL";
options = lib.optionals (hostname == "imxyy-nix") [ "NOPASSWD" ];
};
} }
]; ];
}; };
environment.shellAliases = {
sudoedit = "doasedit";
};
environment.systemPackages = [
(pkgs.writeShellScriptBin "sudo" ''exec doas "$@"'')
(pkgs.writeShellScriptBin "doasedit" ''
if [ -n "''${2}" ]; then
printf 'Expected only one argument\n'
exit 1
elif [ -z "''${1}" ]; then
printf 'No file path provided\n'
exit 1
elif [ "$(id -u)" -eq 0 ]; then
printf 'Cannot be run as root\n'
exit 1
fi
set -eu
tempdir="$(mktemp -d)"
trap 'rm -rf $tempdir' EXIT
srcfile="$(doas realpath "$1")"
if doas [ -f "$srcfile" ]; then
doas cp -a "$srcfile" "$tempdir"/file
doas cp -a "$tempdir"/file "$tempdir"/edit
# make sure that the file is editable by user
doas chown "$USER":"$USER" "$tempdir"/edit
chmod 600 "$tempdir"/edit
else
# create file with "regular" system permissions (root:root 644)
touch "$tempdir"/file
doas chown root:root "$tempdir"/file
fi
$EDITOR "$tempdir"/edit
doas tee "$tempdir"/file 1>/dev/null < "$tempdir"/edit
if doas cmp -s "$tempdir/file" "$srcfile"; then
printf 'Skipping write; no changes.\n'
exit 0
else
doas mv -f "$tempdir"/file "$srcfile"
exit 0
fi
'')
];
nix.settings.trusted-users = [ nix.settings.trusted-users = [
"root" "root"
+1 -2
View File
@@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
hostname,
... ...
}: }:
let let
@@ -16,7 +15,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
my.hm.programs.zen-browser = { my.hm.programs.zen-browser = {
enable = true; enable = true;
nativeMessagingHosts = [ pkgs.firefoxpwa ]; nativeMessagingHosts = [ pkgs.master.firefoxpwa ];
policies = { policies = {
# find more options here: https://mozilla.github.io/policy-templates/ # find more options here: https://mozilla.github.io/policy-templates/
DisableAppUpdate = true; DisableAppUpdate = true;
+17 -1
View File
@@ -13,7 +13,23 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.splayer ]; nixpkgs.config.permittedInsecurePackages = (
lib.warn
''
SPlayer still using pnpm 10.29.2. Check
https://github.com/NixOS/nixpkgs/issues/535580#issuecomment-4809489104
''
[
"pnpm-10.29.2"
]
);
my.hm.home.packages = [
# (pkgs.master.splayer.override {
# pnpm_10_29_2 = pkgs.pnpm_10;
# })
pkgs.splayer
];
my.persist.homeDirs = [ my.persist.homeDirs = [
".config/SPlayer" ".config/SPlayer"
]; ];
+13 -24
View File
@@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
impure,
... ...
}: }:
let let
@@ -13,19 +14,6 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
catppuccin.sddm = {
enable = true;
font = "Jetbrains Mono";
fontSize = "18";
};
services.displayManager.sddm = {
package = pkgs.kdePackages.sddm;
settings.Theme = {
CursorTheme = "breeze-dark";
CursorSize = 24;
};
};
my.hm = { my.hm = {
stylix = { stylix = {
enable = true; enable = true;
@@ -81,20 +69,21 @@ in
#QT #QT
qt = { qt = {
enable = true; enable = true;
style.package = with pkgs; [ platformTheme.name = "kde";
darkly-qt5 style = {
darkly-qt6 package = with pkgs; [
]; darkly-qt6
platformTheme.name = "qtct"; ];
name = "Darkly";
};
}; };
xdg.configFile = { xdg.configFile = {
"qt5ct/qt5ct.conf".source = pkgs.replaceVars ./qtct/qt5ct.conf { kdeglobals.source = impure.mkImpureLink ./kdeglobals;
darker = pkgs.libsForQt5.qt5ct + /share/qt5ct/colors/darker.conf; plasmarc.text = ''
}; [Theme]
"qt6ct/qt6ct.conf".source = pkgs.replaceVars ./qtct/qt6ct.conf { name=darkly
darker = pkgs.qt6Packages.qt6ct + /share/qt6ct/colors/darker.conf; '';
};
}; };
}; };
}; };
+140
View File
@@ -0,0 +1,140 @@
[ColorEffects:Disabled]
ChangeSelectionColor=
Color=36,36,36
ColorAmount=0.5
ColorEffect=3
ContrastAmount=0.5
ContrastEffect=0
Enable=
IntensityAmount=0
IntensityEffect=0
[ColorEffects:Inactive]
ChangeSelectionColor=true
Color=51,51,51
ColorAmount=0.4
ColorEffect=3
ContrastAmount=0.4
ContrastEffect=0
Enable=true
IntensityAmount=-0.2
IntensityEffect=0
[Colors:Button]
BackgroundAlternate=77,77,77
BackgroundNormal=50,50,50
DecorationFocus=52,120,218
DecorationHover=0,161,236
ForegroundActive=61,174,233
ForegroundInactive=199,199,199
ForegroundLink=0,100,255
ForegroundNegative=218,68,83
ForegroundNeutral=246,116,0
ForegroundNormal=241,241,241
ForegroundPositive=36,173,89
ForegroundVisited=115,115,158
[Colors:Complementary]
BackgroundAlternate=59,64,69
BackgroundNormal=49,54,59
DecorationFocus=30,146,255
DecorationHover=61,174,230
ForegroundActive=246,116,0
ForegroundInactive=175,176,179
ForegroundLink=61,174,230
ForegroundNegative=237,21,21
ForegroundNeutral=201,206,59
ForegroundNormal=239,240,241
ForegroundPositive=17,209,22
ForegroundVisited=61,174,230
[Colors:Selection]
BackgroundAlternate=29,153,243
BackgroundNormal=27,145,213
DecorationFocus=52,120,218
DecorationHover=0,161,236
ForegroundActive=252,252,252
ForegroundInactive=241,241,241
ForegroundLink=0,100,255
ForegroundNegative=218,68,83
ForegroundNeutral=246,116,0
ForegroundNormal=241,241,241
ForegroundPositive=36,173,89
ForegroundVisited=115,115,158
[Colors:Tooltip]
BackgroundAlternate=77,77,77
BackgroundNormal=59,59,59
DecorationFocus=52,120,218
DecorationHover=0,161,236
ForegroundActive=61,174,233
ForegroundInactive=199,199,199
ForegroundLink=0,100,255
ForegroundNegative=218,68,83
ForegroundNeutral=246,116,0
ForegroundNormal=239,240,241
ForegroundPositive=36,173,89
ForegroundVisited=115,115,158
[Colors:View]
BackgroundAlternate=54,54,54
BackgroundNormal=44,44,44
DecorationFocus=52,120,218
DecorationHover=0,161,236
ForegroundActive=61,174,233
ForegroundInactive=199,199,199
ForegroundLink=0,100,255
ForegroundNegative=218,68,83
ForegroundNeutral=246,116,0
ForegroundNormal=241,241,241
ForegroundPositive=36,173,89
ForegroundVisited=115,115,158
[Colors:Window]
BackgroundAlternate=77,77,77
BackgroundNormal=34,34,34
DecorationFocus=52,120,218
DecorationHover=0,161,236
ForegroundActive=61,174,233
ForegroundInactive=199,199,199
ForegroundLink=0,100,255
ForegroundNegative=218,68,83
ForegroundNeutral=246,116,0
ForegroundNormal=239,240,241
ForegroundPositive=36,173,89
ForegroundVisited=115,115,158
[General]
ColorScheme=Darkly
[Icons]
Theme=Papirus-Dark
[KDE]
contrast=0
frameContrast=0.2
[KFileDialog Settings]
Allow Expansion=false
Automatically select filename extension=true
Breadcrumb Navigation=true
Decoration position=2
Show Full Path=false
Show Inline Previews=true
Show Preview=false
Show Speedbar=true
Show hidden files=false
Sort by=Name
Sort directories first=true
Sort hidden files last=false
Sort reversed=false
Speedbar Width=154
View Style=DetailTree
[WM]
activeBackground=34,34,34
activeBlend=255,255,255
activeForeground=204,204,204
inactiveBackground=44,44,44
inactiveBlend=44,44,44
inactiveForeground=144,144,144
+1 -5
View File
@@ -119,12 +119,8 @@ in
"cliphist" "cliphist"
"store" "store"
] ]
# TODO: Is there a better way?
[ [
"systemctl" "noctalia-shell"
"restart"
"--user"
"noctalia-shell.service"
] ]
] ]
); );
+7 -3
View File
@@ -15,14 +15,19 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
niri-flake.cache.enable = false;
programs.niri = { programs.niri = {
enable = true; enable = true;
package = pkg; package = pkg;
}; };
services.displayManager = { services.displayManager = {
sddm = { ly = {
enable = true; enable = true;
wayland.enable = true; settings = {
animation = "matrix";
session_log = ".local/state/ly-session.log";
shell = false;
};
}; };
}; };
@@ -77,7 +82,6 @@ in
programs.noctalia-shell = { programs.noctalia-shell = {
enable = true; enable = true;
systemd.enable = true;
# modified from official Tokyo-Night theme # modified from official Tokyo-Night theme
colors = { colors = {
mError = "#f7768e"; mError = "#f7768e";
-77
View File
@@ -1,77 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.my.autologin;
gettycfg = config.services.getty;
baseArgs = [
"--login-program"
"${gettycfg.loginProgram}"
]
++ optionals (gettycfg.loginOptions != null) [
"--login-options"
gettycfg.loginOptions
]
++ gettycfg.extraArgs;
gettyCmd = args: "@${pkgs.util-linux}/sbin/agetty agetty ${escapeShellArgs baseArgs} ${args}";
forAllAutologinTTYs =
config:
attrsets.mergeAttrsList (map (ttynum: { "getty@tty${toString ttynum}" = config; }) cfg.ttys);
autologinModule = types.submodule {
options = {
enable = mkEnableOption "autologin";
user = mkOption {
type = types.str;
default = "";
example = "foo";
description = mdDoc ''
Username of the account that will be automatically logged in at the console.
'';
};
ttys = mkOption {
type = types.listOf types.int;
default = [ 6 ];
description = mdDoc ''
TTY numbers for autologin.user to login to.
'';
};
};
};
in
{
###### interface
options = {
my.autologin = mkOption {
type = autologinModule;
default = { };
};
};
###### implementation
config = mkIf cfg.enable {
systemd.services = forAllAutologinTTYs {
overrideStrategy = "asDropin"; # needed for templates to work
serviceConfig.ExecStart = [
""
(gettyCmd "--noclear --keep-baud %I 115200,38400,9600 -a ${cfg.user} $TERM")
];
};
};
}
-4
View File
@@ -20,10 +20,6 @@ in
bottles.__input.removeWarningPopup.__assign = true; bottles.__input.removeWarningPopup.__assign = true;
easytier.__assign = final.stable.easytier; easytier.__assign = final.stable.easytier;
openldap.__output.doCheck.__assign =
builtins.warn "doCheck disabled for openldap, check https://github.com/NixOS/nixpkgs/issues/514113"
(!prev.stdenv.hostPlatform.isi686);
}; };
} }
// //
+3
View File
@@ -10,6 +10,9 @@
grub.enable = false; grub.enable = false;
timeout = 0; timeout = 0;
}; };
boot.kernel.sysctl = {
"kernel.printk" = "3 4 1 3";
};
security.pam.loginLimits = [ security.pam.loginLimits = [
{ {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+18 -9
View File
@@ -9,6 +9,14 @@ external-controller-cors:
allow-origins: allow-origins:
- ENC[AES256_GCM,data:Ow==,iv:C2R4gooPGj4lranMXP6Uu+nCbGhVk1S37dBKbYgdsRU=,tag:onXhjT4c/qMoayForPKwEQ==,type:str] - ENC[AES256_GCM,data:Ow==,iv:C2R4gooPGj4lranMXP6Uu+nCbGhVk1S37dBKbYgdsRU=,tag:onXhjT4c/qMoayForPKwEQ==,type:str]
allow-private-network: ENC[AES256_GCM,data:mxDrog==,iv:L4hT2zLieK7nQnp5GvdHTsnSkeTz61v77nr281lAcag=,tag:jCQgs+0aDrl7BSZYxI7qUw==,type:bool] allow-private-network: ENC[AES256_GCM,data:mxDrog==,iv:L4hT2zLieK7nQnp5GvdHTsnSkeTz61v77nr281lAcag=,tag:jCQgs+0aDrl7BSZYxI7qUw==,type:bool]
dns:
enable: ENC[AES256_GCM,data:Rp3LZg==,iv:NHk64bGDFmimNmXDk9n9ZqLFVbO8cyWVqivRSDxUowk=,tag:Y5IhMI7n2JtcXfFnEY77PQ==,type:bool]
default-nameserver:
- ENC[AES256_GCM,data:eEwdzhx+ysGj,iv:FZ6vsFPP5dnfcImydU46J8vA9GYbejP3zEXHA6D+6J0=,tag:lmG+OzJwFtBKHraF4PsCjQ==,type:str]
proxy-server-nameserver:
- ENC[AES256_GCM,data:n3PMmscYUm2eXFe3/uNsKPF0rwyQBtGTsA==,iv:FMOP4qohNNqfLIo7U6mk5qxBm0eXVFCbI0KD7kfw1/Y=,tag:N6H/gESlK1Cr5J2T3Mxldg==,type:str]
- ENC[AES256_GCM,data:G5eodgYoIwtWDMnuEg2srdwCJqQi+OAsyPtp4OvT,iv:5maumIhsmc/QE1ey4rufm6Y8G4OqG3qyY0Ybv/24LoI=,tag:heYvV2IVsIMRBEwQwlJlWg==,type:str]
- ENC[AES256_GCM,data:3CbO5pelMlvJxgoawFkEmARs8Xwgw87eKg==,iv:A21aiwBT98NT0VQ2vaepx/F8AG8rWawNWdch+yVDYCM=,tag:OkTMbH5QnXbxf8NQyer8pA==,type:str]
proxies: proxies:
- type: ENC[AES256_GCM,data:82CKWRU=,iv:MmoXN4hqcC2BE93Tfex3swEj50XK6jmjLIWAyRs8WRI=,tag:faiVNIHjq0fRMLiiJoWamg==,type:str] - type: ENC[AES256_GCM,data:82CKWRU=,iv:MmoXN4hqcC2BE93Tfex3swEj50XK6jmjLIWAyRs8WRI=,tag:faiVNIHjq0fRMLiiJoWamg==,type:str]
name: ENC[AES256_GCM,data:mLelhl+5dSLY5TIjoTw=,iv:cJtCH/fMib1KapWVQGsRgy5yRCUC5EZq4RdahEb7NyQ=,tag:ree+OgPt6ixLigZVo06dwQ==,type:str] name: ENC[AES256_GCM,data:mLelhl+5dSLY5TIjoTw=,iv:cJtCH/fMib1KapWVQGsRgy5yRCUC5EZq4RdahEb7NyQ=,tag:ree+OgPt6ixLigZVo06dwQ==,type:str]
@@ -32,6 +40,7 @@ proxy-providers:
url: ENC[AES256_GCM,data:aTVsXCfaCkdZes1CW8SJVQFiTZ/KbYky6ei0FKSmeCF8/TbaLIKKR46FX2yQ8682fdcLGcAB8ekblQ==,iv:7OQ69sjVWNyOrPVlA8DWTAbw/LIVzFFm5dK4FBcwvyk=,tag:gLVzTM5PypNLpaIOiPYc/Q==,type:str] url: ENC[AES256_GCM,data:aTVsXCfaCkdZes1CW8SJVQFiTZ/KbYky6ei0FKSmeCF8/TbaLIKKR46FX2yQ8682fdcLGcAB8ekblQ==,iv:7OQ69sjVWNyOrPVlA8DWTAbw/LIVzFFm5dK4FBcwvyk=,tag:gLVzTM5PypNLpaIOiPYc/Q==,type:str]
proxy: ENC[AES256_GCM,data:BIEXrZQ=,iv:ZzEEJmLgbOhBTcZEgPfsL0AC72GpydlFTKhJ4+fgTec=,tag:v8URxwAU5wSHD5GPr/sTfw==,type:str] proxy: ENC[AES256_GCM,data:BIEXrZQ=,iv:ZzEEJmLgbOhBTcZEgPfsL0AC72GpydlFTKhJ4+fgTec=,tag:v8URxwAU5wSHD5GPr/sTfw==,type:str]
exclude-filter: ENC[AES256_GCM,data:Uc9L0zm7TWGAgIQq6thwK4evIuYoEJyRJ2M=,iv:CbJp7BcobOfkxyY7/fvaECif57yhPZ1/IuPjLwYUwUQ=,tag:xtGissYFtBX3OVinstWRug==,type:str] exclude-filter: ENC[AES256_GCM,data:Uc9L0zm7TWGAgIQq6thwK4evIuYoEJyRJ2M=,iv:CbJp7BcobOfkxyY7/fvaECif57yhPZ1/IuPjLwYUwUQ=,tag:xtGissYFtBX3OVinstWRug==,type:str]
interval: ENC[AES256_GCM,data:fNfSoA==,iv:wYzKqRsdez6gUGQJOgRnqjOzKtNidMKHYNBBrYtPWfk=,tag:woWqs7uC2nSEkvnROTVFRA==,type:int]
proxy-groups: proxy-groups:
- name: ENC[AES256_GCM,data:O6LAzFQ=,iv:a+dfdy14adLlYbJQ5wAQLsD5hxuEXKW8Y/erhBVAREE=,tag:79++dpg2E2Mtc8y63nRcHw==,type:str] - name: ENC[AES256_GCM,data:O6LAzFQ=,iv:a+dfdy14adLlYbJQ5wAQLsD5hxuEXKW8Y/erhBVAREE=,tag:79++dpg2E2Mtc8y63nRcHw==,type:str]
type: ENC[AES256_GCM,data:JR3d3D1p,iv:n0u8vayA0PVDM7yvh2pk36S8EeqMnZRN8TZlwNnEC3U=,tag:ZmxXOralviL2xyd8+hN3ZA==,type:str] type: ENC[AES256_GCM,data:JR3d3D1p,iv:n0u8vayA0PVDM7yvh2pk36S8EeqMnZRN8TZlwNnEC3U=,tag:ZmxXOralviL2xyd8+hN3ZA==,type:str]
@@ -43,8 +52,7 @@ rules:
- ENC[AES256_GCM,data:S6yGMmG4UUUWE04=,iv:FWz0kNu0hhQ+PyIMSxl6NPX/INluS7jAO9loX+E+jlE=,tag:tXK35hMiYDU8X0yl+0PRuQ==,type:str] - ENC[AES256_GCM,data:S6yGMmG4UUUWE04=,iv:FWz0kNu0hhQ+PyIMSxl6NPX/INluS7jAO9loX+E+jlE=,tag:tXK35hMiYDU8X0yl+0PRuQ==,type:str]
sops: sops:
age: age:
- recipient: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO - enc: |
enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IDltTWRrUSA2Zkxs YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IDltTWRrUSA2Zkxs
SGh4Ulp1UklKeDU4M2xtcWZPRGxNUGt4eGVQQ29LcjB2YXJGRVVnClZLSmRra0Qx SGh4Ulp1UklKeDU4M2xtcWZPRGxNUGt4eGVQQ29LcjB2YXJGRVVnClZLSmRra0Qx
@@ -53,8 +61,8 @@ sops:
sF/MYEjihktzyngzTLyuwHYYb1xqTbpmjFNzJfbW7+LJJSPQ9cu6W7DcZGIsSe0e sF/MYEjihktzyngzTLyuwHYYb1xqTbpmjFNzJfbW7+LJJSPQ9cu6W7DcZGIsSe0e
VNycmg== VNycmg==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB28jpN+h5euh3NtdN+A+EtqgIatC22e4i1TPTioKire recipient: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO
enc: | - enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IHJNY1d1ZyBXVDk0 YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IHJNY1d1ZyBXVDk0
bjZhMnRabGVLSHorWmRhd0NjTVF2VTZQVzZSeEkzK3c5WDBoM0FVCjB3cTB6NTYy bjZhMnRabGVLSHorWmRhd0NjTVF2VTZQVzZSeEkzK3c5WDBoM0FVCjB3cTB6NTYy
@@ -63,8 +71,8 @@ sops:
dQxXWnexmkLryDtddH1sdCdQh8e9D1IJFjuOD8JzsyWToWFuo01Cw27VLWGAGnFD dQxXWnexmkLryDtddH1sdCdQh8e9D1IJFjuOD8JzsyWToWFuo01Cw27VLWGAGnFD
GZpp+A== GZpp+A==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMb5G/ieEYBOng66YeyttBQLThyM6W//z2POsNyq4Rw/ recipient: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB28jpN+h5euh3NtdN+A+EtqgIatC22e4i1TPTioKire
enc: | - enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFhGYmtrZyBzVFdr YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFhGYmtrZyBzVFdr
TTNiK1VIRUk4N2l6TDcyMmw5U3ZRMzR2QlMrcy9XL1RLOCtzNUdnCnkvRmdmZ2gz TTNiK1VIRUk4N2l6TDcyMmw5U3ZRMzR2QlMrcy9XL1RLOCtzNUdnCnkvRmdmZ2gz
@@ -73,7 +81,8 @@ sops:
FY9SvbPWXVTcJiLwjpcD8tSMdqcTHTJXcLAWSCjyFF91ihBUanQ7TcdXvZTGfdY0 FY9SvbPWXVTcJiLwjpcD8tSMdqcTHTJXcLAWSCjyFF91ihBUanQ7TcdXvZTGfdY0
pOoJmg== pOoJmg==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2026-02-11T03:50:06Z" recipient: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMb5G/ieEYBOng66YeyttBQLThyM6W//z2POsNyq4Rw/
mac: ENC[AES256_GCM,data:SqQbTjyvC7ev2egnq9swpQcLjVW1yZ0Yiv6DzNTupUVkl8yP4L6pGJ9P0EiuX/JFPFhAv+x61uudGNUUEu2pPdgHO80glBriATM54o7KILVkrm5TYQVZbD9YsAQsmPw3etVeaMk1a6dgIExW8+DG+KLq/qI/fJk1K0mWv9RR940=,iv:fwqW6E9vVFcLVm4mdI/zZlNeq55yz2AyKKvvx9D1nFA=,tag:qoyhpooNb/taN64s926nRw==,type:str] lastmodified: "2026-06-13T04:02:11Z"
mac: ENC[AES256_GCM,data:VWXa9HdGyPBkLQH5lgqioYbd3VxvL7PjuwiHrX353W+G4Lu/VaMHAz9AFN495cLyCm1dB4VwC773JmLNYKbCzHswQr4tpkp7AlIhvCbt+S0L5ZXLxOlVMd0vONGxQOQHhxQnRONXg9K2i7rTfTjGBdY1o/alswfsNrhaL7g/+OY=,iv:Z3MNOcTU9AQ8yEQgYxXKmv+09cXbF1RalrNXqJYTGUs=,tag:K1kps0EPAKYbQradY02yOQ==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.11.0 version: 3.13.1
+2
View File
@@ -1,3 +1,5 @@
#:schema https://raw.githubusercontent.com/crate-ci/typos/refs/heads/master/config.schema.json
[files] [files]
extend-exclude = [ extend-exclude = [
"secrets" "secrets"