mirror of
https://github.com/gburd/nix-config.git
synced 2024-10-03 12:16:57 +00:00
fixes
This commit is contained in:
parent
bf1e85957e
commit
6ddb600069
5 changed files with 28 additions and 6 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
description = "Greg Burd's NixOS and Home Manager Configuration";
|
description = "Greg Burd's NixOS and Home Manager Configuration";
|
||||||
|
|
||||||
|
@ -13,6 +14,8 @@
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
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.url = "github:nix-community/home-manager/release-23.05";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
@ -39,6 +42,7 @@
|
||||||
};
|
};
|
||||||
outputs =
|
outputs =
|
||||||
{ self
|
{ self
|
||||||
|
, fh
|
||||||
, nixpkgs
|
, nixpkgs
|
||||||
, nix-formatter-pack
|
, nix-formatter-pack
|
||||||
, ...
|
, ...
|
||||||
|
|
16
nixos/_mixins/hardware/gpu.nix
Normal file
16
nixos/_mixins/hardware/gpu.nix
Normal 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
|
||||||
|
]);
|
||||||
|
}
|
|
@ -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
|
let
|
||||||
# Only enable auto upgrade if current config came from a clean tree
|
# Only enable auto upgrade if current config came from a clean tree
|
||||||
# This avoids accidental auto-upgrades when working locally.
|
# This avoids accidental auto-upgrades when working locally.
|
||||||
|
@ -104,6 +104,7 @@ in
|
||||||
unzip
|
unzip
|
||||||
usbutils
|
usbutils
|
||||||
wget
|
wget
|
||||||
|
inputs.fh.packages.${platform}.default
|
||||||
];
|
];
|
||||||
variables = {
|
variables = {
|
||||||
EDITOR = "vi";
|
EDITOR = "vi";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
inputs.nixos-hardware.nixosModules.common-pc
|
inputs.nixos-hardware.nixosModules.common-pc
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||||
(import ./disks.nix)
|
(import ./disks.nix)
|
||||||
|
../_mixins/hardware/gpu.nix
|
||||||
|
|
||||||
../_mixins/hardware/systemd-boot.nix
|
../_mixins/hardware/systemd-boot.nix
|
||||||
../_mixins/services/bluetooth.nix
|
../_mixins/services/bluetooth.nix
|
||||||
|
@ -23,9 +24,7 @@
|
||||||
"nvme"
|
"nvme"
|
||||||
"rtsx_pci_sdmmc"
|
"rtsx_pci_sdmmc"
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
"sdhci_pci"
|
"thunderbolt"
|
||||||
"uas"
|
|
||||||
"usbhid"
|
|
||||||
"usb_storage"
|
"usb_storage"
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, disk ? "/dev/nvme0n1", ... }:
|
{ config, disks ? [ "/dev/nvme0n1" ], ... }:
|
||||||
let
|
let
|
||||||
hostname = config.networking.hostName;
|
hostname = config.networking.hostName;
|
||||||
in
|
in
|
||||||
|
@ -7,12 +7,14 @@ in
|
||||||
disk = {
|
disk = {
|
||||||
nvme = {
|
nvme = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = disk;
|
device = builtins.elementAt disks 0;
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
ESP = {
|
ESP = {
|
||||||
size = "512M";
|
size = "512M";
|
||||||
|
bootable = true;
|
||||||
|
flags = [ "esp" ];
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
|
|
Loading…
Reference in a new issue