test update to 23.05

This commit is contained in:
oxapentane - 2023-05-26 16:18:59 +02:00
parent 95e8a04b49
commit 95eaad33d8
Signed by: oxapentane
GPG Key ID: 91FA5E5BF9AA901C
7 changed files with 13 additions and 47 deletions

View File

@ -616,16 +616,16 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1684936879,
"narHash": "sha256-BOSq/QiX7MDs8tUnAt4+nYTJctgYkzVSNL95qlfMYeM=",
"lastModified": 1685004253,
"narHash": "sha256-AbVL1nN/TDicUQ5wXZ8xdLERxz/eJr7+o8lqkIOVuaE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "99fe1b870522d6ee3e692c2b6e663d6868a3fde4",
"rev": "3e01645c40b92d29f3ae76344a6d654986a91a91",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
# naersk and flake utils are not used by this flake directly, but needed
# for the follows in all the other ones.
@ -242,35 +242,12 @@
staging-microvm = self.nixosConfigurations.staging-data-hoarder.config.microvm.declaredRunner;
borken-microvm = self.nixosConfigurations.borken-data-hoarder.config.microvm.declaredRunner;
data-hoarder-microvm = self.nixosConfigurations.data-hoarder.config.microvm.declaredRunner;
fuck-microvm = self.nixosConfigurations.fuck.config.system.build.vm;
docs = pkgs.callPackage ./pkgs/documentation.nix {
inherit documentation-src;
options-docs = (pkgs.nixosOptionsDoc {
options = self.nixosConfigurations.data-hoarder.options.TLMS;
}).optionsCommonMark;
};
test-vm-wrapper =
let
cfg = self.nixosConfigurations.fuck.config;
in
(pkgs.writeScript "datacare-test-vm-wrapper"
''
set -e
echo Datacare-McTest: enterprise-grade, free-range, grass-fed testing vm
echo "ALL RELEVANT SERVICES WILL BE EXPOSED TO THE HOST:"
echo -e "Service\t\tPort"
echo -e "SSH:\t\t2223\troot:lol"
echo -e "trekkie:\t${toString cfg.TLMS.trekkie.port}"
echo -e "datacare:\t${toString cfg.TLMS.datacare.http.port}"
echo -e "data-accumulator:\t${toString cfg.TLMS.dataAccumulator.port}"
echo -e "funnel:\t${toString cfg.TLMS.funnel.defaultWebsocket.port}"
echo
set -x
export QEMU_NET_OPTS="hostfwd=tcp::2223-:22,hostfwd=tcp::80-:80,hostfwd=tcp::8050-:${toString cfg.TLMS.trekkie.port},hostfwd=tcp::8060-:${toString cfg.TLMS.datacare.http.port},hostfwd=tcp::8070-:${toString cfg.TLMS.dataAccumulator.port},hostfwd=tcp::8080-:${toString cfg.TLMS.funnel.defaultWebsocket.port}"
echo "running the vm now..."
${self.packages."x86_64-linux".fuck-microvm}/bin/run-staging-data-hoarder-vm
'');
}
// (import ./pkgs/deployment.nix { inherit self pkgs; systems = stop_boxes; })
// (lib.foldl (x: y: lib.mergeAttrs x { "${y.config.system.name}-vm" = y.config.system.build.vm; }) { } (lib.attrValues self.nixosConfigurations));
@ -308,19 +285,6 @@
] ++ data-hoarder-modules;
};
fuck = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };
modules = [
microvm.nixosModules.microvm
./hosts/staging-data-hoarder
./hosts/fuck
{
deployment-TLMS.monitoring.enable = false;
}
] ++ data-hoarder-modules;
};
notice-me-senpai = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs self; };

View File

@ -20,7 +20,7 @@
useDHCP = lib.mkDefault true;
};
boot.tmpOnTmpfsSize = "25%";
boot.tmp.tmpfsSize = "25%";
boot.kernelModules = [ "kvm-intel" ];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View File

@ -4,7 +4,7 @@
networking.hostName = "notice-me-senpai";
boot = {
cleanTmpDir = true;
tmp.cleanOnBoot = true;
kernelPackages = pkgs.linuxPackages_latest;
};

View File

@ -30,7 +30,7 @@ in
wgHosts = lib.filterAttrs filterWgHosts self.nixosConfigurations;
# collect active prometheus exporters
filterEnabledExporters = name: host: lib.filterAttrs (k: v: v.enable == true) host.config.services.prometheus.exporters;
filterEnabledExporters = name: host: lib.filterAttrs (k: v: (builtins.isAttrs v) && v.enable == true) host.config.services.prometheus.exporters;
enabledExporters = lib.mapAttrs filterEnabledExporters wgHosts;
# turns exporter config into scraper config

View File

@ -74,8 +74,10 @@ in
};
services.openssh = {
enable = true;
permitRootLogin = "prohibit-password";
passwordAuthentication = false;
settings = {
permitRootLogin = "prohibit-password";
passwordAuthentication = false;
};
};
programs.mosh.enable = true;

View File

@ -1,7 +1,7 @@
{ config, ... }:
{
boot.tmpOnTmpfs = true;
boot.tmp.useTmpfs = true;
networking.hostName = "traffic-stop-box-${toString config.deployment-TLMS.systemNumber}"; # Define your hostname.