From 96a8f7e941d05fd700eecb3f0e4da04c6153d812 Mon Sep 17 00:00:00 2001 From: batvin321 Date: Mon, 18 Nov 2024 14:29:44 -0500 Subject: [PATCH] disko --- flake.lock | 30 ++++++++++++++++++++++++++---- flake.nix | 6 ++++-- setup.sh | 4 +++- system/vincents-old-hp/disk.nix | 4 ++-- 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index b009d4e..7c45579 100644 --- a/flake.lock +++ b/flake.lock @@ -1,17 +1,38 @@ { "nodes": { + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1730135292, + "narHash": "sha256-CI27qHAbc3/tIe8sb37kiHNaeCqGxNimckCMj0lW5kg=", + "owner": "nix-community", + "repo": "disko", + "rev": "ab58501b2341bc5e0fc88f2f5983a679b075ddf5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "latest", + "repo": "disko", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1731951205, - "narHash": "sha256-9YhDFPy6K7vUA9NVvlIrV0dFxrARqKgTFhst94yblkM=", + "lastModified": 1731954261, + "narHash": "sha256-xk83zrDElaMXiHI8DH6sLLTix5+ijPYmIusiQ16GDdc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0054a256665f0df8d61b4df921280d6994f2c284", + "rev": "ad2c28c6c5cc04e09bed68db46db5718d40b5b9e", "type": "github" }, "original": { "owner": "nixos", - "ref": "release-24.11", + "ref": "release-24.05", "repo": "nixpkgs", "type": "github" } @@ -34,6 +55,7 @@ }, "root": { "inputs": { + "disko": "disko", "nixpkgs": "nixpkgs", "pkgsUnstable": "pkgsUnstable" } diff --git a/flake.nix b/flake.nix index e34a62f..7bc4c49 100755 --- a/flake.nix +++ b/flake.nix @@ -2,11 +2,13 @@ description = "my nixos setup"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-24.11"; + nixpkgs.url = "github:nixos/nixpkgs/release-24.05"; pkgsUnstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + disko.url = "github:nix-community/disko/latest"; + disko.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, nixpkgs, pkgsUnstable, ... }: + outputs = { self, nixpkgs, disko, pkgsUnstable, ... }: let system = "x86_64-linux"; lib = nixpkgs.lib; diff --git a/setup.sh b/setup.sh index 74be951..7dc8a5c 100755 --- a/setup.sh +++ b/setup.sh @@ -1,3 +1,5 @@ -sudo nixos-rebuild boot --flake .# +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount system/vincents-old-hp/disk.nix + +sudo nixos-install --flake .#vincent-old-hp echo "REBOOT YOUR COMPUTER" diff --git a/system/vincents-old-hp/disk.nix b/system/vincents-old-hp/disk.nix index 76f99c6..6cef66c 100755 --- a/system/vincents-old-hp/disk.nix +++ b/system/vincents-old-hp/disk.nix @@ -1,9 +1,9 @@ { disko.devices = { disk = { - nvme0n1 = { + sda = { type = "disk"; - device = "/dev/nvme0n1"; + device = "/dev/sda"; content = { type = "gpt"; partitions = {