treewide: format
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m53s

This commit is contained in:
Jordan Holt 2025-01-19 11:13:04 +00:00
parent c3283314b7
commit ccb57f954e
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520
77 changed files with 1487 additions and 808 deletions

View File

@ -55,7 +55,8 @@
};
};
outputs = inputs @ { self, nixpkgs, ... }:
outputs =
inputs@{ self, nixpkgs, ... }:
let
inherit (nixpkgs) lib;
@ -70,7 +71,11 @@
profiles.system = {
user = "root";
path = inputs.deploy-rs.lib.${self.nixosConfigurations.${hostName}.config.system.build.toplevel.system}.activate.nixos self.nixosConfigurations.${hostName};
path =
inputs.deploy-rs.lib.${
self.nixosConfigurations.${hostName}.config.system.build.toplevel.system
}.activate.nixos
self.nixosConfigurations.${hostName};
};
};
in
@ -80,16 +85,19 @@
directory = ./overlays;
};
legacyPackages = forEachSystem (system:
legacyPackages = forEachSystem (
system:
lib.packagesFromDirectoryRecursive {
callPackage = nixpkgs.legacyPackages.${system}.callPackage;
directory = ./pkgs;
});
}
);
nixosConfigurations = lib.pipe ./hosts [
builtins.readDir
(lib.filterAttrs (name: value: value == "directory"))
(lib.mapAttrs (name: value:
(lib.mapAttrs (
name: value:
lib.nixosSystem {
specialArgs = { inherit self; };
@ -102,7 +110,8 @@
}
./hosts/${name}
];
}))
}
))
];
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
@ -126,7 +135,8 @@
] mkDeployNode;
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
checks = builtins.mapAttrs (
system: deployLib: deployLib.deployChecks self.deploy
) inputs.deploy-rs.lib;
};
}

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -6,7 +12,14 @@
];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ];
initrd.supportedFilesystems = [ "zfs" ];
kernelModules = [ "kvm-intel" ];

View File

@ -1,4 +1,9 @@
{ config, pkgs, self, ... }:
{
config,
pkgs,
self,
...
}:
{
imports = [
@ -11,11 +16,9 @@
nixpkgs.overlays = [
self.inputs.agenix.overlays.default
(import ../overlays/default.nix)
(
final: prev: {
(final: prev: {
unstable = import self.inputs.nixpkgs-unstable { system = final.system; };
}
)
})
];
time.timeZone = "Europe/London";
@ -66,7 +69,10 @@
system = "aarch64-linux";
maxJobs = 6;
speedFactor = 1;
supportedFeatures = [ "big-parallel" "benchmark" ];
supportedFeatures = [
"big-parallel"
"benchmark"
];
}
];
distributedBuilds = true;

View File

@ -48,7 +48,14 @@
fonts.packages = with pkgs; [
noto-fonts
(nerdfonts.override { fonts = [ "BigBlueTerminal" "ComicShannsMono" "Terminus" "UbuntuMono" ]; })
(nerdfonts.override {
fonts = [
"BigBlueTerminal"
"ComicShannsMono"
"Terminus"
"UbuntuMono"
];
})
];
modules = {

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -6,7 +12,13 @@
];
boot = {
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
initrd.availableKernelModules = [
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
initrd.supportedFilesystems = [ "zfs" ];
kernel.sysctl = {
"kernel.nmi_watchdog" = 0;

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -6,7 +12,15 @@
];
boot = {
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "zfs" ];
initrd.availableKernelModules = [
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
"zfs"
];
initrd.kernelModules = [ ];
initrd.supportedFilesystems = [ "zfs" ];
kernelModules = [ "kvm-intel" ];

View File

@ -1,4 +1,9 @@
{ config, lib, self, ... }:
{
config,
lib,
self,
...
}:
{
imports = [

View File

@ -123,4 +123,3 @@
};
};
}

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -6,12 +12,22 @@
];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernel.sysctl = {
"kernel.nmi_watchdog" = 0;
"vm.laptop_mode" = 5;
};
kernelModules = [ "applesmc" "kvm-intel" "wl" ];
kernelModules = [
"applesmc"
"kvm-intel"
"wl"
];
extraModulePackages = [
config.boot.kernelPackages.broadcom_sta
config.boot.kernelPackages.nvidiaPackages.legacy_470
@ -38,4 +54,3 @@
};
};
}

View File

