Skip to content

Commit

Permalink
chore: don't install snapcraft or LXD on NixOS
Browse files Browse the repository at this point in the history
If I need to build snaps, I'll use Grozbok my Lima VM.
  • Loading branch information
flexiondotorg committed Sep 30, 2024
1 parent 25de814 commit c35a4ac
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions nixos/_mixins/features/snapcraft/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ let
installFor = [ "martin" ];
in
lib.mkIf (lib.elem "${username}" installFor && isWorkstation) {
# Install snapcraft and enable snapd (for running snaps) and lxd (for building snaps)
environment.systemPackages = with pkgs; [ snapcraft ];
services.snap.enable = true;

# I've stopped using snapcraft and lxd on NixOS
# because I now use an Ubuntu guest for building snaps.
# Install snapcraft and enable snapd (for running snaps) and lxd (for building snaps)
#environment.systemPackages = with pkgs; [ snapcraft ];

# lxd in Nixpkgs errorneously disables unified cgroup hierarchy.
# LXD has had support for cgroups v2 since since 2020.
systemd.enableUnifiedCgroupHierarchy = lib.mkForce true;
virtualisation.lxd.enable = true;
users.users.${username}.extraGroups = lib.optional config.virtualisation.lxd.enable "lxd";
#systemd.enableUnifiedCgroupHierarchy = lib.mkForce true;
#virtualisation.lxd.enable = true;
#users.users.${username}.extraGroups = lib.optional config.virtualisation.lxd.enable "lxd";
}

0 comments on commit c35a4ac

Please sign in to comment.