Compare commits
2 Commits
f149643ebc
...
1650823a73
| Author | SHA1 | Date | |
|---|---|---|---|
| 1650823a73 | |||
| 9f96b6dd71 |
36
flake.lock
generated
36
flake.lock
generated
@@ -9,11 +9,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763308703,
|
"lastModified": 1767386128,
|
||||||
"narHash": "sha256-O9Y+Wer8wOh+N+4kcCK5p/VLrXyX+ktk0/s3HdZvJzk=",
|
"narHash": "sha256-BJDu7dIMauO2nYRSL4aI8wDNtEm2KOb7lDKP3hxdrpo=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "blueprint",
|
"repo": "blueprint",
|
||||||
"rev": "5a9bba070f801d63e2af3c9ef00b86b212429f4f",
|
"rev": "0ed984d51a3031065925ab08812a5434f40b93d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -214,11 +214,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767365803,
|
"lastModified": 1767437240,
|
||||||
"narHash": "sha256-5k07cAPVcMWx2P0zSfBQ9KqpMA6La1rz4dy/pl9GzDw=",
|
"narHash": "sha256-OA0dBHhccdupFXp+/eaFfb8K1dQxk61in4aF5ITGVX8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d4e4d5cfa30455f50d034f24aa9bc0ab05388fcd",
|
"rev": "1cfa305fba94468f665de1bd1b62dddf2e0cb012",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -230,11 +230,11 @@
|
|||||||
"homebrew-cask": {
|
"homebrew-cask": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767372117,
|
"lastModified": 1767450286,
|
||||||
"narHash": "sha256-Fb8or9JsXY4vIVP9SlO0rEjzoDOV+SgF91Gn/3v4ilQ=",
|
"narHash": "sha256-wrdh+mcfDPPQd0XmvRGE9mNG/9kltPhR/iJ6pJpcjVE=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-cask",
|
"repo": "homebrew-cask",
|
||||||
"rev": "3aca82817b1dd970786026b40b92a7ee0c23c354",
|
"rev": "d8614a27238462e82b1b8cb60a74f6bbea6309b9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -246,11 +246,11 @@
|
|||||||
"homebrew-core": {
|
"homebrew-core": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767375788,
|
"lastModified": 1767452389,
|
||||||
"narHash": "sha256-lNdMibCRLiGnO3XxImuPPTEZzPJanKNQUF2mKL82vCw=",
|
"narHash": "sha256-ZVzK1Zd00XeUHbTLNOU3KQtCEbP20xfj0HdP8yN78CQ=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-core",
|
"repo": "homebrew-core",
|
||||||
"rev": "52609b50a036c62864c412bce9b80ae677296def",
|
"rev": "806bf4b26f47cdc6c2e53c5fbaf344d2a744f165",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -266,11 +266,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767364726,
|
"lastModified": 1767449715,
|
||||||
"narHash": "sha256-/Ei2HXEVFjFhKEXyVHptrY8BSIRMojTBzricW9XBFBs=",
|
"narHash": "sha256-x9JzDkRae+enzD4PG8frIzkOYZKDNinX8Q6d+2BJubc=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "llm-agents.nix",
|
"repo": "llm-agents.nix",
|
||||||
"rev": "9c0c01e8557f9987153a992fdc093ffa2229385b",
|
"rev": "596e272e0cf96568f7a54b738ed64af4872158dc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -351,11 +351,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767375717,
|
"lastModified": 1767452122,
|
||||||
"narHash": "sha256-P9wpYIy2vjs4zxcBUsy6iMcgWWBDKHc13tZ8fvHBhOw=",
|
"narHash": "sha256-WjGrbyaWw1uHAcXGKQwRGBGBzAnWcvHN4mz3HXikXq0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5e931b16fa2c996f2cbe227f525568264d52a471",
|
"rev": "8c1a5b012cdf861742b0050960e094f32e0f90a1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
55
flake.nix
55
flake.nix
@@ -41,11 +41,17 @@
|
|||||||
outputs = inputs @ {flake-parts, ...}:
|
outputs = inputs @ {flake-parts, ...}:
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} (
|
flake-parts.lib.mkFlake {inherit inputs;} (
|
||||||
let
|
let
|
||||||
|
inherit (inputs.nixpkgs) lib;
|
||||||
constants = import ./lib/constants.nix;
|
constants = import ./lib/constants.nix;
|
||||||
user = constants.user;
|
inherit (constants) user;
|
||||||
|
|
||||||
darwinHosts = ["chidi" "jason"];
|
darwinHosts = ["chidi" "jason"];
|
||||||
nixosHosts = ["michael" "tahani"];
|
nixosHosts = ["michael" "tahani"];
|
||||||
|
|
||||||
overlays = import ./overlays {inherit inputs;};
|
overlays = import ./overlays {inherit inputs;};
|
||||||
|
nixpkgsConfig = hostPlatform: {
|
||||||
|
nixpkgs = {inherit hostPlatform overlays;};
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
@@ -53,27 +59,23 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
flake.darwinConfigurations =
|
flake.darwinConfigurations =
|
||||||
inputs.nixpkgs.lib.genAttrs darwinHosts (
|
lib.genAttrs darwinHosts (
|
||||||
hostname:
|
hostname:
|
||||||
inputs.darwin.lib.darwinSystem {
|
inputs.darwin.lib.darwinSystem {
|
||||||
specialArgs = {
|
specialArgs = {inherit inputs user hostname constants;};
|
||||||
inherit inputs user hostname constants;
|
|
||||||
};
|
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
inputs.nix-homebrew.darwinModules.nix-homebrew
|
inputs.nix-homebrew.darwinModules.nix-homebrew
|
||||||
|
(nixpkgsConfig "aarch64-darwin")
|
||||||
{
|
{
|
||||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
|
|
||||||
nix-homebrew = {
|
nix-homebrew = {
|
||||||
inherit user;
|
inherit user;
|
||||||
enable = true;
|
enable = true;
|
||||||
|
mutableTaps = true;
|
||||||
taps = {
|
taps = {
|
||||||
"homebrew/homebrew-core" = inputs.homebrew-core;
|
"homebrew/homebrew-core" = inputs.homebrew-core;
|
||||||
"homebrew/homebrew-cask" = inputs.homebrew-cask;
|
"homebrew/homebrew-cask" = inputs.homebrew-cask;
|
||||||
};
|
};
|
||||||
mutableTaps = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
./hosts/${hostname}
|
./hosts/${hostname}
|
||||||
@@ -82,18 +84,13 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
flake.nixosConfigurations =
|
flake.nixosConfigurations =
|
||||||
inputs.nixpkgs.lib.genAttrs nixosHosts (
|
lib.genAttrs nixosHosts (
|
||||||
hostname:
|
hostname:
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {inherit inputs user hostname constants;};
|
||||||
inherit inputs user hostname constants;
|
|
||||||
};
|
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
(nixpkgsConfig "x86_64-linux")
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
}
|
|
||||||
./hosts/${hostname}
|
./hosts/${hostname}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -106,7 +103,7 @@
|
|||||||
specialArgs = {inherit inputs user constants;};
|
specialArgs = {inherit inputs user constants;};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// inputs.nixpkgs.lib.genAttrs nixosHosts (
|
// lib.genAttrs nixosHosts (
|
||||||
hostname: {
|
hostname: {
|
||||||
deployment = {
|
deployment = {
|
||||||
targetHost = hostname;
|
targetHost = hostname;
|
||||||
@@ -114,11 +111,8 @@
|
|||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
(nixpkgsConfig "x86_64-linux")
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
{_module.args.hostname = hostname;}
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
_module.args.hostname = hostname;
|
|
||||||
}
|
|
||||||
./hosts/${hostname}
|
./hosts/${hostname}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -128,9 +122,7 @@
|
|||||||
pgbackrest = ./modules/pgbackrest.nix;
|
pgbackrest = ./modules/pgbackrest.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.lib = {
|
flake.lib = {inherit constants;};
|
||||||
constants = import ./lib/constants.nix;
|
|
||||||
};
|
|
||||||
|
|
||||||
perSystem = {
|
perSystem = {
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -153,14 +145,7 @@
|
|||||||
"rollback"
|
"rollback"
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
apps =
|
apps = pkgs.lib.genAttrs appNames mkApp;
|
||||||
builtins.listToAttrs (
|
|
||||||
map (n: {
|
|
||||||
name = n;
|
|
||||||
value = mkApp n;
|
|
||||||
})
|
|
||||||
appNames
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -54,5 +54,12 @@
|
|||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 16 * 1024; # 16GB
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user