Move home-manager to nixos config for easier multi system config

This commit is contained in:
BuyMyMojo 2025-04-02 09:36:08 +11:00
parent fdc23266f3
commit cd265fa1a7
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10 changed files with 700 additions and 19 deletions

View file

@ -16,32 +16,57 @@
inputs.nixpkgs.follows = "nixpkgs";
};
moonlight = {
url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
shadps4-git.url = "./programs/shadps4";
nixpkgs-gsr-ui = {
url = "github:js6pak/nixpkgs/gpu-screen-recorder-ui/init"; # Add `/develop` to the flake URL to use nightly.
};
bellado.url = "github:isabelroses/bellado";
};
outputs =
{
nixpkgs,
unstable,
home-manager,
nix-your-shell,
nixpkgs-gsr-ui,
bellado,
...
}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ nix-your-shell.overlays.default ];
};
unstable = import unstable {
inherit system;
config.allowUnfree = true;
};
gsr-ui = import nixpkgs-gsr-ui {
inherit system;
config.allowUnfree = true;
};
in
{
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ nix-your-shell.overlays.default ];
};
unstable = import unstable {
inherit system;
config.allowUnfree = true;
};
inherit pkgs;
inherit unstable;
inherit nix-your-shell;
@ -50,6 +75,19 @@
./universal.nix
./hosts/nixos/configuration.nix
./hosts/nixos/services.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.buymymojo = ./home-manager/honixos.nix;
home-manager.extraSpecialArgs = {
inherit unstable;
inherit inputs;
inherit gsr-ui;
inherit bellado;
};
}
];
};
@ -57,22 +95,28 @@
nixosConfigurations.low-power-laptop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ nix-your-shell.overlays.default ];
};
unstable = import unstable {
inherit system;
config.allowUnfree = true;
};
inherit pkgs;
inherit unstable;
inherit nix-your-shell;
};
modules = [
./universal.nix
./hosts/low-power-laptop/configuration.nix
./hosts/low-power-laptop/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.aria = ./home-manager/low-power-laptop.nix;
home-manager.extraSpecialArgs = {
inherit unstable;
inherit inputs;
inherit bellado;
};
}
];
};