feat: update frameowkr hardware and docker no pod

This commit is contained in:
Jet Pham 2025-09-02 15:10:57 -07:00
parent 659d79265e
commit dd59d1808c
No known key found for this signature in database
5 changed files with 96 additions and 32 deletions

View file

@ -13,6 +13,13 @@
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# Boot time optimizations
boot.loader.timeout = 0; # Boot immediately without waiting for user input
# Disable slow services that delay boot
systemd.services.systemd-udev-settle.enable = false;
systemd.services.NetworkManager-wait-online.enable = false;
networking.hostName = "framework"; # Define your hostname. networking.hostName = "framework"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -20,6 +27,11 @@
# Configure network proxy if necessary # Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Optimize network configuration for faster boot
networking.dhcpcd.wait = "background"; # Avoid waiting for IP during boot
networking.dhcpcd.extraConfig = "noarp"; # Skip ARP checks to speed up
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
powerOnBoot = true; powerOnBoot = true;
@ -54,6 +66,13 @@
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.enable = true; services.xserver.enable = true;
# Framework Laptop 13 AMD AI 300 Series specific configurations
# Enable AMD GPU support and power management
hardware.graphics = {
enable = true;
enable32Bit = true;
};
# Enable keyd for key remapping # Enable keyd for key remapping
services.keyd = { services.keyd = {
enable = true; enable = true;
@ -120,11 +139,11 @@
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; # services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with 'passwd'.
users.users.jet = { users.users.jet = {
isNormalUser = true; isNormalUser = true;
description = "Jet"; description = "Jet";
extraGroups = [ "networkmanager" "wheel" "podman" ]; extraGroups = [ "networkmanager" "wheel" "docker" ];
}; };
# Allow unfree packages # Allow unfree packages
@ -132,13 +151,28 @@
# Enable the Flakes feature and the accompanying new nix command-line tool # Enable the Flakes feature and the accompanying new nix command-line tool
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Framework-specific services
# Enable fwupd for BIOS updates (distributed through LVFS)
services.fwupd.enable = true;
# Enable automatic garbage collection to prevent old generations from slowing boot
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
# Power management for laptop # Power management for laptop
# Configure lid switch behavior - hybrid-sleep for optimal power management # Configure lid switch behavior - hybrid-sleep for optimal power management
services.logind = { services.logind = {
lidSwitch = "hybrid-sleep"; settings = {
lidSwitchExternalPower = "hybrid-sleep"; Login = {
lidSwitchDocked = "ignore"; HandleLidSwitch = "hibernate";
HandleLidSwitchExternalPower = "hybrid-sleep";
HandleLidSwitchDocked = "ignore";
};
};
}; };
# Enable auto-cpufreq for intelligent power management (replaces TLP) # Enable auto-cpufreq for intelligent power management (replaces TLP)
@ -154,14 +188,25 @@
}; };
}; };
# Disable power-profiles-daemon to avoid conflict with auto-cpufreq
services.power-profiles-daemon.enable = false;
# Enable thermald for thermal management # Enable thermald for thermal management
services.thermald.enable = true; 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;
# AMD specific power management
powerManagement.cpuFreqGovernor = "powersave";
# Enable power management # Enable power management
powerManagement.enable = true; powerManagement.enable = true;
# Enable ZRAM swap for better memory management and potentially faster boot
zramSwap = {
enable = true;
algorithm = "zstd";
};
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
@ -170,8 +215,8 @@
helix # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. helix # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget wget
vim vim
podman docker
podman-compose docker-compose
]; ];
environment.variables.EDITOR = "helix"; environment.variables.EDITOR = "helix";
@ -192,23 +237,18 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;
# Enable Podman with rootless support # Enable rootless Docker
virtualisation = { virtualisation.docker = {
containers.enable = true; enable = true;
oci-containers.backend = "podman"; rootless = {
podman = {
enable = true; enable = true;
autoPrune.enable = true; setSocketVariable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
}; };
}; };
# Create podman group # Create docker group
users.groups.podman = { users.groups.docker = {
name = "podman"; name = "docker";
}; };
# Open ports in the firewall. # Open ports in the firewall.

34
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1755121891, "lastModified": 1756777514,
"narHash": "sha256-UtYkukiGnPRJ5rpd4W/wFVrLMh8fqtNkqHTPgHEtrqU=", "narHash": "sha256-BVCWCoYNCqTt8UuEUbsHJmwjEOGjKatbrBTlLg2rwzU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "279ca5addcdcfa31ac852b3ecb39fc372684f426", "rev": "e31db6141e47f1007a54bc9e4d8b2a26a9fbd697",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,13 +41,28 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1756750488,
"narHash": "sha256-e4ZAu2sjOtGpvbdS5zo+Va5FUUkAnizl4wb0/JlIL2I=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "47eb4856cfd01eaeaa7bb5944a0f27db8fb9b94a",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1755027561, "lastModified": 1756542300,
"narHash": "sha256-IVft239Bc8p8Dtvf7UAACMG5P3ZV+3/aO28gXpGtMXI=", "narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "005433b926e16227259a1843015b5b2b7f7d1fc3", "rev": "d7600c775f877cd87b4f5a831c28aa94137377aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -60,6 +75,7 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
@ -72,11 +88,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1755199018, "lastModified": 1756772830,
"narHash": "sha256-y7dM6ihF4feDgbssaeFxKXjsJb6Rzjz1brc17kSkcoQ=", "narHash": "sha256-Cn2q2OpSu9aX0j5uRolbPU5Ms6RalVVc6QWibgZb3ak=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "8bf64e38baa26429c31d0623c3f16812b794b436", "rev": "b60c294e338f7d15a34f46cb380c6ec84ef4b79a",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -5,6 +5,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware";
zen-browser = { zen-browser = {
url = "github:0xc000022070/zen-browser-flake"; url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -15,6 +16,7 @@
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
nixos-hardware,
... ...
}: { }: {
nixosConfigurations = { nixosConfigurations = {
@ -22,6 +24,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix ./configuration.nix
nixos-hardware.nixosModules.framework-amd-ai-300-series
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;

View file

@ -16,6 +16,7 @@
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/687945b8-9e15-473d-b083-d3a3b12ac98f"; { device = "/dev/disk/by-uuid/687945b8-9e15-473d-b083-d3a3b12ac98f";
fsType = "ext4"; fsType = "ext4";
options = [ "noatime" ];
}; };
fileSystems."/boot" = fileSystems."/boot" =

View file

@ -87,6 +87,8 @@
ffmpeg ffmpeg
google-chrome google-chrome
pdftk pdftk
gh
nmap
]; ];
programs.helix = { programs.helix = {
@ -172,6 +174,7 @@
jsq = "jj squash"; jsq = "jj squash";
ns = "sudo nixos-rebuild switch --flake ~/Documents/nixos-config#jet"; ns = "sudo nixos-rebuild switch --flake ~/Documents/nixos-config#jet";
nd = "nix develop"; nd = "nix develop";
h = "hx";
}; };
}; };
@ -239,6 +242,7 @@
"${pkgs.kitty}/share/applications/kitty.desktop" "${pkgs.kitty}/share/applications/kitty.desktop"
"${inputs.zen-browser.packages."${pkgs.system}".twilight-official}/share/applications/zen-twilight.desktop" "${inputs.zen-browser.packages."${pkgs.system}".twilight-official}/share/applications/zen-twilight.desktop"
"${pkgs.code-cursor}/share/applications/cursor.desktop" "${pkgs.code-cursor}/share/applications/cursor.desktop"
"${pkgs.signal-desktop}/share/applications/signal.desktop"
]; ];
}; };