nixos

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5a9dc23da5cb6de85db184eb22e3c9e16d1df559
parent 688bb21017589468096b0ad35171f01880ba29a7
Author: Toni Brown <me@tb148.net>
Date:   Wed, 14 Jan 2026 18:32:42 +0800

Enable Lix and simplify flake inputs

Diffstat:
Mconfiguration.nix | 2+-
Mflake.lock | 55++++++++-----------------------------------------------
Mflake.nix | 13+++----------
Mzed-editor.nix | 182++++++++++++++++++++++++++++++++++++++-----------------------------------------
4 files changed, 100 insertions(+), 152 deletions(-)

diff --git a/configuration.nix b/configuration.nix @@ -99,7 +99,7 @@ # serviceMode = true; # }; - # nix.package = pkgs.lixPackageSets.latest.lix; + nix.package = pkgs.lixPackageSets.latest.lix; nix.settings.substituters = ["https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"]; nix.extraOptions = lib.concatStringsSep "\n" [ diff --git a/flake.lock b/flake.lock @@ -11,15 +11,14 @@ "narHash": "sha256-Cx4VETh9dGoQYDtWhre7g66d7SAr+h1h6f+SSHxVrck=", "ref": "main", "rev": "e973584280e3b0e1d5b5a1a5e9948dc222c54af7", - "shallow": true, + "revCount": 584, "type": "git", - "url": "ssh://git@github.com/catppuccin/nix" + "url": "ssh://git@github.com/catppuccin/nix.git" }, "original": { "ref": "main", - "shallow": true, "type": "git", - "url": "ssh://git@github.com/catppuccin/nix" + "url": "ssh://git@github.com/catppuccin/nix.git" } }, "home-manager": { @@ -33,15 +32,14 @@ "narHash": "sha256-NUdsaB6H1wvbOC7oh1UZ7Ojg1I+mYBQv8ovlMB6FbHk=", "ref": "master", "rev": "4e235a8746b195e335306d898f0cc93ad6c4564c", - "shallow": true, + "revCount": 6086, "type": "git", - "url": "ssh://git@github.com/nix-community/home-manager" + "url": "ssh://git@github.com/nix-community/home-manager.git" }, "original": { "ref": "master", - "shallow": true, "type": "git", - "url": "ssh://git@github.com/nix-community/home-manager" + "url": "ssh://git@github.com/nix-community/home-manager.git" } }, "nixpkgs": { @@ -50,47 +48,12 @@ "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", "ref": "nixos-unstable", "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", - "shallow": true, + "revCount": 925861, "type": "git", "url": "https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git" }, "original": { "ref": "nixos-unstable", - "shallow": true, - "type": "git", - "url": "https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1768242861, - "narHash": "sha256-F4IIxa5xDHjtrmMcayM8lHctUq1oGltfBQu2+oqDWP4=", - "ref": "nixos-25.11", - "rev": "1327e798cb055f96f92685df444e9a2c326ab5ed", - "shallow": true, - "type": "git", - "url": "https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git" - }, - "original": { - "ref": "nixos-25.11", - "shallow": true, - "type": "git", - "url": "https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git" - } - }, - "nixpkgs-staging": { - "locked": { - "lastModified": 1768349994, - "narHash": "sha256-Dz+v2N/IOA8lylOm5vbc+vdfHEBoYrpr/BGfFsgsmH4=", - "ref": "staging", - "rev": "df490f67d4bbf712457c5f70b2db4debb1374a7c", - "shallow": true, - "type": "git", - "url": "https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git" - }, - "original": { - "ref": "staging", - "shallow": true, "type": "git", "url": "https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git" } @@ -99,9 +62,7 @@ "inputs": { "catppuccin": "catppuccin", "home-manager": "home-manager", - "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable", - "nixpkgs-staging": "nixpkgs-staging" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix @@ -2,12 +2,10 @@ description = "A simple NixOS flake"; inputs = { - nixpkgs.url = "git+https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git?ref=nixos-unstable&shallow=1"; - nixpkgs-stable.url = "git+https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git?ref=nixos-25.11&shallow=1"; - nixpkgs-staging.url = "git+https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git?ref=staging&shallow=1"; - home-manager.url = "git+ssh://git@github.com/nix-community/home-manager?ref=master&shallow=1"; + nixpkgs.url = "git+https://mirrors.tuna.tsinghua.edu.cn/git/nixpkgs.git?ref=nixos-unstable"; + home-manager.url = "git+ssh://git@github.com/nix-community/home-manager.git?ref=master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - catppuccin.url = "git+ssh://git@github.com/catppuccin/nix?ref=main&shallow=1"; + catppuccin.url = "git+ssh://git@github.com/catppuccin/nix.git?ref=main"; catppuccin.inputs.nixpkgs.follows = "nixpkgs"; }; @@ -23,8 +21,6 @@ system = "x86_64-linux"; specialArgs = {inherit inputs;}; modules = [ - # 这里导入之前我们使用的 configuration.nix, - # 这样旧的配置文件仍然能生效 ./configuration.nix catppuccin.nixosModules.catppuccin home-manager.nixosModules.home-manager @@ -37,9 +33,6 @@ catppuccin.homeModules.catppuccin ]; }; - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - home-manager.extraSpecialArgs = {inherit inputs;}; } ]; }; diff --git a/zed-editor.nix b/zed-editor.nix @@ -1,97 +1,91 @@ { - config, - lib, - pkgs, - inputs, - ... + config, + lib, + pkgs, + inputs, + ... }: { - programs.zed-editor = { - enable = true; - extraPackages = with pkgs; [ - alejandra - astro-language-server - basedpyright - (callPackage inputs.nixpkgs-staging.legacyPackages.x86_64-linux.clang-tools.override { - lib = lib; - stdenv = stdenv; - clang-unwrapped = llvmPackages.clang-unwrapped; - clang = clang; - libcxxClang = llvmPackages.libcxxClang; - llvm_meta = {}; - }) - eslint - jdt-language-server - lua-language-server - nil - package-version-server - prettier - ruff - rust-analyzer - svelte-language-server - tailwindcss-language-server - taplo - verible - (veridian.overrideAttrs { - src = fetchFromGitHub { - owner = "vivekmalneedi"; - repo = "veridian"; - rev = "0c5776a4a4e08fd00b90d91ad3cd2ec10315d2bd"; - hash = "sha256-TQ1qyKQesk0eOArhvfGxOHtIwpyM7iUOgNI1VA1riPE="; - }; - }) - vscode-json-languageserver - yaml-language-server - ]; - extensions = [ - "astro" - "git-firefly" - "java" - "lua" - "nix" - "nu" - "svelte" - "toml" - "verilog" - ]; - userSettings = { - preferred_line_length = 64; - buffer_font_family = "Sarasa Mono SC"; - buffer_font_size = 16; - ui_font_family = "Sarasa Mono SC"; - ui_font_size = 16; - hard_tabs = true; - tab_size = 4; - disable_ai = false; - languages = { - Nix.language_servers = [ - "nil" - "!nixd" - ]; - SystemVerilog = { - hard_tabs = false; - formatter = { - language_server = { - name = "verible"; - }; - }; - language_servers = [ - "veridian" - "verible" - "!slang" - ]; - }; - }; - lsp.nil.initialization_options = { - formatting.command = [ - "alejandra" - "--quiet" - "--" - ]; - diagnostics.ignored = ["unused_binding"]; - }; - lsp.ruff.initialization_options.settings.configuration = { - format.indent-style = "tab"; - }; - }; - }; + programs.zed-editor = { + enable = true; + extraPackages = with pkgs; [ + alejandra + astro-language-server + basedpyright + clang-tools + eslint + jdt-language-server + lua-language-server + nil + package-version-server + prettier + ruff + rust-analyzer + svelte-language-server + tailwindcss-language-server + taplo + verible + (veridian.overrideAttrs { + src = + fetchFromGitHub { + owner = "vivekmalneedi"; + repo = "veridian"; + rev = "0c5776a4a4e08fd00b90d91ad3cd2ec10315d2bd"; + hash = "sha256-TQ1qyKQesk0eOArhvfGxOHtIwpyM7iUOgNI1VA1riPE="; + }; + }) + vscode-json-languageserver + yaml-language-server + ]; + extensions = [ + "astro" + "git-firefly" + "java" + "lua" + "nix" + "nu" + "svelte" + "toml" + "verilog" + ]; + userSettings = { + preferred_line_length = 64; + buffer_font_family = "Sarasa Mono SC"; + buffer_font_size = 16; + ui_font_family = "Sarasa Mono SC"; + ui_font_size = 16; + hard_tabs = true; + tab_size = 4; + disable_ai = false; + languages = { + Nix.language_servers = [ + "nil" + "!nixd" + ]; + SystemVerilog = { + hard_tabs = false; + formatter = { + language_server = { + name = "verible"; + }; + }; + language_servers = [ + "veridian" + "verible" + "!slang" + ]; + }; + }; + lsp.nil.initialization_options = { + formatting.command = [ + "alejandra" + "--quiet" + "--" + ]; + diagnostics.ignored = ["unused_binding"]; + }; + lsp.ruff.initialization_options.settings.configuration = { + format.indent-style = "tab"; + }; + }; + }; }