add fw13 pickwick compatible hardware module

This commit is contained in:
Ray Andrew 2025-03-04 00:14:29 -06:00
parent 5fdb6b7d2f
commit 4db41c080f
No known key found for this signature in database
4 changed files with 179 additions and 20 deletions

View file

@ -36,6 +36,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -77,6 +93,49 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1740915799,
"narHash": "sha256-JvQvtaphZNmeeV+IpHgNdiNePsIpHD5U/7QN5AeY44A=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "42b1ba089d2034d910566bf6b40830af6b8ec732",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -117,6 +176,22 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1740646007,
"narHash": "sha256-dMReDQobS3kqoiUCQIYI9c0imPXRZnBubX20yX/G5LE=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "009b764ac98a3602d41fc68072eeec5d24fc0e49",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1739736696, "lastModified": 1739736696,
@ -169,9 +244,12 @@
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"ghostty": "ghostty", "ghostty": "ghostty",
"git-hooks": "git-hooks",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"treefmt-nix": "treefmt-nix",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
}, },
@ -190,6 +268,26 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1739829690,
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "3d0579f5cc93436052d94b73925b48973a104204",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"zen-browser": { "zen-browser": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View file

@ -3,6 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
@ -12,12 +13,17 @@
ghostty.url = "github:ghostty-org/ghostty"; ghostty.url = "github:ghostty-org/ghostty";
nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
treefmt-nix,
... ...
} @ inputs: let } @ inputs: let
inherit (self) outputs; inherit (self) outputs;
@ -44,24 +50,77 @@
}; };
}; };
commonArgs = createCommonArgs system; commonArgs = createCommonArgs system;
in import ./hosts commonArgs // {
# nixosConfigurations = { # call with forAllSystems (commonArgs: function body)
# pickwick = nixpkgs.lib.nixosSystem { forAllSystems =
# specialArgs = {inherit inputs outputs system dots user;}; fn:
# modules = [ lib.genAttrs [
# ./nixos "x86_64-linux"
# # ./nixos/configuration.nix "aarch64-linux"
# ./hosts/pickwick "x86_64-darwin"
# inputs.disko.nixosModules.default "aarch64-darwin"
# inputs.home-manager.nixosModules.home-manager ] (system: fn (createCommonArgs system));
# (nixpkgs.lib.mkAliasOptionModule [ "hm" ] [ treefmtEval = forAllSystems (
# "home-manager" { pkgs, ... }:
# "users" treefmt-nix.lib.evalModule pkgs {
# user projectRootFile = "flake.nix";
# ]) programs.nixfmt-rfc-style.enable = true;
# ]; settings.global.excludes = [ "flake.lock" ];
# }; }
# }; );
in (import ./hosts commonArgs) //
{
checks = forAllSystems (
{
pkgs,
system,
...
}:
{
formatting = treefmtEval.${system}.config.build.check self;
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
excludes = [ "flake.lock" ];
hooks = {
treefmt = {
enable = true;
package = lib.mkForce treefmtEval.${system}.config.build.wrapper;
args = [
# "--config-file ${treefmtEval.${system}.config.build.configFile}"
];
};
};
};
}
);
devShells = forAllSystems (
{
pkgs,
system,
...
}:
{
default = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
name = "dotfiles";
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages;
nativeBuildInputs = [
treefmtEval.${system}.config.build.wrapper
];
packages = with pkgs; [
sops
age
ssh-to-age
nixfmt-rfc-style
];
DIRENV_LOG_FORMAT = "";
};
}
);
formatter = forAllSystems ({ system, ... }: treefmtEval.${system}.config.build.wrapper);
}; };
} }

View file

@ -29,6 +29,8 @@
bluetooth.enable = true; bluetooth.enable = true;
}; };
services.fwupd.enable = true;
time.timeZone = "America/Chicago"; time.timeZone = "America/Chicago";
users.users = { users.users = {

View file

@ -1,10 +1,11 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, inputs, ... }:
{ {
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
(import ./disko.nix { device = "/dev/nvme0n1"; }) (import ./disko.nix { device = "/dev/nvme0n1"; })
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
@ -15,7 +16,6 @@
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
swapDevices = [ swapDevices = [
{ {