feat: Use Attic as binary cache

fix: Improve flake outputs yet again
refactor: Delete dead code related to hamnet
This commit is contained in:
Pim Kunis 2024-07-27 21:12:24 +02:00
parent 6db856cfe9
commit ea84627e59
4 changed files with 17 additions and 91 deletions

View file

@ -25,7 +25,10 @@
};
}).config.kubernetes;
mkManifest = name: { module, namespace }: (mkKubernetes name module namespace).result;
mkManifest = name: { module, namespace }: {
name = "${name}-manifest";
value = (mkKubernetes name module namespace).result;
};
mkDeployApp = name: { module, namespace }:
let
@ -52,8 +55,8 @@
};
in
{
type = "app";
program = "${pkgs.lib.getExe wrappedDeployScript}";
name = "${name}-deploy";
value = wrappedDeployScript;
};
deployers = {
@ -179,6 +182,5 @@
};
in
{
apps = builtins.mapAttrs mkDeployApp deployers;
packages = builtins.mapAttrs mkManifest deployers;
packages = pkgs.lib.mergeAttrs (pkgs.lib.mapAttrs' mkDeployApp deployers) (pkgs.lib.mapAttrs' mkManifest deployers);
})

View file

@ -1,6 +1,16 @@
{
description = "NixOS definitions for our home servers";
nixConfig = {
extra-substituters = [
"https://attic.kun.is/nixos-servers"
];
extra-trusted-public-keys = [
"nixos-servers:JThtPjQjDu3b3qXLgeXSJGgKL4OKQ4uLgTtoo1rg6Vw="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

View file

@ -1,40 +0,0 @@
log syslog all;
debug protocols all;
router id 44.137.17.110;
protocol bgp hamgre {
local as 4220401706;
neighbor 44.137.61.33 as 4220406100;
source address 44.137.61.34;
multihop;
ipv4 {
import all;
export none;
};
}
protocol device {
}
protocol direct {
interface "lo";
ipv4 {
};
}
protocol kernel {
metric 0;
learn;
ipv4 {
import none;
export all;
};
}
protocol static {
route 44.137.17.96/28 via 44.137.61.33;
ipv4 {
};
}

View file

@ -8,52 +8,6 @@
monitoring.server.enable = true;
tailscale.advertiseExitNode = true;
};
services.bird2 = {
enable = false;
config = builtins.readFile ./bird.conf;
};
#systemd.network = {
# netdevs = {
# hamgre = {
# netdevConfig = {
# Name = "hamgre";
# Kind = "gre";
# MTUBytes = "1468";
# };
# tunnelConfig = {
# Remote = "145.220.78.4";
# #Local = "192.145.57.90";
# };
# };
# # hambr = {
# # netdevConfig = {
# # Name = "hambr";
# # Kind = "bridge";
# # };
# # };
# };
# networks = {
# "30-main-nic".networkConfig.Tunnel = "hamgre";
# "40-hamgre" = {
# matchConfig.Name = "hamgre";
# networkConfig = {
# Address = "44.137.61.34/30";
# };
# };
# # "40-hambr" = {
# # matchConfig.Name = "hambr";
# # };
# };
#};
};
};
}