summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-01-02T11·08+0100
committerVincent Ambo <tazjin@gmail.com>2018-01-02T11·08+0100
commitf9641cc1ed5c8436c296dd31af2745ddcdf3e426 (patch)
treedca137400da77c94067f9ff815ee657108ec18b9
parenta9401f94db8eb4d1de439a32f748b2b8f5e598a7 (diff)
refactor(nix): Use disk labels instead of disk UUIDs
Makes configuration portable between VM instances.
-rw-r--r--nix/configuration.nix6
-rw-r--r--nix/glesys.nix6
2 files changed, 6 insertions, 6 deletions
diff --git a/nix/configuration.nix b/nix/configuration.nix
index c93bc65b0e..78f34cd037 100644
--- a/nix/configuration.nix
+++ b/nix/configuration.nix
@@ -7,6 +7,12 @@
   boot.loader.grub.version = 2;
   boot.loader.grub.device = "/dev/sda";
 
+  # Configure root disk
+  fileSystems."/" = {
+    device = "/dev/disk/by-label/nixos";
+    fsType = "ext4";
+  };
+
   time.timeZone = "Europe/Oslo";
 
   environment.systemPackages = with pkgs; [
diff --git a/nix/glesys.nix b/nix/glesys.nix
index b485d2637c..4cd66cb195 100644
--- a/nix/glesys.nix
+++ b/nix/glesys.nix
@@ -2,12 +2,6 @@
   sto-tazserve-1 = { pkgs, config, ... }: {
     deployment.targetHost = "46.21.106.241";
 
-    # Configure root disk
-    fileSystems."/" = {
-      device = "/dev/disk/by-uuid/edb2a58c-561b-4597-9d88-9886cdfb1eac";
-      fsType = "ext4";
-    };
-
     # Configure network
     networking.hostName = "sto-tazserve-1";
     networking.interfaces.ens32.ip4 = [