might've fixed disko ??? OMG TOTES GOATS ???

This commit is contained in:
Serenity-F 2024-04-05 12:47:04 +10:00
parent 0801a929bd
commit 4f5acf57ad
3 changed files with 30 additions and 16 deletions

View file

@ -8,33 +8,39 @@
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# nixos user repository ? :o # alejandra ?? think its a nix code formatter
# nur.url = "git:nix-community/NUR";
# alejandra ?? think its a code formatter
# alejandra.url = "github:kamadorueda/alejandra/3.0.0"; # alejandra.url = "github:kamadorueda/alejandra/3.0.0";
# nix gaming ? # declaratice disks
# nix-gaming.url = "github:fufexan/nix-gaming"; disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# declarative dots # declarative dots
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-23.11"; url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# window manager (ricer friendly) # window manager (ricer friendly)
hyprland = { hyprland = {
url = "github:hyprwm/Hyprland"; url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprpicker.url = "github:hyprwm/hyprpicker";
# hypr-contrib.url = "github:hyprwm/contrib";
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, hyprland, ... }: outputs = {
self,
nixpkgs,
nixpkgs-unstable,
nixos-hardware,
disko,
home-manager,
hyprland,
...
}:
let let
system = "x86_64-linux"; system = "x86_64-linux";
overlay-unstable = final: prev: { overlay-unstable = final: prev: {
@ -46,7 +52,7 @@
overlay-flake-pkgs = final: prev: { overlay-flake-pkgs = final: prev: {
}; };
common-modules = [ common-modules = [
# ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable overlay-flake-pkgs ]; }) ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable overlay-flake-pkgs ]; })
]; ];
in in
{ {
@ -55,9 +61,10 @@
inherit system; inherit system;
# specialArgs = { inherit hyprland; }; # specialArgs = { inherit hyprland; };
modules = [ modules = [
disko.nixosModules.disko
./hosts/proserpina/configuration.nix # Load muir main nix config ./hosts/proserpina/configuration.nix # Load muir main nix config
# nixos-hardware.nixosModules.$MODEL # nixos-hardware.nixosModules.$MODEL
]; # ++ common-modules; ] ++ common-modules;
}; };
}; };
}; };

View file

@ -4,7 +4,7 @@
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" # "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
./disko-config.nix ./disko-config.nix
./network-configuration.nix ./network-configuration.nix

View file

@ -1,4 +1,5 @@
{ {
disko.devices = { disko.devices = {
disk = { disk = {
sda = { sda = {
@ -19,6 +20,7 @@
]; ];
}; };
}; };
luks = { luks = {
size = "100%"; size = "100%";
content = { content = {
@ -31,6 +33,7 @@
#keyFile = "/tmp/secret.key"; #keyFile = "/tmp/secret.key";
}; };
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; # additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; extraArgs = [ "-f" ];
@ -49,11 +52,15 @@
}; };
}; };
}; };
}; };
}; };
}; };
}; };
}; };
}; };
}; };
} }