From 4230501cc1d82338d0da84f0169887ae2b9ef40d Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 4 Oct 2023 13:49:48 -0500 Subject: [PATCH] Fix thinker --- disko/default.nix | 4 +--- modules/nixos/amd.nix | 7 ------- modules/nixos/default.nix | 1 - nixos/dragon/default.nix | 3 ++- nixos/rascal/default.nix | 5 +++-- nixos/thinker/default.nix | 15 +++++++++++---- 6 files changed, 17 insertions(+), 18 deletions(-) delete mode 100644 modules/nixos/amd.nix diff --git a/disko/default.nix b/disko/default.nix index 092f705..cacad4e 100644 --- a/disko/default.nix +++ b/disko/default.nix @@ -63,11 +63,9 @@ }; # TODO: figure out what I can't have an optiona/default 'name' attribute here so I can DRY with "standard" thinker = {disks ? ["/dev/vda"], ...}: { - # this is my standard partitioning scheme for my machines: an LUKS-encrypted - # btrfs volume disko.devices = { disk = { - vda = { + vdb = { type = "disk"; device = builtins.elemAt disks 0; content = { diff --git a/modules/nixos/amd.nix b/modules/nixos/amd.nix deleted file mode 100644 index 8a9463d..0000000 --- a/modules/nixos/amd.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - config, - lib, - ... -}: { - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 392e8e4..49b2661 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -2,7 +2,6 @@ # These should be stuff you would like to share with others, not your personal configurations. { common = import ./common.nix; - amd = import ./amd.nix; melee = import ./melee.nix; desktop-usage = import ./desktop-usage.nix; intel = import ./intel.nix; diff --git a/nixos/dragon/default.nix b/nixos/dragon/default.nix index ade3d63..ac54b74 100644 --- a/nixos/dragon/default.nix +++ b/nixos/dragon/default.nix @@ -15,11 +15,12 @@ (modulesPath + "/installer/scan/not-detected.nix") inputs.disko.nixosModules.disko flake.diskoConfigurations.standard + inputs.hardware.nixosModules.common-cpu-amd + inputs.hardware.nixosModules.common-pc-ssd ] ++ (with outputs.nixosModules; [ # If you want to use modules your own flake exports (from modules/nixos): # melee - amd desktop-usage podman postgres diff --git a/nixos/rascal/default.nix b/nixos/rascal/default.nix index 1b30e50..f0775b1 100644 --- a/nixos/rascal/default.nix +++ b/nixos/rascal/default.nix @@ -1,11 +1,12 @@ { - outputs, + inputs, + # outputs, config, modulesPath, ... }: { imports = [ - outputs.nixosModules.amd + inputs.hardware.nixosModules.common-cpu-amd (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/nixos/thinker/default.nix b/nixos/thinker/default.nix index bf7587a..92462aa 100644 --- a/nixos/thinker/default.nix +++ b/nixos/thinker/default.nix @@ -3,8 +3,8 @@ inputs, outputs, lib, - config, - pkgs, + # config, + # pkgs, ... }: { networking.hostName = "thinker"; @@ -23,6 +23,7 @@ ]) ++ [ inputs.hardware.nixosModules.lenovo-thinkpad-t480 + inputs.hardware.nixosModules.common-pc-laptop-ssd # ./relative-module.nix ]; @@ -31,8 +32,14 @@ # need to measure percentage lost per day, but I think it's around 10%/day # it looks like I may have had hibernation working -- see ../old/third.nix - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.systemd-boot.enable = true; + boot = { + loader = { + efi.canTouchEfiVariables = true; + systemd-boot.enable = true; + }; + kernelParams = ["boot.shell_on_fail"]; + initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"]; + }; hardware.bluetooth.enable = true; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; services.printing.enable = true; # I own a printer in the year of our Lord 2023