nixos/flake.nix

146 lines
3.7 KiB
Nix
Raw Normal View History

2024-05-08 00:45:54 +01:00
{
2024-05-15 21:46:48 +01:00
description = "Nix Config";
2024-05-08 00:45:54 +01:00
inputs = {
2024-05-09 12:03:13 +01:00
# Nixpkgs
2024-06-22 14:37:19 +01:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
2024-05-09 12:03:13 +01:00
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2024-05-08 00:45:54 +01:00
# NUR
nur.url = "github:nix-community/NUR";
2024-05-09 12:03:13 +01:00
# Home manager
2024-05-15 21:46:48 +01:00
home-manager = {
2024-06-22 14:37:19 +01:00
url = "github:nix-community/home-manager/release-24.05";
2024-05-15 19:44:13 +01:00
inputs.nixpkgs.follows = "nixpkgs";
};
2024-05-12 19:58:55 +01:00
# Nixvim
nixvim = {
2024-06-22 14:37:19 +01:00
url = "github:nix-community/nixvim/nixos-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-07-05 18:58:30 +01:00
# Arion for docker
arion = {
url = "github:hercules-ci/arion/236f9dd82d6ef6a2d9987c7a7df3e75f1bc8b318";
};
2024-06-02 14:30:14 +01:00
# Nix colors
nix-colors.url = "github:misterio77/nix-colors";
2024-05-14 14:51:09 +01:00
# Declarative partitioning and formatting
disko = {
url = "github:nix-community/disko/v1.6.1";
2024-05-14 14:51:09 +01:00
inputs.nixpkgs.follows = "nixpkgs";
};
2024-05-17 01:07:42 +01:00
impermanence = {
url = "github:nix-community/impermanence";
};
2024-05-12 19:58:55 +01:00
# Secrets management
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-secrets = {
url = "git+ssh://git@git.bitlab21.com/sam/nix-secrets.git";
flake = false;
};
2024-05-08 00:45:54 +01:00
};
2024-06-06 18:13:16 +01:00
outputs =
{ self
, nixpkgs
, home-manager
, ...
} @ inputs:
let
inherit (self) outputs;
systems = [
"x86_64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
specialArgs = { inherit inputs outputs; };
in
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
2024-05-09 12:03:13 +01:00
2024-06-06 18:13:16 +01:00
# System level configs
nixosConfigurations = {
nixdev = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/nixdev
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
fileserver = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/fileserver
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
bootstrap = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/bootstrap
];
};
sparky = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/sparky
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
semita = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/semita
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
2024-06-28 15:26:16 +01:00
nebula = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
2024-06-28 15:26:16 +01:00
./hosts/nebula
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
2024-07-20 14:48:32 +01:00
citadel = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/citadel
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
2024-05-08 00:45:54 +01:00
};
};
2024-05-08 00:45:54 +01:00
}