b869120287
Replace container-flake (feat/o4dev branch) dependency with oparic-flakes (main) + direct o4dev service inputs. Container is now built via mkOparicContainer with local config and secrets.
140 lines
4.5 KiB
Nix
140 lines
4.5 KiB
Nix
{
|
|
description = "Origami404's NixOS Flake";
|
|
|
|
inputs = {
|
|
nixpkgs-linux.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
darwin = {
|
|
url = "github:nix-darwin/nix-darwin/master";
|
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/master";
|
|
inputs.nixpkgs.follows = "nixpkgs-linux";
|
|
};
|
|
home-manager-darwin = {
|
|
url = "github:nix-community/home-manager/master";
|
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
|
};
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
oparic-flakes.url = "git+ssh://gitea@git.inclyc.cn:20122/oparic/container-flake";
|
|
o4dev-backend = {
|
|
url = "git+ssh://gitea@git.inclyc.cn:20122/oparic/backend?ref=refs/heads/main";
|
|
inputs.nixpkgs.follows = "oparic-flakes/nixpkgs";
|
|
};
|
|
o4dev-admin = {
|
|
url = "git+ssh://gitea@git.inclyc.cn:20122/oparic/admin?ref=refs/heads/main";
|
|
inputs.nixpkgs.follows = "oparic-flakes/nixpkgs";
|
|
};
|
|
o4dev-workflows = {
|
|
url = "git+ssh://gitea@git.inclyc.cn:20122/oparic/workflows?ref=refs/heads/main";
|
|
inputs.nixpkgs.follows = "oparic-flakes/nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { nixpkgs-linux, nixpkgs-darwin, home-manager, home-manager-darwin, ... }@inputs:
|
|
let
|
|
o4devContainer = inputs.oparic-flakes.lib.mkOparicContainer {
|
|
name = "o4dev";
|
|
containerConfig = import ./hosts/oparic-local-dev/containers/o4dev/config.nix;
|
|
secretsFile = ./hosts/oparic-local-dev/containers/o4dev/secrets.yaml;
|
|
backendInput = inputs.o4dev-backend;
|
|
adminInput = inputs.o4dev-admin;
|
|
workflowsInput = inputs.o4dev-workflows;
|
|
};
|
|
in {
|
|
nixosConfigurations = {
|
|
"eris" = nixpkgs-linux.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
./hosts/eris/configuration.nix
|
|
];
|
|
};
|
|
"oparic-local-dev" = nixpkgs-linux.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = { inherit inputs o4devContainer; };
|
|
modules = [
|
|
./hosts/oparic-local-dev/configuration.nix
|
|
];
|
|
};
|
|
};
|
|
|
|
darwinConfigurations = {
|
|
"hypnos" = inputs.darwin.lib.darwinSystem {
|
|
system = "aarch64-darwin";
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
./hosts/hypnos/configuration.nix
|
|
];
|
|
};
|
|
};
|
|
|
|
homeConfigurations = {
|
|
"origami@eris" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs-linux.legacyPackages.x86_64-linux;
|
|
modules = [
|
|
{ nixpkgs.config.allowUnfreePredicate = _: true; }
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
./home/hosts/eris.nix
|
|
];
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
lib = import ./home/lib/origami404.nix {
|
|
hmSource = inputs.home-manager;
|
|
npLib = nixpkgs-linux.lib;
|
|
};
|
|
};
|
|
};
|
|
|
|
"origami@metis" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs-linux.legacyPackages.x86_64-linux;
|
|
modules = [
|
|
{ nixpkgs.config.allowUnfreePredicate = _: true; }
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
./home/hosts/metis.nix
|
|
];
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
lib = import ./home/lib/origami404.nix {
|
|
hmSource = inputs.home-manager;
|
|
npLib = nixpkgs-linux.lib;
|
|
};
|
|
};
|
|
};
|
|
|
|
"origami@oparic-local-dev" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs-linux.legacyPackages.x86_64-linux;
|
|
modules = [
|
|
{ nixpkgs.config.allowUnfreePredicate = _: true; }
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
./home/hosts/oparic-local-dev.nix
|
|
];
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
lib = import ./home/lib/origami404.nix {
|
|
hmSource = inputs.home-manager;
|
|
npLib = nixpkgs-linux.lib;
|
|
};
|
|
};
|
|
};
|
|
|
|
"origami@hypnos" = home-manager-darwin.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs-darwin.legacyPackages.aarch64-darwin;
|
|
modules = [
|
|
{ nixpkgs.config.allowUnfreePredicate = _: true; }
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
./home/hosts/hypnos.nix
|
|
];
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
lib = import ./home/lib/origami404.nix {
|
|
hmSource = inputs.home-manager-darwin;
|
|
npLib = nixpkgs-darwin.lib;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|