[ubuntu] Onboard an ubuntu config.

This commit is contained in:
jmug
2026-11-18 22:28:25 -08:00
parent 2df0a3a2f9
commit 61e1108ff7
10 changed files with 612 additions and 4 deletions
+33
View File
@@ -27,6 +27,12 @@
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-unstable = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# Declarative flatpaks.
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
ghostty = {
url = "github:ghostty-org/ghostty";
};
@@ -224,6 +230,33 @@
./users/alarm/home.nix
];
};
# Ubuntu desktop.
# Apply with ./ubuntu/bootstrap.sh on first install (safe to rerun to sync).
ubuntu = let
pkgs = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
overlays = [
# Use the host's flatpak. Ubuntu sets
# kernel.apparmor_restrict_unprivileged_userns=1 so so nixpkgs'
# flatpak can't sandbox extra-data installs (e.g. Slack's apply_extra).
(final: prev: {
flatpak = final.writeShellScriptBin "flatpak" ''exec /usr/bin/flatpak "$@"'';
})
];
};
in inputs.home-manager-unstable.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
homeConfigurationName = "ubuntu";
# Shared modules take a pkgs-unstable arg, for this config pkgs-unstable and pkgs are the same.
pkgs-unstable = pkgs;
};
modules = [
./hosts/ubuntu/home.nix
];
};
# For machines that don't run NixOS.
devbox = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";