feat: add opencode and use simpler gc
This commit is contained in:
parent
31f93b5bc9
commit
de27df4ce2
3 changed files with 19 additions and 19 deletions
|
|
@ -3,3 +3,8 @@
|
||||||
I've done nixos a few times but this time around it's been very comfterable. Nothing is really that special about it, but feel free to copy it!
|
I've done nixos a few times but this time around it's been very comfterable. Nothing is really that special about it, but feel free to copy it!
|
||||||
|
|
||||||
> silly language thing creddited to https://github.com/SylvanFranklin/.config
|
> silly language thing creddited to https://github.com/SylvanFranklin/.config
|
||||||
|
|
||||||
|
This flake currently defines one host: `framework` which is my laptop.
|
||||||
|
|
||||||
|
- system config lives in `configuration.nix`
|
||||||
|
- Home Manager config lives in `home.nix`
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,11 @@
|
||||||
AttrKeyboardIntegration=internal
|
AttrKeyboardIntegration=internal
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Codex currently probes the conventional FHS bubblewrap path.
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"L+ /usr/bin/bwrap - - - - ${pkgs.bubblewrap}/bin/bwrap"
|
||||||
|
];
|
||||||
|
|
||||||
# Set Kitty as default terminal
|
# Set Kitty as default terminal
|
||||||
xdg.terminal-exec = {
|
xdg.terminal-exec = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -154,7 +159,6 @@
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
auto-optimise-store = true;
|
|
||||||
trusted-users = [
|
trusted-users = [
|
||||||
"root"
|
"root"
|
||||||
"jet"
|
"jet"
|
||||||
|
|
@ -163,6 +167,12 @@
|
||||||
cores = 0;
|
cores = 0;
|
||||||
build-users-group = "nixbld";
|
build-users-group = "nixbld";
|
||||||
};
|
};
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
nix.optimise.automatic = true;
|
||||||
|
|
||||||
# Framework-specific services
|
# Framework-specific services
|
||||||
# Enable fwupd for BIOS updates (distributed through LVFS)
|
# Enable fwupd for BIOS updates (distributed through LVFS)
|
||||||
|
|
@ -173,24 +183,6 @@
|
||||||
services.irqbalance.enable = true;
|
services.irqbalance.enable = true;
|
||||||
services.earlyoom.enable = true;
|
services.earlyoom.enable = true;
|
||||||
|
|
||||||
# Keep only last 3 generations, GC everything else (daily)
|
|
||||||
systemd.services.nix-cleanup = {
|
|
||||||
description = "Nix generation cleanup and garbage collection";
|
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
script = ''
|
|
||||||
${pkgs.nix}/bin/nix-env --delete-generations +3 -p /nix/var/nix/profiles/system
|
|
||||||
${pkgs.nix}/bin/nix-env --delete-generations +3 -p /nix/var/nix/profiles/per-user/jet/home-manager || true
|
|
||||||
${pkgs.nix}/bin/nix-store --gc
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
systemd.timers.nix-cleanup = {
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "daily";
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Power management for laptop
|
# Power management for laptop
|
||||||
services.logind = {
|
services.logind = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -252,6 +244,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
bubblewrap
|
||||||
wget
|
wget
|
||||||
nh
|
nh
|
||||||
];
|
];
|
||||||
|
|
|
||||||
2
home.nix
2
home.nix
|
|
@ -85,6 +85,7 @@ in
|
||||||
bat
|
bat
|
||||||
ffmpeg-full
|
ffmpeg-full
|
||||||
claude-code
|
claude-code
|
||||||
|
opencode
|
||||||
inputs.codex-cli-nix.packages.${pkgs.stdenv.hostPlatform.system}.default
|
inputs.codex-cli-nix.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
fd
|
fd
|
||||||
btop
|
btop
|
||||||
|
|
@ -251,6 +252,7 @@ in
|
||||||
"da" = "direnv allow";
|
"da" = "direnv allow";
|
||||||
"nfu" = "nix flake update";
|
"nfu" = "nix flake update";
|
||||||
"c" = "claude";
|
"c" = "claude";
|
||||||
|
"o" = "opencode";
|
||||||
".." = "z ..";
|
".." = "z ..";
|
||||||
j = "jj";
|
j = "jj";
|
||||||
jgf = "jj git fetch";
|
jgf = "jj git fetch";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue