From 1e3886b8885d8cf7ade6b508703b652b9e2e3094 Mon Sep 17 00:00:00 2001 From: Wong Ding Feng Date: Thu, 25 Dec 2025 14:27:20 +0800 Subject: [PATCH] test --- common.nix | 20 ++++++++++---------- darwin/configuration.nix | 5 +++-- home-manager/modules/kitty.nix | 27 +-------------------------- home-manager/modules/packages.nix | 5 ++--- 4 files changed, 16 insertions(+), 41 deletions(-) diff --git a/common.nix b/common.nix index 1a7a293..521dd96 100644 --- a/common.nix +++ b/common.nix @@ -8,6 +8,7 @@ ... }: { # Shared Nix configuration + # Note: On Darwin with Determinate Nix, set nix.enable = false in darwin/configuration.nix nix = let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; in { @@ -25,18 +26,17 @@ nix-path = config.nix.nixPath; }; - # Deduplicate and optimize nix store - optimise.automatic = true; - - # Garbage collection - gc = { - automatic = true; - options = "--delete-older-than 7d"; - }; - # Opinionated: make flake registry and nix path match flake inputs registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; + + # Platform-specific: These require nix.enable = true (conflicts with Determinate Nix on Darwin) + # Only enable on Linux where we manage Nix ourselves + optimise.automatic = lib.mkIf pkgs.stdenv.isLinux true; + gc = lib.mkIf pkgs.stdenv.isLinux { + automatic = true; + options = "--delete-older-than 7d"; + }; }; # Shared nixpkgs configuration @@ -60,7 +60,7 @@ # Shared environment packages environment.systemPackages = with pkgs; [ vim - git + # git is managed by home-manager (programs.git) curl wget ]; diff --git a/darwin/configuration.nix b/darwin/configuration.nix index f7fcef1..75582db 100644 --- a/darwin/configuration.nix +++ b/darwin/configuration.nix @@ -23,8 +23,9 @@ # macOS-specific Nix settings (common.nix has the shared ones) # Any darwin-specific nix configuration can go here - # Necessary for using flakes on this system - nix.package = pkgs.nix; + # Using Determinate Nix - disable nix-darwin's Nix daemon management + # Determinate manages its own daemon and conflicts with nix-darwin + nix.enable = false; # TODO: Set your hostname networking.hostName = "m2n1"; diff --git a/home-manager/modules/kitty.nix b/home-manager/modules/kitty.nix index 048489d..f35ce45 100644 --- a/home-manager/modules/kitty.nix +++ b/home-manager/modules/kitty.nix @@ -7,33 +7,8 @@ ... }: { # Alacritty terminal emulator configuration - programs.alacritty = { + programs.kitty = { enable = true; - settings = { - window = { - padding = { - x = 10; - y = 10; - }; - decorations = "full"; - opacity = 0.95; - }; - - font = { - size = 13.0; - normal = { - family = "JetBrainsMono Nerd Font"; - style = "Regular"; - }; - }; - - colors = { - primary = { - background = "0x1e1e1e"; - foreground = "0xd4d4d4"; - }; - }; - }; }; } diff --git a/home-manager/modules/packages.nix b/home-manager/modules/packages.nix index ec27f36..8226f0b 100644 --- a/home-manager/modules/packages.nix +++ b/home-manager/modules/packages.nix @@ -12,7 +12,7 @@ with pkgs; let #!/usr/bin/env bash exec ${p}/bin/${a} $@ ''; - pythonPackages = pkgs.python311.withPackages (p: + pythonPackages = pkgs.python312.withPackages (p: with p; [ python-lsp-server pyls-flake8 @@ -33,8 +33,7 @@ with pkgs; let ]); in { home.packages = with pkgs; [ - gitAndTools.gitFull - neovim + # git is managed by programs.git in git.nix vim ripgrep openvpn