This commit is contained in:
Greg Burd 2023-10-02 12:36:47 -04:00
parent bf1e85957e
commit 6ddb600069
No known key found for this signature in database
GPG key ID: 1FC1E7793410DE46
5 changed files with 28 additions and 6 deletions

View file

@ -1,3 +1,4 @@
{
description = "Greg Burd's NixOS and Home Manager Configuration";
@ -13,6 +14,8 @@
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
fh.url = "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz";
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
@ -39,6 +42,7 @@
};
outputs =
{ self
, fh
, nixpkgs
, nix-formatter-pack
, ...

View file

@ -0,0 +1,16 @@
{ config, lib, pkgs, ...}: {
environment.systemPackages = with pkgs;
[
clinfo
libva-utils
python311Packages.gpustat
vdpauinfo
] ++ (if lib.elem "nvidia" config.services.xserver.videoDrivers then
[
nvtop
]
else
[
nvtop-amd
]);
}

View file

@ -1,4 +1,4 @@
{ config, desktop, hostname, inputs, lib, modulesPath, outputs, pkgs, stateVersion, username, ... }:
{ config, desktop, hostname, inputs, lib, modulesPath, outputs, pkgs, platform, stateVersion, username, ... }:
let
# Only enable auto upgrade if current config came from a clean tree
# This avoids accidental auto-upgrades when working locally.
@ -104,6 +104,7 @@ in
unzip
usbutils
wget
inputs.fh.packages.${platform}.default
];
variables = {
EDITOR = "vi";

View file

@ -6,6 +6,7 @@
inputs.nixos-hardware.nixosModules.common-pc
inputs.nixos-hardware.nixosModules.common-pc-ssd
(import ./disks.nix)
../_mixins/hardware/gpu.nix
../_mixins/hardware/systemd-boot.nix
../_mixins/services/bluetooth.nix
@ -23,9 +24,7 @@
"nvme"
"rtsx_pci_sdmmc"
"sd_mod"
"sdhci_pci"
"uas"
"usbhid"
"thunderbolt"
"usb_storage"
"xhci_pci"
];

View file

@ -1,4 +1,4 @@
{ config, disk ? "/dev/nvme0n1", ... }:
{ config, disks ? [ "/dev/nvme0n1" ], ... }:
let
hostname = config.networking.hostName;
in
@ -7,12 +7,14 @@ in
disk = {
nvme = {
type = "disk";
device = disk;
device = builtins.elementAt disks 0;
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
bootable = true;
flags = [ "esp" ];
type = "EF00";
content = {
type = "filesystem";