From ae019440a53646ae28a9177dc7101fd3fbb753d2 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 7 Feb 2025 23:31:20 -0500 Subject: [PATCH] laptop disko test --- etcnixos/disko_mreow.nix | 40 +++++++++++++++++++++++++++++++++++++++ etcnixos/flake.nix | 5 +++++ etcnixos/system-mreow.nix | 3 +++ home-manager/flake.lock | 6 +++--- 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 etcnixos/disko_mreow.nix diff --git a/etcnixos/disko_mreow.nix b/etcnixos/disko_mreow.nix new file mode 100644 index 0000000..141a4e9 --- /dev/null +++ b/etcnixos/disko_mreow.nix @@ -0,0 +1,40 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/sdb"; + # device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + settings.allowDiscards = true; + passwordFile = "/tmp/secret.key"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/etcnixos/flake.nix b/etcnixos/flake.nix index 3fc0e98..3884fec 100644 --- a/etcnixos/flake.nix +++ b/etcnixos/flake.nix @@ -20,6 +20,11 @@ url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs"; }; + + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = diff --git a/etcnixos/system-mreow.nix b/etcnixos/system-mreow.nix index 49d1077..1a0881f 100644 --- a/etcnixos/system-mreow.nix +++ b/etcnixos/system-mreow.nix @@ -13,6 +13,9 @@ inputs.nixos-hardware.nixosModules.framework-12th-gen-intel inputs.lanzaboote.nixosModules.lanzaboote + + inputs.disko.nixosModules.disko + ./disko_mreow.nix ]; hardware.framework.laptop13.audioEnhancement = { diff --git a/home-manager/flake.lock b/home-manager/flake.lock index 4c03aa9..8493b8d 100644 --- a/home-manager/flake.lock +++ b/home-manager/flake.lock @@ -242,11 +242,11 @@ ] }, "locked": { - "lastModified": 1738951757, - "narHash": "sha256-I0Bmxpjid9m7Gg+z2HVASlpQpKzR7QJq5X8b9wCZFVY=", + "lastModified": 1738984719, + "narHash": "sha256-bejXG9u1z3Er7kcsCF3L9v7pb94J9OiuIYoO/TQgEiQ=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "e2f657fb55f62fb57e614a1e22e9e667996f5234", + "rev": "e81208f101c5e6c85630fd3b35c798e1ac77f1d4", "type": "github" }, "original": {