Commit 9fcf2f77cd77

Vincent Demeester <vincent@sbr.pm>
2020-12-11 17:28:50
systems: revert to normal nix…
… let's experiment with `nixFlake` on a VM to start with Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent cda9428
systems/hosts/naruhodo.flake.nix
@@ -13,12 +13,14 @@ let
   endpointPublicKey = strings.optionalString secretCondition (import secretPath).wireguard.kerkouane.publicKey;
 in
 {
+  /*
   imports = [
     ../hardware/thinkpad-t480s.nix
     ../modules
     (import ../../users).vincent
     (import ../../users).root
   ];
+  */
 
   fileSystems."/" =
     {
systems/modules/core/nix.nix
@@ -57,7 +57,7 @@ in
       daemonIONiceLevel = 5;
       daemonNiceLevel = 10;
       # if hydra is down, don't wait forever
-      package = pkgs.nixFlakes;
+      # package = pkgs.nixFlakes;
       extraOptions = ''
         connect-timeout = 20
         build-cores = 0
@@ -86,6 +86,9 @@ in
       useSandbox = true;
     };
 
+    # `nix-daemon` will hit the stack limit when using `nixFlakes`.
+    systemd.services.nix-daemon.serviceConfig."LimitSTACK" = "infinity";
+
     nixpkgs = {
       overlays = [
         (import ../../../overlays/mkSecret.nix)
systems/modules/profiles/default.nix
@@ -1,6 +1,5 @@
 {
   imports = [
-    # Remove "nixos" from here
     ./avahi.nix
     ./base.nix
     ./desktop.nix
systems/profiles/base.nix
@@ -0,0 +1,15 @@
+{ config, lib, pkgs, ... }:
+let
+  inherit (lib) mkEnableOption;
+  cfg = config.profiles.base;
+in
+{
+  options = {
+    enable = mkEnableOption "base configuration";
+  };
+  config = {
+
+    # `nix-daemon` will hit the stack limit when using `nixFlakes`.
+    systemd.services.nix-daemon.serviceConfig."LimitSTACK" = "infinity";
+  };
+}
systems/profiles/default.nix
@@ -0,0 +1,12 @@
+{ lib, ... }:
+
+{
+  imports = [
+    ./base.nix
+    ./desktop.nix
+    ./development.nix
+    # FIXME: vpn, server, builder, …
+  ];
+
+  config.profiles.base.enable = lib.mkDefault true;
+}
systems/profiles/desktop.nix
systems/profiles/development.nix
flake.nix
@@ -130,7 +130,7 @@
             })
             # FIXME remove flake suffix once migrated
             (import ./systems/modules/default.flake.nix)
-            # (import ./systems/profiles)
+            (import ./systems/profiles)
             (import config)
           ];
           specialArgs = { inherit name inputs; };