nixos/flake.nix
2024-12-18 18:19:37 -06:00

103 lines
2.8 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix.url = "github:ryantm/agenix";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
};
outputs =
{
nixpkgs,
nixpkgsUnstable,
home-manager,
nixos-hardware,
agenix,
simple-nixos-mailserver,
...
}:
let
system = "x86_64-linux";
overlayUnstable = final: prev: {
unstable = import nixpkgsUnstable {
inherit system;
config.allowUnfree = true;
};
};
in
{
nixosConfigurations = {
nixbox = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
agenix.nixosModules.default
{
environment.systemPackages = [ agenix.packages.${system}.default ];
}
(
{ config, pkgs, ... }:
{
nixpkgs.overlays = [ overlayUnstable ];
}
)
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
./hosts/nixbox
];
};
flynode = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
agenix.nixosModules.default
{
environment.systemPackages = [ agenix.packages.${system}.default ];
}
(
{ config, pkgs, ... }:
{
nixpkgs.overlays = [ overlayUnstable ];
}
)
nixos-hardware.nixosModules.lenovo-thinkpad-z13-gen1
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
./hosts/flynode
];
};
thewordnerd = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
agenix.nixosModules.default
{
environment.systemPackages = [ agenix.packages.${system}.default ];
}
(
{ config, pkgs, ... }:
{
nixpkgs.overlays = [ overlayUnstable ];
}
)
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
simple-nixos-mailserver.nixosModule
./hosts/hub
];
};
};
};
}