Cleanup
Some checks failed
/ Build Nix targets (push) Has been cancelled

This commit is contained in:
Théo Barnouin 2025-06-18 09:27:31 +02:00
parent 1fc6e03c2c
commit 8754f0d1a0
7 changed files with 2 additions and 155 deletions

View file

@ -15,18 +15,14 @@
}; };
outputs = inputs @ { outputs = inputs @ {
self,
nixpkgs, nixpkgs,
home-manager,
agenix, agenix,
crowdsec, crowdsec,
... ...
}: let }: let
system = "x86_64-linux"; system = "x86_64-linux";
username = "tbarnouin";
proxy_host = "192.168.1.40"; proxy_host = "192.168.1.40";
pgsql_host = "192.168.1.13"; pgsql_host = "192.168.1.13";
pkgs = import nixpkgs {inherit system;};
in { in {
nixosConfigurations = { nixosConfigurations = {
nginx = nixpkgs.lib.nixosSystem { nginx = nixpkgs.lib.nixosSystem {
@ -155,23 +151,6 @@
} }
]; ];
}; };
nixarr = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {inherit inputs;};
modules = [
agenix.nixosModules.default
crowdsec.nixosModules.crowdsec-firewall-bouncer
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-image.nix"
"${inputs.self}/systems/minimalVMConfig.nix"
"${inputs.self}/services"
"${inputs.self}/modules"
{
services.vm_nixarr = {
enable = true;
};
}
];
};
arr-box = nixpkgs.lib.nixosSystem { arr-box = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs;};

View file

@ -1,4 +1,4 @@
{inputs, ...}: { {...}: {
imports = [ imports = [
./crowdsec.nix ./crowdsec.nix
]; ];

View file

@ -1,28 +0,0 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "cs-firewall-bouncer";
version = "0.0.31";
src = fetchFromGitHub {
owner = "crowdsecurity";
repo = pname;
rev = "v${version}";
hash = "sha256-59MWll8v00CF4WA53gjHZSTFc8hpYaHENg9O7LgTCrA=";
};
vendorHash = "sha256-7Jxvg8UEjUxnIz1llvXyI2AefJ31OVdNzhWD/C8wU/Y=";
meta = with lib; {
homepage = "https://crowdsec.net/";
changelog = "https://github.com/crowdsecurity/${pname}/releases/tag/v${version}";
description = "Crowdsec bouncer for firewalls.";
longDescription = ''
crowdsec-firewall-bouncer will fetch new and old decisions from a CrowdSec API to add them in a blocklist used by supported firewalls.
'';
license = licenses.mit;
};
}

View file

@ -1,4 +1,4 @@
{inputs, ...}: { {...}: {
imports = [ imports = [
./nginx ./nginx
./forgejo ./forgejo

View file

@ -1,57 +0,0 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.services.vm_jellyfin_nvidia;
in {
options.services.vm_jellyfin_nvidia = {
enable = lib.mkEnableOption "Enable minimal config";
};
config = lib.mkIf cfg.enable {
environment = {
systemPackages = with pkgs; [
nvtopPackages.nvidia
];
};
# Nvidia Hardware Acceleration config
services.xserver.videoDrivers = ["nvidia"];
hardware = {
graphics = {
enable = true;
extraPackages = with pkgs; [cudaPackages.cudatoolkit];
};
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
nvidiaSettings = true;
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
powerManagement.finegrained = false;
# Use the NVidia open source kernel module
# Recommended by Nvidia for 20+ series GPU
open = true;
};
};
services = {
jellyfin = {
enable = true;
user = "tbarnouin";
openFirewall = true;
};
};
fileSystems."/mnt/media" = {
device = "192.168.1.125:/BIGDATA";
fsType = "nfs";
options = [
"x-systemd.automount"
"noauto"
];
};
};
}

View file

@ -1,44 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
cfg = config.services.vm_netbox;
in {
options.services.vm_netbox = {
enable = lib.mkEnableOption "Enable minimal config";
pgsql_ip = lib.mkOption {
type = lib.types.str;
description = "Netbox database IP address";
};
};
config = lib.mkIf cfg.enable {
age.secrets.netbox-lapi-key = {
file = ../../secrets/netbox-lapi-key.age;
owner = "crowdsec";
};
services = {
crowdsec = {
settings.lapi.credentialsFile = "${config.age.secrets.netbox-lapi-key.path}";
localConfig = {
acquisitions = [
{
source = "journalctl";
journalctl_filter = ["_SYSTEMD_UNIT=netbox.service"];
labels = {
type = "syslog";
};
}
];
};
};
netbox = {
enable = true;
package = pkgs.netbox_3_7;
port = 8001;
};
};
networking.firewall.allowedTCPPorts = [8001];
};
}

View file

@ -2,9 +2,6 @@
config, config,
pkgs, pkgs,
lib, lib,
inputs,
modulesPath,
microvm,
... ...
}: let }: let
cfg = config.services.micro_vm; cfg = config.services.micro_vm;