home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ea23657b3e7e289762be818bdbe9d759df40bf8b
parent a5c7387e5f30dcbc379eaf88c362c743f735adb8
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed,  3 Jun 2020 15:32:58 +0200

users/vincent: virtualisation.containers is not…

… available on 20.03…

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Musers/vincent/default.nix | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/users/vincent/default.nix b/users/vincent/default.nix @@ -10,6 +10,8 @@ let (name: value: value.key) (attrsets.filterAttrs (name: value: isAuthorized value) (import secretPath).ssh) ); + hasConfigVirtualizationContainers = builtins.hasAttr "containers" config.virtualisation; + isContainersEnabled = if hasConfigVirtualizationContainers then config.virtualisation.containers.enable else false; in { users.users.vincent = { @@ -32,7 +34,11 @@ in subGidRanges = [{ startGid = 100000; count = 65536; }]; }; - virtualisation.containers.users = [ "vincent" ]; + /* + virtualisation = mkIf isContainersEnabled { + containers.users = [ "vincent" ]; + }; + */ security.pam.services.vincent.fprintAuth = config.services.fprintd.enable; home-manager.users.vincent = lib.mkMerge ( @@ -45,7 +51,7 @@ in ++ optionals config.profiles.docker.enable [{ home.packages = with pkgs; [ docker docker-compose ]; }] - ++ optionals (config.virtualisation.containers.enable && config.profiles.dev.enable) [ + ++ optionals (isContainersEnabled && config.profiles.dev.enable) [ (import ./containers) ] );