2021-09-24 06:09:20 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
description = "my krops file";
|
|
|
|
|
|
|
|
inputs = {
|
2021-09-25 11:07:09 +02:00
|
|
|
secrets = {
|
2022-01-15 09:32:59 +01:00
|
|
|
url = "git+ssh://gitea@git.ingolf-wagner.de/palo/nixos-secrets.git?ref=main";
|
2021-09-25 11:07:09 +02:00
|
|
|
flake = false;
|
|
|
|
};
|
2022-06-14 22:56:58 +02:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
|
2021-09-24 06:09:20 +02:00
|
|
|
krops = {
|
|
|
|
url = "github:Mic92/krops";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-06-22 21:54:57 +02:00
|
|
|
# colmena
|
|
|
|
colmena.url = "github:zhaofengli/colmena";
|
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
polygon-art = {
|
|
|
|
url = "git+https://git.ingolf-wagner.de/palo/polygon-art.git";
|
|
|
|
};
|
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
|
|
emacs-overlay = {
|
|
|
|
url = "github:nix-community/emacs-overlay";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
doom-emacs-nix = {
|
|
|
|
url = "github:nix-community/nix-doom-emacs";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
#inputs.emacs-overlay.follows = "emacs-overlay";
|
|
|
|
};
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-21.11";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
home-manager-utils = {
|
|
|
|
url = "github:mrvandalo/home-manager-utils";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
};
|
|
|
|
cluster-module = {
|
|
|
|
url = "github:mrvandalo/module.cluster";
|
|
|
|
};
|
|
|
|
nixpkgs-fmt = {
|
|
|
|
url = "github:nix-community/nixpkgs-fmt";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
grocy-scanner = {
|
|
|
|
url = "github:mrVanDalo/grocy-scanner";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-09-24 06:09:20 +02:00
|
|
|
};
|
|
|
|
|
2022-06-22 21:54:57 +02:00
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, cluster-module
|
|
|
|
, colmena
|
|
|
|
, doom-emacs-nix
|
|
|
|
, emacs-overlay
|
|
|
|
, grocy-scanner
|
|
|
|
, home-manager
|
|
|
|
, home-manager-utils
|
|
|
|
, nixpkgs
|
|
|
|
, nixpkgs-fmt
|
|
|
|
, nixpkgs-unstable
|
|
|
|
, polygon-art
|
|
|
|
, sops-nix
|
|
|
|
, krops
|
|
|
|
, secrets
|
|
|
|
}:
|
2021-09-25 20:28:25 +02:00
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
writeCommand = krops.packages.${system}.writeCommand;
|
2021-11-01 09:20:42 +01:00
|
|
|
in
|
|
|
|
{
|
2021-11-01 12:16:18 +01:00
|
|
|
# deployment
|
|
|
|
apps.${system} = {
|
|
|
|
# nix run ".#deploy.sterni"
|
|
|
|
deploy = pkgs.callPackage ./nixos/krops.nix {
|
|
|
|
inherit writeCommand secrets;
|
|
|
|
lib = krops.lib;
|
|
|
|
};
|
|
|
|
|
|
|
|
# nix run ".#test.sterni"
|
|
|
|
test = pkgs.callPackage ./nixos/krops.nix {
|
|
|
|
inherit writeCommand secrets;
|
|
|
|
lib = krops.lib;
|
|
|
|
nixosRebuildCommand = "test";
|
|
|
|
};
|
2021-09-24 06:09:20 +02:00
|
|
|
};
|
2021-11-01 12:16:18 +01:00
|
|
|
|
2022-06-22 21:54:57 +02:00
|
|
|
# colmena
|
|
|
|
devShell.x86_64-linux =
|
|
|
|
pkgs.mkShell {
|
|
|
|
buildInputs = [ colmena.packages.${system}.colmena ];
|
|
|
|
};
|
|
|
|
|
|
|
|
colmena = {
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
nixpkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlays = [
|
|
|
|
(_self: _super: {
|
|
|
|
# we assign the overlay created before to the overlays of nixpkgs.
|
|
|
|
unstable = nixpkgs-unstable.legacyPackages.${pkgs.system};
|
|
|
|
polygon-art = polygon-art.packages.${pkgs.system};
|
|
|
|
})
|
|
|
|
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
sterni = { name, nodes, pkgs, ... }: {
|
|
|
|
deployment = {
|
|
|
|
buildOnTarget = true;
|
|
|
|
targetHost = "sterni.private";
|
|
|
|
keys = {
|
|
|
|
"onion_id_pepe".text = "yolo";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
./nixos/configs/sterni/configuration.nix
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
cluster-module.nixosModules.tinc
|
|
|
|
grocy-scanner.nixosModule
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
];
|
|
|
|
|
|
|
|
# todo
|
|
|
|
sops.defaultSopsFile = "${secrets}/secrets/sterni.yaml";
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
# no channesl needed this way
|
|
|
|
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
|
|
|
# make flakes available
|
|
|
|
package = pkgs.nixUnstable;
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.mainUser = {
|
|
|
|
imports = [
|
|
|
|
doom-emacs-nix.hmModule
|
|
|
|
home-manager-utils.hmModule
|
|
|
|
];
|
|
|
|
};
|
|
|
|
environment.systemPackages = [
|
|
|
|
nixpkgs-fmt.defaultPackage."x86_64-linux"
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
2021-09-25 20:28:25 +02:00
|
|
|
};
|
2021-09-24 06:09:20 +02:00
|
|
|
}
|
2022-06-22 21:54:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|