From 97bdd0158ed956fb823a20c7f9056c162e1a9ee6 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Thu, 9 Sep 2021 11:15:54 -0400 Subject: [PATCH] add lxd --- features/docker.nix | 2 +- features/lxd.nix | 7 +++++ flake.lock | 8 +++--- flake.nix | 65 +++++++++++++++++++++++---------------------- 4 files changed, 45 insertions(+), 37 deletions(-) create mode 100644 features/lxd.nix diff --git a/features/docker.nix b/features/docker.nix index d390a15..eecc6d9 100644 --- a/features/docker.nix +++ b/features/docker.nix @@ -2,6 +2,6 @@ virtualisation.docker.enable = true; users.users.srid = { - extraGroups = [ "lxd" "docker" ]; + extraGroups = [ "docker" ]; }; } diff --git a/features/lxd.nix b/features/lxd.nix new file mode 100644 index 0000000..0c0c06d --- /dev/null +++ b/features/lxd.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: { + virtualisation.lxd.enable = true; + + users.users.srid = { + extraGroups = [ "lxd" ]; + }; +} diff --git a/flake.lock b/flake.lock index 62b8ede..d3f47e5 100644 --- a/flake.lock +++ b/flake.lock @@ -601,17 +601,17 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1630761588, - "narHash": "sha256-7GXckvZy7DGh2KIyfdArqwnyeSc5Owy1fumEDQyd8eY=", + "lastModified": 1631015389, + "narHash": "sha256-9SKTwRbp7OQGa4wKTo1wB6ctC2VlaIeKFZ+flqzPuoI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a51aa6523bd8ee985bc70987909eff235900197a", + "rev": "bc06c93905f60a82d6ebbb78f78cf289257860cc", "type": "github" }, "original": { "owner": "nixos", "repo": "nixpkgs", - "rev": "a51aa6523bd8ee985bc70987909eff235900197a", + "rev": "bc06c93905f60a82d6ebbb78f78cf289257860cc", "type": "github" } }, diff --git a/flake.nix b/flake.nix index af45ce0..4652b50 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ # https://status.nixos.org/ # # This ensures that we always use the official nix cache. - nixpkgs.url = "github:nixos/nixpkgs/a51aa6523bd8ee985bc70987909eff235900197a"; + nixpkgs.url = "github:nixos/nixpkgs/bc06c93905f60a82d6ebbb78f78cf289257860cc"; nixos-hardware.url = github:NixOS/nixos-hardware/master; home-manager.url = "github:nix-community/home-manager"; @@ -55,36 +55,37 @@ ); }; in - { - # The "name" in nixosConfigurations.${name} should match the `hostname` - # - nixosConfigurations.p71 = mkHomeMachine - ./hosts/p71.nix - [ - inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p53 - ./features/desktopish - #./features/gnome.nix - ./features/desktopish/guiapps.nix - #./features/virtualbox.nix - #./features/server-mode.nix - # ./features/postgrest.nix - ./features/server/devserver.nix - ]; - nixosConfigurations.x1c7 = mkHomeMachine - ./hosts/x1c7.nix - [ - inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-7th-gen - ./features/distributed-build.nix - ./features/gnome.nix - ./features/desktopish/guiapps.nix - ]; - nixosConfigurations.ryzen9 = mkHomeMachine - ./hosts/ryzen9.nix - [ - ./features/server/harden.nix - ./features/server/devserver.nix - ./features/ema/emanote.nix - ]; - }; + { + # The "name" in nixosConfigurations.${name} should match the `hostname` + # + nixosConfigurations.p71 = mkHomeMachine + ./hosts/p71.nix + [ + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p53 + ./features/desktopish + #./features/gnome.nix + ./features/desktopish/guiapps.nix + #./features/virtualbox.nix + #./features/server-mode.nix + # ./features/postgrest.nix + ./features/server/devserver.nix + ]; + nixosConfigurations.x1c7 = mkHomeMachine + ./hosts/x1c7.nix + [ + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-7th-gen + ./features/distributed-build.nix + ./features/gnome.nix + ./features/desktopish/guiapps.nix + ]; + nixosConfigurations.ryzen9 = mkHomeMachine + ./hosts/ryzen9.nix + [ + ./features/server/harden.nix + ./features/server/devserver.nix + ./features/ema/emanote.nix + ./features/lxd.nix + ]; + }; }