diff --git a/flake.nix b/flake.nix index 5511603..843dacc 100644 --- a/flake.nix +++ b/flake.nix @@ -7,34 +7,40 @@ nixpkgs.url = "nixpkgs/nixos-23.11"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - - # nixos user repository ? :o - # nur.url = "git:nix-community/NUR"; - - # alejandra ?? think its a code formatter + + # alejandra ?? think its a nix code formatter # alejandra.url = "github:kamadorueda/alejandra/3.0.0"; - # nix gaming ? - # nix-gaming.url = "github:fufexan/nix-gaming"; + # declaratice disks + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # declarative dots home-manager = { url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; - }; - + }; # window manager (ricer friendly) hyprland = { url = "github:hyprwm/Hyprland"; 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 system = "x86_64-linux"; overlay-unstable = final: prev: { @@ -46,7 +52,7 @@ overlay-flake-pkgs = final: prev: { }; common-modules = [ - # ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable overlay-flake-pkgs ]; }) + ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable overlay-flake-pkgs ]; }) ]; in { @@ -55,9 +61,10 @@ inherit system; # specialArgs = { inherit hyprland; }; modules = [ + disko.nixosModules.disko ./hosts/proserpina/configuration.nix # Load muir main nix config # nixos-hardware.nixosModules.$MODEL - ]; # ++ common-modules; + ] ++ common-modules; }; }; }; diff --git a/hosts/proserpina/configuration.nix b/hosts/proserpina/configuration.nix index ce89a67..c652a14 100644 --- a/hosts/proserpina/configuration.nix +++ b/hosts/proserpina/configuration.nix @@ -4,7 +4,7 @@ imports = [ # Include the results of the hardware scan. ./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 ./network-configuration.nix diff --git a/hosts/proserpina/disko-config.nix b/hosts/proserpina/disko-config.nix index ecc32ac..06b376d 100644 --- a/hosts/proserpina/disko-config.nix +++ b/hosts/proserpina/disko-config.nix @@ -1,4 +1,5 @@ { + disko.devices = { disk = { sda = { @@ -19,6 +20,7 @@ ]; }; }; + luks = { size = "100%"; content = { @@ -31,6 +33,7 @@ #keyFile = "/tmp/secret.key"; }; # additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; + content = { type = "btrfs"; extraArgs = [ "-f" ]; @@ -49,11 +52,15 @@ }; }; }; + }; }; + }; }; }; }; + }; + }