Merge branch 'main' of gh:greg-hellings/nixos-config
This commit is contained in:
@@ -75,10 +75,6 @@ in {
|
|||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = [ "ro" ];
|
options = [ "ro" ];
|
||||||
};
|
};
|
||||||
"/proxy" = {
|
|
||||||
device = "/dev/vdb1";
|
|
||||||
fsType = "btrfs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
@@ -187,42 +183,6 @@ in {
|
|||||||
"jellyfin.home".target = "http://localhost:8096/";
|
"jellyfin.home".target = "http://localhost:8096/";
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
|
||||||
nginx.virtualHosts."nixcache.thehellings.lan" = {
|
|
||||||
serverName = "nixcache.thehellings.lan";
|
|
||||||
serverAliases = [ "nixcache" "nixcache.home" ];
|
|
||||||
root = "/proxy";
|
|
||||||
locations = {
|
|
||||||
"~ ^/nix-cache-info" = {
|
|
||||||
proxyPass = "https://cache.nixos.org";
|
|
||||||
root = "/proxy/nixpkgs/nix-cache-info/store";
|
|
||||||
recommendedProxySettings = false;
|
|
||||||
extraConfig = ''
|
|
||||||
error_log /var/log/nginx/proxy.log debug;
|
|
||||||
proxy_store on;
|
|
||||||
proxy_store_access user:rw group:rw all:r;
|
|
||||||
proxy_temp_path /proxy/nixpkgs/nix-cache-info/temp;
|
|
||||||
proxy_pass_request_headers on;
|
|
||||||
proxy_set_header Host "cache.nixos.org";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
"~^/nar/.+$" = {
|
|
||||||
proxyPass = "https://cache.nixos.org";
|
|
||||||
root = "/proxy/nixpkgs/nar/store";
|
|
||||||
recommendedProxySettings = false;
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_store on;
|
|
||||||
proxy_store_access user:rw group:rw all:r;
|
|
||||||
proxy_temp_path /proxy/nixpkgs/nar/temp;
|
|
||||||
proxy_pass_request_headers on;
|
|
||||||
proxy_set_header Host "cache.nixos.org";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/proxy" ];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
bind
|
bind
|
||||||
curl # Used by dnsmasq fetching
|
curl # Used by dnsmasq fetching
|
||||||
|
|||||||
@@ -57,74 +57,5 @@ in
|
|||||||
layout = "us";
|
layout = "us";
|
||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
gitlab-runner = {
|
|
||||||
enable = true;
|
|
||||||
settings.concurrent = 1;
|
|
||||||
services = {
|
|
||||||
shell = {
|
|
||||||
executor = "shell";
|
|
||||||
limit = 5;
|
|
||||||
registrationConfigFile = config.age.secrets.runner-reg.path;
|
|
||||||
environmentVariables = {
|
|
||||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
|
||||||
STORAGE_URL = "http://minio-01.thehellings.lan:9000";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#####################################################################################
|
|
||||||
#################### Virtualbox Runner ##############################################
|
|
||||||
#####################################################################################
|
|
||||||
age.secrets.runner-reg.file = ../../secrets/gitlab/myself-vbox-runner-reg.age;
|
|
||||||
virtualisation.virtualbox.host = {
|
|
||||||
enable = true;
|
|
||||||
enableExtensionPack = true;
|
|
||||||
enableHardening = false;
|
|
||||||
headless = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services."gitlab-runner" = {
|
|
||||||
after = [
|
|
||||||
"network.target"
|
|
||||||
"network-online.target"
|
|
||||||
"systemd-resolved.service"
|
|
||||||
];
|
|
||||||
# Moved here from myself/Isaiah, so technically unnecessary now
|
|
||||||
conflicts = [
|
|
||||||
"container@gitlab-runner-qemu.service"
|
|
||||||
];
|
|
||||||
wants = [
|
|
||||||
"network-online.target"
|
|
||||||
"systemd-resolved.service"
|
|
||||||
];
|
|
||||||
preStart = builtins.concatStringsSep "\n" [
|
|
||||||
"${pkgs.kmod}/bin/modprobe vboxdrv"
|
|
||||||
"${pkgs.kmod}/bin/modprobe vboxnetadp"
|
|
||||||
"${pkgs.kmod}/bin/modprobe vboxnetflt"
|
|
||||||
];
|
|
||||||
postStop = "${pkgs.kmod}/bin/rmmod vboxnetadp vboxnetflt vboxdrv";
|
|
||||||
serviceConfig = {
|
|
||||||
DevicePolicy = lib.mkForce "auto";
|
|
||||||
User = "root";
|
|
||||||
DynamicUser = lib.mkForce false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
curl
|
|
||||||
gawk
|
|
||||||
git
|
|
||||||
p7zip
|
|
||||||
packer
|
|
||||||
pup
|
|
||||||
gregpy
|
|
||||||
shellcheck
|
|
||||||
unzip
|
|
||||||
xorriso
|
|
||||||
vagrant
|
|
||||||
wget
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 18083 ]; # Should be interface for vboxweb
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
minioPort
|
minioPort
|
||||||
minioConsolePort
|
minioConsolePort
|
||||||
];
|
];
|
||||||
@@ -23,6 +24,8 @@ in {
|
|||||||
browser = true;
|
browser = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
greg.proxies."s3.thehellings.lan".target = "http://127.0.0.1:${toString minioPort}";
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
minio-client
|
minio-client
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ in
|
|||||||
keep-derivations = true;
|
keep-derivations = true;
|
||||||
min-free = (toString (1024 * 1024 * 1024) );
|
min-free = (toString (1024 * 1024 * 1024) );
|
||||||
max-free = (toString (5 * 1024 * 1024 * 1024) );
|
max-free = (toString (5 * 1024 * 1024 * 1024) );
|
||||||
substituters = (if notDarwin then [ "http://nixcache.home" ] else []) ++ [
|
substituters = [
|
||||||
"https://cache.garnix.io"
|
"https://cache.garnix.io"
|
||||||
"https://ai.cachix.org"
|
"https://ai.cachix.org"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
efibootmgr
|
efibootmgr
|
||||||
psmisc
|
psmisc
|
||||||
lshw
|
lshw
|
||||||
|
usbutils
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
pipenv-ivr = prev.callPackage ./pipenv.nix { };
|
pipenv-ivr = prev.callPackage ./pipenv.nix { };
|
||||||
|
|
||||||
myxonsh = (prev.xonsh-unwrapped.passthru.wrapper.override {
|
myxonsh = (prev.unstable.xonsh-unwrapped.passthru.wrapper.override {
|
||||||
extraPackages = (ps: with ps; [
|
extraPackages = (ps: with ps; [
|
||||||
xonsh-apipenv
|
xonsh-apipenv
|
||||||
xonsh-direnv
|
xonsh-direnv
|
||||||
|
|||||||
Reference in New Issue
Block a user