Compare commits

...

2 Commits

Author SHA1 Message Date
1650823a73 refactor 2026-01-03 15:18:55 +00:00
9f96b6dd71 deps 2026-01-03 15:18:55 +00:00
3 changed files with 45 additions and 53 deletions

36
flake.lock generated
View File

@@ -9,11 +9,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1763308703,
"narHash": "sha256-O9Y+Wer8wOh+N+4kcCK5p/VLrXyX+ktk0/s3HdZvJzk=",
"lastModified": 1767386128,
"narHash": "sha256-BJDu7dIMauO2nYRSL4aI8wDNtEm2KOb7lDKP3hxdrpo=",
"owner": "numtide",
"repo": "blueprint",
"rev": "5a9bba070f801d63e2af3c9ef00b86b212429f4f",
"rev": "0ed984d51a3031065925ab08812a5434f40b93d4",
"type": "github"
},
"original": {
@@ -214,11 +214,11 @@
]
},
"locked": {
"lastModified": 1767365803,
"narHash": "sha256-5k07cAPVcMWx2P0zSfBQ9KqpMA6La1rz4dy/pl9GzDw=",
"lastModified": 1767437240,
"narHash": "sha256-OA0dBHhccdupFXp+/eaFfb8K1dQxk61in4aF5ITGVX8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d4e4d5cfa30455f50d034f24aa9bc0ab05388fcd",
"rev": "1cfa305fba94468f665de1bd1b62dddf2e0cb012",
"type": "github"
},
"original": {
@@ -230,11 +230,11 @@
"homebrew-cask": {
"flake": false,
"locked": {
"lastModified": 1767372117,
"narHash": "sha256-Fb8or9JsXY4vIVP9SlO0rEjzoDOV+SgF91Gn/3v4ilQ=",
"lastModified": 1767450286,
"narHash": "sha256-wrdh+mcfDPPQd0XmvRGE9mNG/9kltPhR/iJ6pJpcjVE=",
"owner": "homebrew",
"repo": "homebrew-cask",
"rev": "3aca82817b1dd970786026b40b92a7ee0c23c354",
"rev": "d8614a27238462e82b1b8cb60a74f6bbea6309b9",
"type": "github"
},
"original": {
@@ -246,11 +246,11 @@
"homebrew-core": {
"flake": false,
"locked": {
"lastModified": 1767375788,
"narHash": "sha256-lNdMibCRLiGnO3XxImuPPTEZzPJanKNQUF2mKL82vCw=",
"lastModified": 1767452389,
"narHash": "sha256-ZVzK1Zd00XeUHbTLNOU3KQtCEbP20xfj0HdP8yN78CQ=",
"owner": "homebrew",
"repo": "homebrew-core",
"rev": "52609b50a036c62864c412bce9b80ae677296def",
"rev": "806bf4b26f47cdc6c2e53c5fbaf344d2a744f165",
"type": "github"
},
"original": {
@@ -266,11 +266,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1767364726,
"narHash": "sha256-/Ei2HXEVFjFhKEXyVHptrY8BSIRMojTBzricW9XBFBs=",
"lastModified": 1767449715,
"narHash": "sha256-x9JzDkRae+enzD4PG8frIzkOYZKDNinX8Q6d+2BJubc=",
"owner": "numtide",
"repo": "llm-agents.nix",
"rev": "9c0c01e8557f9987153a992fdc093ffa2229385b",
"rev": "596e272e0cf96568f7a54b738ed64af4872158dc",
"type": "github"
},
"original": {
@@ -351,11 +351,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1767375717,
"narHash": "sha256-P9wpYIy2vjs4zxcBUsy6iMcgWWBDKHc13tZ8fvHBhOw=",
"lastModified": 1767452122,
"narHash": "sha256-WjGrbyaWw1uHAcXGKQwRGBGBzAnWcvHN4mz3HXikXq0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5e931b16fa2c996f2cbe227f525568264d52a471",
"rev": "8c1a5b012cdf861742b0050960e094f32e0f90a1",
"type": "github"
},
"original": {

View File

@@ -41,11 +41,17 @@
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} (
let
inherit (inputs.nixpkgs) lib;
constants = import ./lib/constants.nix;
user = constants.user;
inherit (constants) user;
darwinHosts = ["chidi" "jason"];
nixosHosts = ["michael" "tahani"];
overlays = import ./overlays {inherit inputs;};
nixpkgsConfig = hostPlatform: {
nixpkgs = {inherit hostPlatform overlays;};
};
in {
systems = [
"x86_64-linux"
@@ -53,27 +59,23 @@
];
flake.darwinConfigurations =
inputs.nixpkgs.lib.genAttrs darwinHosts (
lib.genAttrs darwinHosts (
hostname:
inputs.darwin.lib.darwinSystem {
specialArgs = {
inherit inputs user hostname constants;
};
specialArgs = {inherit inputs user hostname constants;};
modules = [
inputs.home-manager.darwinModules.home-manager
inputs.nix-homebrew.darwinModules.nix-homebrew
(nixpkgsConfig "aarch64-darwin")
{
nixpkgs.hostPlatform = "aarch64-darwin";
nixpkgs.overlays = overlays;
nix-homebrew = {
inherit user;
enable = true;
mutableTaps = true;
taps = {
"homebrew/homebrew-core" = inputs.homebrew-core;
"homebrew/homebrew-cask" = inputs.homebrew-cask;
};
mutableTaps = true;
};
}
./hosts/${hostname}
@@ -82,18 +84,13 @@
);
flake.nixosConfigurations =
inputs.nixpkgs.lib.genAttrs nixosHosts (
lib.genAttrs nixosHosts (
hostname:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs user hostname constants;
};
lib.nixosSystem {
specialArgs = {inherit inputs user hostname constants;};
modules = [
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.hostPlatform = "x86_64-linux";
nixpkgs.overlays = overlays;
}
(nixpkgsConfig "x86_64-linux")
./hosts/${hostname}
];
}
@@ -106,7 +103,7 @@
specialArgs = {inherit inputs user constants;};
};
}
// inputs.nixpkgs.lib.genAttrs nixosHosts (
// lib.genAttrs nixosHosts (
hostname: {
deployment = {
targetHost = hostname;
@@ -114,11 +111,8 @@
};
imports = [
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.hostPlatform = "x86_64-linux";
nixpkgs.overlays = overlays;
_module.args.hostname = hostname;
}
(nixpkgsConfig "x86_64-linux")
{_module.args.hostname = hostname;}
./hosts/${hostname}
];
}
@@ -128,9 +122,7 @@
pgbackrest = ./modules/pgbackrest.nix;
};
flake.lib = {
constants = import ./lib/constants.nix;
};
flake.lib = {inherit constants;};
perSystem = {
pkgs,
@@ -153,14 +145,7 @@
"rollback"
];
in {
apps =
builtins.listToAttrs (
map (n: {
name = n;
value = mkApp n;
})
appNames
);
apps = pkgs.lib.genAttrs appNames mkApp;
};
}
);

View File

@@ -54,5 +54,12 @@
virtualisation.docker.enable = true;
swapDevices = [
{
device = "/swapfile";
size = 16 * 1024; # 16GB
}
];
networking.hostName = hostname;
}