107 lines
2.6 KiB
Nix
107 lines
2.6 KiB
Nix
{
|
|
description = "System nixOS flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
lanzaboote = {
|
|
url = "github:nix-community/lanzaboote";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.rust-overlay.follows = "rust-overlay";
|
|
};
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
agenix = {
|
|
url = "github:ryantm/agenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
chaotic = {
|
|
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
|
|
disko = {
|
|
url = "github:nix-community/disko/latest";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
zen-browser = {
|
|
url = "github:0xc000022070/zen-browser-flake";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
|
|
niri = {
|
|
url = "github:sodiboo/niri-flake";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
lanzaboote,
|
|
nixos-hardware,
|
|
agenix,
|
|
home-manager,
|
|
...
|
|
}@inputs:
|
|
let
|
|
username = "primary";
|
|
system = "x86_64-linux";
|
|
hostnames = [
|
|
"mreow"
|
|
"yarn"
|
|
];
|
|
in
|
|
{
|
|
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
|
|
nixosConfigurations = nixpkgs.lib.foldl' (
|
|
config: hostname:
|
|
config
|
|
// {
|
|
"${hostname}" = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit
|
|
inputs
|
|
username
|
|
hostname
|
|
;
|
|
};
|
|
modules = [
|
|
home-manager.nixosModules.home-manager
|
|
(
|
|
{ ... }:
|
|
{
|
|
# home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = {
|
|
inherit inputs hostname username;
|
|
homeDirectory = "/home/${username}";
|
|
};
|
|
home-manager.users.${username} = import ./home-manager/home-${hostname}.nix;
|
|
}
|
|
)
|
|
./etcnixos/system-${hostname}.nix
|
|
];
|
|
};
|
|
}
|
|
) { } hostnames;
|
|
};
|
|
}
|