format && add nix-serve for caching
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ inputs, pkgs, config, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.copyparty.nixosModules.default ];
|
||||
nixpkgs.overlays = [ inputs.copyparty.overlays.default ];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
services.coredns = {
|
||||
enable = false;
|
||||
config = ''
|
||||
@@ -8,7 +9,7 @@
|
||||
cache
|
||||
file ${./db.homelab.local}
|
||||
}
|
||||
|
||||
|
||||
. {
|
||||
forward . 8.8.8.8
|
||||
log
|
||||
|
||||
@@ -14,7 +14,15 @@
|
||||
};
|
||||
|
||||
# Flake outputs
|
||||
outputs = inputs@{ self, nixpkgs, disko, unstable, agenix, ... }:
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
disko,
|
||||
unstable,
|
||||
agenix,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# The systems supported for this flake
|
||||
supportedSystems = [
|
||||
@@ -22,9 +30,14 @@
|
||||
];
|
||||
|
||||
# Helper to provide system-specific attributes
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
forEachSupportedSystem =
|
||||
f:
|
||||
nixpkgs.lib.genAttrs supportedSystems (
|
||||
system:
|
||||
f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
nixosConfigurations.zimablade = nixpkgs.lib.nixosSystem {
|
||||
@@ -40,15 +53,21 @@
|
||||
};
|
||||
};
|
||||
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
# The Nix packages provided in the environment
|
||||
# Add any you need here
|
||||
packages = with pkgs; [ pkgs.disko nixos-anywhere ];
|
||||
devShells = forEachSupportedSystem (
|
||||
{ pkgs }:
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
# The Nix packages provided in the environment
|
||||
# Add any you need here
|
||||
packages = with pkgs; [
|
||||
pkgs.disko
|
||||
nixos-anywhere
|
||||
];
|
||||
|
||||
# Add any shell logic you want executed any time the environment is activated
|
||||
shellHook = '''';
|
||||
};
|
||||
});
|
||||
# Add any shell logic you want executed any time the environment is activated
|
||||
shellHook = '''';
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
services.glances = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
||||
@@ -1,26 +1,39 @@
|
||||
# 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")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# 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
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s21f0u3u4.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
# 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")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# 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
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s21f0u3u4.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
@@ -116,6 +116,8 @@
|
||||
url = "udp://minecraft.shobu.fr:25565";
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
"reclamation" = {
|
||||
description = "bring back your world to life";
|
||||
widget = {
|
||||
@@ -123,7 +125,6 @@
|
||||
url = "udp://minecraft.shobu.fr:43001";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{pkgs, inputs, ...}: let
|
||||
{ pkgs, inputs, ... }:
|
||||
let
|
||||
unstable = import inputs.unstable { system = pkgs.system; };
|
||||
in {
|
||||
in
|
||||
{
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
@@ -27,24 +29,49 @@ in {
|
||||
extraGroups = [ "jellyfin" ];
|
||||
};
|
||||
|
||||
users.users.sonarr.extraGroups = ["jellyfin" "radarr" "transmission" "starr"];
|
||||
users.users.radarr.extraGroups = ["jellyfin" "sonarr" "transmission" "starr"];
|
||||
users.users.bazarr.extraGroups = ["jellyfin" "sonarr" "transmission" "starr" "radarr"];
|
||||
users.users.lidarr.extraGroups = ["jellyfin" "starr" "transmission"];
|
||||
|
||||
users.users.shobu.extraGroups = [ "jellyfin" "starr" "transmission" "radarr" "sonarr" ];
|
||||
users.users.sonarr.extraGroups = [
|
||||
"jellyfin"
|
||||
"radarr"
|
||||
"transmission"
|
||||
"starr"
|
||||
];
|
||||
users.users.radarr.extraGroups = [
|
||||
"jellyfin"
|
||||
"sonarr"
|
||||
"transmission"
|
||||
"starr"
|
||||
];
|
||||
users.users.bazarr.extraGroups = [
|
||||
"jellyfin"
|
||||
"sonarr"
|
||||
"transmission"
|
||||
"starr"
|
||||
"radarr"
|
||||
];
|
||||
users.users.lidarr.extraGroups = [
|
||||
"jellyfin"
|
||||
"starr"
|
||||
"transmission"
|
||||
];
|
||||
|
||||
users.users.shobu.extraGroups = [
|
||||
"jellyfin"
|
||||
"starr"
|
||||
"transmission"
|
||||
"radarr"
|
||||
"sonarr"
|
||||
];
|
||||
|
||||
|
||||
users.groups = {
|
||||
starr = {};
|
||||
starr = { };
|
||||
};
|
||||
|
||||
|
||||
services = {
|
||||
jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
|
||||
sonarr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
@@ -68,7 +95,7 @@ in {
|
||||
openFirewall = true;
|
||||
package = unstable.lidarr;
|
||||
};
|
||||
|
||||
|
||||
jellyseerr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
# Devices will be mounted and formatted in alphabetical order, and btrfs can only mount raids
|
||||
@@ -102,7 +103,7 @@
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd:3" ];
|
||||
};
|
||||
};
|
||||
|
||||
"/data" = {
|
||||
mountpoint = "/mnt/data";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{pkgs, config, ...}:
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
users.users = {
|
||||
postgres = {
|
||||
@@ -26,7 +26,10 @@
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 8008 8448 ];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8008
|
||||
8448
|
||||
];
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
@@ -39,13 +42,16 @@
|
||||
listeners = [
|
||||
{
|
||||
port = 8008;
|
||||
bind_addresses = ["0.0.0.0"];
|
||||
bind_addresses = [ "0.0.0.0" ];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
resources = [
|
||||
{
|
||||
names = [ "client" "federation" ];
|
||||
names = [
|
||||
"client"
|
||||
"federation"
|
||||
];
|
||||
compress = true;
|
||||
}
|
||||
];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
age.secrets = {
|
||||
# captcha = {
|
||||
# file = ./secrets/matrix_captcha.age;
|
||||
|
||||
Reference in New Issue
Block a user