nixos/flake.nix

137 lines
3.2 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-10-14 18:46:13 +01:00
nixpkgs.url = "github:nixos/nixpkgs/release-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-10-04 17:53:32 +01:00
# nix-bitcoin
nix-bitcoin = {
url = "github:fort-nix/nix-bitcoin/nixos-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
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";
inputs = {};
};
2024-05-08 00:45:54 +01:00
};
outputs = {
self,
nixpkgs,
home-manager,
...
} @ inputs: let
inherit (self) outputs;
systems = [
"x86_64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
inherit (nixpkgs) lib;
configVars = import ./vars {inherit inputs lib;};
specialArgs = {
inherit
inputs
outputs
configVars
;
};
in {
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
overlays = import ./overlays {inherit inputs;};
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
# System level configs
nixosConfigurations = {
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;
}
];
};
merlin = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/nebula
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
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
}