This commit is contained in:
2025-12-25 14:27:20 +08:00
parent 880374e016
commit 1e3886b888
4 changed files with 16 additions and 41 deletions
+10 -10
View File
@@ -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
];
+3 -2
View File
@@ -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";
+1 -26
View File
@@ -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";
};
};
};
};
}
+2 -3
View File
@@ -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