Compare commits

..

No commits in common. "97c8a8b2b9298e9dc107b056d7e3d6b074e59ae8" and "a386763b86e419617229eb946ac05b875c93da24" have entirely different histories.

3 changed files with 75 additions and 51 deletions

View file

@ -4,7 +4,6 @@
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;
@ -22,7 +21,9 @@
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services.resolved.enable = true; services.resolved = {
enable = true;
};
networking.firewall.enable = true; networking.firewall.enable = true;
# Required for Tailscale # Required for Tailscale
@ -33,6 +34,18 @@
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
@ -40,6 +53,8 @@
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
@ -106,6 +121,7 @@
services.xserver.xkb = { services.xserver.xkb = {
layout = "us"; layout = "us";
variant = "";
}; };
services.printing.enable = true; services.printing.enable = true;
@ -130,16 +146,10 @@
}; };
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings = { nix.settings.experimental-features = [
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)
@ -148,22 +158,19 @@
# Enable periodic TRIM for NVMe/SSD health # Enable periodic TRIM for NVMe/SSD health
services.fstrim.enable = true; services.fstrim.enable = true;
# Keep only last 10 generations, GC everything else (daily) # Enable automatic garbage collection to prevent old generations from slowing boot
systemd.services.nix-cleanup = { nix.gc = {
description = "Nix generation cleanup and garbage collection"; automatic = true;
serviceConfig.Type = "oneshot"; dates = "daily";
script = '' options = "--delete-older-than 7d";
${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 = { nix.settings.auto-optimise-store = true;
wantedBy = [ "timers.target" ]; nix.optimise.automatic = true;
timerConfig = {
OnCalendar = "daily"; nix.settings = {
Persistent = true; max-jobs = "auto";
}; cores = 0;
build-users-group = "nixbld";
}; };
# Power management for laptop # Power management for laptop
@ -191,10 +198,18 @@
}; };
}; };
# Disable power-profiles-daemon (conflicts with auto-cpufreq) # Enable thermald for thermal management
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;
# Enable power management (governor managed dynamically by auto-cpufreq) # AMD specific power management
powerManagement.cpuFreqGovernor = "powersave";
# Enable power management
powerManagement.enable = true; powerManagement.enable = true;
# v4l2loopback for OBS Virtual Camera # v4l2loopback for OBS Virtual Camera
@ -206,7 +221,8 @@
# RAM optimizations for 96GB system # RAM optimizations for 96GB system
boot.kernel.sysctl = { boot.kernel.sysctl = {
"vm.vfs_cache_pressure" = 50; # Keep more filesystem cache in RAM "vm.swappiness" = 0; # Never swap to disk
"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": 1772841847, "lastModified": 1772674218,
"narHash": "sha256-Qre73BGBcw1YlhBTTT+T/rVoqVtlCgHYYExUreIJoYs=", "narHash": "sha256-1oc5zUFOjeK2Bro5cdCe3Fc/uzQIHyxfKMDZQ+Zm6Uo=",
"owner": "ryoppippi", "owner": "ryoppippi",
"repo": "claude-code-overlay", "repo": "claude-code-overlay",
"rev": "871c9fa0d37c0d6b3bdbf30341a8d08a75b1793b", "rev": "e177db5beaf0cd10761e1b4a6eac2906627ed119",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -48,11 +48,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772985285, "lastModified": 1772633327,
"narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=", "narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85", "rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -89,11 +89,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772945408, "lastModified": 1772341813,
"narHash": "sha256-PMt48sEQ8cgCeljQ9I/32uoBq/8t8y+7W/nAZhf72TQ=", "narHash": "sha256-/PQ0ubBCMj/MVCWEI/XMStn55a8dIKsvztj4ZVLvUrQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "1c1d8ea87b047788fd7567adf531418c5da321ec", "rev": "a2051ff239ce2e8a0148fa7a152903d9a78e854f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -104,11 +104,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1772972630, "lastModified": 1771969195,
"narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=", "narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72", "rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -119,11 +119,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1772963539, "lastModified": 1772624091,
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", "narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d", "rev": "80bdc1e5ce51f56b19791b52b2901187931f5353",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -141,11 +141,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773086064, "lastModified": 1772745558,
"narHash": "sha256-w5cbHv8jVS+1iD7xPokoT3XPUnkiAxFCUtW2KEwgU5s=", "narHash": "sha256-pVmX5Z0PLUZIL7TFcfYyWNqEKDVf72bAz0PORyNQHSQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "e5b002c3d53b380695fd161e6562570ed8e7d01d", "rev": "361709a61eebc0b1783dd478677b7ac4e1efa0a2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -173,11 +173,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772945022, "lastModified": 1772638901,
"narHash": "sha256-Fv14NttjL/7xfi6eVwrSEBAyBvDjI00RLiRNqA5apcw=", "narHash": "sha256-kzAyU054Mzpnzgx475MgmcjYJXxXWQWBG7LLsYtHXKw=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "3a6a5ca7fb48cc8fd8183386506a06579d1d79dc", "rev": "75de12ddd50616a3628499ec18b648bceb88eb0d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,6 +2,7 @@
config, config,
pkgs, pkgs,
inputs, inputs,
lib,
... ...
}: }:
@ -110,9 +111,13 @@
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 = {
@ -195,6 +200,7 @@
"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";
@ -239,6 +245,7 @@
}; };
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";
}; };
@ -274,6 +281,7 @@
# 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;