@ -71,12 +71,14 @@
scrapeConfigs = [
{
job_name = "node";
static_configs = [{
static_configs = [
{
targets = [
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
"127.0.0.1:${toString config.services.prometheus.exporters.zfs.port}"
];
}];
}
];
}
];
};
@ -90,8 +92,8 @@
];
wants = [ "network-online.target" ];
serviceConfig = {
Type="simple";
ExecStart=pkgs.lib.mkForce ''
Type = "simple";
ExecStart = pkgs.lib.mkForce ''
${pkgs.openssh}/bin/ssh \
-NT \
-o ExitOnForwardFailure=yes \
@ -101,13 +103,14 @@
-R localhost:8000:localhost:8000 \
jellyfin@vps1.mesh.vimium.net
'';
Restart="always";
RestartSec=20;
Restart = "always";
RestartSec = 20;
};
wantedBy = [ "default.target" ];
};
services.nginx = let
services.nginx =
let
proxyConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
@ -121,7 +124,8 @@
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
in {
in
{
enable = true;
package = pkgs.openresty;
recommendedGzipSettings = true;
@ -162,7 +166,10 @@
vaapiVdpau
];
};
users.users.jellyfin.extraGroups = [ "video" "render" ];
users.users.jellyfin.extraGroups = [
"video"
"render"
];
services.jellyfin = {
enable = true;
package = pkgs.unstable.jellyfin;
@ -192,4 +199,3 @@
system.stateVersion = "22.11";
}

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -6,7 +12,13 @@
];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
@ -65,4 +77,3 @@
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,4 +1,9 @@
{ config, lib, self, ... }:
{
config,
lib,
self,
...
}:
{
imports = [

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -7,7 +13,12 @@
boot = {
initrd = {
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
"vmw_pvscsi"
];
kernelModules = [ "nvme" ];
};
loader.grub = {
@ -19,4 +30,3 @@
zramSwap.enable = true;
}

View File

@ -26,7 +26,10 @@
networking = {
hostId = "c5e68d78";
networkmanager.enable = true;
firewall.trustedInterfaces = [ "lxdbr0" "virbr0" ]; # Work around https://github.com/NixOS/nixpkgs/issues/263359
firewall.trustedInterfaces = [
"lxdbr0"
"virbr0"
]; # Work around https://github.com/NixOS/nixpkgs/issues/263359
};
virtualisation = {
@ -44,7 +47,8 @@
recommendedProxySettings = true;
virtualHosts = {
"odyssey.mesh.vimium.net" = {
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
locations."/".proxyPass =
"http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
};
};
};

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -6,7 +12,14 @@
];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ];
initrd.supportedFilesystems = [ "zfs" ];
kernelModules = [ "kvm-intel" ];

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, self, ... }:
{
config,
lib,
pkgs,
self,
...
}:
{
imports = [
@ -140,8 +146,8 @@
"system_health"
];
config = {
default_config = {};
backup = {};
default_config = { };
backup = { };
homeassistant = {
name = "Home";
latitude = "!secret latitude";
@ -163,14 +169,16 @@
services.mosquitto = {
enable = true;
listeners = [{
listeners = [
{
acl = [ "pattern readwrite #" ];
omitPasswordAuth = true;
port = 1883;
settings = {
allow_anonymous = true;
};
}];
}
];
};
age.secrets."files/services/zigbee2mqtt/secret.yaml" = {
@ -203,7 +211,16 @@
channel = 20;
network_key = "!secret.yaml network_key";
pan_id = 13001;
ext_pan_id = [ 79 1 73 47 250 136 124 222 ];
ext_pan_id = [
79
1
73
47
250
136
124
222
];
transmit_power = 20;
};
mqtt = {
@ -234,10 +251,12 @@
# Connection to ONKYO HT-R990
networking.interfaces.end0 = {
ipv4.addresses = [{
ipv4.addresses = [
{
address = "172.16.0.1";
prefixLength = 30;
}];
}
];
};
environment.systemPackages = with pkgs; [
@ -248,4 +267,3 @@
system.stateVersion = "22.11";
}

View File

@ -1,4 +1,9 @@
{ lib, pkgs, modulesPath, ... }:
{
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -6,11 +11,14 @@
];
boot = {
kernelPackages = let
kernelPackages =
let
version = "6.1.73";
tag = "stable_20240124";
srcHash = "sha256-P4ExzxWqZj+9FZr9U2tmh7rfs/3+iHEv0m74PCoXVuM=";
in pkgs.linuxPackagesFor (pkgs.linux_rpi4.override {
in
pkgs.linuxPackagesFor (
pkgs.linux_rpi4.override {
argsOverride = {
src = pkgs.fetchFromGitHub {
owner = "raspberrypi";
@ -20,7 +28,7 @@
};
version = version;
modDirVersion = version;
structuredExtraConfig = {};
structuredExtraConfig = { };
kernelPatches = [
{
name = "drm-rp1-depends-on-instead-of-select-MFD_RP1.patch";
@ -38,10 +46,20 @@
}
];
};
});
}
);
# Stop ZFS kernel being built
supportedFilesystems = lib.mkForce [ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs" ];
supportedFilesystems = lib.mkForce [
"btrfs"
"cifs"
"f2fs"
"jfs"
"ntfs"
"reiserfs"
"vfat"
"xfs"
];
tmp.cleanOnBoot = true;
};
@ -49,14 +67,15 @@
# https://github.com/NixOS/nixpkgs/issues/154163
nixpkgs.overlays = [
(final: prev: {
makeModulesClosure = x:
prev.makeModulesClosure (x // { allowMissing = true; });
makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; });
})
(final: prev: {
raspberrypifw = let
raspberrypifw =
let
version = "1.20240529";
srcHash = "sha256-KsCo7ZG6vKstxRyFljZtbQvnDSqiAPdUza32xTY/tlA=";
in pkgs.raspberrypifw.override {
in
pkgs.raspberrypifw.override {
argsOverride = {
src = prev.fetchFromGitHub {
owner = "raspberrypi";
@ -77,4 +96,3 @@
};
};
}

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports = [

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, self, ... }:
{
config,
lib,
pkgs,
self,
...
}:
{
imports = [
@ -21,9 +27,18 @@
# From https://github.com/Electrostasy/dots/blob/3b81723feece67610a252ce754912f6769f0cd34/hosts/phobos/klipper.nix#L43-L65
overlays =
let
mkCompatibleDtsFile = dtbo:
mkCompatibleDtsFile =
dtbo:
let
drv = pkgs.runCommand "fix-dts" { nativeBuildInputs = with pkgs; [ dtc gnused ]; } ''
drv =
pkgs.runCommand "fix-dts"
{
nativeBuildInputs = with pkgs; [
dtc
gnused
];
}
''
mkdir "$out"
dtc -I dtb -O dts ${dtbo} | sed -e 's/bcm2835/bcm2711/' > $out/overlay.dts
'';
@ -83,7 +98,8 @@
ConditionPathExists = "/sys/bus/i2c/drivers/imx708/10-001a/video4linux";
};
serviceConfig = {
ExecStart = ''${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \
ExecStart = ''
${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \
--host=0.0.0.0 \
--resolution=4608x2592
'';

View File

@ -1,4 +1,9 @@
{ config, lib, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports = [
@ -11,14 +16,17 @@
"cma=512M"
"panic=0"
];
supportedFilesystems = lib.mkForce [ "f2fs" "vfat" "xfs" ];
supportedFilesystems = lib.mkForce [
"f2fs"
"vfat"
"xfs"
];
tmp.cleanOnBoot = false;
};
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // { allowMissing = true; });
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
})
];
@ -30,4 +38,3 @@
};
};
}

View File

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
{
imports = [
@ -37,7 +42,10 @@
groups = {
jellyfin = { };
};
extraGroups.acme.members = [ "kanidm" "nginx" ];
extraGroups.acme.members = [
"kanidm"
"nginx"
];
};
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
@ -47,11 +55,13 @@
group = "acme";
};
services.kanidm = let
services.kanidm =
let
baseDomain = "vimium.com";
domain = "auth.${baseDomain}";
uri = "https://${domain}";
in {
in
{
package = pkgs.unstable.kanidm;
enableClient = true;
enableServer = true;

View File

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
@ -7,7 +13,12 @@
boot = {
initrd = {
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
"vmw_pvscsi"
];
kernelModules = [ "nvme" ];
};
loader.grub.device = "/dev/sda";
@ -23,4 +34,3 @@
};
};
}

View File

@ -1,28 +1,67 @@
{ config, options, lib, self, ... }:
{
config,
options,
lib,
self,
...
}:
with lib;
{
options = with types; {
user = mkOption { type = attrs; default = { }; };
home = {
configFile = mkOption { type = attrs; default = { }; description = "Files to place in $XDG_CONFIG_HOME"; };
dataFile = mkOption { type = attrs; default = { }; description = "Files to place in $XDG_DATA_HOME"; };
file = mkOption { type = attrs; default = { }; description = "Files to place directly in $HOME"; };
packages = mkOption { type = attrs; default = { }; description = "User-level installed packages"; };
programs = mkOption { type = attrs; default = { }; description = "Programs managed directly from home-manager"; };
services = mkOption { type = attrs; default = { }; description = "Services managed directly from home-manager"; };
user = mkOption {
type = attrs;
default = { };
};
dconf.settings = mkOption { type = attrs; default = { }; description = "dconf settings to enable"; };
home = {
configFile = mkOption {
type = attrs;
default = { };
description = "Files to place in $XDG_CONFIG_HOME";
};
dataFile = mkOption {
type = attrs;
default = { };
description = "Files to place in $XDG_DATA_HOME";
};
file = mkOption {
type = attrs;
default = { };
description = "Files to place directly in $HOME";
};
packages = mkOption {
type = attrs;
default = { };
description = "User-level installed packages";
};
programs = mkOption {
type = attrs;
default = { };
description = "Programs managed directly from home-manager";
};
services = mkOption {
type = attrs;
default = { };
description = "Services managed directly from home-manager";
};
};
dconf.settings = mkOption {
type = attrs;
default = { };
description = "dconf settings to enable";
};
env = mkOption {
type = attrsOf (oneOf [ str path (listOf (either str path)) ]);
apply = mapAttrs (n: v:
if isList v then
concatMapStringsSep ":" (x: toString x) v
else
(toString v));
type = attrsOf (oneOf [
str
path
(listOf (either str path))
]);
apply = mapAttrs (
n: v: if isList v then concatMapStringsSep ":" (x: toString x) v else (toString v)
);
default = { };
description = "";
};
@ -31,12 +70,27 @@ with lib;
config = {
age.secrets."passwords/users/jordan".file = "${self.inputs.secrets}/passwords/users/jordan.age";
user =
let user = builtins.getEnv "USER";
name = if elem user [ "" "root" ] then "jordan" else user;
in {
let
user = builtins.getEnv "USER";
name =
if
elem user [
""
"root"
]
then
"jordan"
else
user;
in
{
inherit name;
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "lxd" ];
extraGroups = [
"networkmanager"
"wheel"
"lxd"
];
description = "Jordan Holt";
useDefaultShell = true;
openssh.authorizedKeys.keys = [
@ -75,8 +129,8 @@ with lib;
users.users.${config.user.name} = mkAliasDefinitions options.user;
environment.extraInit =
concatStringsSep "\n"
(mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env);
environment.extraInit = concatStringsSep "\n" (
mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env
);
};
}

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.brave;
in {
let
cfg = config.modules.programs.brave;
in
{
options.modules.programs.brave = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.cc;
in {
let
cfg = config.modules.programs.dev.cc;
in
{
options.modules.programs.dev.cc = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.java;
in {
let
cfg = config.modules.programs.dev.java;
in
{
options.modules.programs.dev.java = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.lua;
in {
let
cfg = config.modules.programs.dev.lua;
in
{
options.modules.programs.dev.lua = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.node;
in {
let
cfg = config.modules.programs.dev.node;
in
{
options.modules.programs.dev.node = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.python;
in {
let
cfg = config.modules.programs.dev.python;
in
{
options.modules.programs.dev.python = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.rust;
in {
let
cfg = config.modules.programs.dev.rust;
in
{
options.modules.programs.dev.rust = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.scala;
in {
let
cfg = config.modules.programs.dev.scala;
in
{
options.modules.programs.dev.scala = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.shell;
in {
let
cfg = config.modules.programs.dev.shell;
in
{
options.modules.programs.dev.shell = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.dev.zig;
in {
let
cfg = config.modules.programs.dev.zig;
in
{
options.modules.programs.dev.zig = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.emulators;
in {
let
cfg = config.modules.programs.emulators;
in
{
options.modules.programs.emulators = {
ds.enable = lib.mkOption {
default = false;
@ -60,14 +67,9 @@ in {
(lib.mkIf cfg.ps3.enable rpcs3)
(lib.mkIf cfg.psp.enable unstable.ppsspp)
(lib.mkIf cfg.ds.enable desmume)
(lib.mkIf (cfg.gba.enable ||
cfg.gb.enable ||
cfg.snes.enable)
higan)
(lib.mkIf (cfg.gba.enable || cfg.gb.enable || cfg.snes.enable) higan)
(lib.mkIf cfg.switch.enable yuzuPackages.mainline)
(lib.mkIf (cfg.wii.enable ||
cfg.gamecube.enable)
dolphin-emu)
(lib.mkIf (cfg.wii.enable || cfg.gamecube.enable) dolphin-emu)
(lib.mkIf cfg.xbox.enable unstable.xemu)
];
};

View File

@ -1,7 +1,14 @@
{ config, lib, self, ... }:
{
config,
lib,
self,
...
}:
let cfg = config.modules.programs.firefox;
in {
let
cfg = config.modules.programs.firefox;
in
{
options.modules.programs.firefox = {
enable = lib.mkOption {
default = false;
@ -10,7 +17,8 @@ in {
};
config = lib.mkIf cfg.enable {
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = self.inputs.firefox-gnome-theme;
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source =
self.inputs.firefox-gnome-theme;
home.programs.firefox = {
enable = true;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.forensics;
in {
let
cfg = config.modules.programs.forensics;
in
{
options.modules.programs.forensics = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.git;
in {
let
cfg = config.modules.programs.git;
in
{
options.modules.programs.git = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.gpg;
in {
let
cfg = config.modules.programs.gpg;
in
{
options.modules.programs.gpg = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.graphics;
in {
let
cfg = config.modules.programs.graphics;
in
{
options.modules.programs.graphics = {
modeling.enable = lib.mkOption {
default = false;

View File

@ -1,25 +1,31 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.programs.libreoffice;
# libreoffice-gtk4 = pkgs.libreoffice.override {
# extraMakeWrapperArgs = [
# "--set SAL_USE_VCLPLUGIN gtk4"
# ];
# unwrapped = pkgs.libreoffice-unwrapped.overrideAttrs (oldAttrs: {
# buildInputs = oldAttrs.buildInputs ++ [
# pkgs.gtk4
# ];
# configureFlags = oldAttrs.configureFlags ++ [
# "--disable-werror"
# "--enable-gtk4"
# ];
# passthru = oldAttrs.passthru // {
# inherit (pkgs) gtk4;
# };
# });
# };
in {
in
# libreoffice-gtk4 = pkgs.libreoffice.override {
# extraMakeWrapperArgs = [
# "--set SAL_USE_VCLPLUGIN gtk4"
# ];
# unwrapped = pkgs.libreoffice-unwrapped.overrideAttrs (oldAttrs: {
# buildInputs = oldAttrs.buildInputs ++ [
# pkgs.gtk4
# ];
# configureFlags = oldAttrs.configureFlags ++ [
# "--disable-werror"
# "--enable-gtk4"
# ];
# passthru = oldAttrs.passthru // {
# inherit (pkgs) gtk4;
# };
# });
# };
{
options.modules.programs.libreoffice = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.lutris;
in {
let
cfg = config.modules.programs.lutris;
in
{
options.modules.programs.lutris = {
enable = lib.mkOption {
default = false;

View File

@ -1,8 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.programs.neovim;
in {
in
{
options.modules.programs.neovim = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.pass;
in {
let
cfg = config.modules.programs.pass;
in
{
options.modules.programs.pass = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.qbittorrent;
in {
let
cfg = config.modules.programs.qbittorrent;
in
{
options.modules.programs.qbittorrent = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.recording;
in {
let
cfg = config.modules.programs.recording;
in
{
options.modules.programs.recording = {
audio.enable = lib.mkOption {
default = false;
@ -14,15 +21,26 @@ in {
};
config = {
user.packages = with pkgs;
(if cfg.audio.enable then [
user.packages =
with pkgs;
(
if cfg.audio.enable then
[
ardour
audacity
] else []) ++
(if cfg.video.enable then [
]
else
[ ]
)
++ (
if cfg.video.enable then
[
handbrake
mkvtoolnix
obs-studio
] else []);
]
else
[ ]
);
};
}

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.slack;
in {
let
cfg = config.modules.programs.slack;
in
{
options.modules.programs.slack = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.steam;
in {
let
cfg = config.modules.programs.steam;
in
{
options.modules.programs.steam = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, self, ... }:
{
config,
lib,
self,
...
}:
let cfg = config.modules.programs.thunderbird;
in {
let
cfg = config.modules.programs.thunderbird;
in
{
options.modules.programs.thunderbird = {
enable = lib.mkOption {
default = false;
@ -10,7 +17,8 @@ in {
};
config = lib.mkIf cfg.enable {
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = self.inputs.thunderbird-gnome-theme;
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source =
self.inputs.thunderbird-gnome-theme;
home.programs.thunderbird = {
enable = true;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.vscode;
in {
let
cfg = config.modules.programs.vscode;
in
{
options.modules.programs.vscode = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.programs.zoom;
in {
let
cfg = config.modules.programs.zoom;
in
{
options.modules.programs.zoom = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.shell.zsh;
in {
let
cfg = config.modules.shell.zsh;
in
{
options.modules.shell.zsh = {
enable = lib.mkOption {
default = false;

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.hardware.presonus-studio;
snd-usb-audio-module = pkgs.callPackage ./snd-usb-audio.nix {
@ -13,7 +18,8 @@ let
"channelmix.upmix-method" = "psd";
};
};
in {
in
{
options.modules.hardware.presonus-studio = {
enable = lib.mkOption {
default = false;
@ -67,11 +73,23 @@ in {
"capture.props" = {
"node.name" = "Genelec_Speakers";
"media.class" = "Audio/Sink";
"audio.position" = [ "FL" "FR" "SL" "SR" "LFE" ];
"audio.position" = [
"FL"
"FR"
"SL"
"SR"
"LFE"
];
};
"playback.props" = {
"node.name" = "playback.Genelec_Speakers";
"audio.position" = [ "AUX0" "AUX1" "AUX3" "AUX4" "AUX5" ];
"audio.position" = [
"AUX0"
"AUX1"
"AUX3"
"AUX4"
"AUX5"
];
"target.object" = "alsa_output.usb-PreSonus_Studio_1824c_SC4E21110775-00.multichannel-output";
"stream.dont-remix" = true;
"node.passive" = true;
@ -85,4 +103,4 @@ in {
client-rt."40-upmix" = upmixConfig;
};
};
}
}

View File

@ -1,8 +1,17 @@
{ pkgs, lib, kernel ? pkgs.linuxPackages_latest.kernel }:
{
pkgs,
lib,
kernel ? pkgs.linuxPackages_latest.kernel,
}:
pkgs.stdenv.mkDerivation {
pname = "snd-usb-audio";
inherit (kernel) src version postPatch nativeBuildInputs;
inherit (kernel)
src
version
postPatch
nativeBuildInputs
;
kernel_dev = kernel.dev;
kernelVersion = kernel.modDirVersion;
@ -33,4 +42,3 @@ pkgs.stdenv.mkDerivation {
license = lib.licenses.gpl2;
};
}

View File

@ -1,10 +1,16 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.podman;
in {
in
{
options.modules.podman = {
enable = mkOption {
default = false;

View File

@ -1,9 +1,15 @@
{ config, lib, self, ... }:
{
config,
lib,
self,
...
}:
let
cfg = config.modules.services.borgmatic;
hostname = config.networking.hostName;
in {
in
{
options.modules.services.borgmatic = {
enable = lib.mkOption {
default = false;
@ -12,7 +18,7 @@ in {
};
directories = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
default = [ ];
example = [
"/home/jordan/Documents"
];
@ -35,9 +41,14 @@ in {
settings = {
source_directories = cfg.directories;
repositories = [
{ label = "borgbase"; path = cfg.repoPath; }
{
label = "borgbase";
path = cfg.repoPath;
}
];
encryption_passcommand = "cat ${config.age.secrets."passwords/services/borg/${hostname}-passphrase".path}";
encryption_passcommand = "cat ${
config.age.secrets."passwords/services/borg/${hostname}-passphrase".path
}";
ssh_command = "ssh -i /etc/ssh/ssh_host_ed25519_key";
keep_daily = 7;
keep_weekly = 4;

View File

@ -1,10 +1,16 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.services.chrony;
in {
in
{
options.modules.services.chrony = {
enable = mkOption {
default = false;

View File

@ -1,8 +1,14 @@
{ config, lib, self, ... }:
{
config,
lib,
self,
...
}:
let
cfg = config.modules.services.coturn;
in {
in
{
options.modules.services.coturn = {
enable = lib.mkOption {
default = false;
@ -21,12 +27,16 @@ in {
};
config = lib.mkIf cfg.enable {
networking.firewall = let
range = with config.services.coturn; lib.singleton {
networking.firewall =
let
range =
with config.services.coturn;
lib.singleton {
from = min-port;
to = max-port;
};
in {
in
{
allowedTCPPorts = [
3478 # TURN listener
5349 # STUN TLS
@ -47,19 +57,26 @@ in {
};
};
age.secrets = {
age.secrets =
{
"passwords/services/coturn/static-auth-secret" = {
file = "${self.inputs.secrets}/passwords/services/coturn/static-auth-secret.age";
owner = "turnserver";
group = "turnserver";
};
} // (if cfg.matrixIntegration then {
}
// (
if cfg.matrixIntegration then
{
"passwords/services/coturn/matrix-turn-config.yml" = {
file = "${self.inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age";
owner = "matrix-synapse";
group = "matrix-synapse";
};
} else {});
}
else
{ }
);
services.coturn = rec {
enable = true;

View File

@ -1,4 +1,10 @@
{ pkgs, config, lib, self, ... }:
{
pkgs,
config,
lib,
self,
...
}:
# Based on: https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix
@ -52,7 +58,12 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "podman.service" ];
requires = [ "podman.service" ];
path = [ config.virtualisation.podman.package pkgs.gnutar pkgs.shadow pkgs.getent ];
path = [
config.virtualisation.podman.package
pkgs.gnutar
pkgs.shadow
pkgs.getent
];
script = ''
set -eux -o pipefail
mkdir -p etc/nix
@ -142,7 +153,12 @@ in
"~setdomainname"
"~sethostname"
];
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" "AF_NETLINK" ];
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_UNIX"
"AF_NETLINK"
];
# Needs network access
PrivateNetwork = false;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, self, ... }:
{
config,
lib,
pkgs,
self,
...
}:
let
cfg = config.modules.services.gitea;
in {
in
{
options.modules.services.gitea = {
enable = lib.mkEnableOption "gitea";
domain = lib.mkOption {

View File

@ -1,9 +1,15 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.services.headscale;
fqdn = "headscale.vimium.net";
in {
in
{
options.modules.services.headscale = {
enable = lib.mkOption {
default = false;

View File

@ -1,4 +1,9 @@
{ config, lib, self, ... }:
{
config,
lib,
self,
...
}:
let
cfg = config.modules.services.mail;
@ -14,7 +19,8 @@ let
"vimium.org"
"vimium.xyz"
];
in {
in
{
options.modules.services.mail = {
enable = lib.mkOption {
default = false;
@ -40,7 +46,10 @@ in {
services.nginx.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedTCPPorts = [
80
443
];
mailserver = {
enable = true;

View File

@ -1,8 +1,15 @@
{ config, lib, pkgs, self, ... }:
{
config,
lib,
pkgs,
self,
...
}:
let
cfg = config.modules.services.matrix;
in {
in
{
options.modules.services.matrix = {
enable = lib.mkEnableOption "matrix";
element = {
@ -31,7 +38,8 @@ in {
usePostgresql = lib.mkEnableOption "postgresql";
};
config = let
config =
let
matrixSubdomain = "matrix.${cfg.serverName}";
elementSubdomain = "chat.${cfg.serverName}";
matrixClientConfig = {
@ -70,7 +78,8 @@ in {
domain = cfg.serverName;
};
};
in lib.mkIf cfg.enable {
in
lib.mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [
8448 # Matrix federation
];
@ -81,7 +90,8 @@ in {
};
};
services.nginx.virtualHosts = {
services.nginx.virtualHosts =
{
"${matrixSubdomain}" = {
forceSSL = true;
enableACME = true;
@ -132,16 +142,21 @@ in {
"/_synapse/client".proxyPass = "http://localhost:8008";
};
};
"${cfg.serverName}" = let
"${cfg.serverName}" =
let
mkWellKnown = data: ''
more_set_headers 'Content-Type: application/json';
return 200 '${builtins.toJSON data}';
'';
in {
in
{
locations."= /.well-known/matrix/server".extraConfig = (mkWellKnown matrixServerConfig);
locations."= /.well-known/matrix/client".extraConfig = (mkWellKnown matrixClientConfig);
};
} // (if cfg.element.enable then {
}
// (
if cfg.element.enable then
{
"${elementSubdomain}" = {
forceSSL = true;
enableACME = true;
@ -152,13 +167,19 @@ in {
branding = {
auth_header_logo_url = "https://vimium.com/images/logo.svg";
auth_footer_links = [
{ "text" = "Vimium.com"; "url" = "https://vimium.com"; }
{
"text" = "Vimium.com";
"url" = "https://vimium.com";
}
];
};
};
};
};
} else {});
}
else
{ }
);
nixpkgs.config.permittedInsecurePackages = [
"jitsi-meet-1.0.8043"
@ -177,32 +198,32 @@ in {
server_name = cfg.serverName;
};
};
systemd.services.matrix-synapse.serviceConfig.SupplementaryGroups =
(lib.optional cfg.bridges.whatsapp
config.systemd.services.mautrix-whatsapp.serviceConfig.Group);
systemd.services.matrix-synapse.serviceConfig.SupplementaryGroups = (
lib.optional cfg.bridges.whatsapp config.systemd.services.mautrix-whatsapp.serviceConfig.Group
);
services.postgresql = lib.mkIf cfg.usePostgresql {
ensureUsers = [
ensureUsers =
[
{
name = "matrix-synapse";
ensureDBOwnership = true;
}
] ++ (lib.optional cfg.bridges.signal
{
]
++ (lib.optional cfg.bridges.signal {
name = "mautrix-signal";
ensureDBOwnership = true;
})
++ (lib.optional cfg.bridges.whatsapp
{
++ (lib.optional cfg.bridges.whatsapp {
name = "mautrix-whatsapp";
ensureDBOwnership = true;
});
ensureDatabases = [
ensureDatabases =
[
"matrix-synapse"
] ++ (lib.optional cfg.bridges.signal
"mautrix-signal")
++ (lib.optional cfg.bridges.whatsapp
"mautrix-whatsapp");
]
++ (lib.optional cfg.bridges.signal "mautrix-signal")
++ (lib.optional cfg.bridges.whatsapp "mautrix-whatsapp");
};
services.mautrix-signal = lib.mkIf cfg.bridges.signal {

View File

@ -1,9 +1,15 @@
{ config, lib, self, ... }:
{
config,
lib,
self,
...
}:
let
cfg = config.modules.services.netbird;
hostname = config.networking.hostName;
in {
in
{
options.modules.services.netbird = {
enable = lib.mkEnableOption "netbird";
coordinatorDomain = lib.mkOption {
@ -43,7 +49,9 @@ in {
HttpConfig = {
AuthAudience = "netbird";
};
StoreConfig = { Engine = "sqlite"; };
StoreConfig = {
Engine = "sqlite";
};
TURNConfig = {
Secret._secret = config.age.secrets."passwords/services/coturn/static-auth-secret".path;
TimeBasedCredentials = true;

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
@ -34,7 +39,8 @@ let
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
};
};
in {
in
{
options.modules.services.nginx = {
enable = mkOption {
default = false;
@ -89,7 +95,8 @@ in {
maxSize = "100m";
};
};
virtualHosts = {
virtualHosts =
{
## Static sites
"jellyfin.vimium.com" = {
forceSSL = true;
@ -157,7 +164,11 @@ in {
forceSSL = true;
enableACME = true;
serverAliases = [ "www.vimium.com" ];
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders + ''
extraConfig =
nginxErrorPages
+ nginxEdgeHeaders
+ nginxStrictHeaders
+ ''
add_header Content-Security-Policy "default-src 'self' https://vimium.com https://www.vimium.com; style-src 'unsafe-inline'; object-src 'none'; upgrade-insecure-requests" always;
'';
locations."/" = {

View File

@ -1,9 +1,17 @@
{ config, lib, pkgs, self, ... }:
{
config,
lib,
pkgs,
self,
...
}:
with lib;
let cfg = config.modules.services.photoprism;
in {
let
cfg = config.modules.services.photoprism;
in
{
options.modules.services.photoprism = {
enable = mkOption {
default = false;

View File

@ -6,7 +6,8 @@
let
cfg = config.modules.services.postgresql;
in {
in
{
options.modules.services.postgresql = {
enable = lib.mkOption {
default = false;

View File

@ -1,10 +1,17 @@
{ config, lib, pkgs, self, ... }:
{
config,
lib,
pkgs,
self,
...
}:
let
cfg = config.modules.services.tailscale;
headscale = "https://headscale.vimium.net";
hostname = config.networking.hostName;
in {
in
{
options.modules.services.tailscale = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,15 @@
{ config, lib, pkgs, self, ... }:
{
config,
lib,
pkgs,
self,
...
}:
let cfg = config.modules.system.desktop.gnome;
in {
let
cfg = config.modules.system.desktop.gnome;
in
{
options.modules.system.desktop.gnome = {
enable = lib.mkOption {
default = false;
@ -208,13 +216,15 @@ in {
};
home.configFile = {
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI { } {
General.theme = "KvLibadwaitaDark";
};
"Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita";
};
user.packages = with pkgs; [
user.packages =
with pkgs;
[
authenticator
# bottles
# bustle
@ -238,9 +248,15 @@ in {
# schemes
shortwave
sysprof
] ++ (if config.virtualisation.podman.enable then [
]
++ (
if config.virtualisation.podman.enable then
[
pods
] else []);
]
else
[ ]
);
environment.systemPackages = with pkgs.unstable; [
adw-gtk3

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.system.desktop.hyprland;
in {
let
cfg = config.modules.system.desktop.hyprland;
in
{
options.modules.system.desktop.hyprland = {
enable = lib.mkOption {
default = false;

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.modules.system.desktop.kde;
in {
let
cfg = config.modules.system.desktop.kde;
in
{
options.modules.system.desktop.kde = {
enable = lib.mkOption {
default = false;

View File

@ -1,10 +1,16 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.system.desktop.mimeapps;
avApp = "io.github.celluloid_player.Celluloid.desktop";
imageApp = "org.gnome.eog.desktop";
in {
in
{
options.modules.system.desktop.mimeapps = {
enable = lib.mkOption {
default = false;

View File

@ -1,9 +1,17 @@
{ config, lib, pkgs, self, ... }:
{
config,
lib,
pkgs,
self,
...
}:
with lib;
let cfg = config.modules.system.wireless;
in {
let
cfg = config.modules.system.wireless;
in
{
options.modules.system.wireless = {
enable = mkOption {
default = false;

View File

@ -15,21 +15,22 @@ let
directory = ../pkgs;
};
in
lib.mapAttrs
(name: value:
lib.mapAttrs (
name: value:
if lib.isAttrs value then
if lib.hasAttrByPath [ name "overrideScope" ] prev then
# Namespaced package sets created with `lib.makeScope pkgs.newScope`.
prev.${name}.overrideScope (final': prev':
lib.mapAttrs (name': value': final'.callPackage value' { }) value)
prev.${name}.overrideScope (
final': prev': lib.mapAttrs (name': value': final'.callPackage value' { }) value
)
else if lib.hasAttrByPath [ name "extend" ] prev then
# Namespaced package sets created with `lib.makeExtensible`.
prev.${name}.extend (final': prev':
lib.mapAttrs (name': value': final.callPackage value' { }) value)
prev.${name}.extend (
final': prev': lib.mapAttrs (name': value': final.callPackage value' { }) value
)
else
# Namespaced package sets in regular attrsets.
prev.${name} // value
else
final.callPackage value { })
pkgs
final.callPackage value { }
) pkgs

View File

@ -1,5 +1,4 @@
final: prev:
{
final: prev: {
gvdb = prev.fetchgit {
url = "https://gitlab.gnome.org/GNOME/gvdb.git";
rev = "b54bc5da25127ef416858a3ad92e57159ff565b3"; # From gvdb_wrap

View File

@ -1,5 +1,4 @@
final: prev:
{
final: prev: {
libpisp = final.stdenv.mkDerivation {
name = "libpisp";
version = "1.0.5";
@ -42,7 +41,9 @@ final: prev:
./0001-Ignore-IPA-signing.patch
];
buildInputs = old.buildInputs ++ (with final; [
buildInputs =
old.buildInputs
++ (with final; [
libpisp
libglibutil
]);

View File

@ -1,23 +1,24 @@
{ stdenv
, fetchFromGitHub
{
stdenv,
fetchFromGitHub,
, cmake
, gnumake
, pkg-config
, xxd
cmake,
gnumake,
pkg-config,
xxd,
, v4l-utils
, nlohmann_json
, ffmpegSupport ? true
, ffmpeg
, libcameraSupport ? true
, libcamera
, rtspSupport ? false
, live555
, webrtcSupport ? false
, openssl
v4l-utils,
nlohmann_json,
ffmpegSupport ? true,
ffmpeg,
libcameraSupport ? true,
libcamera,
rtspSupport ? false,
live555,
webrtcSupport ? false,
openssl,
, lib
lib,
}:
stdenv.mkDerivation (finalAttrs: {
@ -60,7 +61,11 @@ stdenv.mkDerivation (finalAttrs: {
dontUseCmakeConfigure = true;
buildInputs = [ nlohmann_json v4l-utils ]
buildInputs =
[
nlohmann_json
v4l-utils
]
++ (lib.optional ffmpegSupport ffmpeg)
++ (lib.optional libcameraSupport libcamera)
++ (lib.optional rtspSupport live555)
@ -75,4 +80,3 @@ stdenv.mkDerivation (finalAttrs: {
license = licenses.gpl3Only;
};
})

View File

@ -1,17 +1,18 @@
{ stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, boost
, ffmpeg
, libcamera
, libdrm
, libexif
, libjpeg
, libpng
, libtiff
, lib
{
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
boost,
ffmpeg,
libcamera,
libdrm,
libexif,
libjpeg,
libpng,
libtiff,
lib,
}:
stdenv.mkDerivation (finalAttrs: {
@ -55,4 +56,3 @@ stdenv.mkDerivation (finalAttrs: {
license = licenses.bsd2;
};
})