Compare commits

...

12 commits

Author SHA1 Message Date
Jet Pham
97c8a8b2b9
update: nfu 2026-03-09 13:48:39 -07:00
Jet Pham
8d2981f1d2
fix: remove depricated warning config 2026-03-09 13:46:52 -07:00
Jet Pham
99b8877021
remove possibly dangerous control c alias 2026-03-09 13:46:30 -07:00
Jet Pham
f396f4ff74
fix: remove dangerous alias 2026-03-09 13:46:09 -07:00
Jet Pham
1815ab4b88
fix: remove unused lib input 2026-03-09 13:45:54 -07:00
Jet Pham
2e4b2e8a80
fix: remove swap because I have alot of mem 2026-03-09 13:45:23 -07:00
Jet Pham
c634b77ae1
fix: make power management work for AMD chip 2026-03-09 13:45:06 -07:00
Jet Pham
02a273f2f7
fix: remove unused comments 2026-03-09 13:44:42 -07:00
Jet Pham
4ac1fd1489
fix: remove default languages already set 2026-03-09 13:44:14 -07:00
Jet Pham
23b2ac9a33
feat: configure to only keep 3 configurations/gens 2026-03-09 13:43:54 -07:00
Jet Pham
f5b62c0053
fix: remove unused opencl configurations 2026-03-09 13:43:29 -07:00
Jet Pham
966dd1bfff
fix: remove extra curlies 2026-03-08 19:34:33 -07:00
3 changed files with 51 additions and 75 deletions

View file

@ -4,6 +4,7 @@
imports = [ ./hardware-configuration.nix ]; imports = [ ./hardware-configuration.nix ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.timeout = 0; boot.loader.timeout = 0;
@ -21,9 +22,7 @@
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services.resolved = { services.resolved.enable = true;
enable = true;
};
networking.firewall.enable = true; networking.firewall.enable = true;
# Required for Tailscale # Required for Tailscale
@ -34,18 +33,6 @@
time.timeZone = "America/Los_Angeles"; time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
services.xserver.enable = true; services.xserver.enable = true;
# Framework Laptop 13 AMD AI 300 Series specific configurations # Framework Laptop 13 AMD AI 300 Series specific configurations
@ -53,8 +40,6 @@
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
# Add OpenCL support via Rusticl (recommended by NixOS wiki for DaVinci Resolve)
extraPackages = with pkgs; [ mesa.opencl ];
}; };
# Enable keyd for key remapping # Enable keyd for key remapping
@ -121,7 +106,6 @@
services.xserver.xkb = { services.xserver.xkb = {
layout = "us"; layout = "us";
variant = "";
}; };
services.printing.enable = true; services.printing.enable = true;
@ -146,10 +130,16 @@
}; };
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ nix.settings = {
experimental-features = [
"nix-command" "nix-command"
"flakes" "flakes"
]; ];
auto-optimise-store = true;
max-jobs = "auto";
cores = 0;
build-users-group = "nixbld";
};
# Framework-specific services # Framework-specific services
# Enable fwupd for BIOS updates (distributed through LVFS) # Enable fwupd for BIOS updates (distributed through LVFS)
@ -158,19 +148,22 @@
# Enable periodic TRIM for NVMe/SSD health # Enable periodic TRIM for NVMe/SSD health
services.fstrim.enable = true; services.fstrim.enable = true;
# Enable automatic garbage collection to prevent old generations from slowing boot # Keep only last 10 generations, GC everything else (daily)
nix.gc = { systemd.services.nix-cleanup = {
automatic = true; description = "Nix generation cleanup and garbage collection";
dates = "daily"; serviceConfig.Type = "oneshot";
options = "--delete-older-than 7d"; 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;
}; };
nix.settings.auto-optimise-store = true;
nix.optimise.automatic = true;
nix.settings = {
max-jobs = "auto";
cores = 0;
build-users-group = "nixbld";
}; };
# Power management for laptop # Power management for laptop
@ -198,18 +191,10 @@
}; };
}; };
# Enable thermald for thermal management # Disable power-profiles-daemon (conflicts with auto-cpufreq)
services.thermald.enable = true;
# Framework Laptop 13 specific power optimizations
# Enable power-profiles-daemon for better AMD power management
# (Note: This conflicts with auto-cpufreq, so we'll keep auto-cpufreq disabled)
services.power-profiles-daemon.enable = false; services.power-profiles-daemon.enable = false;
# AMD specific power management # Enable power management (governor managed dynamically by auto-cpufreq)
powerManagement.cpuFreqGovernor = "powersave";
# Enable power management
powerManagement.enable = true; powerManagement.enable = true;
# v4l2loopback for OBS Virtual Camera # v4l2loopback for OBS Virtual Camera
@ -221,8 +206,7 @@
# RAM optimizations for 96GB system # RAM optimizations for 96GB system
boot.kernel.sysctl = { boot.kernel.sysctl = {
"vm.swappiness" = 0; # Never swap to disk "vm.vfs_cache_pressure" = 50; # Keep more filesystem cache in RAM
"vm.vfs_cache_pressure" = 50; # Keep more filesystem cache in RAM
"vm.dirty_ratio" = 15; # Write to disk when 15% of RAM is dirty "vm.dirty_ratio" = 15; # Write to disk when 15% of RAM is dirty
"vm.dirty_background_ratio" = 5; # Start writing when 5% dirty "vm.dirty_background_ratio" = 5; # Start writing when 5% dirty
}; };

