2022-12-19 22:35:54 +00:00
|
|
|
{
|
2022-12-20 10:33:21 +00:00
|
|
|
description = "Laureηt's infrastructure";
|
2022-12-19 22:35:54 +00:00
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-05-07 21:11:34 +00:00
|
|
|
# nixpkgs.url = "git+file:///home/laurent/Documents/nixpkgs?shallow=1";
|
2023-05-21 08:21:31 +00:00
|
|
|
|
2023-03-19 13:26:56 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2022-12-21 21:37:21 +00:00
|
|
|
|
2023-04-23 13:38:34 +00:00
|
|
|
lanzaboote = {
|
|
|
|
url = "github:nix-community/lanzaboote";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-03-14 13:12:21 +00:00
|
|
|
agenix = {
|
|
|
|
url = "github:yaxitech/ragenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-03-19 13:26:56 +00:00
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
2023-03-14 13:12:21 +00:00
|
|
|
};
|
|
|
|
|
2022-12-21 21:37:21 +00:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-12-19 22:35:54 +00:00
|
|
|
};
|
2022-12-21 19:29:15 +00:00
|
|
|
|
2023-05-21 08:21:31 +00:00
|
|
|
outputs = { nixpkgs, flake-utils, lanzaboote, agenix, home-manager, ... }:
|
2022-12-19 22:35:54 +00:00
|
|
|
|
2023-03-19 13:26:56 +00:00
|
|
|
# Provide colmena
|
|
|
|
(flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in {
|
2023-03-19 14:13:24 +00:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
packages = [
|
2023-05-16 19:10:41 +00:00
|
|
|
pkgs.colmena # remote deployment
|
|
|
|
pkgs.nixfmt # formatting
|
|
|
|
pkgs.git # version control
|
|
|
|
pkgs.update-nix-fetchgit # auto update fetchs
|
|
|
|
agenix.packages.${system}.ragenix # secrets
|
|
|
|
pkgs.sbctl # secure boot
|
2023-03-19 14:13:24 +00:00
|
|
|
];
|
|
|
|
};
|
2023-03-19 13:26:56 +00:00
|
|
|
})) // {
|
2022-12-19 22:35:54 +00:00
|
|
|
|
2023-03-19 13:26:56 +00:00
|
|
|
# colmena
|
|
|
|
colmena = {
|
|
|
|
meta = {
|
|
|
|
nixpkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlays = [ ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# default config
|
|
|
|
defaults = { name, ... }: {
|
|
|
|
imports = [
|
|
|
|
./hosts/${name}/configuration.nix
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
agenix.nixosModules.default
|
2023-04-23 13:38:34 +00:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
2023-03-19 13:26:56 +00:00
|
|
|
];
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# personnal laptop
|
|
|
|
neodymium = { ... }: {
|
|
|
|
deployment = {
|
|
|
|
allowLocalDeployment = true;
|
|
|
|
targetHost = null;
|
|
|
|
};
|
|
|
|
};
|
2022-12-20 10:33:21 +00:00
|
|
|
|
2023-03-19 13:26:56 +00:00
|
|
|
# ovh vps
|
|
|
|
hydrogen = { ... }: {
|
|
|
|
deployment = {
|
|
|
|
targetHost = "178.62.253.235";
|
|
|
|
targetUser = "root";
|
|
|
|
};
|
|
|
|
};
|
2022-12-20 10:33:21 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-19 13:26:56 +00:00
|
|
|
|
2022-12-19 22:35:54 +00:00
|
|
|
}
|