From 3ae6fd49a3f1f71946f671c0bbfab47fe19d4189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 26 Apr 2019 07:21:51 +0100 Subject: [PATCH] Make the nixos boxes definitions unrelated to each other --- nixos/boot.nix | 8 -------- nixos/boxes/skinnyv.nix | 9 +++++++++ nixos/{configuration.nix => common.nix} | 4 +--- 3 files changed, 10 insertions(+), 11 deletions(-) rename nixos/{configuration.nix => common.nix} (96%) diff --git a/nixos/boot.nix b/nixos/boot.nix index 46b82b1a..3156bf32 100644 --- a/nixos/boot.nix +++ b/nixos/boot.nix @@ -3,14 +3,6 @@ fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; boot = { - initrd.luks.devices = [ - { - name = "root"; - device = "/dev/disk/by-uuid/8c76bf01-59b3-4c60-b853-e9cb77f3ca14"; - preLVM = true; - allowDiscards = true; - } - ]; loader.grub = { enable = true; version = 2; diff --git a/nixos/boxes/skinnyv.nix b/nixos/boxes/skinnyv.nix index 9fd6760b..a44dba9f 100644 --- a/nixos/boxes/skinnyv.nix +++ b/nixos/boxes/skinnyv.nix @@ -1,4 +1,13 @@ { config, pkgs, ... }: { networking.hostName = "skinnyv"; + boot.initrd.luks.devices = [ + { + name = "root"; + device = "/dev/disk/by-uuid/8c76bf01-59b3-4c60-b853-e9cb77f3ca14"; + preLVM = true; + allowDiscards = true; + }]; + + imports = [ ../common.nix ]; } \ No newline at end of file diff --git a/nixos/configuration.nix b/nixos/common.nix similarity index 96% rename from nixos/configuration.nix rename to nixos/common.nix index 168fca16..63f36aa6 100644 --- a/nixos/configuration.nix +++ b/nixos/common.nix @@ -13,8 +13,6 @@ in ./gsconnect.nix ./gfx.nix ./boot.nix - - ./boxes/skinnyv.nix # TODO: invert relationship ]; nixpkgs.config = { @@ -23,7 +21,7 @@ in unstable = import unstableTarball { config = config.nixpkgs.config; }; - cyplo = import "/home/cyryl/dev/nixpkgs/" { + cyplo = import ./nixpkgs { config = config.nixpkgs.config; }; };