Compare commits
58 Commits
471c46d4cb
...
master
Author | SHA1 | Date | |
---|---|---|---|
14d8f23d54
|
|||
47bcec6b0d
|
|||
fb15ef954b
|
|||
6a8016dd66
|
|||
8a110a8f30
|
|||
c71208da11
|
|||
c1ded6c3ce
|
|||
68b09a34d2
|
|||
c57bbad8e5
|
|||
2aa6dd2aa7
|
|||
532427c07f
|
|||
3fb607752b
|
|||
e0c0ae3ee7
|
|||
fed69bbc80
|
|||
ac95c15e34
|
|||
b4ffc4ec0b
|
|||
a578aaa922
|
|||
48ac90515d
|
|||
4435f4ff2d
|
|||
f6c0620f8e
|
|||
265fbf1375
|
|||
d5a188dda6
|
|||
e3bd1cad68
|
|||
0e36db8840
|
|||
967455f8c3
|
|||
9316eb1257
|
|||
89fb397639
|
|||
33cc641030
|
|||
95617d4ad2
|
|||
fa3ed847bf
|
|||
31103c7f53
|
|||
152e382214
|
|||
703e011eae
|
|||
2023757f1f
|
|||
8e7aa906e2
|
|||
c829ae4e9d
|
|||
2fcafcbdba
|
|||
e7948146e7
|
|||
511df9b56c
|
|||
cdf2c00e9f
|
|||
ffebf63fe8
|
|||
cf8d18515f
|
|||
a1a6a8ffc7
|
|||
73f4258ca4
|
|||
2b44c2c2bf
|
|||
77399b70cb
|
|||
c83d754117
|
|||
71ff49c411
|
|||
cf1cab83db
|
|||
0ba904c576
|
|||
5cf9a5c72c
|
|||
f06229b84e
|
|||
e0e6ee3039
|
|||
70f046eb6b
|
|||
7317211271
|
|||
9e267aa32e
|
|||
abe4d7dda5
|
|||
13163dc1fb
|
872
flake.lock
generated
872
flake.lock
generated
File diff suppressed because it is too large
Load Diff
11
flake.nix
11
flake.nix
@ -15,6 +15,11 @@
|
|||||||
url = "github:nix-community/home-manager/release-25.05";
|
url = "github:nix-community/home-manager/release-25.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
hyprland-plugins = {
|
||||||
|
url = "github:hyprwm/hyprland-plugins";
|
||||||
|
inputs.hyprland.follows = "hyprland";
|
||||||
|
};
|
||||||
firefox-gnome-theme = {
|
firefox-gnome-theme = {
|
||||||
url = "github:rafaelmardojai/firefox-gnome-theme";
|
url = "github:rafaelmardojai/firefox-gnome-theme";
|
||||||
flake = false;
|
flake = false;
|
||||||
@ -45,7 +50,6 @@
|
|||||||
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
|
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
stylix.url = "github:danth/stylix/release-25.05";
|
|
||||||
thunderbird-gnome-theme = {
|
thunderbird-gnome-theme = {
|
||||||
url = "github:rafaelmardojai/thunderbird-gnome-theme";
|
url = "github:rafaelmardojai/thunderbird-gnome-theme";
|
||||||
flake = false;
|
flake = false;
|
||||||
@ -132,6 +136,7 @@
|
|||||||
nixfmt-rfc-style.enable = true;
|
nixfmt-rfc-style.enable = true;
|
||||||
trim-trailing-whitespace.enable = true;
|
trim-trailing-whitespace.enable = true;
|
||||||
};
|
};
|
||||||
|
excludes = [ "pkgs/libcamera-rpi/libcamera-rpi-ipa-priv-key.pem" ];
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -153,8 +158,8 @@
|
|||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
nodes = lib.genAttrs [
|
nodes = lib.genAttrs [
|
||||||
"mail"
|
"mail"
|
||||||
# "pi"
|
"pi"
|
||||||
# "skycam"
|
"skycam"
|
||||||
"vps1"
|
"vps1"
|
||||||
] mkDeployNode;
|
] mkDeployNode;
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.agenix.nixosModules.age
|
inputs.agenix.nixosModules.age
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.stylix.nixosModules.stylix
|
|
||||||
../modules/nixos
|
../modules/nixos
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -77,7 +76,7 @@
|
|||||||
'';
|
'';
|
||||||
buildMachines = [
|
buildMachines = [
|
||||||
{
|
{
|
||||||
hostName = "10.0.1.79";
|
hostName = "10.0.1.235";
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
maxJobs = 6;
|
maxJobs = 6;
|
||||||
|
@ -46,15 +46,6 @@
|
|||||||
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
corefonts
|
|
||||||
noto-fonts
|
|
||||||
nerd-fonts.bigblue-terminal
|
|
||||||
nerd-fonts.comic-shanns-mono
|
|
||||||
nerd-fonts.terminess-ttf
|
|
||||||
nerd-fonts.ubuntu-mono
|
|
||||||
];
|
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
system.desktop.gnome.enable = true;
|
system.desktop.gnome.enable = true;
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
supportedFilesystems = [ "zfs" ];
|
supportedFilesystems = [ "zfs" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = "schedutil";
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "rpool/system/root";
|
device = "rpool/system/root";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
|
@ -8,12 +8,12 @@ Media and public file server.
|
|||||||
* Chipset - AMD B550
|
* Chipset - AMD B550
|
||||||
* Memory - 64 GB DDR4
|
* Memory - 64 GB DDR4
|
||||||
* Motherboard - ASRock B550M Pro4
|
* Motherboard - ASRock B550M Pro4
|
||||||
* Case - Fractal Design Node 804
|
* Case - JMCD-12S4
|
||||||
|
|
||||||
### Disks
|
### Disks
|
||||||
Device | Partitions _(filesystem, size, usage)_
|
Device | Partitions _(filesystem, size, usage)_
|
||||||
--- | ---
|
--- | ---
|
||||||
Samsung 980 Evo | `/dev/nvme0n1p1` (EFI, 512 MiB, NixOS Boot) <br> `/dev/nvme0n1p2` (ZFS `rpool`, 200 GiB, NixOS Root)
|
Samsung 970 Evo Plus | `/dev/nvme0n1p1` (EFI, 512 MiB, NixOS Boot) <br> `/dev/nvme0n1p2` (ZFS `rpool`, 200 GiB, NixOS Root)
|
||||||
|
|
||||||
#### ZFS datasets
|
#### ZFS datasets
|
||||||
```
|
```
|
||||||
|
38
hosts/library/ai.nix
Normal file
38
hosts/library/ai.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
age.secrets."files/services/open-webui/envfile" = {
|
||||||
|
file = "${inputs.secrets}/files/services/open-webui/envfile.age";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.open-webui = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.unstable.open-webui;
|
||||||
|
port = 8081;
|
||||||
|
environment =
|
||||||
|
let
|
||||||
|
clientId = "open-webui";
|
||||||
|
publicUrl = "https://chat.ai.vimium.com";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
WEBUI_URL = publicUrl;
|
||||||
|
ENABLE_LOGIN_FORM = "False";
|
||||||
|
ENABLE_OAUTH_SIGNUP = "True";
|
||||||
|
ENABLE_OAUTH_ROLE_MANAGEMENT = "True";
|
||||||
|
OAUTH_CLIENT_ID = clientId;
|
||||||
|
OAUTH_PROVIDER_NAME = "Vimium";
|
||||||
|
OPENID_PROVIDER_URL = "https://auth.vimium.com/oauth2/openid/${clientId}/.well-known/openid-configuration";
|
||||||
|
OPENID_REDIRECT_URI = "${publicUrl}/oauth/oidc/callback";
|
||||||
|
};
|
||||||
|
environmentFile = config.age.secrets."files/services/open-webui/envfile".path;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules.services.borgmatic.directories = [
|
||||||
|
"/var/lib/private/open-webui"
|
||||||
|
];
|
||||||
|
}
|
@ -5,8 +5,10 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./ai.nix
|
||||||
./grafana.nix
|
./grafana.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
|
./jellysearch.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
./prometheus.nix
|
./prometheus.nix
|
||||||
./tunnel.nix
|
./tunnel.nix
|
||||||
@ -18,7 +20,10 @@
|
|||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
zfs.extraPools = [ "library" ];
|
zfs.extraPools = [
|
||||||
|
"downloads"
|
||||||
|
"library"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
58
hosts/library/jellysearch.nix
Normal file
58
hosts/library/jellysearch.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
age.secrets."files/services/meilisearch/envfile" = {
|
||||||
|
file = "${inputs.secrets}/files/services/meilisearch/envfile.age";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.meilisearch = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.meilisearch;
|
||||||
|
masterKeyEnvironmentFile = config.age.secrets."files/services/meilisearch/envfile".path;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.jellysearch = {
|
||||||
|
group = "jellysearch";
|
||||||
|
isSystemUser = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.jellysearch = { };
|
||||||
|
|
||||||
|
systemd.services.jellysearch = {
|
||||||
|
enable = true;
|
||||||
|
description = "JellySearch";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "on-failure";
|
||||||
|
ExecStart = "${pkgs.jellysearch}/bin/jellysearch";
|
||||||
|
StateDirectory = "jellysearch";
|
||||||
|
StateDirectoryMode = "0750";
|
||||||
|
WorkingDirectory = "/var/lib/jellysearch";
|
||||||
|
EnvironmentFile = config.age.secrets."files/services/meilisearch/envfile".path;
|
||||||
|
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
RestrictRealtime = true;
|
||||||
|
RestrictSUIDSGID = true;
|
||||||
|
ProtectHostname = true;
|
||||||
|
LockPersonality = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
PrivateUsers = true;
|
||||||
|
RemoveIPC = true;
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
DOTNET_ENVIRONMENT = "Production";
|
||||||
|
INDEX_CRON = "0 0 0/2 ? * * *";
|
||||||
|
JELLYFIN_URL = "http://localhost:8096";
|
||||||
|
JELLYFIN_CONFIG_DIR = "${toString config.services.jellyfin.dataDir}";
|
||||||
|
MEILI_URL = "http://localhost:${toString config.services.meilisearch.listenPort}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -12,9 +12,6 @@
|
|||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
proxy_set_header Range $http_range;
|
|
||||||
proxy_set_header If-Range $http_if_range;
|
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
@ -36,6 +33,27 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"chat.ai.vimium.com" = {
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "127.0.0.1";
|
||||||
|
port = 8001;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:8081";
|
||||||
|
extraConfig =
|
||||||
|
proxyConfig
|
||||||
|
+ ''
|
||||||
|
# Disable proxy buffering for better streaming response from models
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
|
# Increase max request size for large attachments and long audio messages
|
||||||
|
client_max_body_size 20M;
|
||||||
|
proxy_read_timeout 10m;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
"jellyfin.vimium.com" = {
|
"jellyfin.vimium.com" = {
|
||||||
default = true;
|
default = true;
|
||||||
listen = [
|
listen = [
|
||||||
@ -45,8 +63,21 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:8096";
|
extraConfig =
|
||||||
extraConfig = proxyConfig;
|
''
|
||||||
|
# Proxy JellySearch first
|
||||||
|
if ($arg_searchTerm) {
|
||||||
|
proxy_pass http://localhost:5000;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
proxy_pass http://localhost:8096;
|
||||||
|
''
|
||||||
|
+ proxyConfig
|
||||||
|
+ ''
|
||||||
|
proxy_set_header Range $http_range;
|
||||||
|
proxy_set_header If-Range $http_if_range;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
locations."/metrics" = {
|
locations."/metrics" = {
|
||||||
return = "404";
|
return = "404";
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
-o TCPKeepAlive=no \
|
-o TCPKeepAlive=no \
|
||||||
-i %h/.ssh/id_jellyfin \
|
-i %h/.ssh/id_jellyfin \
|
||||||
-R localhost:8000:localhost:8000 \
|
-R localhost:8000:localhost:8000 \
|
||||||
|
-R localhost:8001:localhost:8001 \
|
||||||
jellyfin@vps1.mesh.vimium.net
|
jellyfin@vps1.mesh.vimium.net
|
||||||
'';
|
'';
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.sunshine = {
|
services.sunshine = {
|
||||||
enable = true;
|
enable = false;
|
||||||
package = pkgs.unstable.sunshine;
|
package = pkgs.unstable.sunshine;
|
||||||
capSysAdmin = true;
|
capSysAdmin = true;
|
||||||
};
|
};
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./home-assistant
|
./home-assistant
|
||||||
|
./snapcast.nix
|
||||||
../server.nix
|
../server.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@ -11,44 +10,6 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages =
|
|
||||||
let
|
|
||||||
version = "6.1.73";
|
|
||||||
tag = "stable_20240124";
|
|
||||||
srcHash = "sha256-P4ExzxWqZj+9FZr9U2tmh7rfs/3+iHEv0m74PCoXVuM=";
|
|
||||||
in
|
|
||||||
pkgs.linuxPackagesFor (
|
|
||||||
pkgs.linux_rpi4.override {
|
|
||||||
argsOverride = {
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "raspberrypi";
|
|
||||||
repo = "linux";
|
|
||||||
rev = tag;
|
|
||||||
hash = srcHash;
|
|
||||||
};
|
|
||||||
version = version;
|
|
||||||
modDirVersion = version;
|
|
||||||
structuredExtraConfig = { };
|
|
||||||
kernelPatches = [
|
|
||||||
{
|
|
||||||
name = "drm-rp1-depends-on-instead-of-select-MFD_RP1.patch";
|
|
||||||
patch = pkgs.fetchpatch {
|
|
||||||
url = "https://github.com/peat-psuwit/rpi-linux/commit/6de0bb51929cd3ad4fa27b2a421a2af12e6468f5.patch";
|
|
||||||
hash = "sha256-9pHcbgWTiztu48SBaLPVroUnxnXMKeCGt5vEo9V8WGw=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "iommu-bcm2712-don-t-allow-building-as-module.patch";
|
|
||||||
patch = pkgs.fetchpatch {
|
|
||||||
url = "https://github.com/peat-psuwit/rpi-linux/commit/693a5e69bddbcbe1d1b796ebc7581c3597685b1b.patch";
|
|
||||||
hash = "sha256-8BYYQDM5By8cTk48ASYKJhGVQnZBIK4PXtV70UtfS+A=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
# Stop ZFS kernel being built
|
# Stop ZFS kernel being built
|
||||||
supportedFilesystems = lib.mkForce [
|
supportedFilesystems = lib.mkForce [
|
||||||
"btrfs"
|
"btrfs"
|
||||||
@ -69,23 +30,6 @@
|
|||||||
(final: prev: {
|
(final: prev: {
|
||||||
makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; });
|
makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; });
|
||||||
})
|
})
|
||||||
(final: prev: {
|
|
||||||
raspberrypifw =
|
|
||||||
let
|
|
||||||
version = "1.20240529";
|
|
||||||
srcHash = "sha256-KsCo7ZG6vKstxRyFljZtbQvnDSqiAPdUza32xTY/tlA=";
|
|
||||||
in
|
|
||||||
pkgs.raspberrypifw.override {
|
|
||||||
argsOverride = {
|
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "raspberrypi";
|
|
||||||
repo = "firmware";
|
|
||||||
rev = "${version}";
|
|
||||||
hash = srcHash;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
|
@ -63,7 +63,6 @@
|
|||||||
};
|
};
|
||||||
media_player = [ ];
|
media_player = [ ];
|
||||||
mobile_app = { };
|
mobile_app = { };
|
||||||
onkyo = { };
|
|
||||||
open_meteo = { };
|
open_meteo = { };
|
||||||
recorder = {
|
recorder = {
|
||||||
purge_keep_days = 365;
|
purge_keep_days = 365;
|
||||||
|
43
hosts/pi/snapcast.nix
Normal file
43
hosts/pi/snapcast.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Put all sinks in pipewire group
|
||||||
|
services.pipewire.systemWide = true;
|
||||||
|
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
publish = {
|
||||||
|
enable = true;
|
||||||
|
domain = true;
|
||||||
|
addresses = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.snapserver = {
|
||||||
|
enable = true;
|
||||||
|
streams = {
|
||||||
|
default = {
|
||||||
|
type = "file";
|
||||||
|
location = "/var/lib/snapserver/test.wav";
|
||||||
|
sampleFormat = "44100:16:2";
|
||||||
|
codec = "flac";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.snapclient = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "pipewire.service" ];
|
||||||
|
requires = [ "pipewire.service" ];
|
||||||
|
description = "Snapcast client";
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.snapcast}/bin/snapclient -h 127.0.0.1 --player pulse --mixer hardware";
|
||||||
|
DynamicUser = true;
|
||||||
|
SupplementaryGroups = [ "pipewire" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -50,11 +50,6 @@ in
|
|||||||
AllowSuspend=no
|
AllowSuspend=no
|
||||||
AllowHibernation=no
|
AllowHibernation=no
|
||||||
'';
|
'';
|
||||||
|
|
||||||
watchdog = {
|
|
||||||
runtimeTime = "20s";
|
|
||||||
rebootTime = "30s";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.fail2ban = {
|
services.fail2ban = {
|
||||||
|
@ -1,77 +1,16 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../server.nix
|
../server.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "aarch64-linux";
|
nixpkgs.hostPlatform = "aarch64-linux";
|
||||||
|
|
||||||
hardware = {
|
|
||||||
raspberry-pi."4" = {
|
|
||||||
apply-overlays-dtmerge.enable = true;
|
|
||||||
audio.enable = false;
|
|
||||||
xhci.enable = false;
|
|
||||||
};
|
|
||||||
deviceTree = {
|
|
||||||
enable = true;
|
|
||||||
filter = "*rpi-4-*.dtb";
|
|
||||||
# From https://github.com/Electrostasy/dots/blob/3b81723feece67610a252ce754912f6769f0cd34/hosts/phobos/klipper.nix#L43-L65
|
|
||||||
overlays =
|
|
||||||
let
|
|
||||||
mkCompatibleDtsFile =
|
|
||||||
dtbo:
|
|
||||||
let
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
"${drv}/overlay.dts";
|
|
||||||
|
|
||||||
inherit (config.boot.kernelPackages) kernel;
|
|
||||||
in
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name = "imx708.dtbo";
|
|
||||||
dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/imx708.dtbo";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "vc4-kms-v3d-pi4.dtbo";
|
|
||||||
dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/vc4-kms-v3d-pi4.dtbo";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
firmware = with pkgs; [
|
|
||||||
firmwareLinuxNonfree
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"
|
|
||||||
KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
|
|
||||||
SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"
|
|
||||||
'';
|
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(import ./../../overlays/libcamera.nix)
|
|
||||||
];
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostId = "731d1660";
|
hostId = "731d1660";
|
||||||
firewall = {
|
firewall = {
|
||||||
@ -81,37 +20,59 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.ustreamer = {
|
services.go2rtc =
|
||||||
enable = true;
|
let
|
||||||
description = "uStreamer service";
|
rpicam-vid = "${pkgs.rpicam-apps}/bin/rpicam-vid";
|
||||||
unitConfig = {
|
in
|
||||||
Type = "simple";
|
{
|
||||||
ConditionPathExists = "/sys/bus/i2c/drivers/imx708/10-001a/video4linux";
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
streams.rpicam = "exec:${rpicam-vid} -v1 -t0 -o- --inline --width=4608 --height=2592 --framerate=14 --codec mjpeg --quality 90 --denoise=cdn_off --sharpness 1.25 --exposure long --gain 3";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = ''
|
systemd.services.skycam-archiver =
|
||||||
${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \
|
let
|
||||||
--host=0.0.0.0 \
|
snapshotScript = pkgs.writeShellScript "skycam-archiver" ''
|
||||||
--resolution=4608x2592
|
${pkgs.lib.getExe pkgs.curl} -s -o "/var/lib/skycam-archiver/snapshot-$(date +%Y%m%d-%H%M%S).jpg" "http://skycam.mesh.vimium.net:1984/api/frame.jpeg?src=rpicam"
|
||||||
'';
|
'';
|
||||||
DynamicUser = "yes";
|
in
|
||||||
SupplementaryGroups = [ "video" ];
|
{
|
||||||
Restart = "always";
|
description = "Capture skycam snapshot and save with timestamp";
|
||||||
RestartSec = 10;
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
StateDirectory = "skycam-archiver";
|
||||||
|
ExecStart = "${snapshotScript}";
|
||||||
|
};
|
||||||
|
requires = [ "go2rtc.service" ];
|
||||||
|
after = [ "go2rtc.service" ];
|
||||||
};
|
};
|
||||||
wantedBy = [ "network-online.target" ];
|
|
||||||
confinement.mode = "chroot-only";
|
systemd.timers.skycam-archiver = {
|
||||||
|
description = "Timer for capturing skycam snapshots every 30 minutes";
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "5min";
|
||||||
|
OnUnitActiveSec = "30min";
|
||||||
|
Unit = "skycam-archiver.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
modules.services.borgmatic = {
|
||||||
|
enable = true;
|
||||||
|
directories = [
|
||||||
|
"/var/lib/skycam-archiver"
|
||||||
|
];
|
||||||
|
repoPath = "ssh://m94ekv2i@m94ekv2i.repo.borgbase.com/./repo";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
camera-streamer
|
|
||||||
git
|
git
|
||||||
neovim
|
neovim
|
||||||
libcamera
|
libcamera
|
||||||
libraspberrypi
|
libraspberrypi
|
||||||
raspberrypi-eeprom
|
raspberrypi-eeprom
|
||||||
v4l-utils
|
rpicam-apps
|
||||||
unstable.ustreamer
|
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
{
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||||
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelModules = [ "bcm2835-v4l2" ];
|
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
"cma=512M"
|
|
||||||
"panic=0"
|
"panic=0"
|
||||||
];
|
];
|
||||||
supportedFilesystems = lib.mkForce [
|
supportedFilesystems = lib.mkForce [
|
||||||
@ -23,6 +25,61 @@
|
|||||||
tmp.cleanOnBoot = false;
|
tmp.cleanOnBoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
raspberry-pi."4" = {
|
||||||
|
apply-overlays-dtmerge.enable = true;
|
||||||
|
audio.enable = false;
|
||||||
|
xhci.enable = false;
|
||||||
|
};
|
||||||
|
deviceTree = {
|
||||||
|
enable = true;
|
||||||
|
filter = "*rpi-4-*.dtb";
|
||||||
|
# From https://github.com/Electrostasy/dots/blob/3b81723feece67610a252ce754912f6769f0cd34/hosts/phobos/klipper.nix#L43-L65
|
||||||
|
overlays =
|
||||||
|
let
|
||||||
|
mkCompatibleDtsFile =
|
||||||
|
dtbo:
|
||||||
|
let
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
"${drv}/overlay.dts";
|
||||||
|
|
||||||
|
inherit (config.boot.kernelPackages) kernel;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name = "imx708.dtbo";
|
||||||
|
dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/imx708.dtbo";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "vc4-kms-v3d-pi4.dtbo";
|
||||||
|
dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/vc4-kms-v3d-pi4.dtbo";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
firmware = with pkgs; [
|
||||||
|
firmwareLinuxNonfree
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"
|
||||||
|
KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
|
||||||
|
SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"
|
||||||
|
SUBSYSTEM=="dma_heap", KERNEL=="linux,cma", SYMLINK+="dma_heap/vidbuf_cached", OPTIONS+="link_priority=-50"
|
||||||
|
'';
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: super: {
|
(final: super: {
|
||||||
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
||||||
|
@ -85,6 +85,31 @@ in
|
|||||||
virtualHosts =
|
virtualHosts =
|
||||||
{
|
{
|
||||||
## Static sites
|
## Static sites
|
||||||
|
"chat.ai.vimium.com" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
extraConfig = nginxErrorPages + nginxEdgeHeaders;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:8001";
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
# Disable proxy buffering for better streaming response from models
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
|
# Increase max request size for large attachments and long audio messages
|
||||||
|
client_max_body_size 20M;
|
||||||
|
proxy_read_timeout 10m;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
"jellyfin.vimium.com" = {
|
"jellyfin.vimium.com" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
@ -111,13 +136,16 @@ in
|
|||||||
enableACME = true;
|
enableACME = true;
|
||||||
serverAliases = [ "www.jdholt.com" ];
|
serverAliases = [ "www.jdholt.com" ];
|
||||||
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
|
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
|
||||||
|
locations."/skycam" = {
|
||||||
|
root = "/var/www/jdholt.com";
|
||||||
|
};
|
||||||
locations."/skycam/snapshot.jpg" = {
|
locations."/skycam/snapshot.jpg" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set $backend "skycam.mesh.vimium.net:8080";
|
set $backend "skycam.mesh.vimium.net:1984";
|
||||||
|
|
||||||
resolver 100.100.100.100;
|
resolver 100.100.100.100;
|
||||||
|
|
||||||
proxy_pass http://$backend/snapshot;
|
proxy_pass http://$backend/api/frame.jpeg?src=rpicam;
|
||||||
proxy_cache skycam_cache;
|
proxy_cache skycam_cache;
|
||||||
proxy_cache_valid any 10s;
|
proxy_cache_valid any 10s;
|
||||||
proxy_ignore_headers Cache-Control Expires Set-Cookie;
|
proxy_ignore_headers Cache-Control Expires Set-Cookie;
|
||||||
|
@ -64,7 +64,8 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Add `pg_dumpall` to unit environment
|
# Add `pg_dumpall` to unit environment
|
||||||
systemd.services.borgmatic.path = [ config.services.postgresql.package ];
|
systemd.services.borgmatic.path =
|
||||||
|
if config.services.postgresql.enable then [ config.services.postgresql.package ] else [ ];
|
||||||
|
|
||||||
# Without this override, `cat` is unavailable for `encryption_passcommand`
|
# Without this override, `cat` is unavailable for `encryption_passcommand`
|
||||||
systemd.services.borgmatic.confinement.fullUnit = true;
|
systemd.services.borgmatic.confinement.fullUnit = true;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
@ -22,14 +21,5 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
withUWSM = true;
|
withUWSM = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
autoEnable = false;
|
|
||||||
image = config.lib.stylix.pixel "base00";
|
|
||||||
polarity = "dark";
|
|
||||||
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/colors.yaml";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
From 625939e594ce255afa3fab3a40c3e524460e1f8b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jordan Holt <jordan@vimium.com>
|
|
||||||
Date: Sat, 10 Aug 2024 18:28:08 +0100
|
|
||||||
Subject: [PATCH] Ignore IPA signing
|
|
||||||
|
|
||||||
---
|
|
||||||
src/libcamera/ipa_manager.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
|
|
||||||
index 6d5bbd05..43004175 100644
|
|
||||||
--- a/src/libcamera/ipa_manager.cpp
|
|
||||||
+++ b/src/libcamera/ipa_manager.cpp
|
|
||||||
@@ -295,7 +295,7 @@ bool IPAManager::isSignatureValid([[maybe_unused]] IPAModule *ipa) const
|
|
||||||
if (data.empty())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
- bool valid = pubKey_.verify(data, ipa->signature());
|
|
||||||
+ bool valid = true;
|
|
||||||
|
|
||||||
LOG(IPAManager, Debug)
|
|
||||||
<< "IPA module " << ipa->path() << " signature is "
|
|
||||||
--
|
|
||||||
2.44.1
|
|
@ -1,141 +0,0 @@
|
|||||||
From 57128bb78f56cadf9e2dcca5ba4d710c3bd478a7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jordan Holt <jordan@vimium.com>
|
|
||||||
Date: Mon, 5 Aug 2024 21:53:09 +0100
|
|
||||||
Subject: [PATCH] Remove relative config lookups
|
|
||||||
|
|
||||||
---
|
|
||||||
src/libcamera/ipa_manager.cpp | 16 ----------
|
|
||||||
src/libcamera/ipa_proxy.cpp | 48 ++----------------------------
|
|
||||||
src/libcamera/pipeline_handler.cpp | 21 ++-----------
|
|
||||||
3 files changed, 4 insertions(+), 81 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
|
|
||||||
index f4e0b633..6d5bbd05 100644
|
|
||||||
--- a/src/libcamera/ipa_manager.cpp
|
|
||||||
+++ b/src/libcamera/ipa_manager.cpp
|
|
||||||
@@ -131,22 +131,6 @@ IPAManager::IPAManager()
|
|
||||||
<< "No IPA found in '" << modulePaths << "'";
|
|
||||||
}
|
|
||||||
|
|
||||||
- /*
|
|
||||||
- * When libcamera is used before it is installed, load IPAs from the
|
|
||||||
- * same build directory as the libcamera library itself.
|
|
||||||
- */
|
|
||||||
- std::string root = utils::libcameraBuildPath();
|
|
||||||
- if (!root.empty()) {
|
|
||||||
- std::string ipaBuildPath = root + "src/ipa";
|
|
||||||
- constexpr int maxDepth = 2;
|
|
||||||
-
|
|
||||||
- LOG(IPAManager, Info)
|
|
||||||
- << "libcamera is not installed. Adding '"
|
|
||||||
- << ipaBuildPath << "' to the IPA search path";
|
|
||||||
-
|
|
||||||
- ipaCount += addDir(ipaBuildPath.c_str(), maxDepth);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
/* Finally try to load IPAs from the installed system path. */
|
|
||||||
ipaCount += addDir(IPA_MODULE_DIR);
|
|
||||||
|
|
||||||
diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
|
|
||||||
index 69975d8f..cd9284a3 100644
|
|
||||||
--- a/src/libcamera/ipa_proxy.cpp
|
|
||||||
+++ b/src/libcamera/ipa_proxy.cpp
|
|
||||||
@@ -122,33 +122,11 @@ std::string IPAProxy::configurationFile(const std::string &name,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- std::string root = utils::libcameraSourcePath();
|
|
||||||
- if (!root.empty()) {
|
|
||||||
- /*
|
|
||||||
- * When libcamera is used before it is installed, load
|
|
||||||
- * configuration files from the source directory. The
|
|
||||||
- * configuration files are then located in the 'data'
|
|
||||||
- * subdirectory of the corresponding IPA module.
|
|
||||||
- */
|
|
||||||
- std::string ipaConfDir = root + "src/ipa/" + ipaName + "/data";
|
|
||||||
-
|
|
||||||
- LOG(IPAProxy, Info)
|
|
||||||
- << "libcamera is not installed. Loading IPA configuration from '"
|
|
||||||
- << ipaConfDir << "'";
|
|
||||||
-
|
|
||||||
- std::string confPath = ipaConfDir + "/" + name;
|
|
||||||
+ for (const auto &dir : utils::split(IPA_CONFIG_DIR, ":")) {
|
|
||||||
+ std::string confPath = dir + "/" + ipaName + "/" + name;
|
|
||||||
ret = stat(confPath.c_str(), &statbuf);
|
|
||||||
if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)
|
|
||||||
return confPath;
|
|
||||||
-
|
|
||||||
- } else {
|
|
||||||
- /* Else look in the system locations. */
|
|
||||||
- for (const auto &dir : utils::split(IPA_CONFIG_DIR, ":")) {
|
|
||||||
- std::string confPath = dir + "/" + ipaName + "/" + name;
|
|
||||||
- ret = stat(confPath.c_str(), &statbuf);
|
|
||||||
- if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)
|
|
||||||
- return confPath;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fallbackName.empty()) {
|
|
||||||
@@ -197,28 +175,6 @@ std::string IPAProxy::resolvePath(const std::string &file) const
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- /*
|
|
||||||
- * When libcamera is used before it is installed, load proxy workers
|
|
||||||
- * from the same build directory as the libcamera directory itself.
|
|
||||||
- * This requires identifying the path of the libcamera.so, and
|
|
||||||
- * referencing a relative path for the proxy workers from that point.
|
|
||||||
- */
|
|
||||||
- std::string root = utils::libcameraBuildPath();
|
|
||||||
- if (!root.empty()) {
|
|
||||||
- std::string ipaProxyDir = root + "src/libcamera/proxy/worker";
|
|
||||||
-
|
|
||||||
- LOG(IPAProxy, Info)
|
|
||||||
- << "libcamera is not installed. Loading proxy workers from '"
|
|
||||||
- << ipaProxyDir << "'";
|
|
||||||
-
|
|
||||||
- std::string proxyPath = ipaProxyDir + proxyFile;
|
|
||||||
- if (!access(proxyPath.c_str(), X_OK))
|
|
||||||
- return proxyPath;
|
|
||||||
-
|
|
||||||
- return std::string();
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /* Else try finding the exec target from the install directory. */
|
|
||||||
std::string proxyPath = std::string(IPA_PROXY_DIR) + proxyFile;
|
|
||||||
if (!access(proxyPath.c_str(), X_OK))
|
|
||||||
return proxyPath;
|
|
||||||
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
|
|
||||||
index 5ea2ca78..fd8555ca 100644
|
|
||||||
--- a/src/libcamera/pipeline_handler.cpp
|
|
||||||
+++ b/src/libcamera/pipeline_handler.cpp
|
|
||||||
@@ -561,25 +561,8 @@ std::string PipelineHandler::configurationFile(const std::string &subdir,
|
|
||||||
struct stat statbuf;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
- std::string root = utils::libcameraSourcePath();
|
|
||||||
- if (!root.empty()) {
|
|
||||||
- /*
|
|
||||||
- * When libcamera is used before it is installed, load
|
|
||||||
- * configuration files from the source directory. The
|
|
||||||
- * configuration files are then located in the 'data'
|
|
||||||
- * subdirectory of the corresponding pipeline handler.
|
|
||||||
- */
|
|
||||||
- std::string confDir = root + "src/libcamera/pipeline/";
|
|
||||||
- confPath = confDir + subdir + "/data/" + name;
|
|
||||||
-
|
|
||||||
- LOG(Pipeline, Info)
|
|
||||||
- << "libcamera is not installed. Loading platform configuration file from '"
|
|
||||||
- << confPath << "'";
|
|
||||||
- } else {
|
|
||||||
- /* Else look in the system locations. */
|
|
||||||
- confPath = std::string(LIBCAMERA_DATA_DIR)
|
|
||||||
- + "/pipeline/" + subdir + '/' + name;
|
|
||||||
- }
|
|
||||||
+ confPath = std::string(LIBCAMERA_DATA_DIR)
|
|
||||||
+ + "/pipeline/" + subdir + '/' + name;
|
|
||||||
|
|
||||||
ret = stat(confPath.c_str(), &statbuf);
|
|
||||||
if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)
|
|
||||||
--
|
|
||||||
2.44.1
|
|
@ -1,65 +0,0 @@
|
|||||||
final: prev: {
|
|
||||||
libpisp = final.stdenv.mkDerivation {
|
|
||||||
name = "libpisp";
|
|
||||||
version = "1.0.5";
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "raspberrypi";
|
|
||||||
repo = "libpisp";
|
|
||||||
rev = "v1.0.5";
|
|
||||||
hash = "sha256-CHd44CH5dBcZuK+5fZtONZ8HE/lwGKwK5U0BYUK8gG4=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = with final; [
|
|
||||||
pkg-config
|
|
||||||
meson
|
|
||||||
ninja
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with final; [
|
|
||||||
nlohmann_json
|
|
||||||
boost
|
|
||||||
];
|
|
||||||
|
|
||||||
BOOST_INCLUDEDIR = "${prev.lib.getDev final.boost}/include";
|
|
||||||
BOOST_LIBRARYDIR = "${prev.lib.getLib final.boost}/lib";
|
|
||||||
};
|
|
||||||
|
|
||||||
libcamera = prev.libcamera.overrideAttrs (old: {
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "raspberrypi";
|
|
||||||
repo = "libcamera";
|
|
||||||
rev = "eb00c13d7c9f937732305d47af5b8ccf895e700f";
|
|
||||||
hash = "sha256-p0/inkHPRUkxSIsTmj7VI7sIaX7OXdqjMGZ31W7cnt4=";
|
|
||||||
};
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
patchShebangs utils/ src/py/
|
|
||||||
'';
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./0001-Remove-relative-config-lookups.patch
|
|
||||||
./0001-Ignore-IPA-signing.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs =
|
|
||||||
old.buildInputs
|
|
||||||
++ (with final; [
|
|
||||||
libpisp
|
|
||||||
libglibutil
|
|
||||||
]);
|
|
||||||
|
|
||||||
mesonFlags = old.mesonFlags ++ [
|
|
||||||
"--buildtype=release"
|
|
||||||
"-Dpipelines=rpi/vc4,rpi/pisp"
|
|
||||||
"-Dipas=rpi/vc4,rpi/pisp"
|
|
||||||
"-Dgstreamer=enabled"
|
|
||||||
"-Dtest=false"
|
|
||||||
"-Dcam=enabled"
|
|
||||||
"-Dpycamera=disabled"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
camera-streamer = prev.callPackage ../pkgs/camera-streamer/package.nix {
|
|
||||||
libcamera = final.libcamera;
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
From 0f17bb86772afe9495891e420a809a0b3c071caf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jordan Holt <jordan@vimium.com>
|
|
||||||
Date: Sat, 10 Aug 2024 15:37:15 +0100
|
|
||||||
Subject: [PATCH] Disable libdatachannel
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index d5029bd..e50ba1a 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -23,7 +23,7 @@ USE_HW_H264 ?= 1
|
|
||||||
USE_FFMPEG ?= $(shell pkg-config libavutil libavformat libavcodec && echo 1)
|
|
||||||
USE_LIBCAMERA ?= $(shell pkg-config libcamera && echo 1)
|
|
||||||
USE_RTSP ?= $(shell pkg-config live555 && echo 1)
|
|
||||||
-USE_LIBDATACHANNEL ?= $(shell [ -e $(LIBDATACHANNEL_PATH)/CMakeLists.txt ] && echo 1)
|
|
||||||
+USE_LIBDATACHANNEL ?= 0
|
|
||||||
|
|
||||||
ifeq (1,$(DEBUG))
|
|
||||||
CFLAGS += -g
|
|
||||||
--
|
|
||||||
2.44.1
|
|
@ -1,82 +0,0 @@
|
|||||||
{
|
|
||||||
stdenv,
|
|
||||||
fetchFromGitHub,
|
|
||||||
|
|
||||||
cmake,
|
|
||||||
gnumake,
|
|
||||||
pkg-config,
|
|
||||||
xxd,
|
|
||||||
|
|
||||||
v4l-utils,
|
|
||||||
nlohmann_json,
|
|
||||||
ffmpegSupport ? true,
|
|
||||||
ffmpeg,
|
|
||||||
libcameraSupport ? true,
|
|
||||||
libcamera,
|
|
||||||
rtspSupport ? false,
|
|
||||||
live555,
|
|
||||||
webrtcSupport ? false,
|
|
||||||
openssl,
|
|
||||||
|
|
||||||
lib,
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "camera-streamer";
|
|
||||||
version = "0.2.8";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ayufan";
|
|
||||||
repo = "camera-streamer";
|
|
||||||
rev = "refs/tags/v${finalAttrs.version}";
|
|
||||||
hash = "sha256-8vV8BMFoDeh22I1/qxk6zttJROaD/lrThBxXHZSPpT4=";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./0001-Disable-libdatachannel.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
# Second replacement fixes literal newline in generated version.h.
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace Makefile \
|
|
||||||
--replace '/usr/local/bin' '/bin' \
|
|
||||||
--replace 'echo "#define' 'echo -e "#define'
|
|
||||||
'';
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = builtins.toString [
|
|
||||||
"-Wno-error=stringop-overflow"
|
|
||||||
"-Wno-error=format"
|
|
||||||
"-Wno-format"
|
|
||||||
"-Wno-format-security"
|
|
||||||
"-Wno-error=unused-result"
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
gnumake
|
|
||||||
pkg-config
|
|
||||||
xxd
|
|
||||||
];
|
|
||||||
|
|
||||||
dontUseCmakeConfigure = true;
|
|
||||||
|
|
||||||
buildInputs =
|
|
||||||
[
|
|
||||||
nlohmann_json
|
|
||||||
v4l-utils
|
|
||||||
]
|
|
||||||
++ (lib.optional ffmpegSupport ffmpeg)
|
|
||||||
++ (lib.optional libcameraSupport libcamera)
|
|
||||||
++ (lib.optional rtspSupport live555)
|
|
||||||
++ (lib.optional webrtcSupport openssl);
|
|
||||||
|
|
||||||
installFlags = [ "DESTDIR=${builtins.placeholder "out"}" ];
|
|
||||||
preInstall = "mkdir -p $out/bin";
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "High-performance low-latency camera streamer for Raspberry Pi's";
|
|
||||||
website = "https://github.com/ayufan/camera-streamer";
|
|
||||||
license = licenses.gpl3Only;
|
|
||||||
};
|
|
||||||
})
|
|
172
pkgs/jellysearch/nuget-deps.json
Normal file
172
pkgs/jellysearch/nuget-deps.json
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"pname": "MeiliSearch",
|
||||||
|
"version": "0.15.0",
|
||||||
|
"hash": "sha256-MM8Z8xc+AG0m+jNXAHSLhUB2egJC4lI+u6BDTVaOwzg="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.AspNetCore.OpenApi",
|
||||||
|
"version": "8.0.4",
|
||||||
|
"hash": "sha256-Y/UnyBlwraJjxDmEO3vsgB63GO1M7OXyIS10vL1Fs5A="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.Data.Sqlite",
|
||||||
|
"version": "8.0.6",
|
||||||
|
"hash": "sha256-t1g1cF4T26Np10H7opo/vCMTMNb9SS9pmLA9pSCUBp4="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.Data.Sqlite.Core",
|
||||||
|
"version": "8.0.6",
|
||||||
|
"hash": "sha256-MgUBbb0LDM1ixm8pBfBrSTVjNoGFn6NQMD36mirELmo="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.Extensions.ApiDescription.Server",
|
||||||
|
"version": "6.0.5",
|
||||||
|
"hash": "sha256-RJjBWz+UHxkQE2s7CeGYdTZ218mCufrxl0eBykZdIt4="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.Extensions.Logging.Abstractions",
|
||||||
|
"version": "2.1.1",
|
||||||
|
"hash": "sha256-TzbYgz4EemrYKHMvB9HWDkFmq0BkTetKPUwBpYHk9+k="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.IdentityModel.Abstractions",
|
||||||
|
"version": "7.4.0",
|
||||||
|
"hash": "sha256-rzTsvh5hDX7zk6wYzUKNg7lIQf38G/EeR6qUq/j3Eo0="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.IdentityModel.JsonWebTokens",
|
||||||
|
"version": "7.4.0",
|
||||||
|
"hash": "sha256-IeezkUkScumgLQZqq2Zu4YsyldIUA/XpTeONB2AtYDc="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.IdentityModel.Logging",
|
||||||
|
"version": "7.4.0",
|
||||||
|
"hash": "sha256-rudTpYcSlIlE1OX2LO3Qd6DAisqd5vsuX/Edu7rHIJs="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.IdentityModel.Tokens",
|
||||||
|
"version": "7.4.0",
|
||||||
|
"hash": "sha256-qVqVYxBy5p6Jerd1rfMUgApV7vcH54N4neS2x+N5zRQ="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.OpenApi",
|
||||||
|
"version": "1.2.3",
|
||||||
|
"hash": "sha256-OafkxXKnDmLZo5tjifjycax0n0F/OnWQTEZCntBMYR0="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.OpenApi",
|
||||||
|
"version": "1.4.3",
|
||||||
|
"hash": "sha256-vk47e78OwopXJx2LhDRbKFObqF3GShHfNHR2SzvbQeA="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Microsoft.Win32.SystemEvents",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-N9EVZbl5w1VnMywGXyaVWzT9lh84iaJ3aD48hIBk1zA="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Quartz",
|
||||||
|
"version": "3.10.0",
|
||||||
|
"hash": "sha256-1sb+JKJdS01lScgVjcbDHxbXSpHeMn1Mqg/CQ8r+BKI="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "SQLitePCLRaw.bundle_e_sqlite3",
|
||||||
|
"version": "2.1.6",
|
||||||
|
"hash": "sha256-dZD/bZsYXjOu46ZH5Y/wgh0uhHOqIxC+S+0ecKhr718="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "SQLitePCLRaw.core",
|
||||||
|
"version": "2.1.6",
|
||||||
|
"hash": "sha256-RxWjm52PdmMV98dgDy0BCpF988+BssRZUgALLv7TH/E="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "SQLitePCLRaw.lib.e_sqlite3",
|
||||||
|
"version": "2.1.6",
|
||||||
|
"hash": "sha256-uHt5d+SFUkSd6WD7Tg0J3e8eVoxy/FM/t4PAkc9PJT0="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "SQLitePCLRaw.provider.e_sqlite3",
|
||||||
|
"version": "2.1.6",
|
||||||
|
"hash": "sha256-zHc/YZsd72eXlI8ba1tv58HZWUIiyjJaxq2CCP1hQe8="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Swashbuckle.AspNetCore",
|
||||||
|
"version": "6.4.0",
|
||||||
|
"hash": "sha256-czuCv3Os7Oo06m3W+auJjrTGuYT82E+Bi80sJqeVb8o="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Swashbuckle.AspNetCore.Swagger",
|
||||||
|
"version": "6.4.0",
|
||||||
|
"hash": "sha256-1u4A9vzDUJ+wLoxH5yQEVhpOxi+VnAMd64Z18SLqjPE="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Swashbuckle.AspNetCore.SwaggerGen",
|
||||||
|
"version": "6.4.0",
|
||||||
|
"hash": "sha256-Alra5J+i0L/4JoS5pATJexVu8LId8HZcofkx7KiRqMw="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "Swashbuckle.AspNetCore.SwaggerUI",
|
||||||
|
"version": "6.4.0",
|
||||||
|
"hash": "sha256-P84wlE4EVruLVGGTUHK29wWYs/BTq/MR5P7PuSBwr+c="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Configuration.ConfigurationManager",
|
||||||
|
"version": "6.0.1",
|
||||||
|
"hash": "sha256-U/0HyekAZK5ya2VNfGA1HeuQyJChoaqcoIv57xLpzLQ="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Drawing.Common",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-/9EaAbEeOjELRSMZaImS1O8FmUe8j4WuFUw1VOrPyAo="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.IdentityModel.Tokens.Jwt",
|
||||||
|
"version": "7.4.0",
|
||||||
|
"hash": "sha256-LYvdJPbPuxr8V3FJacStflSf9GVStprl1Wr+dfgqMdw="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Memory",
|
||||||
|
"version": "4.5.3",
|
||||||
|
"hash": "sha256-Cvl7RbRbRu9qKzeRBWjavUkseT2jhZBUWV1SPipUWFk="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Net.Http.Json",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-R4s4Fb3OTKpg9gXSv+8CQ9gPJPJMmj3/nagzaRndm+g="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Runtime.CompilerServices.Unsafe",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-bEG1PnDp7uKYz/OgLOWs3RWwQSVYm+AnPwVmAmcgp2I="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Security.AccessControl",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-qOyWEBbNr3EjyS+etFG8/zMbuPjA+O+di717JP9Cxyg="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Security.Cryptography.ProtectedData",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-Wi9I9NbZlpQDXgS7Kl06RIFxY/9674S7hKiYw5EabRY="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Security.Permissions",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-/MMvtFWGN/vOQfjXdOhet1gsnMgh6lh5DCHimVsnVEs="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Text.Encodings.Web",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-UemDHGFoQIG7ObQwRluhVf6AgtQikfHEoPLC6gbFyRo="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Text.Json",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-9AE/5ds4DqEfb0l+27fCBTSeYCdRWhxh2Bhg8IKvIuo="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pname": "System.Windows.Extensions",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"hash": "sha256-N+qg1E6FDJ9A9L50wmVt3xPQV8ZxlG1xeXgFuxO+yfM="
|
||||||
|
}
|
||||||
|
]
|
36
pkgs/jellysearch/package.nix
Normal file
36
pkgs/jellysearch/package.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
fetchFromGitLab,
|
||||||
|
buildDotnetModule,
|
||||||
|
dotnetCorePackages,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildDotnetModule rec {
|
||||||
|
pname = "jellysearch";
|
||||||
|
version = "0.0.1";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
owner = "DomiStyle";
|
||||||
|
repo = "JellySearch";
|
||||||
|
rev = "7397e3f8c7daa6f0d30b22dda7c5159a913ca6b8";
|
||||||
|
hash = "sha256-7t0j4S5A9yvRN8zjToMNsxJ72OjU3j++EAqq9CKcPaI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./patches/Only-listen-on-loopback-interface.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
projectFile = "src/JellySearch/JellySearch.csproj";
|
||||||
|
executables = [ "jellysearch" ];
|
||||||
|
nugetDeps = ./nuget-deps.json;
|
||||||
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
||||||
|
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A fast full-text search proxy for Jellyfin";
|
||||||
|
homepage = "https://gitlab.com/DomiStyle/jellysearch";
|
||||||
|
license = licenses.mit;
|
||||||
|
mainProgram = "JellySearch";
|
||||||
|
platforms = dotnet-runtime.meta.platforms;
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
From dede2b55ef53028b1347ccb731657a12d7fa3d15 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jordan Holt <jordan@vimium.com>
|
||||||
|
Date: Sun, 22 Jun 2025 17:16:56 +0100
|
||||||
|
Subject: [PATCH] Only listen on loopback interface
|
||||||
|
|
||||||
|
---
|
||||||
|
src/JellySearch/Program.cs | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/JellySearch/Program.cs b/src/JellySearch/Program.cs
|
||||||
|
index a0c6ee1..98798f7 100644
|
||||||
|
--- a/src/JellySearch/Program.cs
|
||||||
|
+++ b/src/JellySearch/Program.cs
|
||||||
|
@@ -6,7 +6,7 @@ using Quartz.Impl;
|
||||||
|
|
||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
-builder.WebHost.UseUrls("http://0.0.0.0:5000"); // Listen on every IP
|
||||||
|
+builder.WebHost.UseUrls("http://127.0.0.1:5000"); // Listen on loopback only
|
||||||
|
|
||||||
|
builder.Services.AddCors(options =>
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.49.0
|
28
pkgs/libcamera-rpi/libcamera-rpi-ipa-priv-key.pem
Normal file
28
pkgs/libcamera-rpi/libcamera-rpi-ipa-priv-key.pem
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCocmtyzPPjv+52
|
||||||
|
JiZrpZFfaZ0eeUgugc8gV+0+2Q9GEkl/xxqjiDVg31gBO3iwQov2NmGuPbXr+vwZ
|
||||||
|
QcUqNQakmmdi22tBaTtd6hMuhu9OfbP8sIFaf0dToZRHkPgf63+WCF6w0O9enEz4
|
||||||
|
zjW3kPa1eVRVekiYCXGML/VhN+h5WwWouNWgEOw5JH39ZuGmhsGN5XekkHtyMkwq
|
||||||
|
Vr+JodoSizhYs9VBYNA1J4PlyiS4BYr4pLiLffzPwRjcSS777x33g+nWNr1lsFxB
|
||||||
|
nDoVvVnq0E7fiXxlmCtAr/7dv0Ug5ixuNfZ9yoT0f+mfUiG/anmfodHujIm2Db37
|
||||||
|
jvmfxaq1AgMBAAECggEAFhJKBHSY92xod0g37A55fiZFTV8oZ1mgdXU386522yBd
|
||||||
|
y5Wf5rIcBmm1axHrFjNeCgClq3JQEk/kdP3Ccy2YBXzq04/7HYrHmd5oLYZGOINt
|
||||||
|
kExjYqN/SdTH7FmxPWN66AKIP8RcvQmfZ1GDxd4DiZNQitO3S96e53bIQPkVp8Lg
|
||||||
|
GfK6LQCdOGimD00wvRoeqbV0PWGGVMfx+KvD5hxKYolyi/hNUxToD28qCAoMlMTi
|
||||||
|
yL+17q3nIYZvUmL0k7d64U+lXF8ov3cVXNJzAzFi41MXZ2Xqk3Lj+IhNweUhlOyn
|
||||||
|
fTo8QntNlirNL/XmtJ+5mPbGufE/6zsSNOf2Cyz2aQKBgQDio/tA3tFBzOz31hox
|
||||||
|
gW6NKarhp7e5R3XHQjZPmQXKq2lGCTBN+LzwCLYDa+ZWkS+cel/xSbkUFl0dopCu
|
||||||
|
7uGrSvmVAv+l1k879WHsYmLlDjJSa8WmDtVQ0SJr70X9UJmD2BivWnTnzrpZFu2A
|
||||||
|
Nv57gvebJTI4tLfAAyIfbg8gOQKBgQC+RJRv8/jVha/4sPonQYvpH0scS0Xzwca6
|
||||||
|
xd23e+vULBpk7IVzMbVGJEDdfWXVJeAO++FSQcgTJA38nfYm2XRPZAProliLaW8o
|
||||||
|
XVhhhWbXP7Jc8BmL5zyfDaLOXNFBX2kfr/oKeOoQ+0dRDlWKlarw1SxC+RT6i2qQ
|
||||||
|
YETgXHKmXQKBgGk8mWsqy2HRZOtDqE/6eLnlciprtVy7+M14Sj21oUHVTAGwPJTH
|
||||||
|
/fs7IEEAdikWK1RuYmRoxh60r7IWDTadR35BRxjRFqILnCkMLNcVbDRN3kH1NwZ/
|
||||||
|
dr+bDG+v4ADazx2wVu39g7Erhc3eXpOddZcmXhDVObeo+nWXPt33PeDJAoGBAJ4v
|
||||||
|
+FVnuo8Tee1Cfogat87W5KSedIcnqSjpjt+Y2MXq8PrNplnSjwrE42UCd6KRvcnX
|
||||||
|
Ykr4Q/ad+D75uYgtLMVAuv2yWPl3bCJcETnrJkh5PbqFKEgntT/rn1sA0j0OrSDa
|
||||||
|
NwFz6+64a1+ZkkcJDjjykr0Px4BSXwOv9jOuyOdFAoGADZEADOLX5y4utxboe1M0
|
||||||
|
UnaFKGEDE6H8qdRJQ9bSvEwJI142al02CvnvqvP4cpd8rKOCRs9nSXFJFXCedTLy
|
||||||
|
ojSVfjTyJMTVJxab/c/Qugkxb/TqGfEnZF2yoTsfPYp2pXRd6DvyKlDQzlSOj933
|
||||||
|
FrqeSe1QKapuPRsujVwLZDU=
|
||||||
|
-----END PRIVATE KEY-----
|
66
pkgs/libcamera-rpi/package.nix
Normal file
66
pkgs/libcamera-rpi/package.nix
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
|
libcamera,
|
||||||
|
boost,
|
||||||
|
nlohmann_json,
|
||||||
|
python3Packages,
|
||||||
|
git,
|
||||||
|
cacert,
|
||||||
|
meson,
|
||||||
|
}:
|
||||||
|
libcamera.overrideAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [
|
||||||
|
boost
|
||||||
|
nlohmann_json
|
||||||
|
];
|
||||||
|
nativeBuildInputs = old.nativeBuildInputs ++ [ python3Packages.pybind11 ];
|
||||||
|
|
||||||
|
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
|
||||||
|
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./patches/libcamera-installed.patch
|
||||||
|
./patches/libcamera-no-timeout.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch =
|
||||||
|
old.postPatch
|
||||||
|
+ ''
|
||||||
|
patchShebangs src/py/libcamera
|
||||||
|
'';
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
ninja src/ipa-priv-key.pem
|
||||||
|
install -D ${./libcamera-rpi-ipa-priv-key.pem} src/ipa-priv-key.pem
|
||||||
|
'';
|
||||||
|
|
||||||
|
mesonFlags = old.mesonFlags ++ [
|
||||||
|
"--buildtype=release"
|
||||||
|
"-Dcam=disabled"
|
||||||
|
"-Dgstreamer=disabled"
|
||||||
|
"-Dipas=rpi/vc4,rpi/pisp"
|
||||||
|
"-Dpipelines=rpi/vc4,rpi/pisp"
|
||||||
|
"-Dtest=false"
|
||||||
|
];
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "raspberrypi";
|
||||||
|
repo = "libcamera";
|
||||||
|
rev = "d83ff0a4ae4503bc56b7ed48cd142c3dd423ad3b";
|
||||||
|
sha256 = "sha256-VP0s1jOON9J3gn81aiemsChvGeqx0PPivQF5rmSga6M=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ git ];
|
||||||
|
|
||||||
|
postFetch = ''
|
||||||
|
cd "$out"
|
||||||
|
|
||||||
|
export NIX_SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||||
|
|
||||||
|
${lib.getExe meson} subprojects download \
|
||||||
|
libpisp
|
||||||
|
|
||||||
|
find subprojects -type d -name .git -prune -execdir rm -r {} +
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
53
pkgs/libcamera-rpi/patches/libcamera-installed.patch
Normal file
53
pkgs/libcamera-rpi/patches/libcamera-installed.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From e65bbb6e263d99212cd29a32d89e4c45d0c05353 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jordan Holt <jordan@vimium.com>
|
||||||
|
Date: Sat, 21 Jun 2025 18:38:38 +0100
|
||||||
|
Subject: [PATCH] libcamera installed
|
||||||
|
|
||||||
|
---
|
||||||
|
src/libcamera/source_paths.cpp | 9 ---------
|
||||||
|
src/py/libcamera/meson.build | 4 ++--
|
||||||
|
2 files changed, 2 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libcamera/source_paths.cpp b/src/libcamera/source_paths.cpp
|
||||||
|
index 1af5386a..3fc7d044 100644
|
||||||
|
--- a/src/libcamera/source_paths.cpp
|
||||||
|
+++ b/src/libcamera/source_paths.cpp
|
||||||
|
@@ -39,15 +39,6 @@ namespace {
|
||||||
|
*/
|
||||||
|
bool isLibcameraInstalled()
|
||||||
|
{
|
||||||
|
- /*
|
||||||
|
- * DT_RUNPATH (DT_RPATH when the linker uses old dtags) is removed on
|
||||||
|
- * install.
|
||||||
|
- */
|
||||||
|
- for (const ElfW(Dyn) *dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) {
|
||||||
|
- if (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH)
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
|
||||||
|
index 596a203c..c0b1db59 100644
|
||||||
|
--- a/src/py/libcamera/meson.build
|
||||||
|
+++ b/src/py/libcamera/meson.build
|
||||||
|
@@ -34,14 +34,14 @@ gen_py_controls = files('gen-py-controls.py')
|
||||||
|
pycamera_sources += custom_target('py_gen_controls',
|
||||||
|
input : controls_files,
|
||||||
|
output : ['py_controls_generated.cpp'],
|
||||||
|
- command : [gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@',
|
||||||
|
+ command : ['python3', gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@',
|
||||||
|
'-t', gen_py_controls_template, '@INPUT@'],
|
||||||
|
env : py_build_env)
|
||||||
|
|
||||||
|
pycamera_sources += custom_target('py_gen_properties',
|
||||||
|
input : properties_files,
|
||||||
|
output : ['py_properties_generated.cpp'],
|
||||||
|
- command : [gen_py_controls, '--mode', 'properties', '-o', '@OUTPUT@',
|
||||||
|
+ command : ['python3', gen_py_controls, '--mode', 'properties', '-o', '@OUTPUT@',
|
||||||
|
'-t', gen_py_controls_template, '@INPUT@'],
|
||||||
|
env : py_build_env)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.49.0
|
29
pkgs/libcamera-rpi/patches/libcamera-no-timeout.patch
Normal file
29
pkgs/libcamera-rpi/patches/libcamera-no-timeout.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 98918c4efdcf03701908bb756f252ba11b59490b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jordan Holt <jordan@vimium.com>
|
||||||
|
Date: Sat, 21 Jun 2025 18:41:54 +0100
|
||||||
|
Subject: [PATCH] libcamera no timeout
|
||||||
|
|
||||||
|
---
|
||||||
|
src/libcamera/ipc_pipe_unixsocket.cpp | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp
|
||||||
|
index 668ec73b..faf7e2a5 100644
|
||||||
|
--- a/src/libcamera/ipc_pipe_unixsocket.cpp
|
||||||
|
+++ b/src/libcamera/ipc_pipe_unixsocket.cpp
|
||||||
|
@@ -130,11 +130,13 @@ int IPCPipeUnixSocket::call(const IPCUnixSocket::Payload &message,
|
||||||
|
/* \todo Make this less dangerous, see IPCPipe::sendSync() */
|
||||||
|
timeout.start(2000ms);
|
||||||
|
while (!iter->second.done) {
|
||||||
|
+ #if 0
|
||||||
|
if (!timeout.isRunning()) {
|
||||||
|
LOG(IPCPipe, Error) << "Call timeout!";
|
||||||
|
callData_.erase(iter);
|
||||||
|
return -ETIMEDOUT;
|
||||||
|
}
|
||||||
|
+ #endif
|
||||||
|
|
||||||
|
Thread::current()->eventDispatcher()->processEvents();
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.49.0
|
@ -1,58 +1,68 @@
|
|||||||
{
|
{
|
||||||
stdenv,
|
stdenv,
|
||||||
|
callPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
makeWrapper,
|
||||||
meson,
|
meson,
|
||||||
ninja,
|
ninja,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
boost,
|
boost,
|
||||||
ffmpeg,
|
ffmpeg-headless,
|
||||||
libcamera,
|
|
||||||
libdrm,
|
libdrm,
|
||||||
|
libepoxy,
|
||||||
libexif,
|
libexif,
|
||||||
libjpeg,
|
libjpeg,
|
||||||
libpng,
|
libpng,
|
||||||
libtiff,
|
libtiff,
|
||||||
lib,
|
libX11,
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
libcamera-rpi = callPackage (import ../libcamera-rpi/package.nix) { };
|
||||||
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "rpicam-apps";
|
pname = "rpicam-apps";
|
||||||
version = "1.4.1";
|
version = "1.7.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "raspberrypi";
|
owner = "raspberrypi";
|
||||||
repo = "rpicam-apps";
|
repo = "rpicam-apps";
|
||||||
rev = "v" + finalAttrs.version;
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-3NG2ZE/Ub3lTbfne0LCXuDgLGTPaAAADRdElEbZwvls=";
|
hash = "sha256-79qpAfY83YOZdM5ZPyIOkg3s7x75hvjG6Cc96UAIdb0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
boost
|
||||||
|
ffmpeg-headless
|
||||||
|
libcamera-rpi
|
||||||
|
libdrm
|
||||||
|
libepoxy # GLES/EGL preview window
|
||||||
|
libexif
|
||||||
|
libjpeg
|
||||||
|
libpng
|
||||||
|
libtiff
|
||||||
|
libX11
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
# See all options here: https://github.com/raspberrypi/rpicam-apps/blob/main/meson_options.txt
|
||||||
boost
|
mesonFlags = [
|
||||||
ffmpeg
|
"-Denable_drm=disabled"
|
||||||
libcamera
|
"-Denable_egl=disabled"
|
||||||
libdrm
|
"-Denable_hailo=disabled"
|
||||||
libexif
|
"-Denable_qt=disabled"
|
||||||
libjpeg
|
"-Denable_libav=disabled"
|
||||||
libpng
|
|
||||||
libtiff
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Meson is no longer able to pick up Boost automatically:
|
postInstall = ''
|
||||||
# https://github.com/NixOS/nixpkgs/issues/86131
|
for f in rpicam-hello rpicam-jpeg rpicam-raw rpicam-still rpicam-vid
|
||||||
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
|
do
|
||||||
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
|
wrapProgram $out/bin/$f --set-default LIBCAMERA_IPA_PROXY_PATH ${libcamera-rpi}/libexec/libcamera
|
||||||
|
done
|
||||||
meta = with lib; {
|
'';
|
||||||
description = ''
|
|
||||||
libcamera-based applications to drive the cameras on a Raspberry Pi platform
|
|
||||||
'';
|
|
||||||
homepage = "https://github.com/raspberrypi/rpicam-apps";
|
|
||||||
license = licenses.bsd2;
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
From 18efb9b5c8e562b169425f6ba79977e52e8b91b9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pavel Sobolev <paveloomm@gmail.com>
|
|
||||||
Date: Sat, 13 Jan 2024 12:49:45 +0000
|
|
||||||
Subject: [PATCH] Ensure the default config file is writable.
|
|
||||||
|
|
||||||
---
|
|
||||||
streamrip/config.py | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/streamrip/config.py b/streamrip/config.py
|
|
||||||
index 7ee2f57..88a5fef 100644
|
|
||||||
--- a/streamrip/config.py
|
|
||||||
+++ b/streamrip/config.py
|
|
||||||
@@ -378,6 +378,9 @@ def set_user_defaults(path: str, /):
|
|
||||||
"""Update the TOML file at the path with user-specific default values."""
|
|
||||||
shutil.copy(BLANK_CONFIG_PATH, path)
|
|
||||||
|
|
||||||
+ # Ensure the default config file is writable
|
|
||||||
+ os.chmod(path, 0o644)
|
|
||||||
+
|
|
||||||
with open(path) as f:
|
|
||||||
toml = parse(f.read())
|
|
||||||
toml["downloads"]["folder"] = DEFAULT_DOWNLOADS_FOLDER # type: ignore
|
|
||||||
--
|
|
||||||
2.42.0
|
|
@ -1,78 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
python3Packages,
|
|
||||||
fetchFromGitHub,
|
|
||||||
|
|
||||||
ffmpeg,
|
|
||||||
}:
|
|
||||||
|
|
||||||
python3Packages.buildPythonApplication {
|
|
||||||
pname = "streamrip";
|
|
||||||
version = "2.0.7";
|
|
||||||
pyproject = true;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "nathom";
|
|
||||||
repo = "streamrip";
|
|
||||||
rev = "46b570dbb6f81d604cbaa3bfa379463e0a20a841";
|
|
||||||
hash = "sha256-LD99OjguaBnrQxCwmCeHvmBMq5aOfobwnMd5/aCRZW8=";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./ensure-the-default-config-file-is-writable.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = with python3Packages; [
|
|
||||||
poetry-core
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
|
||||||
aiodns
|
|
||||||
aiofiles
|
|
||||||
aiohttp
|
|
||||||
aiolimiter
|
|
||||||
appdirs
|
|
||||||
cleo
|
|
||||||
click-help-colors
|
|
||||||
deezer-py
|
|
||||||
m3u8
|
|
||||||
mutagen
|
|
||||||
pathvalidate
|
|
||||||
pillow
|
|
||||||
pycryptodomex
|
|
||||||
pytest-asyncio
|
|
||||||
pytest-mock
|
|
||||||
rich
|
|
||||||
simple-term-menu
|
|
||||||
tomlkit
|
|
||||||
tqdm
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeCheckInputs = with python3Packages; [
|
|
||||||
pytestCheckHook
|
|
||||||
];
|
|
||||||
|
|
||||||
prePatch = ''
|
|
||||||
sed -i 's#aiofiles = ".*"#aiofiles = "*"#' pyproject.toml
|
|
||||||
sed -i 's#deezer-py = ".*"#deezer-py = "*"#' pyproject.toml
|
|
||||||
sed -i 's#m3u8 = ".*"#m3u8 = "*"#' pyproject.toml
|
|
||||||
sed -i 's#pathvalidate = ".*"#pathvalidate = "*"#' pyproject.toml
|
|
||||||
sed -i 's#Pillow = ".*"#Pillow = "*"#' pyproject.toml
|
|
||||||
sed -i 's#pytest-asyncio = ".*"#pytest-asyncio = "*"#' pyproject.toml
|
|
||||||
sed -i 's#tomlkit = ".*"#tomlkit = "*"#' pyproject.toml
|
|
||||||
|
|
||||||
sed -i 's#"ffmpeg"#"${lib.getBin ffmpeg}/bin/ffmpeg"#g' streamrip/client/downloadable.py
|
|
||||||
'';
|
|
||||||
|
|
||||||
preCheck = ''
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer";
|
|
||||||
homepage = "https://github.com/nathom/streamrip";
|
|
||||||
license = licenses.gpl3Only;
|
|
||||||
maintainers = with maintainers; [ paveloom ];
|
|
||||||
mainProgram = "rip";
|
|
||||||
};
|
|
||||||
}
|
|
17
users/jordan/common/optional/graphical/fonts.nix
Normal file
17
users/jordan/common/optional/graphical/fonts.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
adwaita-fonts
|
||||||
|
apple-color-emoji
|
||||||
|
corefonts
|
||||||
|
nerd-fonts.bigblue-terminal
|
||||||
|
nerd-fonts.comic-shanns-mono
|
||||||
|
nerd-fonts.terminess-ttf
|
||||||
|
nerd-fonts.ubuntu-mono
|
||||||
|
sf-pro
|
||||||
|
];
|
||||||
|
}
|
@ -58,8 +58,13 @@ in
|
|||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.unstable.hyprland;
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
# plugins = [ hypr-dynamic-cursors ]; # https://github.com/VirtCode/hypr-dynamic-cursors
|
portalPackage =
|
||||||
|
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||||
|
plugins = [
|
||||||
|
pkgs.unstable.hyprlandPlugins.hyprbars
|
||||||
|
pkgs.unstable.hyprlandPlugins.hypr-dynamic-cursors
|
||||||
|
];
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general = {
|
||||||
gaps_in = 5;
|
gaps_in = 5;
|
||||||
@ -71,6 +76,22 @@ in
|
|||||||
layout = "dwindle";
|
layout = "dwindle";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugin = {
|
||||||
|
dynamic-cursors = {
|
||||||
|
enabled = true;
|
||||||
|
mode = "none";
|
||||||
|
shake = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprbars = {
|
||||||
|
enabled = true;
|
||||||
|
bar_height = 20;
|
||||||
|
bar_blur = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
dwindle = {
|
dwindle = {
|
||||||
pseudotile = true;
|
pseudotile = true;
|
||||||
preserve_split = true;
|
preserve_split = true;
|
||||||
@ -226,10 +247,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fontconfig.defaultFonts.sansSerif = [
|
|
||||||
"SF Pro Text"
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.configFile = mkIf osConfig.programs.hyprland.withUWSM {
|
xdg.configFile = mkIf osConfig.programs.hyprland.withUWSM {
|
||||||
"Kvantum/kvantum.kvconfig".text = toINI { } {
|
"Kvantum/kvantum.kvconfig".text = toINI { } {
|
||||||
General.theme = "KvLibadwaitaDark";
|
General.theme = "KvLibadwaitaDark";
|
||||||
@ -243,37 +260,32 @@ in
|
|||||||
) hyprVariables;
|
) hyprVariables;
|
||||||
};
|
};
|
||||||
|
|
||||||
stylix = {
|
home.pointerCursor = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoEnable = false;
|
gtk.enable = true;
|
||||||
image = osConfig.lib.stylix.pixel "base00";
|
name = "macOS";
|
||||||
polarity = "dark";
|
package = pkgs.apple-cursor;
|
||||||
|
size = 28;
|
||||||
|
};
|
||||||
|
|
||||||
# colors, dracula, eris, google-dark, framer, horizon-terminal-dark, humanoid-dark, isotope, onedark-dark, spacemacs, windows-nt
|
gtk = {
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-dark.yaml";
|
enable = true;
|
||||||
|
|
||||||
cursor = {
|
|
||||||
name = "macOS";
|
|
||||||
package = pkgs.apple-cursor;
|
|
||||||
size = 28;
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts = {
|
|
||||||
sansSerif = {
|
|
||||||
name = "SF Pro Text";
|
|
||||||
package = pkgs.sf-pro;
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
name = "Apple Color Emoji";
|
|
||||||
package = pkgs.apple-color-emoji;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
enable = true;
|
name = "MoreWaita";
|
||||||
package = pkgs.unstable.morewaita-icon-theme;
|
package = pkgs.unstable.morewaita-icon-theme;
|
||||||
dark = "MoreWaita";
|
};
|
||||||
light = "MoreWaita";
|
};
|
||||||
|
|
||||||
|
fonts.fontconfig = {
|
||||||
|
enable = true;
|
||||||
|
defaultFonts = {
|
||||||
|
sansSerif = [
|
||||||
|
"Adwaita Sans"
|
||||||
|
];
|
||||||
|
emoji = [
|
||||||
|
"Apple Color Emoji"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,9 +6,13 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common/optional/graphical/firefox.nix
|
./common/optional/graphical/firefox.nix
|
||||||
./common/optional/graphical/gnome.nix
|
./common/optional/graphical/fonts.nix
|
||||||
|
./common/optional/graphical/hyprland
|
||||||
|
./common/optional/graphical/mimeapps.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.nh.enable = true;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
jellyfin-media-player
|
jellyfin-media-player
|
||||||
];
|
];
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common/optional/graphical/firefox.nix
|
./common/optional/graphical/firefox.nix
|
||||||
|
./common/optional/graphical/fonts.nix
|
||||||
./common/optional/graphical/gnome.nix
|
./common/optional/graphical/gnome.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common/optional/graphical/firefox.nix
|
./common/optional/graphical/firefox.nix
|
||||||
|
./common/optional/graphical/fonts.nix
|
||||||
./common/optional/graphical/hyprland
|
./common/optional/graphical/hyprland
|
||||||
./common/optional/graphical/libreoffice.nix
|
./common/optional/graphical/libreoffice.nix
|
||||||
./common/optional/graphical/mimeapps.nix
|
./common/optional/graphical/mimeapps.nix
|
||||||
|
Reference in New Issue
Block a user