From 3c79934ce108feea9e9fa6657ae18e3c677fbc0a Mon Sep 17 00:00:00 2001 From: Don Harper Date: Sat, 8 Jun 2024 11:22:59 -0500 Subject: [PATCH] enabling disko for some profiles --- flake.nix | 17 +++++++------- hosts/ace/default.nix | 2 ++ hosts/ace/hardware-configuration.nix | 12 +++++----- hosts/disko/mmcblk.nix | 33 +++++++++++++++++++++++++++ hosts/disko/nvme.nix | 33 +++++++++++++++++++++++++++ hosts/disko/sda.nix | 33 +++++++++++++++++++++++++++ hosts/eve/default.nix | 2 ++ hosts/eve/hardware-configuration.nix | 10 ++++---- hosts/loki/default.nix | 1 + hosts/loki/hardware-configuration.nix | 4 ++-- 10 files changed, 125 insertions(+), 22 deletions(-) create mode 100644 hosts/disko/mmcblk.nix create mode 100644 hosts/disko/nvme.nix create mode 100644 hosts/disko/sda.nix diff --git a/flake.nix b/flake.nix index 6e0fef2..6e8a7fc 100644 --- a/flake.nix +++ b/flake.nix @@ -1,16 +1,15 @@ { inputs = { - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + disko.url = "github:nix-community/disko"; + disko.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.url = "github:nix-community/home-manager/master"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; stylix.url = "github:danth/stylix"; - home-manager = { - url = "github:nix-community/home-manager/master"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - wayland-pipewire-idle-inhibit = { - url = "github:rafaelrc7/wayland-pipewire-idle-inhibit"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + stylix.inputs.nixpkgs.follows = "nixpkgs"; + wayland-pipewire-idle-inhibit.url = "github:rafaelrc7/wayland-pipewire-idle-inhibit"; + wayland-pipewire-idle-inhibit.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs@{ diff --git a/hosts/ace/default.nix b/hosts/ace/default.nix index 912b6f7..cd40b92 100644 --- a/hosts/ace/default.nix +++ b/hosts/ace/default.nix @@ -4,7 +4,9 @@ imports = [ ./hardware-configuration.nix + ../disko/mmcblk.nix ../workstation + ../themes.nix ../wm ]; networking.hostName = "ace"; diff --git a/hosts/ace/hardware-configuration.nix b/hosts/ace/hardware-configuration.nix index 2e76296..395cfae 100644 --- a/hosts/ace/hardware-configuration.nix +++ b/hosts/ace/hardware-configuration.nix @@ -14,18 +14,18 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/31c01307-0e0b-4f01-8c0e-04bd70698a28"; + { device = "/dev/mmcblk0p2"; fsType = "ext4"; }; - fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/7714-A10A"; + fileSystems."/boot" = + { device = "/dev/mmcblk0p1"; fsType = "vfat"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/8c445831-23e0-4508-85d0-54ea8cd3f80b"; } - ]; + # swapDevices = + # [ { device = "/dev/disk/by-uuid/8c445831-23e0-4508-85d0-54ea8cd3f80b"; } + # ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/hosts/disko/mmcblk.nix b/hosts/disko/mmcblk.nix new file mode 100644 index 0000000..c48c792 --- /dev/null +++ b/hosts/disko/mmcblk.nix @@ -0,0 +1,33 @@ +{ + disko.devices = { + disk = { + vdb = { + device = "/dev/mmcblk0"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "2G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} + diff --git a/hosts/disko/nvme.nix b/hosts/disko/nvme.nix new file mode 100644 index 0000000..e860fb3 --- /dev/null +++ b/hosts/disko/nvme.nix @@ -0,0 +1,33 @@ +{ + disko.devices = { + disk = { + vdb = { + device = "/dev/nvme0n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "2G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} + diff --git a/hosts/disko/sda.nix b/hosts/disko/sda.nix new file mode 100644 index 0000000..97a07c5 --- /dev/null +++ b/hosts/disko/sda.nix @@ -0,0 +1,33 @@ +{ + disko.devices = { + disk = { + vdb = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "2G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} + diff --git a/hosts/eve/default.nix b/hosts/eve/default.nix index f122bcb..8991c68 100644 --- a/hosts/eve/default.nix +++ b/hosts/eve/default.nix @@ -4,7 +4,9 @@ imports = [ ./hardware-configuration.nix + ../disko/mmcblk.nix ../workstation + ../themes.nix ../wm ]; networking.hostName = "eve"; diff --git a/hosts/eve/hardware-configuration.nix b/hosts/eve/hardware-configuration.nix index a1e83b6..c925608 100644 --- a/hosts/eve/hardware-configuration.nix +++ b/hosts/eve/hardware-configuration.nix @@ -14,18 +14,18 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/3b13f80d-64f5-491c-b5d4-9bfb376e6f6c"; + { device = "/dev/mmcblk0p2"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/9492-C4B2"; + { device = "/dev/mmcblk0p1"; fsType = "vfat"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/a7ae7629-f44f-4298-bf31-59c51cd95658"; } - ]; + # swapDevices = + # [ { device = "/dev/disk/by-uuid/a7ae7629-f44f-4298-bf31-59c51cd95658"; } + # ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix index 1e7855f..86a8600 100644 --- a/hosts/loki/default.nix +++ b/hosts/loki/default.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix + ../disko/nvme.nix ../workstation ../workstation/kvm.nix ../wm diff --git a/hosts/loki/hardware-configuration.nix b/hosts/loki/hardware-configuration.nix index efb86ac..ab2e870 100644 --- a/hosts/loki/hardware-configuration.nix +++ b/hosts/loki/hardware-configuration.nix @@ -14,12 +14,12 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/2a362c6a-109a-4017-be40-1ad9a7f3c8b1"; + { device = "/dev/nvme0n1p2"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/14BC-6928"; + { device = "/dev/nvme0n1p1"; fsType = "vfat"; };