move to flake entrypoint
This commit is contained in:
parent
60a9f59816
commit
6f17f67493
5 changed files with 230 additions and 115 deletions
104
flake.nix
Normal file
104
flake.nix
Normal file
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix?tag=0.15.0";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
darwin.follows = "";
|
||||
};
|
||||
};
|
||||
|
||||
birdsong.url = "git+https://git.qenya.tel/qenya/birdsong?ref=main";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, agenix, birdsong, ... }: {
|
||||
colmena = {
|
||||
meta.nixpkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
meta.nodeNixpkgs.kalessin = import nixpkgs { system = "aarch64-linux"; }; # TODO: this should be generated from the host config somehow
|
||||
|
||||
defaults = { name, nodes, config, lib, pkgs, ... }: {
|
||||
deployment.replaceUnknownProfiles = lib.mkDefault false;
|
||||
networking.hostName = name;
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
nixpkgs.flake.source = nixpkgs;
|
||||
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs:
|
||||
let sources = import ./npins;
|
||||
in {
|
||||
agenix = (import sources.agenix { inherit pkgs; }).agenix;
|
||||
nur = (import sources.nur { inherit pkgs; });
|
||||
vscode-extensions = (import sources.nix-vscode-extensions).extensions.x86_64-linux; # TODO: This should check the host architecture
|
||||
};
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
home-manager.nixosModules.home-manager
|
||||
agenix.nixosModules.default
|
||||
birdsong.nixosModules.default
|
||||
./common
|
||||
./services
|
||||
];
|
||||
};
|
||||
|
||||
tohru = { name, nodes, ... }: {
|
||||
networking.hostId = "31da19c1";
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
imports = [
|
||||
./deployment/local.nix
|
||||
./hosts/tohru/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
yevaud = { name, nodes, ... }: {
|
||||
networking.hostId = "09673d65";
|
||||
time.timeZone = "Etc/UTC";
|
||||
|
||||
imports = [
|
||||
./deployment/remote.nix
|
||||
./hosts/yevaud/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
orm = { name, nodes, ... }: {
|
||||
networking.hostId = "00000000";
|
||||
time.timeZone = "Etc/UTC";
|
||||
|
||||
imports = [
|
||||
./deployment/remote.nix
|
||||
./hosts/orm/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
kalessin = { name, nodes, ... }: {
|
||||
networking.hostId = "534b538e";
|
||||
time.timeZone = "Etc/UTC";
|
||||
deployment = {
|
||||
buildOnTarget = true;
|
||||
replaceUnknownProfiles = true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
./deployment/remote.nix
|
||||
./hosts/kalessin/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue