change from mono-home-manager to full flake multi-system configuration
This commit is contained in:
85
flake.nix
Normal file
85
flake.nix
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
description = "Multi-machine NixOS and Home Manager config";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
|
||||
zen-browser = {
|
||||
url = "github:0xc000022070/zen-browser-flake";
|
||||
inputs = {
|
||||
# IMPORTANT: we're using "libgbm" and is only available in unstable so ensure
|
||||
# to have it up-to-date or simply don't specify the nixpkgs input
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@ { self, nixpkgs, home-manager, sops-nix, ... }: {
|
||||
nixosConfigurations = {
|
||||
|
||||
t440p = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/t440p/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
sops-nix.nixosModules.sops
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.wieerwill = import ./hosts/t440p/home.nix {
|
||||
inherit inputs;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
steamdeck = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/steamdeck/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
sops-nix.nixosModules.sops
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.wieerwill = import ./hosts/steamdeck/home.nix {
|
||||
inherit inputs;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
|
||||
xaorus = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/xaorus/home.nix
|
||||
sops-nix.homeManagerModules.sops
|
||||
];
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
vps04_08 = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/vps04_08/home.nix
|
||||
sops-nix.homeManagerModules.sops
|
||||
];
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user