Fix being unable to boot laptop

This commit is contained in:
Daniel Flanagan 2023-09-14 21:00:11 -05:00
parent b4818d741c
commit ab1e07328e
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 21 additions and 10 deletions

View file

@ -1,10 +1,10 @@
{ {
standard = { disks ? [ "/dev/vda" ], ... }: { standard = { disks ? [ "/dev/vda" ], name ? "primary", ... }: {
# this is my standard partitioning scheme for my machines: an LUKS-encrypted # this is my standard partitioning scheme for my machines: an LUKS-encrypted
# btrfs volume # btrfs volume
disko.devices = { disko.devices = {
disk = { disk = {
primary = { ${builtins.trace name name} = {
type = "disk"; type = "disk";
device = builtins.elemAt disks 0; device = builtins.elemAt disks 0;
content = { content = {

View file

@ -15,10 +15,10 @@ let
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
(daniel system) (daniel system)
]; ];
disko = scheme: disks: [ disko = args @ { scheme, ... }: [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
scheme self.diskoConfigurations.${scheme}
{ _module.args.disks = disks; } { _module.args = args; }
]; ];
nixosSystem = system: modules: (inputs.nixpkgs.lib.nixosSystem { nixosSystem = system: modules: (inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system; }; specialArgs = { inherit inputs system; };
@ -27,19 +27,30 @@ let
./nixos/common.nix ./nixos/common.nix
] ++ modules ++ hms system; ] ++ modules ++ hms system;
}); });
diskoNixosSystem = system: scheme: disks: modules: (nixosSystem system ((disko scheme disks) ++ modules));
in in
{ {
# TODO: disko-fy rascal and beefcake? # TODO: disko-fy rascal and beefcake?
beefcake = nixosSystem [ beefcake = nixosSystem "x86-64-linux" [
./nixos/beefcake.nix ./nixos/beefcake.nix
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
]; ];
rascal = nixosSystem [ ./nixos/rascal.nix ]; rascal = nixosSystem "x86_64-linux" [ ./nixos/rascal.nix ];
musicbox = diskoNixosSystem "x86_64-linux" self.diskoConfigurations.unencrypted [ "/dev/sda" ] [ ./nixos/musicbox.nix ]; musicbox = nixosSystem "x86_64-linux" (disko {
thinker = diskoNixosSystem "x86_64-linux" self.diskoConfigurations.standard [ "/dev/nvme0n1" ] [ ./nixos/thinker.nix ]; scheme = "unencrypted";
disks = ["/dev/sda"];
} ++ [
./nixos/musicbox.nix
]);
thinker = nixosSystem "x86_64-linux" (disko {
scheme = "standard";
disks = ["/dev/nvme0n1"];
name = "vdb";
} ++ [
./nixos/thinker.nix
]);
# dragon = diskoNixosSystem self.diskoConfigurations.standard [ "/dev/disk/by-uuid/asdf" ] [ ./nixos/dragon.nix ]; # dragon = diskoNixosSystem self.diskoConfigurations.standard [ "/dev/disk/by-uuid/asdf" ] [ ./nixos/dragon.nix ];
} }