task | reformatted with nixfmt
This commit is contained in:
parent
e3fea64660
commit
c3a0a0847f
119 changed files with 1010 additions and 2135 deletions
|
|
@ -1,15 +1,4 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./default.nix
|
||||
];
|
||||
deployment = {
|
||||
tags = ["server" "intel"];
|
||||
};
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
imports = [ ./default.nix ];
|
||||
deployment = { tags = [ "server" "intel" ]; };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,4 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../server
|
||||
|
|
@ -16,11 +9,9 @@
|
|||
];
|
||||
networking.hostName = "fred";
|
||||
boot = {
|
||||
binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
systemd-boot = { enable = true; };
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
# Auto-generated using compose2nix v0.1.6.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
{ config, lib, ... }: {
|
||||
# Runtime
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,29 +1,14 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
{ config, lib, pkgs, modulesPath, ... }: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"ums_realtek"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ehci_pci" "ahci" "usbhid" "ums_realtek" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/4a1d2915-6964-4479-98c6-d17e333e83e9";
|
||||
|
|
@ -35,7 +20,7 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
@ -45,5 +30,6 @@
|
|||
# networking.interfaces.enp0s25.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
# Auto-generated using compose2nix v0.1.6.
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
{ pkgs, lib, ... }: {
|
||||
# Runtime
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
|
|
@ -35,29 +31,16 @@
|
|||
"/home/don/docker/speedtest/config:/config:rw"
|
||||
"/home/don/docker/speedtest/web:/etc/ssl/web:rw"
|
||||
];
|
||||
dependsOn = [
|
||||
"bandwidth-db"
|
||||
"bandwidth-ts"
|
||||
];
|
||||
dependsOn = [ "bandwidth-db" "bandwidth-ts" ];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network=container:bandwidth-ts"
|
||||
];
|
||||
extraOptions = [ "--network=container:bandwidth-ts" ];
|
||||
};
|
||||
systemd.services."podman-bandwidth" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
};
|
||||
partOf = [
|
||||
"podman-compose-tstest-root.target"
|
||||
];
|
||||
unitConfig.UpheldBy = [
|
||||
"podman-bandwidth-db.service"
|
||||
"podman-bandwidth-ts.service"
|
||||
];
|
||||
wantedBy = [
|
||||
"podman-compose-tstest-root.target"
|
||||
];
|
||||
serviceConfig = { Restart = lib.mkOverride 500 "always"; };
|
||||
partOf = [ "podman-compose-tstest-root.target" ];
|
||||
unitConfig.UpheldBy =
|
||||
[ "podman-bandwidth-db.service" "podman-bandwidth-ts.service" ];
|
||||
wantedBy = [ "podman-compose-tstest-root.target" ];
|
||||
};
|
||||
virtualisation.oci-containers.containers."bandwidth-db" = {
|
||||
image = "mariadb:10";
|
||||
|
|
@ -69,30 +52,16 @@
|
|||
PGID = "1000";
|
||||
PUID = "1000";
|
||||
};
|
||||
volumes = [
|
||||
"/home/don/docker/speedtest-db:/var/lib/mysql:rw"
|
||||
];
|
||||
dependsOn = [
|
||||
"bandwidth-ts"
|
||||
];
|
||||
volumes = [ "/home/don/docker/speedtest-db:/var/lib/mysql:rw" ];
|
||||
dependsOn = [ "bandwidth-ts" ];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network=container:bandwidth-ts"
|
||||
];
|
||||
extraOptions = [ "--network=container:bandwidth-ts" ];
|
||||
};
|
||||
systemd.services."podman-bandwidth-db" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
};
|
||||
partOf = [
|
||||
"podman-compose-tstest-root.target"
|
||||
];
|
||||
unitConfig.UpheldBy = [
|
||||
"podman-bandwidth-ts.service"
|
||||
];
|
||||
wantedBy = [
|
||||
"podman-compose-tstest-root.target"
|
||||
];
|
||||
serviceConfig = { Restart = lib.mkOverride 500 "always"; };
|
||||
partOf = [ "podman-compose-tstest-root.target" ];
|
||||
unitConfig.UpheldBy = [ "podman-bandwidth-ts.service" ];
|
||||
wantedBy = [ "podman-compose-tstest-root.target" ];
|
||||
};
|
||||
virtualisation.oci-containers.containers."bandwidth-ts" = {
|
||||
image = "tailscale/tailscale";
|
||||
|
|
@ -108,7 +77,7 @@
|
|||
"/dev/net/tun:/dev/net/tun:rw"
|
||||
"/home/don/docker/tailscale/var_lib:/var/lib:rw"
|
||||
];
|
||||
cmd = ["tailscaled"];
|
||||
cmd = [ "tailscaled" ];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--cap-add=net_admin"
|
||||
|
|
@ -119,26 +88,16 @@
|
|||
];
|
||||
};
|
||||
systemd.services."podman-bandwidth-ts" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "no";
|
||||
};
|
||||
after = [
|
||||
"podman-network-tstest-default.service"
|
||||
];
|
||||
requires = [
|
||||
"podman-network-tstest-default.service"
|
||||
];
|
||||
partOf = [
|
||||
"podman-compose-tstest-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"podman-compose-tstest-root.target"
|
||||
];
|
||||
serviceConfig = { Restart = lib.mkOverride 500 "no"; };
|
||||
after = [ "podman-network-tstest-default.service" ];
|
||||
requires = [ "podman-network-tstest-default.service" ];
|
||||
partOf = [ "podman-compose-tstest-root.target" ];
|
||||
wantedBy = [ "podman-compose-tstest-root.target" ];
|
||||
};
|
||||
|
||||
# Networks
|
||||
systemd.services."podman-network-tstest-default" = {
|
||||
path = [pkgs.podman];
|
||||
path = [ pkgs.podman ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
|
|
@ -147,17 +106,15 @@
|
|||
script = ''
|
||||
podman network inspect tstest-default || podman network create tstest-default --opt isolate=true
|
||||
'';
|
||||
partOf = ["podman-compose-tstest-root.target"];
|
||||
wantedBy = ["podman-compose-tstest-root.target"];
|
||||
partOf = [ "podman-compose-tstest-root.target" ];
|
||||
wantedBy = [ "podman-compose-tstest-root.target" ];
|
||||
};
|
||||
|
||||
# Root service
|
||||
# When started, this will automatically create all resources and start
|
||||
# the containers. When stopped, this will teardown all resources.
|
||||
systemd.targets."podman-compose-tstest-root" = {
|
||||
unitConfig = {
|
||||
Description = "Root target generated by compose2nix.";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
unitConfig = { Description = "Root target generated by compose2nix."; };
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue