work on unifying configs
This commit is contained in:
109
flake.nix
Normal file
109
flake.nix
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
description = "System nixOS flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
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"
|
||||
];
|
||||
|
||||
inputs.nixpkgs =
|
||||
(import nixpkgs {
|
||||
}).applyPatches
|
||||
{
|
||||
name = "nixpkgs";
|
||||
src = inputs.nixpkgs;
|
||||
patches = [
|
||||
# https://github.com/NixOS/nixpkgs/pull/67576
|
||||
# gimp 3.0
|
||||
(builtins.fetchurl {
|
||||
url = "https://github.com/NixOS/nixpkgs/pull/67576.diff";
|
||||
sha256 = "1idkhfirjba6iywkddyhm980x44kfl9lmp51cyfqrpbq7wlzpnia";
|
||||
})
|
||||
];
|
||||
};
|
||||
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 = import ./home-manager/home-${hostname}.nix { inherit inputs hostname username; };
|
||||
}
|
||||
)
|
||||
./etcnixos/system-${hostname}.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
) { } hostnames;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user