mirror of
https://github.com/gburd/nix-config.git
synced 2024-07-01 23:57:20 +00:00
fixes
This commit is contained in:
parent
bf1e85957e
commit
6ddb600069
|
@ -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
|
||||
, ...
|
||||
|
|
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
|
||||
# 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";
|
||||
|
|
|
@ -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"
|
||||
];
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue