[ubuntu] Onboard an ubuntu config.
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user