diff --git a/flake.nix b/flake.nix index 30a854e..bb8b52b 100644 --- a/flake.nix +++ b/flake.nix @@ -15,18 +15,14 @@ }; outputs = inputs @ { - self, nixpkgs, - home-manager, agenix, crowdsec, ... }: let system = "x86_64-linux"; - username = "tbarnouin"; proxy_host = "192.168.1.40"; pgsql_host = "192.168.1.13"; - pkgs = import nixpkgs {inherit system;}; in { nixosConfigurations = { 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 { inherit system; specialArgs = {inherit inputs;}; diff --git a/modules/default.nix b/modules/default.nix index 935f8a1..b2da44e 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,4 @@ -{inputs, ...}: { +{...}: { imports = [ ./crowdsec.nix ]; diff --git a/packages/cs-firewall-bouncer/default.nix b/packages/cs-firewall-bouncer/default.nix deleted file mode 100644 index d894b8a..0000000 --- a/packages/cs-firewall-bouncer/default.nix +++ /dev/null @@ -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; - }; -} diff --git a/services/default.nix b/services/default.nix index 29c63c1..1b92054 100644 --- a/services/default.nix +++ b/services/default.nix @@ -1,4 +1,4 @@ -{inputs, ...}: { +{...}: { imports = [ ./nginx ./forgejo diff --git a/services/jellyfin-nvidia/default.nix b/services/jellyfin-nvidia/default.nix deleted file mode 100644 index 6375d4e..0000000 --- a/services/jellyfin-nvidia/default.nix +++ /dev/null @@ -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" - ]; - }; - }; -} diff --git a/services/netbox/default.nix b/services/netbox/default.nix deleted file mode 100644 index d2257b5..0000000 --- a/services/netbox/default.nix +++ /dev/null @@ -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]; - }; -} diff --git a/systems/minimalMicrovmConfig.nix b/systems/minimalMicrovmConfig.nix index 35d7459..2e557b0 100644 --- a/systems/minimalMicrovmConfig.nix +++ b/systems/minimalMicrovmConfig.nix @@ -2,9 +2,6 @@ config, pkgs, lib, - inputs, - modulesPath, - microvm, ... }: let cfg = config.services.micro_vm;