fmt ++
This commit is contained in:
@@ -217,8 +217,8 @@
|
||||
nixos-raspberrypi.nixosModules.raspberry-pi-4.display-vc4
|
||||
nixos-raspberrypi.nixosModules.nixpkgs-rpi
|
||||
nixos-raspberrypi.nixosModules.trusted-nix-caches
|
||||
nixos-raspberrypi.lib.inject-overlays
|
||||
nixos-raspberrypi.lib.inject-overlays-global
|
||||
# nixos-raspberrypi.lib.inject-overlays
|
||||
# nixos-raspberrypi.lib.inject-overlays-global
|
||||
];
|
||||
};
|
||||
|
||||
@@ -234,8 +234,8 @@
|
||||
nixos-raspberrypi.nixosModules.raspberry-pi-5.page-size-16k
|
||||
nixos-raspberrypi.nixosModules.nixpkgs-rpi
|
||||
nixos-raspberrypi.nixosModules.trusted-nix-caches
|
||||
nixos-raspberrypi.lib.inject-overlays
|
||||
nixos-raspberrypi.lib.inject-overlays-global
|
||||
# nixos-raspberrypi.lib.inject-overlays
|
||||
# nixos-raspberrypi.lib.inject-overlays-global
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) enabled;
|
||||
# Displays
|
||||
display = {
|
||||
input = "eDP-1";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
home.username = "root";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
home.username = "root";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
home.username = "root";
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{ lib, pkgs, namespace, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
home.username = "admin";
|
||||
@@ -23,7 +28,10 @@ in
|
||||
};
|
||||
protonmail-bridge = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ pass libsecret ];
|
||||
extraPackages = with pkgs; [
|
||||
pass
|
||||
libsecret
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{ lib, pkgs, namespace, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) enabled;
|
||||
in
|
||||
{
|
||||
home.username = "deck";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
home.username = "root";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
home.username = "root";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
home.username = "root";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) disabled;
|
||||
in
|
||||
{
|
||||
home.username = "root";
|
||||
|
||||
@@ -30,7 +30,10 @@ mkModule {
|
||||
age = {
|
||||
generateKey = true;
|
||||
keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ] ++ config.${namespace}.sops.sshKeyPaths;
|
||||
sshKeyPaths = [
|
||||
"${config.home.homeDirectory}/.ssh/id_ed25519"
|
||||
]
|
||||
++ config.${namespace}.sops.sshKeyPaths;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}.module) mkModule mkOpt mkBoolOpt;
|
||||
in
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, lib, namespace }:
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
namespace,
|
||||
}:
|
||||
let
|
||||
inherit (inputs.nixpkgs.lib)
|
||||
mapAttrs
|
||||
@@ -31,7 +35,7 @@ rec {
|
||||
moduleConfig ? { },
|
||||
domain ? "services",
|
||||
config,
|
||||
serviceName ? name
|
||||
serviceName ? name,
|
||||
}:
|
||||
let
|
||||
cfg = config.${namespace}.${domain}.${name};
|
||||
@@ -90,9 +94,10 @@ rec {
|
||||
# # "d ${cfg.configDir}/server-files 0775 ${name} ${name} - -"
|
||||
# # "d ${cfg.configDir}/user-files 0775 ${name} ${name} - -"
|
||||
# ];
|
||||
} // moduleConfig;
|
||||
}
|
||||
// moduleConfig;
|
||||
in
|
||||
{ config, lib, ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.${namespace}.${domain}.${name} = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
@@ -127,9 +132,14 @@ rec {
|
||||
port = mkOpt types.int 80 "Port for ${name} redis to be hosted on";
|
||||
};
|
||||
|
||||
hashedPassword = mkOpt (types.nullOr types.str) "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06" "Hashed password for code-server authentication";
|
||||
hashedPassword =
|
||||
mkOpt (types.nullOr types.str)
|
||||
"$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06"
|
||||
"Hashed password for code-server authentication";
|
||||
|
||||
extraEnvironment = mkOpt (types.attrsOf types.str) { } "Extra environment variables for code-server";
|
||||
extraEnvironment =
|
||||
mkOpt (types.attrsOf types.str) { }
|
||||
"Extra environment variables for code-server";
|
||||
|
||||
reverseProxy = mkReverseProxyOpt;
|
||||
}
|
||||
@@ -141,7 +151,6 @@ rec {
|
||||
config = lib.mkIf cfg.enable defaultConfig;
|
||||
};
|
||||
|
||||
|
||||
# container
|
||||
mkContainer =
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
inherit (lib.${namespace}) enabled;
|
||||
in
|
||||
{
|
||||
home = {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.btop;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, pkgs, namespace, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options.${namespace}.programs.hyprland = {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, namespace, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.kitty;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
{ lib, namespace, ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (lib.${namespace}) mkOpt;
|
||||
in
|
||||
{
|
||||
options.${namespace}.programs.kitty = {
|
||||
enable = mkEnableOption "enable kitty terminal";
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.mako;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.nwg-dock;
|
||||
palette = import cfg.theme.file;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.nwg-drawer;
|
||||
palette = import cfg.theme.file;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.nwg-panel;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, pkgs, namespace, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options.${namespace}.programs.nwg-panel = {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.waybar;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.wlogout;
|
||||
palette = import cfg.theme.file;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.programs.wofi;
|
||||
palette = import cfg.theme.file;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, system, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# # Pull from global theme options
|
||||
# themeSize = "standard"; # "standard" | "compact"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
@@ -64,48 +63,57 @@
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
"linux_rpi-bcm2711" = super."linux_rpi-bcm2711".override { stdenv = super.ccacheStdenv; };
|
||||
})
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
"mesa" = super."mesa".override { buildPackages.stdenv = super.ccacheStdenv; };
|
||||
})
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
"webkitgtk_4_1" = super.stable."webkitgtk_4_1".override { clangStdenv = super.ccacheStdenv; };
|
||||
})
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
"webkitgtk_6_0" = super."webkitgtk_6_0".override { clangStdenv = super.ccacheStdenv; };
|
||||
})
|
||||
(self: super: {
|
||||
"jellyfin-ffmpeg" = super."jellyfin-ffmpeg".override { ffmpeg_7-full = super.ffmpeg_7-full.override { stdenv = super.ccacheStdenv; }; };
|
||||
(_self: super: {
|
||||
"jellyfin-ffmpeg" = super."jellyfin-ffmpeg".override {
|
||||
ffmpeg_7-full = super.ffmpeg_7-full.override { stdenv = super.ccacheStdenv; };
|
||||
};
|
||||
})
|
||||
# (self: super: {
|
||||
# "ffmpeg-headless-rpi" = super."ffmpeg-headless-rpi".override { ffmpeg = super.ffmpeg_7.override { stdenv = super.ccacheStdenv; }; };
|
||||
# })
|
||||
|
||||
# todo: make these work
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
pcsx2 = super.pcsx2.override {
|
||||
llvmPackages = super.llvmPackages // {
|
||||
stdenv = super.ccacheStdenv;
|
||||
};
|
||||
};
|
||||
})
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
driversi686Linux = super.driversi686Linux // {
|
||||
mesa = super.driversi686Linux.mesa.override { stdenv = super.ccacheStdenv; buildPackages.stdenv = super.ccacheStdenv; };
|
||||
mesa = super.driversi686Linux.mesa.override {
|
||||
stdenv = super.ccacheStdenv;
|
||||
buildPackages.stdenv = super.ccacheStdenv;
|
||||
};
|
||||
};
|
||||
})
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
kdePackages = super.kdePackages // {
|
||||
qt3d = super.kdePackages.qt3d.override { qtbase = super.kdePackages.qtbase.override { stdenv = super.ccacheStdenv; }; };
|
||||
qt3d = super.kdePackages.qt3d.override {
|
||||
qtbase = super.kdePackages.qtbase.override { stdenv = super.ccacheStdenv; };
|
||||
};
|
||||
# qtbase = super.kdePackages.qtbase.override { stdenv = super.ccacheStdenv; };
|
||||
qtwebengine = super.kdePackages.qtwebengine.override { stdenv = super.ccacheStdenv; };
|
||||
};
|
||||
})
|
||||
(self: super: {
|
||||
(_self: super: {
|
||||
linuxAndFirmware = super.linuxAndFirmware // {
|
||||
linuxPackages_rpi4 = super.linuxAndFirmware.linuxPackages_rpi4.override { stdenv = super.ccacheStdenv; };
|
||||
linuxPackages_rpi4 = super.linuxAndFirmware.linuxPackages_rpi4.override {
|
||||
stdenv = super.ccacheStdenv;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{ config, namespace, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
namespace,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hasGui = config.${namespace}.desktop.hyprland.enable || config.${namespace}.desktop.gnome.enable || config.${namespace}.desktop.cosmic.enable;
|
||||
hasGui =
|
||||
config.${namespace}.desktop.hyprland.enable
|
||||
|| config.${namespace}.desktop.gnome.enable
|
||||
|| config.${namespace}.desktop.cosmic.enable;
|
||||
in
|
||||
{
|
||||
security = {
|
||||
@@ -37,12 +46,15 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
age-plugin-yubikey
|
||||
libsecret
|
||||
yubikey-manager
|
||||
yubikey-personalization
|
||||
] ++ (if hasGui then [ yubioath-flutter ] else [ ]);
|
||||
]
|
||||
++ (if hasGui then [ yubioath-flutter ] else [ ]);
|
||||
|
||||
services = {
|
||||
yubikey-agent.enable = true;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, pkgs, system, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
isArm = "aarch64-linux" == system;
|
||||
in
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
let
|
||||
name = "collabora";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
jwtSecretFile = config.sops.secrets."jallen-nas/onlyoffice-key".path;
|
||||
|
||||
collaboraConfig = lib.${namespace}.mkModule {
|
||||
inherit config name;
|
||||
|
||||
42
modules/nixos/services/dispatcharr/default.nix
Normal file
42
modules/nixos/services/dispatcharr/default.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "dispatcharr";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
|
||||
dispatcharrConfig = lib.${namespace}.mkModule {
|
||||
inherit config name;
|
||||
serviceName = "podman-${name}";
|
||||
description = "dispatcharr podman container";
|
||||
options = { };
|
||||
moduleConfig = {
|
||||
virtualisation.oci-containers.containers.${name} = {
|
||||
autoStart = true;
|
||||
image = "ghcr.io/dispatcharr/dispatcharr";
|
||||
extraOptions = [ "--device=/dev/dri" ];
|
||||
volumes = [
|
||||
"${cfg.configDir}/dispatcharr:/data"
|
||||
"${cfg.dataDir}/movies:/movies"
|
||||
"${cfg.dataDir}/tv:/tv"
|
||||
];
|
||||
ports = [
|
||||
"${toString cfg.port}:9191"
|
||||
];
|
||||
environment = {
|
||||
DISPATCHARR_ENV = "aio";
|
||||
PUID = cfg.puid;
|
||||
PGID = cfg.pgid;
|
||||
TZ = cfg.timeZone;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ dispatcharrConfig ];
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
name = "minecraft";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) mkOpt mkReverseProxyOpt;
|
||||
name = "ntfy";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) mkOpt mkReverseProxyOpt;
|
||||
inherit (lib.${namespace}) mkOpt;
|
||||
cfg = config.${namespace}.services.onlyoffice;
|
||||
|
||||
jwtSecretFile = config.sops.secrets."jallen-nas/onlyoffice-key".path;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.onlyoffice = with lib; {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
inherit (lib.${namespace}) mkOpt mkReverseProxyOpt;
|
||||
name = "unmanic";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
{ inputs, self, ... }:
|
||||
|
||||
{ inputs, lib, self, ... }:
|
||||
|
||||
final: prev: let
|
||||
final: _prev:
|
||||
let
|
||||
cachyosPackages = final.callPackage ../../packages/linux-cachyos {
|
||||
pkgs = final;
|
||||
nixpkgs = inputs.nixpkgs;
|
||||
inherit self;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
# GCC Kernels
|
||||
# Latest
|
||||
linuxPackages_cachyos = cachyosPackages.cachyos-gcc;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, buildHomeAssistantComponent, fetchFromGitHub, ... }:
|
||||
{ buildHomeAssistantComponent, fetchFromGitHub, ... }:
|
||||
buildHomeAssistantComponent rec {
|
||||
owner = "jjjonesjr33";
|
||||
domain = "petlibro";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}@inputs:
|
||||
}:
|
||||
let
|
||||
# Don't waste user's time.
|
||||
markBroken =
|
||||
|
||||
@@ -130,7 +130,12 @@ let
|
||||
# });
|
||||
|
||||
kernel = callPackage ./kernel.nix {
|
||||
inherit cachyConfig pname stdenv kconfigToNix;
|
||||
inherit
|
||||
cachyConfig
|
||||
pname
|
||||
stdenv
|
||||
kconfigToNix
|
||||
;
|
||||
kernelPatches = [ ];
|
||||
configfile = preparedConfigfile;
|
||||
config = linuxConfigTransfomed;
|
||||
@@ -154,9 +159,7 @@ let
|
||||
addOurs = finalAttrs: prevAttrs: {
|
||||
kernel_configfile = prevAttrs.kernel.configfile;
|
||||
zfs_cachyos =
|
||||
(finalAttrs.callPackage "${nixpkgs}/pkgs/os-specific/linux/zfs/generic.nix"
|
||||
zfsOverride
|
||||
{
|
||||
(finalAttrs.callPackage "${nixpkgs}/pkgs/os-specific/linux/zfs/generic.nix" zfsOverride {
|
||||
kernelModuleAttribute = "zfs_cachyos";
|
||||
kernelMinSupportedMajorMinor = "1.0";
|
||||
kernelMaxSupportedMajorMinor = "99.99";
|
||||
@@ -168,8 +171,7 @@ let
|
||||
];
|
||||
hash = "";
|
||||
extraPatches = [ ];
|
||||
}
|
||||
).overrideAttrs
|
||||
}).overrideAttrs
|
||||
(prevAttrs: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "cachyos";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
python3Packages
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
|
||||
99
packages/raspberrypi/ffmpeg-rpi/default.nix
Normal file
99
packages/raspberrypi/ffmpeg-rpi/default.nix
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
ffmpeg,
|
||||
ffmpegVariant ? "small",
|
||||
withVoutEgl ? false,
|
||||
libepoxy,
|
||||
withV4l2Request ? true,
|
||||
udev,
|
||||
systemd,
|
||||
withVoutDrm ? true,
|
||||
stdenv ? null,
|
||||
}:
|
||||
|
||||
let
|
||||
extraVersion = "rpi";
|
||||
# https://github.com/jc-kynesim/rpi-ffmpeg/tree/test/7.1.2/main
|
||||
ffmpegVersion = "7.1.2";
|
||||
rpiFfmpegSrc = fetchFromGitHub {
|
||||
owner = "jc-kynesim";
|
||||
repo = "rpi-ffmpeg";
|
||||
# rev = "test/${ffmpegVersion}/main"; # this branch is being forced-push to
|
||||
rev = "de943d66dab18e89fc10c74459bea1d787edc49d";
|
||||
hash = "sha256-Qbgos7uzYXF5E557kR2EXhX9eJRmO0LVmSE2NOpEZY0=";
|
||||
};
|
||||
|
||||
in
|
||||
(ffmpeg.overrideAttrs (old: {
|
||||
pname = old.pname + "-rpi";
|
||||
|
||||
doCheck = false; # disabled because `imgutils` test fails
|
||||
|
||||
# see also
|
||||
# https://github.com/jc-kynesim/rpi-ffmpeg/blob/release/4.4/rpi_import_1/pi-util/conf_native.sh#L85
|
||||
configureFlags =
|
||||
old.configureFlags
|
||||
++ [
|
||||
"--extra-version=${extraVersion}"
|
||||
"--enable-logging"
|
||||
"--enable-asm"
|
||||
]
|
||||
++ [
|
||||
"--disable-mmal"
|
||||
"--enable-neon"
|
||||
]
|
||||
++ [
|
||||
"--enable-sand"
|
||||
]
|
||||
++ lib.optionals withVoutEgl [
|
||||
"--enable-epoxy"
|
||||
"--enable-vout-egl" # rpi
|
||||
]
|
||||
++ lib.optionals withVoutDrm [
|
||||
# when withV4l2
|
||||
"--enable-vout-drm" # rpi
|
||||
]
|
||||
++ lib.optionals withV4l2Request [
|
||||
"--enable-v4l2-request"
|
||||
"--enable-libudev"
|
||||
];
|
||||
buildInputs =
|
||||
old.buildInputs
|
||||
++ lib.optionals withVoutEgl [
|
||||
libepoxy.dev
|
||||
]
|
||||
++ lib.optionals withV4l2Request [
|
||||
udev
|
||||
systemd
|
||||
];
|
||||
})).override
|
||||
{
|
||||
version = ffmpegVersion;
|
||||
source = rpiFfmpegSrc;
|
||||
hash = rpiFfmpegSrc.hash;
|
||||
|
||||
# version = ffmpegVersion + "-rpi";
|
||||
# source = rpiFfmpegSrc;
|
||||
# hash = rpiFfmpegSrc.hash;
|
||||
inherit ffmpegVariant;
|
||||
|
||||
withStripping = true;
|
||||
|
||||
withDocumentation = false;
|
||||
withHtmlDoc = false;
|
||||
withManPages = false;
|
||||
|
||||
# withV4l2 = true; # default on linux
|
||||
# withDrm = true; # default on linux
|
||||
withXlib = withVoutEgl; # for libepoxy
|
||||
|
||||
withVaapi = false;
|
||||
# !!! keep this enabled, because some applications may need it
|
||||
# for example, vlc 3.0.20: fails with 'undefined reference to
|
||||
# `av_vdpau_get_surface_parameters'' otherwise
|
||||
withVdpau = true;
|
||||
}
|
||||
|
||||
# > configure flags: --disable-static --prefix=/nix/store/hksqdxfkpspl4bqhvzq88v46c5zlf1c9-ffmpeg-4.4-rpi --target_os=linux --arch=aarch64 --pkg-config=pkg-config --enable-gpl --enable-version3 --disable-nonfree --disable-static --enable-shared --enable-pic --disable-thumb --disable-small --enable-runtime-cpudetect --disable-gray --enable-swscale-alpha --enable-hardcoded-tables --enable-safe-bitstream-reader --enable-pthreads --disable-w32threads --disable-os2threads --enable-network --enable-pixelutils --datadir=/nix/store/k9hkfl02wlmms2czv8a56c3sfk0c1947-ffmpeg-4.4-rpi-data/share/ffmpeg --enable-ffmpeg --enable-ffplay --enable-ffprobe --bindir=/nix/store/xmgl25z6yh1166ykgf3srqhihdzx45ng-ffmpeg-4.4-rpi-bin/bin --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-avresample --enable-avutil --enable-postproc --enable-swresample --enable-swscale --libdir=/nix/store/sgxz7wifxfi3yk2706fjfn1ja418lz4l-ffmpeg-4.4-rpi-lib/lib --incdir=/nix/store/4i8zcixbngr553ajfsg7qxasy372j18s-ffmpeg-4.4-rpi-dev/include --disable-doc --disable-htmlpages --disable-manpages --enable-podpages --enable-txtpages --enable-alsa --disable-libaom --enable-libass --disable-libbluray --disable-libbs2b --enable-bzlib --disable-libcaca --disable-libcelt --disable-chromaprint --disable-cuda --disable-cuda-llvm --enable-libdav1d --disable-libdc1394 --enable-libdrm --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfontconfig --enable-libfreetype --disable-frei0r --disable-libfribidi --disable-libgme --enable-gnutls --disable-libgsm --enable-iconv --disable-libjack --disable-ladspa --enable-lzma --disable-libmfx --disable-libmodplug --enable-libmp3lame --disable-libmysofa --enable-cuvid --enable-nvdec --enable-nvenc --disable-openal --disable-opencl --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --enable-libopus --enable-libpulse --disable-librav1e --disable-librtmp --disable-libsmbclient --enable-sdl2 --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --disable-librsvg --disable-libsvtav1 --disable-libtensorflow --enable-libtheora --enable-libv4l2 --enable-v4l2-m2m --disable-vaapi --disable-vdpau --disable-libvidstab --disable-libvmaf --disable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-vulkan --disable-libwebp --enable-libx264 --enable-libx265 --disable-libxavs --disable-libxcb --disable-libxcb-shape --disable-libxcb-shm --disable-libxcb-xfixes --enable-xlib --disable-libxml2 --enable-libxvid --enable-libzimg --enable-zlib --disable-libzmq --disable-debug --enable-optimizations --disable-extra-warnings --enable-stripping --extra-version=rpi --enable-logging --enable-asm --disable-mmal --enable-neon --disable-thumb --enable-sand --enable-epoxy --enable-vout-egl --enable-vout-drm --enable-v4l2-request --enable-libudev
|
||||
# > ERROR: v4l2-request requires libudev
|
||||
47
packages/raspberrypi/libraspberrypi/default.nix
Normal file
47
packages/raspberrypi/libraspberrypi/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkg-config,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (_finalAttrs: {
|
||||
pname = "libraspberrypi";
|
||||
version = "unstable-2024-12-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "userland";
|
||||
rev = "a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976";
|
||||
hash = "sha256-Edca6nkykdXKFF5MGq6LeKirMLHTZBCbFWvHTNHMWJ4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
cmakeFlags = [
|
||||
# -DARM64=ON disables all targets that only build on 32-bit ARM; this allows
|
||||
# the package to build on aarch64 and other architectures
|
||||
"-DARM64=${if stdenv.hostPlatform.isAarch32 then "OFF" else "ON"}"
|
||||
"-DVMCS_INSTALL_PREFIX=${placeholder "out"}"
|
||||
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.10")
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "ARM side libraries for interfacing to Raspberry Pi GPU (deprecated as of 27.08.2025)";
|
||||
homepage = "https://github.com/raspberrypi/userland";
|
||||
license = licenses.bsd3;
|
||||
platforms = [
|
||||
"armv6l-linux"
|
||||
"armv7l-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
maintainers = with maintainers; [
|
||||
dezgeg
|
||||
tkerber
|
||||
];
|
||||
};
|
||||
})
|
||||
39
packages/raspberrypi/raspberrypi-utils/default.nix
Normal file
39
packages/raspberrypi/raspberrypi-utils/default.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/libraspberrypi/default.nix#L28
|
||||
# because libraspberrypi is outdated and deprecated
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
dtc,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (_finalAttrs: {
|
||||
pname = "raspberrypi-utils";
|
||||
version = "unstable-2025-11-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "utils";
|
||||
rev = "6e0779b1c552976e0da2374c0325a8c9c77b6010";
|
||||
hash = "sha256-gzcQdchmYZ8NSGDnozUK3JgEQAO5b7GCOzQeRL0nDM8";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
dtc # dtmerge depends on libfdt
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A collection of scripts and simple applications for Raspberry Pi hardware";
|
||||
homepage = "https://github.com/raspberrypi/utils";
|
||||
license = licenses.bsd3;
|
||||
platforms = [
|
||||
"armv6l-linux"
|
||||
"armv7l-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
maintainers = with maintainers; [ kazenyuk ];
|
||||
};
|
||||
})
|
||||
88
packages/raspberrypi/udev-rules/default.nix
Normal file
88
packages/raspberrypi/udev-rules/default.nix
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
bash,
|
||||
gnugrep,
|
||||
coreutils,
|
||||
withCpuGovernorConfig ? false,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (_finalAttrs: {
|
||||
pname = "raspberrypi-udev-rules";
|
||||
version = "20251028";
|
||||
|
||||
# https://github.com/RPi-Distro/raspberrypi-sys-mods/tree/pios/trixie
|
||||
src = fetchFromGitHub {
|
||||
owner = "RPi-Distro";
|
||||
repo = "raspberrypi-sys-mods";
|
||||
rev = "147bccd7db1a32468fac69a89a05d6b93c6f1796";
|
||||
hash = "sha256-+PWf3fy14Pb51ee8BueCnLR6OnUD3Htgd6r1321crhk=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/udev/rules.d
|
||||
mkdir -p $out/lib/tmpfiles.d
|
||||
|
||||
# Note: Installing only explicitly listed rules
|
||||
|
||||
rules_usr_lib_src=usr/lib/udev/rules.d
|
||||
declare -a rules_usr_lib=(
|
||||
10-vc.rules
|
||||
|
||||
# disable until i know what to do with /usr/lib/raspberrypi-sys-mods/i2cprobe
|
||||
# is it even still needed?
|
||||
# 15-i2c-modprobe.rules
|
||||
|
||||
60-backlight.rules
|
||||
60-dma-heap.rules
|
||||
60-gpiochip4.rules
|
||||
60-i2c-aliases.rules
|
||||
${if withCpuGovernorConfig then "60-ondemand-governor.rules" else ""}
|
||||
60-pico.rules
|
||||
60-piolib.rules
|
||||
61-drm.rules
|
||||
70-microbit.rules
|
||||
|
||||
# doesn't seem to provide any value on nixos
|
||||
# 80-noobs.rules
|
||||
|
||||
99-com.rules
|
||||
)
|
||||
|
||||
tmpfiles_usr_lib_src=usr/lib/tmpfiles.d
|
||||
declare -a tmpfiles_usr_lib=(
|
||||
${if withCpuGovernorConfig then "raspberrypi-sys-mods-ondemand-governor.conf" else ""}
|
||||
sys-kernel-debug.conf
|
||||
)
|
||||
|
||||
for i in "''${rules_usr_lib[@]}"; do
|
||||
install -vD "$rules_usr_lib_src/$i" $out/lib/udev/rules.d
|
||||
done
|
||||
|
||||
for i in "''${tmpfiles_usr_lib[@]}"; do
|
||||
install -vD "$tmpfiles_usr_lib_src/$i" $out/lib/tmpfiles.d
|
||||
done
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
for i in $out/{etc,lib}/udev/rules.d/*.rules; do
|
||||
substituteInPlace $i \
|
||||
--replace-quiet \"/bin/sh \"${bash}/bin/sh \
|
||||
--replace-quiet \"/bin/grep \"${lib.getExe gnugrep} \
|
||||
--replace-quiet \"/bin/chgrp \"${coreutils}/bin/chgrp \
|
||||
--replace-quiet \"/bin/chmod \"${coreutils}/bin/chmod \
|
||||
--replace-quiet /usr/bin/test ${coreutils}/bin/test
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A collection of Raspberry Pi-sourced system configuration files and associated scripts";
|
||||
homepage = "https://github.com/RPi-Distro/raspberrypi-sys-mods/";
|
||||
# https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/master/debian/copyright
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
# buildable by all, but will make sense only on these, obviously
|
||||
# platforms = [ "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
};
|
||||
})
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
@@ -35,7 +34,8 @@
|
||||
nix = {
|
||||
linux-builder = {
|
||||
enable = true;
|
||||
config = ({ pkgs, ... }:
|
||||
config = (
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation.cores = 6;
|
||||
environment.etc."ccache.conf".text = ''
|
||||
@@ -47,7 +47,8 @@
|
||||
# "d /var/cache/ccache 0770 builder nixbld -"
|
||||
"p+ /var/cache/ccache/ccache.conf - - - - /etc/ccache.conf"
|
||||
];
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled disabled;
|
||||
in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Services configs
|
||||
services = {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
# systems, # An attribute map of your defined hosts.
|
||||
|
||||
# All other arguments come from the system system.
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user