nix: add polder home

This commit is contained in:
js0ny 2025-10-21 17:39:23 +00:00
parent 04492a62c2
commit 8bcd089b3a
4 changed files with 108 additions and 98 deletions

View file

@ -28,98 +28,100 @@
agenix.url = "github:ryantm/agenix";
};
outputs =
{
self,
nixpkgs,
nix-flatpak,
nix-darwin,
home-manager,
plasma-manager,
nur,
winboat,
caelestia-shell,
agenix,
...
}@inputs:
let
overlays = [
nur.overlays.default
(final: prev: {
winboat = winboat.packages.x86_64-linux.winboat;
caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell;
})
];
forSystem =
system:
import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
specialArgs = { inherit inputs overlays; };
nixosHosts = [
"zp"
"zephyrus"
"nixvirt"
"polder"
];
outputs = {
self,
nixpkgs,
nix-flatpak,
nix-darwin,
home-manager,
plasma-manager,
nur,
winboat,
caelestia-shell,
agenix,
...
} @ inputs: let
overlays = [
nur.overlays.default
(final: prev: {
winboat = winboat.packages.x86_64-linux.winboat;
caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell;
})
];
forSystem = system:
import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
specialArgs = {inherit inputs overlays;};
nixosHosts = [
"zp"
"zephyrus"
"nixvirt"
"polder"
];
mkNixosSystem =
hostname:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
inherit specialArgs;
modules = [
agenix.nixosModules.default
./hosts/${hostname}
{ nixpkgs.overlays = overlays; }
];
};
in
{
# This will automatically generate nixOS config for `nixosHosts'
# Include the module ./hosts/${hostname} by default.
nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem;
darwinConfigurations."zen" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
mkNixosSystem = hostname:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
inherit specialArgs;
modules = [
./hosts/zen
agenix.nixosModules.default
./hosts/${hostname}
{nixpkgs.overlays = overlays;}
];
};
in {
# This will automatically generate nixOS config for `nixosHosts'
# Include the module ./hosts/${hostname} by default.
nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem;
homeConfigurations = {
js0ny = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "x86_64-linux";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny
];
};
"js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "x86_64-linux";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny/zephyrus.nix
plasma-manager.homeModules.plasma-manager
nix-flatpak.homeManagerModules.nix-flatpak
];
};
"js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "x86_64-linux";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny/nixvirt.nix
];
};
"js0ny@zen" = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "aarch64-darwin";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny/zen.nix
];
};
darwinConfigurations."zen" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
inherit specialArgs;
modules = [
./hosts/zen
];
};
homeConfigurations = {
js0ny = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "x86_64-linux";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny
];
};
"js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "x86_64-linux";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny/zephyrus.nix
plasma-manager.homeModules.plasma-manager
nix-flatpak.homeManagerModules.nix-flatpak
];
};
"js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "x86_64-linux";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny/nixvirt.nix
];
};
"js0ny@polder" = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "x86_64-linux";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny/polder.nix
];
};
"js0ny@zen" = home-manager.lib.homeManagerConfiguration {
pkgs = forSystem "aarch64-darwin";
extraSpecialArgs = specialArgs;
modules = [
./users/js0ny/zen.nix
];
};
};
};
}