diff --git a/modules/system/packages.nix b/modules/system/packages.nix index c3be557..03e6e24 100644 --- a/modules/system/packages.nix +++ b/modules/system/packages.nix @@ -3,8 +3,10 @@ { # Baseline system tools available everywhere; users run Home Manager standalone. config.environment.systemPackages = lib.mkAfter [ - pkgs.git + pkgs.distrobox + pkgs.distroshelf pkgs.ghostty + pkgs.git pkgs.home-manager pkgs.just pkgs.libnotify diff --git a/modules/users/admin.nix b/modules/users/admin.nix index 764102a..35c0f67 100644 --- a/modules/users/admin.nix +++ b/modules/users/admin.nix @@ -2,8 +2,8 @@ { users.groups = { - docker = {}; - podman = {}; + docker = { }; + podman = { }; }; users.users.admin = { @@ -15,6 +15,18 @@ "docker" ]; hashedPassword = "$6$HrwFoHtYRwiTZsYo$gKNOvkQhjalczOLgoTXvVu1MaihYP4BdBnVpWkdoAf.5MAiV2mMPRibYyGv9ti1Q63AhGK7n4wOPjAU0O74mK0"; + subGidRanges = [ + { + count = 65536; + startGid = 100000; + } + ]; + subUidRanges = [ + { + count = 65536; + startUid = 100000; + } + ]; }; security.sudo.wheelNeedsPassword = lib.mkDefault true; @@ -34,7 +46,9 @@ Environment = [ "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/%u/bin" ]; StandardOutput = "journal"; StandardError = "journal"; - ExecStart = pkgs.writeShellScript "hm-bootstrap.sh" (builtins.readFile ../../scripts/hm-bootstrap.sh); + ExecStart = pkgs.writeShellScript "hm-bootstrap.sh" ( + builtins.readFile ../../scripts/hm-bootstrap.sh + ); }; wantedBy = [ "graphical-session.target" ]; }; diff --git a/templates/home-home.nix b/templates/home-home.nix index d88dde6..eac54f8 100644 --- a/templates/home-home.nix +++ b/templates/home-home.nix @@ -7,18 +7,39 @@ nixpkgs.config.allowUnfree = true; - programs.vscode = { - enable = true; + programs = { + distrobox = { + enable = true; + settings = { + container_always_pull = "1"; + container_generate_entry = "1"; + container_manager = "podman"; + container_name_default = "ubuntu"; + container_image_default = "ghcr.io/ublue-os/ubuntu-toolbox:latest"; + non_interactive = "1"; + skip_workdir = "1"; + }; + containers = { + ubuntu = { + image = "ubuntu:latest"; + entry = true; + }; + }; + }; + home-manager.enable = true; + vscode = { + enable = true; - # Choose between VS Code and Codium: - # package = pkgs.vscode; - package = pkgs.vscodium; + # Choose between VS Code and Codium: + # package = pkgs.vscode; + package = pkgs.vscodium; - # You can declaratively enable extensions here: - profiles.default.extensions = with pkgs.vscode-extensions; [ - dracula-theme.theme-dracula - yzhang.markdown-all-in-one - ]; + # You can declaratively enable extensions here: + profiles.default.extensions = with pkgs.vscode-extensions; [ + dracula-theme.theme-dracula + yzhang.markdown-all-in-one + ]; + }; }; # programs.emacs.enable = true @@ -48,7 +69,7 @@ jetbrains-toolbox # fresh versions of Android Studio and other tools # devpod # open-source code spaces - pods # Podman desktop application + pods # Podman desktop application ]; @@ -77,7 +98,7 @@ TERMINAL = "${pkgs.ghostty}/bin/ghostty"; DEFAULT_TERMINAL = "${pkgs.ghostty}/bin/ghostty"; EDITOR = "${pkgs.micro}/bin/micro"; + DBX_CONTAINER_HOME_PREFIX = "$HOME/distrobox"; }; - programs.home-manager.enable = true; }