nixos/flake.nix

99 lines
3.1 KiB
Nix
Raw Normal View History

2023-08-01 15:35:09 +02:00
{
description = "NixOS system";
inputs = {
2024-03-28 16:35:03 +01:00
secrets = {
url = "git+ssh://git@git.caspervk.net/caspervk/nixos-secrets.git";
};
2023-08-01 15:35:09 +02:00
nixpkgs = {
2023-12-01 17:46:52 +01:00
url = "github:NixOS/nixpkgs/nixos-23.11";
2023-08-01 15:35:09 +02:00
};
2023-08-13 19:28:37 +02:00
nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
2023-11-11 23:00:19 +01:00
nixos-hardware = {
# nixos-hardware is a collection of NixOS modules covering hardware
# quirks. The modules are imported in each hosts' hardware.nix. See
# https://github.com/NixOS/nixos-hardware/blob/master/flake.nix for
# a list of available modules.
url = "github:NixOS/nixos-hardware/master";
};
2023-08-01 15:35:09 +02:00
impermanence = {
url = "github:nix-community/impermanence";
};
2024-02-24 02:11:59 +01:00
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
inputs.home-manager.follows = "home-manager"; # use the same home-manager as the system
inputs.darwin.follows = ""; # don't download dawrin dependencies
};
2023-08-01 15:35:09 +02:00
nix-index-database = {
url = "github:nix-community/nix-index-database";
2023-08-01 16:55:53 +02:00
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
2023-08-01 15:35:09 +02:00
};
home-manager = {
2023-12-01 20:55:41 +01:00
url = "github:nix-community/home-manager/release-23.11";
2023-08-01 16:55:53 +02:00
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
2023-08-01 15:35:09 +02:00
};
2023-08-13 19:28:37 +02:00
home-manager-unstable = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
};
2023-08-01 15:35:09 +02:00
};
2024-03-05 22:57:41 +01:00
outputs = {
self,
nixpkgs,
...
} @ inputs: {
# https://kamadorueda.com/alejandra/
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
2024-04-06 01:52:07 +02:00
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
2023-08-01 16:55:53 +02:00
2023-08-01 15:35:09 +02:00
nixosConfigurations = {
2024-04-05 23:45:55 +02:00
# Hetzner VPS
alpha = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
2023-08-01 16:55:53 +02:00
specialArgs = inputs; # pass flake inputs to modules
2024-04-05 23:45:55 +02:00
modules = [./hosts/alpha];
2023-08-01 15:35:09 +02:00
};
2024-04-05 23:45:55 +02:00
# Hetzner VPS
delta = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
2023-08-01 16:55:53 +02:00
specialArgs = inputs; # pass flake inputs to modules
2024-04-05 23:45:55 +02:00
modules = [./hosts/delta];
2023-08-01 16:31:44 +02:00
};
2023-10-07 02:18:22 +02:00
# Work laptop
mu = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs; # pass flake inputs to modules
2024-03-05 22:57:41 +01:00
modules = [./hosts/mu];
2023-10-07 02:18:22 +02:00
};
2024-04-05 23:45:55 +02:00
# Home desktop
omega = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
2024-02-24 02:33:59 +01:00
specialArgs = inputs; # pass flake inputs to modules
2024-04-05 23:45:55 +02:00
modules = [./hosts/omega];
2024-02-24 02:33:59 +01:00
};
2024-03-28 17:31:20 +01:00
# Home Server
sigma = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = inputs; # pass flake inputs to modules
modules = [./hosts/sigma];
};
2023-08-06 00:45:08 +02:00
# Tor relay
tor = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs; # pass flake inputs to modules
2024-03-05 22:57:41 +01:00
modules = [./hosts/tor];
2023-08-06 00:45:08 +02:00
};
2024-04-05 23:45:55 +02:00
# Laptop
zeta = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs; # pass flake inputs to modules
modules = [./hosts/zeta];
};
2023-08-01 15:35:09 +02:00
};
};
}