Merge branch 'main' of github.com:asosnovsky/nixos-setup

This commit is contained in:
ari committed 2024-07-31 11:51:18 -04:00
commit 47638d5f8b
4 files changed
+18 -42

No files matched your search

+8 -4
View File
@@ -43,10 +43,14 @@
};
homeManagerVersion = "24.05";
# Local Services
localNixCaches = [
"http://minipc1.lab.internal:5000"
"http://fwlaptop.devices.internal:5000"
];
localNixCaches = {
urls = [
"http://minipc1.lab.internal:5000"
];
keys = [
"minipc1.lab.internal:eIoib1JgcBEd0YKdW95QlRA2eCKDs+WxNhWhkA1wffc="
];
};
localDockerRegistries = [ "minipc1.lab.internal:5001" ];
# Libs
lib = (import modules/lib.nix {
+5 -33
View File
@@ -1,6 +1,11 @@
{ user }:
{ pkgs, lib, config, ... }: {
imports = [ ./hl-minipc1.hardware-configuration.nix ];
# Nix Stores
services.nix-serve = {
enable = true;
secretKeyFile = "/var/keys/cache-priv-key.pem";
};
# firmware updater
services.fwupd.enable = true;
# Bootloader.
@@ -29,38 +34,5 @@
listenAddress = "0.0.0.0";
enableDelete = true;
};
virtualisation.oci-containers = {
backend = "docker";
containers = {
myevents-app = {
autoStart = true;
image = "localhost:5001/asosnovsky/myevents";
extraOptions = [ "--gpus" "all" ];
ports = [ "8000:80" ];
cmd = [ "app" ];
environmentFiles = [
"/mnt/Data/myevents/app.env"
];
dependsOn = [ "myevents-db" ];
};
myevents-cron = {
autoStart = true;
image = "localhost:5001/asosnovsky/myevents";
cmd = [ "cron" ];
environmentFiles = [
"/mnt/Data/myevents/app.env"
];
dependsOn = [ "myevents-db" ];
};
myevents-db = {
autoStart = true;
image = "docker.io/postgres";
hostname = "myevents-db";
environmentFiles = [
"/mnt/Data/myevents/db.env"
];
};
};
};
}
+1 -1
View File
@@ -17,7 +17,7 @@
enable = false;
enableDevelopmentKit = false;
}
, localNixCaches ? [ ]
, localNixCaches ? { keys = [ ]; urls = [ ]; }
, ...
}:
{ ... }: {
+4 -4
View File
@@ -1,4 +1,4 @@
{ user, systemStateVersion, localNixCaches ? [ ] }:
{ user, systemStateVersion, localNixCaches ? { keys = [ ]; urls = [ ]; } }:
{ pkgs, ... }:
{
# Nix core
@@ -10,16 +10,16 @@
"https://cache.nixos.org"
"https://cache.flox.dev"
"https://devenv.cachix.org"
] ++ localNixCaches;
] ++ localNixCaches.urls;
trusted-substituters = [
"https://cache.flox.dev"
"https://devenv.cachix.org"
] ++ localNixCaches;
] ++ localNixCaches.urls;
trusted-users = [ "root" user.name ];
trusted-public-keys = [
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
] ++ localNixCaches.keys;
};
# System Packages