mirror of
https://github.com/srid/nixos-config.git
synced 2026-07-16 22:01:33 +08:00
...
This commit is contained in:
parent
54e0b0f276
commit
5eaa6b9671
8 changed files with 72 additions and 13 deletions
|
|
@ -47,7 +47,9 @@ in
|
||||||
pkgs.python3
|
pkgs.python3
|
||||||
pkgs.portfwd
|
pkgs.portfwd
|
||||||
# The kolu terminal-side CLIs, without running the kolu service itself.
|
# The kolu terminal-side CLIs, without running the kolu service itself.
|
||||||
|
inputs.kolu.packages.${pkgs.stdenv.hostPlatform.system}.kaval
|
||||||
inputs.kolu.packages.${pkgs.stdenv.hostPlatform.system}.kaval-tui
|
inputs.kolu.packages.${pkgs.stdenv.hostPlatform.system}.kaval-tui
|
||||||
|
inputs.kolu.packages.${pkgs.stdenv.hostPlatform.system}.padi
|
||||||
inputs.kolu.packages.${pkgs.stdenv.hostPlatform.system}.padi-tui
|
inputs.kolu.packages.${pkgs.stdenv.hostPlatform.system}.padi-tui
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
self.nixosModules.default
|
self.nixosModules.default
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
(self + /modules/nixos/linux/gc.nix)
|
||||||
(self + /modules/nixos/linux/llm-debugging.nix)
|
(self + /modules/nixos/linux/llm-debugging.nix)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -37,7 +38,8 @@ in
|
||||||
sandbox = "relaxed";
|
sandbox = "relaxed";
|
||||||
extra-experimental-features = [ "impure-derivations" "ca-derivations" ];
|
extra-experimental-features = [ "impure-derivations" "ca-derivations" ];
|
||||||
};
|
};
|
||||||
# GC is handled via home-manager (modules/home/nix/gc.nix)
|
# GC: system generations via modules/nixos/linux/gc.nix (root-owned);
|
||||||
|
# user profile via home-manager (modules/home/nix/gc.nix).
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
swapDevices = [{
|
swapDevices = [{
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@ in
|
||||||
self.nixosModules.default
|
self.nixosModules.default
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./devbox.nix
|
./devbox.nix
|
||||||
|
./kolu-dev.nix
|
||||||
(self + /modules/nixos/linux/beszel.nix)
|
(self + /modules/nixos/linux/beszel.nix)
|
||||||
|
(self + /modules/nixos/linux/gc.nix)
|
||||||
(self + /modules/nixos/linux/incus)
|
(self + /modules/nixos/linux/incus)
|
||||||
(self + /modules/nixos/linux/llm-debugging.nix)
|
(self + /modules/nixos/linux/llm-debugging.nix)
|
||||||
];
|
];
|
||||||
|
|
@ -78,7 +80,8 @@ in
|
||||||
sandbox = "relaxed";
|
sandbox = "relaxed";
|
||||||
extra-experimental-features = [ "impure-derivations" "ca-derivations" ];
|
extra-experimental-features = [ "impure-derivations" "ca-derivations" ];
|
||||||
};
|
};
|
||||||
# GC is handled via home-manager (modules/home/nix/gc.nix)
|
# GC: system generations via modules/nixos/linux/gc.nix (root-owned);
|
||||||
|
# user profile via home-manager (modules/home/nix/gc.nix).
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
swapDevices = [{
|
swapDevices = [{
|
||||||
|
|
|
||||||
14
configurations/nixos/pureintent/kolu-dev.nix
Normal file
14
configurations/nixos/pureintent/kolu-dev.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Host-side bits for kolu development on pureintent.
|
||||||
|
{ flake, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Dedicated account for kolu end-to-end remote-terminal tests.
|
||||||
|
# Authorize srid (same machine) to `ssh kolu-e2e-remote@localhost` with his key.
|
||||||
|
users.users.kolu-e2e-remote = {
|
||||||
|
isNormalUser = true;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
# pureintent srid
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnWriRB3c/G+O4/N5ALnOQBdBTp9LeGC6HNYTZCCGS2 srid@pureintent"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
14
flake.lock
generated
14
flake.lock
generated
|
|
@ -283,11 +283,11 @@
|
||||||
"bun2nix": "bun2nix"
|
"bun2nix": "bun2nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783304273,
|
"lastModified": 1783601954,
|
||||||
"narHash": "sha256-TaiFUcQjPk1MiIsTsYtLXhH9wwoKXYK3uk2qt9ZgbIk=",
|
"narHash": "sha256-tlebQqzg5CS/liUGV9GI8Rjxduxs29bXZcohhcVj/o4=",
|
||||||
"owner": "srid",
|
"owner": "srid",
|
||||||
"repo": "drishti",
|
"repo": "drishti",
|
||||||
"rev": "25a1dcfda307ca07e40d9e049b13e9d9ae63854c",
|
"rev": "037ebbdd72e35d2d53f8c8199ad86d7c07b6a669",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -845,16 +845,16 @@
|
||||||
},
|
},
|
||||||
"kolu": {
|
"kolu": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783521149,
|
"lastModified": 1783602023,
|
||||||
"narHash": "sha256-JeO5oKKXwLnrynIY9butaYh8YbpARNycZOK/wPFDhgo=",
|
"narHash": "sha256-bO5h/S9vTSkYj8grU98ZRRxi/O+MltvUSPCMfZFxlY4=",
|
||||||
"owner": "juspay",
|
"owner": "juspay",
|
||||||
"repo": "kolu",
|
"repo": "kolu",
|
||||||
"rev": "7d51cb2b290bdcaaabe6522c90152598d162d9bd",
|
"rev": "a56b0bbbcec72643c5980e4855976b0da85e2dca",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "juspay",
|
"owner": "juspay",
|
||||||
"ref": "master",
|
"ref": "feat/header-host-first-daemons",
|
||||||
"repo": "kolu",
|
"repo": "kolu",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@
|
||||||
jumphost-nix.url = "github:srid/jumphost-nix";
|
jumphost-nix.url = "github:srid/jumphost-nix";
|
||||||
jumphost-nix.flake = false;
|
jumphost-nix.flake = false;
|
||||||
|
|
||||||
kolu.url = "github:juspay/kolu/master";
|
# Pinned to PR #1730 (padi W6 — the honest connect): https://github.com/juspay/kolu/pull/1730
|
||||||
|
kolu.url = "github:juspay/kolu/w6-honest-connect";
|
||||||
|
|
||||||
# drishti remote host monitor (home-manager module)
|
# drishti remote host monitor (home-manager module)
|
||||||
drishti.url = "github:srid/drishti/master";
|
drishti.url = "github:srid/drishti/master";
|
||||||
|
|
|
||||||
25
justfile
25
justfile
|
|
@ -12,7 +12,7 @@ mod pureintent 'configurations/nixos/pureintent/mod.just'
|
||||||
[group('main')]
|
[group('main')]
|
||||||
activate host="":
|
activate host="":
|
||||||
nix flake lock
|
nix flake lock
|
||||||
@if [ -z "{{host}}" ]; then \
|
@if [ -z "{{ host }}" ]; then \
|
||||||
if [ -f ./configurations/home/$USER@$HOSTNAME.nix ]; then \
|
if [ -f ./configurations/home/$USER@$HOSTNAME.nix ]; then \
|
||||||
echo "Activating home env $USER@$HOSTNAME ..."; \
|
echo "Activating home env $USER@$HOSTNAME ..."; \
|
||||||
nix run . $USER@$HOSTNAME; \
|
nix run . $USER@$HOSTNAME; \
|
||||||
|
|
@ -21,8 +21,8 @@ activate host="":
|
||||||
nix run . $HOSTNAME; \
|
nix run . $HOSTNAME; \
|
||||||
fi \
|
fi \
|
||||||
else \
|
else \
|
||||||
echo "Deploying to {{host}} ..."; \
|
echo "Deploying to {{ host }} ..."; \
|
||||||
nix run . {{host}}; \
|
nix run . {{ host }}; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update primary flame inputs
|
# Update primary flame inputs
|
||||||
|
|
@ -30,6 +30,25 @@ activate host="":
|
||||||
update:
|
update:
|
||||||
nix run .#update
|
nix run .#update
|
||||||
|
|
||||||
|
# Update Kolu/Drishti, then build Kolu and activate target environments.
|
||||||
|
[group('main')]
|
||||||
|
kolu: _kolu-update && _kolu-after-update
|
||||||
|
|
||||||
|
_kolu-update:
|
||||||
|
nix flake update kolu drishti
|
||||||
|
|
||||||
|
[parallel]
|
||||||
|
_kolu-after-update: _kolu-build _kolu-activate-pureintent _kolu-activate-local
|
||||||
|
|
||||||
|
_kolu-build:
|
||||||
|
nix build --inputs-from . kolu
|
||||||
|
|
||||||
|
_kolu-activate-pureintent:
|
||||||
|
just activate pureintent
|
||||||
|
|
||||||
|
_kolu-activate-local:
|
||||||
|
just activate
|
||||||
|
|
||||||
# Misc commands
|
# Misc commands
|
||||||
# --------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
18
modules/nixos/linux/gc.nix
Normal file
18
modules/nixos/linux/gc.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
# System-level Nix garbage collection + store optimisation.
|
||||||
|
#
|
||||||
|
# The home-manager `nix.gc` (modules/home/nix/gc.nix) runs as the user, so it
|
||||||
|
# can prune the *user* profile and collect the store, but it can never touch
|
||||||
|
# the root-owned `system-*` profile generations. Without a system-level GC,
|
||||||
|
# those pile up unbounded — pureintent accumulated ~480 system generations
|
||||||
|
# (~4 months of daily rebuilds), each pinning a full closure and keeping old
|
||||||
|
# kernels/packages from ever being collected. This prunes them; auto-optimise
|
||||||
|
# hardlinks identical files across the closures that remain.
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue