From f9641cc1ed5c8436c296dd31af2745ddcdf3e426 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 2 Jan 2018 12:08:35 +0100 Subject: refactor(nix): Use disk labels instead of disk UUIDs Makes configuration portable between VM instances. --- nix/configuration.nix | 6 ++++++ nix/glesys.nix | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nix/configuration.nix b/nix/configuration.nix index c93bc65b0e40..78f34cd037cf 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 b485d2637c67..4cd66cb19595 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 = [ -- cgit 1.4.1