From c40724190ed030c1ad35f5d1050d5aaf29eadedb Mon Sep 17 00:00:00 2001 From: Deepak Mallubhotla Date: Fri, 21 Mar 2025 12:32:21 -0500 Subject: [PATCH] trying out docker --- home/deepak/home.nix | 2 +- hosts/commonWSL-configuration.nix | 6 ++++++ hosts/hosts.nix | 4 ++++ justfile | 12 ++++++++++-- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/home/deepak/home.nix b/home/deepak/home.nix index 19fb291..15d07e2 100644 --- a/home/deepak/home.nix +++ b/home/deepak/home.nix @@ -147,7 +147,7 @@ in cmp_luasnip nvim-lspconfig - # vim-vinegar + # vim-vinegar oil-nvim wiki-vim diff --git a/hosts/commonWSL-configuration.nix b/hosts/commonWSL-configuration.nix index 1b8c055..fac1108 100644 --- a/hosts/commonWSL-configuration.nix +++ b/hosts/commonWSL-configuration.nix @@ -1,6 +1,7 @@ { pkgs, customPackageOverlay, + withDocker, stateVersion, modulesPath, hostname, @@ -100,4 +101,9 @@ in time.timeZone = "America/Chicago"; + virtualisation.docker.rootless = pkgs.lib.mkIf withDocker { + enable = true; + setSocketVariable = true; + }; + } diff --git a/hosts/hosts.nix b/hosts/hosts.nix index b2ebf77..719f6aa 100644 --- a/hosts/hosts.nix +++ b/hosts/hosts.nix @@ -25,6 +25,7 @@ in specialArgs = { inherit customPackageOverlay; inherit nixpkgs-unstable; + withDocker = false; }; modules = [ ./maxos/configuration.nix @@ -54,6 +55,7 @@ in inherit nixpkgs-unstable; hostname = "nixosWalrus"; stateVersion = "24.11"; + withDocker = false; }; modules = [ ./commonWSL-configuration.nix @@ -87,6 +89,7 @@ in inherit nixpkgs-unstable; hostname = "nixosWSL"; stateVersion = "22.05"; + withDocker = false; }; modules = [ ./commonWSL-configuration.nix @@ -120,6 +123,7 @@ in inherit nixpkgs-unstable; hostname = "nixosEggYoke"; stateVersion = "22.05"; + withDocker = true; }; modules = [ ./commonWSL-configuration.nix diff --git a/justfile b/justfile index 4bed2e7..ed2993f 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,14 @@ # executes default, set to rebuilding current flake as test -default: test +default: + just --list # does a nixos-rebuild test of current flake -test: +install: sudo nixos-rebuild test --flake . + +# run nix flake check +test: + nix flake check + +fmt: + nix fmt