42
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772674218, "lastModified": 1772841847,
"narHash": "sha256-1oc5zUFOjeK2Bro5cdCe3Fc/uzQIHyxfKMDZQ+Zm6Uo=", "narHash": "sha256-Qre73BGBcw1YlhBTTT+T/rVoqVtlCgHYYExUreIJoYs=",
"owner": "ryoppippi", "owner": "ryoppippi",
"repo": "claude-code-overlay", "repo": "claude-code-overlay",
"rev": "e177db5beaf0cd10761e1b4a6eac2906627ed119", "rev": "871c9fa0d37c0d6b3bdbf30341a8d08a75b1793b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -48,11 +48,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772633327, "lastModified": 1772985285,
"narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=", "narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc", "rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -89,11 +89,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772341813, "lastModified": 1772945408,
"narHash": "sha256-/PQ0ubBCMj/MVCWEI/XMStn55a8dIKsvztj4ZVLvUrQ=", "narHash": "sha256-PMt48sEQ8cgCeljQ9I/32uoBq/8t8y+7W/nAZhf72TQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "a2051ff239ce2e8a0148fa7a152903d9a78e854f", "rev": "1c1d8ea87b047788fd7567adf531418c5da321ec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -104,11 +104,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1771969195, "lastModified": 1772972630,
"narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=", "narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e", "rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -119,11 +119,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1772624091, "lastModified": 1772963539,
"narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=", "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "80bdc1e5ce51f56b19791b52b2901187931f5353", "rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -141,11 +141,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772745558, "lastModified": 1773086064,
"narHash": "sha256-pVmX5Z0PLUZIL7TFcfYyWNqEKDVf72bAz0PORyNQHSQ=", "narHash": "sha256-w5cbHv8jVS+1iD7xPokoT3XPUnkiAxFCUtW2KEwgU5s=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "361709a61eebc0b1783dd478677b7ac4e1efa0a2", "rev": "e5b002c3d53b380695fd161e6562570ed8e7d01d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -173,11 +173,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772638901, "lastModified": 1772945022,
"narHash": "sha256-kzAyU054Mzpnzgx475MgmcjYJXxXWQWBG7LLsYtHXKw=", "narHash": "sha256-Fv14NttjL/7xfi6eVwrSEBAyBvDjI00RLiRNqA5apcw=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "75de12ddd50616a3628499ec18b648bceb88eb0d", "rev": "3a6a5ca7fb48cc8fd8183386506a06579d1d79dc",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,7 +2,6 @@
config, config,
pkgs, pkgs,
inputs, inputs,
lib,
... ...
}: }:
@ -111,13 +110,9 @@
gnomeExtensions.wifi-qrcode gnomeExtensions.wifi-qrcode
]; ];
# Set environment variables for OpenCL
home.sessionVariables = { home.sessionVariables = {
OCL_ICD_VENDORS = "/etc/OpenCL/vendors";
POCL_DEVICES = "cpu";
BROWSER = "zen"; BROWSER = "zen";
TERMINAL = "kitty"; TERMINAL = "kitty";
RUSTICL_ENABLE = "radeonsi";
}; };
programs.helix = { programs.helix = {
@ -200,7 +195,6 @@
"da" = "direnv allow"; "da" = "direnv allow";
"nfu" = "nix flake update"; "nfu" = "nix flake update";
"c" = "claude"; "c" = "claude";
"." = "z ..";
".." = "z .."; ".." = "z ..";
j = "jj"; j = "jj";
jgf = "jj git fetch"; jgf = "jj git fetch";
@ -245,7 +239,6 @@
}; };
keybindings = { keybindings = {
"ctrl+shift+c" = "copy_and_clear_or_interrupt"; "ctrl+shift+c" = "copy_and_clear_or_interrupt";
"ctrl+c" = "copy_and_clear_or_interrupt";
"ctrl+shift+v" = "paste_from_clipboard"; "ctrl+shift+v" = "paste_from_clipboard";
"ctrl+v" = "paste_from_clipboard"; "ctrl+v" = "paste_from_clipboard";
}; };
@ -281,7 +274,6 @@
# Configure Zen Browser with about:config settings # Configure Zen Browser with about:config settings
programs.zen-browser = { programs.zen-browser = {
enable = true; enable = true;
suppressXdgMigrationWarning = true;
policies = { policies = {
DisableTelemetry = true; DisableTelemetry = true;
DisableFirefoxStudies = true; DisableFirefoxStudies = true;