From 615feaf22e0b89aac51f5d525ec1641c8b4c485b Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 31 Jan 2020 23:18:17 +1300 Subject: [PATCH] shell.nix improvements --- configs/porani/hardware-configuration.nix | 24 +++++----- shell.nix | 55 +++++++++-------------- 2 files changed, 33 insertions(+), 46 deletions(-) diff --git a/configs/porani/hardware-configuration.nix b/configs/porani/hardware-configuration.nix index fa5cd78..5bd70b1 100644 --- a/configs/porani/hardware-configuration.nix +++ b/configs/porani/hardware-configuration.nix @@ -55,18 +55,18 @@ # partitions # ---------- - fileSystems."/" = - { device = "/dev/disk/by-uuid/77a3e839-5a80-4777-93c3-31be7f0cb99d"; - fsType = "ext4"; - }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/FBFB-8DA5"; - fsType = "vfat"; - }; - fileSystems."/home" = - { device = "/dev/disk/by-uuid/192a8bd6-e5f7-4e66-b69e-f3da701da343"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/77a3e839-5a80-4777-93c3-31be7f0cb99d"; + fsType = "ext4"; + }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/FBFB-8DA5"; + fsType = "vfat"; + }; + fileSystems."/home" = { + device = "/dev/disk/by-uuid/192a8bd6-e5f7-4e66-b69e-f3da701da343"; + fsType = "ext4"; + }; swapDevices = [ ]; diff --git a/shell.nix b/shell.nix index 8e9e0ed..2259b1c 100644 --- a/shell.nix +++ b/shell.nix @@ -114,6 +114,7 @@ let ref = "76260ad60cd99d40ab25df1400b0663d48e736db"; }; + # enable only on workhorse # wetten.file = toString ./wetten; }; @@ -126,41 +127,27 @@ let { host ? (hostPattern name), target ? "/var/src/", user ? "root" , commandPrefix ? "deploy", enableSwitch ? true }: with ops; - jobs "${commandPrefix}-${name}" "${user}@${host}${target}" ( - populateCommands - ++ (if enableSwitch then [ switch ] else [ ])); + jobs "${commandPrefix}-${name}" "${user}@${host}${target}" + (populateCommands ++ (if enableSwitch then [ switch ] else [ ])); - #serverDeployment = name: - # { host ? (hostPattern name), target ? "/var/src/", user ? "root" - # , commandPrefix ? "deploy", enableSwitch ? true }: - # with ops; - # jobs "${commandPrefix}-${name}" "${user}@${host}${target}" ([ - # ] ++ (if enableSwitch then [ switch ] else [ ])); - serverDeployment = name: deployment [ - (ops.populate source.nixPkgs) - (ops.populate source.modules) - (ops.populate (source.secrets name)) - (ops.populate (source.system name)) - ] name; + serverDeployment = name: + with ops; + deployment [ + (populate source.nixPkgs) + (populate source.modules) + (populate (source.secrets name)) + (populate (source.system name)) + ] name; - #desktopDeployment = name: - # { host ? (hostPattern name), target ? "/var/src/", user ? "root" - # , commandPrefix ? "deploy", enableSwitch ? true }: - # with ops; - # jobs "${commandPrefix}-${name}" "${user}@${host}${target}" ([ - # (populate source.nixPkgs) - # (populate source.modules) - # (populate (source.secrets name)) - # (populate (source.system name)) - # (populate source.desktopSecrets) - # ] ++ (if enableSwitch then [ switch ] else [ ])); - desktopDeployment = name: deployment [ - (ops.populate source.nixPkgs) - (ops.populate source.modules) - (ops.populate (source.secrets name)) - (ops.populate (source.system name)) - (ops.populate source.desktopSecrets) - ] name; + desktopDeployment = name: + with ops; + deployment [ + (populate source.nixPkgs) + (populate source.modules) + (populate (source.secrets name)) + (populate (source.system name)) + (populate source.desktopSecrets) + ] name; cleanupNix = name: let @@ -191,7 +178,7 @@ let target = "/mnt/var/src"; enableSwitch = false; }); - in deployments ++ cleanup ++ install ; + in deployments ++ cleanup ++ install; desktops = with lib; let