From fd1ead0b62b46472f10c76a2c925d3245dd41f3e Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Sat, 1 Jun 2024 19:57:24 -0600 Subject: [PATCH] Add nixos-hardware config for Howl --- flake.lock | 17 +++++++++++++++++ flake.nix | 3 +++ machines/howl/default.nix | 14 +++++++++++++- machines/howl/hardware-configuration.nix | 3 +++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 197b849..d21fd8c 100644 --- a/flake.lock +++ b/flake.lock @@ -184,6 +184,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1717248095, + "narHash": "sha256-e8X2eWjAHJQT82AAN+mCI0B68cIDBJpqJ156+VRrFO0=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "7b49d3967613d9aacac5b340ef158d493906ba79", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1710420202, @@ -291,6 +307,7 @@ "deploy-rs": "deploy-rs", "flake-utils": "flake-utils", "nix-index-database": "nix-index-database", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-frigate": "nixpkgs-frigate", "nixpkgs-xone-fix": "nixpkgs-xone-fix", diff --git a/flake.nix b/flake.nix index 39bf617..c25840b 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,8 @@ flake-utils.url = "github:numtide/flake-utils"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + # mail server simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-22.05"; simple-nixos-mailserver.inputs.nixpkgs.follows = "nixpkgs"; @@ -97,6 +99,7 @@ specialArgs = { inherit allModules; lib = self.lib; + nixos-hardware = inputs.nixos-hardware; }; }; in diff --git a/machines/howl/default.nix b/machines/howl/default.nix index 1652d0d..ced8e8b 100644 --- a/machines/howl/default.nix +++ b/machines/howl/default.nix @@ -1,8 +1,9 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, nixos-hardware, ... }: { imports = [ ./hardware-configuration.nix + nixos-hardware.nixosModules.framework-13-7040-amd ]; @@ -58,4 +59,15 @@ ]; programs.adb.enable = true; + + # thunderbolt + users.users.googlebot.packages = with pkgs; [ + kdePackages.plasma-thunderbolt + ]; + + services.fwupd.enable = true; + + # fingerprint reader has initially shown to be more of a nuisance than a help + # it makes sddm log in fail most of the time and take several minutes to finish + services.fprintd.enable = false; } diff --git a/machines/howl/hardware-configuration.nix b/machines/howl/hardware-configuration.nix index 92ceb0a..414888c 100644 --- a/machines/howl/hardware-configuration.nix +++ b/machines/howl/hardware-configuration.nix @@ -14,6 +14,9 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; + # thunderbolt + services.hardware.bolt.enable = true; + # firmware firmware.x86_64.enable = true;