1 Commits

Author SHA1 Message Date
17b924c84e Update deployment hostnames
Some checks failed
Check flake / build-amd64-linux (push) Failing after 2m13s
2024-08-09 21:54:55 +01:00
40 changed files with 221 additions and 497 deletions

86
flake.lock generated
View File

@@ -8,11 +8,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1723293904, "lastModified": 1722339003,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", "narHash": "sha256-ZeS51uJI30ehNkcZ4uKqT4ZDARPyqrHADSKAwv5vVCU=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", "rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -66,11 +66,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1727447169, "lastModified": 1718194053,
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=", "narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
"owner": "serokell", "owner": "serokell",
"repo": "deploy-rs", "repo": "deploy-rs",
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76", "rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -107,11 +107,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727359191, "lastModified": 1723080788,
"narHash": "sha256-5PltTychnExFwzpEnY3WhOywaMV/M6NxYI/y3oXuUtw=", "narHash": "sha256-C5LbM5VMdcolt9zHeLQ0bYMRjUL+N+AL5pK7/tVTdes=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "67dc29be3036cc888f0b9d4f0a788ee0f6768700", "rev": "ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -206,11 +206,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1725234343, "lastModified": 1722555600,
"narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -233,11 +233,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1724857454, "lastModified": 1722857853,
"narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=", "narHash": "sha256-3Zx53oz/MSIyevuWO/SumxABkrIvojnB7g9cimxkhiE=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6", "rev": "06939f6b7ec4d4f465bf3132a05367cccbbf64da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -313,11 +313,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726989464, "lastModified": 1720042825,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -373,11 +373,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1725189302, "lastModified": 1722924007,
"narHash": "sha256-IhXok/kwQqtusPsoguQLCHA+h6gKvgdCrkhIaN+kByA=", "narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "7c4b53a7d9f3a3df902b3fddf2ae245ef20ebcda", "rev": "91010a5613ffd7ee23ee9263213157a1c422b705",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -388,11 +388,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1727437159, "lastModified": 1723149858,
"narHash": "sha256-v4qLwEw5OmprgQZTT7KZMNU7JjXJzRypw8+Cw6++fWk=", "narHash": "sha256-3u51s7jdhavmEL1ggtd8wqrTH2clTy5yaZmhLvAXTqc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "d830ad47cc992b4a46b342bbc79694cbd0e980b2", "rev": "107bb46eef1f05e86fc485ee8af9b637e5157988",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -459,11 +459,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1727122398, "lastModified": 1722813957,
"narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=", "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093", "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -490,11 +490,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1727264057, "lastModified": 1722987190,
"narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "narHash": "sha256-68hmex5efCiM2aZlAAEcQgmFI4ZwWt8a80vOeB/5w3A=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "rev": "21cc704b5e918c5fbf4f9fff22b4ac2681706d90",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -517,11 +517,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1725350106, "lastModified": 1722925293,
"narHash": "sha256-TaMMlI2KPJ3wCyxJk6AShOLhNuTeabHCnvYRkLBlEFs=", "narHash": "sha256-saXm5dd/e3PMsYTEcp1Qbzifm3KsZtNFkrWjmLhXHGE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "0f2c31e6a57a83ed4e6fa3adc76749620231055d", "rev": "170df9814c3e41d5a4d6e3339e611801b1f02ce2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -541,11 +541,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727210241, "lastModified": 1723232379,
"narHash": "sha256-lufS6uzSbSrggNCSgubymMQWnQMh7PvQ+lRZ8qH9Uoc=", "narHash": "sha256-F4Y3f9305aHGWKqAd3s2GyNRONdpDBuNuK4TCSdaHz8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "plasma-manager", "repo": "plasma-manager",
"rev": "a02fef2ece8084aff0b41700bb57d24d73574cd1", "rev": "22bea90404c5ff6457913a03c1a54a3caa5b1c57",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -576,11 +576,11 @@
"secrets": { "secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1724093899, "lastModified": 1722712220,
"narHash": "sha256-VohYwTIBq7NEssFibuu+HMXXwuCoLmMOmEwQf7sESSI=", "narHash": "sha256-gEmbk/DROfVZ+v/BAZHDloHzS0KdqIzxtW7z9g2eH4Y=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "7f5901bb5d6eeaa94d7e1f18f66093be9df014e4", "rev": "dfe0e95be5ef539bf28602ff47beeea26cc4d1b8",
"revCount": 27, "revCount": 22,
"type": "git", "type": "git",
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git" "url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
}, },
@@ -658,11 +658,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1724833132, "lastModified": 1722330636,
"narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=", "narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "3ffd842a5f50f435d3e603312eefa4790db46af5", "rev": "768acdb06968e53aa1ee8de207fd955335c754b7",
"type": "github" "type": "github"
}, },
"original": { "original": {

135
flake.nix
View File

@@ -51,60 +51,81 @@
}; };
}; };
outputs = inputs @ { self, nixpkgs, ... }: outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, agenix, deploy-rs, disko, home-manager, nixos-hardware, nixos-mailserver, ... }:
let let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
domain = "mesh.vimium.net";
forEverySystem = lib.getAttrs lib.systems.flakeExposed;
forEachSystem = lib.genAttrs [ forEachSystem = lib.genAttrs [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" "aarch64-linux"
]; ];
mkDeployNode = hostName: { mkPkgsForSystem = system: inputs.nixpkgs;
hostname = "${hostName}.${domain}"; customPkgs = forEachSystem (system:
lib.packagesFromDirectoryRecursive {
profiles.system = { callPackage = nixpkgs.legacyPackages.${system}.callPackage;
user = "root"; directory = ./pkgs;
path = inputs.deploy-rs.lib.${self.nixosConfigurations.${hostName}.config.system.build.toplevel.system}.activate.nixos self.nixosConfigurations.${hostName}; });
overlays = [
agenix.overlays.default
(import ./overlays/gnome.nix)
(
final: prev: {
unstable = import inputs.nixpkgs-unstable { system = final.system; };
}
)
];
commonModules = [
agenix.nixosModules.age
disko.nixosModules.disko
nixos-mailserver.nixosModule
home-manager.nixosModule
./modules
];
mkNixosSystem = { system, name, extraModules ? [] }:
let
nixpkgs = mkPkgsForSystem system;
lib = (import nixpkgs { inherit overlays system; }).lib;
in
inputs.nixpkgs.lib.nixosSystem {
inherit lib system;
specialArgs = { modulesPath = toString (nixpkgs + "/nixos/modules"); inherit inputs; };
baseModules = import (nixpkgs + "/nixos/modules/module-list.nix");
modules = commonModules ++ [
({ config, ... }:
{
nixpkgs.pkgs = import nixpkgs {
inherit overlays system;
config.allowUnfree = true;
config.nvidia.acceptLicense = true;
};
networking.hostName = name;
})
./hosts/${name}
] ++ extraModules;
}; };
};
in in
{ {
overlays = lib.packagesFromDirectoryRecursive {
callPackage = path: overrides: import path;
directory = ./overlays;
};
legacyPackages = forEachSystem (system: legacyPackages = forEachSystem (system:
lib.packagesFromDirectoryRecursive { lib.packagesFromDirectoryRecursive {
callPackage = nixpkgs.legacyPackages.${system}.callPackage; callPackage = nixpkgs.legacyPackages.${system}.callPackage;
directory = ./pkgs; directory = ./pkgs;
}); });
nixosConfigurations = lib.pipe ./hosts [ nixosConfigurations = {
builtins.readDir atlas = mkNixosSystem { system = "x86_64-linux"; name = "atlas"; };
(lib.filterAttrs (name: value: value == "directory")) eos = mkNixosSystem { system = "x86_64-linux"; name = "eos"; };
(lib.mapAttrs (name: value: helios = mkNixosSystem { system = "x86_64-linux"; name = "helios"; };
lib.nixosSystem { hypnos = mkNixosSystem { system = "x86_64-linux"; name = "hypnos"; };
specialArgs = { inherit self; }; library = mkNixosSystem { system = "x86_64-linux"; name = "library"; };
mail = mkNixosSystem { system = "x86_64-linux"; name = "mail"; };
modules = [ odyssey = mkNixosSystem { system = "x86_64-linux"; name = "odyssey"; };
{ pi = mkNixosSystem { system = "aarch64-linux"; name = "pi"; extraModules = [ nixos-hardware.nixosModules.raspberry-pi-4 ]; };
networking = { skycam = mkNixosSystem { system = "aarch64-linux"; name = "skycam"; extraModules = [ nixos-hardware.nixosModules.raspberry-pi-4 ]; };
inherit domain; vps1 = mkNixosSystem { system = "x86_64-linux"; name = "vps1"; };
hostName = name; };
};
}
./hosts/${name}
];
}))
];
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell { devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
buildInputs = [ buildInputs = [
inputs.agenix.packages.x86_64-linux.agenix deploy-rs.packages.x86_64-linux.deploy-rs
inputs.deploy-rs.packages.x86_64-linux.deploy-rs
]; ];
}; };
@@ -112,15 +133,43 @@
magicRollback = true; magicRollback = true;
autoRollback = true; autoRollback = true;
sshUser = "root"; sshUser = "root";
nodes = lib.genAttrs [ nodes = {
"mail" mail = {
# "pi" hostname = "mail.mesh.vimium.net";
# "skycam"
"vps1" profiles.system = {
] mkDeployNode; user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mail;
};
};
vps1 = {
hostname = "vps1.mesh.vimium.net";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.vps1;
};
};
pi = {
hostname = "pi.mesh.vimium.net";
profiles.system = {
user = "root";
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.pi;
};
};
skycam = {
hostname = "skycam.mesh.vimium.net";
profiles.system = {
user = "root";
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.skycam;
};
};
};
}; };
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib; checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
}; };
} }

View File

@@ -1,4 +1,4 @@
{ config, ... }: { config, lib, ... }:
{ {
imports = [ imports = [
@@ -6,8 +6,6 @@
../desktop.nix ../desktop.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;

View File

@@ -1,22 +1,6 @@
{ config, pkgs, self, ... }: { config, pkgs, ... }:
{ {
imports = [
self.inputs.agenix.nixosModules.age
self.inputs.home-manager.nixosModule
../modules
];
nixpkgs.overlays = [
self.inputs.agenix.overlays.default
(import ../overlays/default.nix)
(
final: prev: {
unstable = import self.inputs.nixpkgs-unstable { system = final.system; };
}
)
];
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";

View File

@@ -1,14 +1,10 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ imports = [
./common.nix ./common.nix
]; ];
nixpkgs.overlays = [
(import ../overlays/gnome.nix)
];
services.printing.enable = true; services.printing.enable = true;
services.openssh.startWhenNeeded = true; services.openssh.startWhenNeeded = true;

View File

@@ -1,4 +1,4 @@
{ config, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ imports = [
@@ -6,8 +6,6 @@
../desktop.nix ../desktop.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;

View File

@@ -7,12 +7,11 @@
boot = { boot = {
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
initrd.kernelModules = [ ];
initrd.supportedFilesystems = [ "zfs" ]; initrd.supportedFilesystems = [ "zfs" ];
kernel.sysctl = { kernelModules = [ ];
"kernel.nmi_watchdog" = 0;
"vm.laptop_mode" = 5;
};
kernelParams = [ "elevator=none" ]; kernelParams = [ "elevator=none" ];
extraModulePackages = [ ];
supportedFilesystems = [ "zfs" ]; supportedFilesystems = [ "zfs" ];
}; };

View File

@@ -1,4 +1,4 @@
{ config, ... }: { config, lib, pkgs, inputs, ... }:
{ {
imports = [ imports = [
@@ -6,8 +6,6 @@
../desktop.nix ../desktop.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
boot = { boot = {
loader.grub = { loader.grub = {
enable = true; enable = true;

View File

@@ -1,21 +1,12 @@
{ config, lib, self, ... }: { config, lib, ... }:
{ {
imports = [ imports = [
self.inputs.disko.nixosModules.disko
./hardware-configuration.nix ./hardware-configuration.nix
./disko-config.nix ./disko-config.nix
../desktop.nix ../desktop.nix
]; ];
nixpkgs = {
hostPlatform = "x86_64-linux";
config = {
allowUnfree = true;
nvidia.acceptLicense = true;
};
};
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;

View File

@@ -7,10 +7,6 @@
boot = { boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
kernel.sysctl = {
"kernel.nmi_watchdog" = 0;
"vm.laptop_mode" = 5;
};
kernelModules = [ "applesmc" "kvm-intel" "wl" ]; kernelModules = [ "applesmc" "kvm-intel" "wl" ];
extraModulePackages = [ extraModulePackages = [
config.boot.kernelPackages.broadcom_sta config.boot.kernelPackages.broadcom_sta

View File

@@ -6,8 +6,6 @@
../server.nix ../server.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
boot = { boot = {
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
@@ -15,6 +13,7 @@
}; };
networking = { networking = {
domain = "mesh.vimium.net";
hostId = "d24ae953"; hostId = "d24ae953";
firewall = { firewall = {
enable = true; enable = true;

View File

@@ -1,17 +1,15 @@
{ config, lib, self, ... }: { config, lib, pkgs, inputs, ... }:
{ {
imports = [ imports = [
self.inputs.disko.nixosModules.disko
./hardware-configuration.nix ./hardware-configuration.nix
./disko-config.nix ./disko-config.nix
../server.nix ../server.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
networking = { networking = {
hostId = "08ac2f14"; hostId = "08ac2f14";
domain = "mesh.vimium.net";
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [

View File

@@ -1,4 +1,4 @@
{ config, ... }: { config, lib, pkgs, inputs, ... }:
{ {
imports = [ imports = [
@@ -6,14 +6,6 @@
../desktop.nix ../desktop.nix
]; ];
nixpkgs = {
hostPlatform = "x86_64-linux";
config = {
allowUnfree = true;
nvidia.acceptLicense = true;
};
};
boot.loader = { boot.loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = true;

View File

@@ -1,13 +1,12 @@
{ config, lib, pkgs, self, ... }: { config, lib, pkgs, inputs, ... }:
{ {
imports = [ imports = [
self.inputs.nixos-hardware.nixosModules.raspberry-pi-4
./hardware-configuration.nix ./hardware-configuration.nix
../server.nix ../server.nix
]; ];
nixpkgs.hostPlatform = "aarch64-linux"; networking.hostId = "731d1660";
hardware = { hardware = {
raspberry-pi."4" = { raspberry-pi."4" = {
@@ -98,8 +97,6 @@
]; ];
}; };
networking.hostId = "731d1660";
sound.enable = true; sound.enable = true;
security.rtkit.enable = true; security.rtkit.enable = true;
@@ -111,7 +108,7 @@
}; };
age.secrets."files/services/home-assistant/secrets.yaml" = { age.secrets."files/services/home-assistant/secrets.yaml" = {
file = "${self.inputs.secrets}/files/services/home-assistant/secrets.yaml.age"; file = "${inputs.secrets}/files/services/home-assistant/secrets.yaml.age";
path = "${config.services.home-assistant.configDir}/secrets.yaml"; path = "${config.services.home-assistant.configDir}/secrets.yaml";
owner = "hass"; owner = "hass";
group = "hass"; group = "hass";
@@ -176,7 +173,7 @@
}; };
age.secrets."files/services/zigbee2mqtt/secret.yaml" = { age.secrets."files/services/zigbee2mqtt/secret.yaml" = {
file = "${self.inputs.secrets}/files/services/zigbee2mqtt/secret.yaml.age"; file = "${inputs.secrets}/files/services/zigbee2mqtt/secret.yaml.age";
path = "${config.services.zigbee2mqtt.dataDir}/secret.yaml"; path = "${config.services.zigbee2mqtt.dataDir}/secret.yaml";
owner = "zigbee2mqtt"; owner = "zigbee2mqtt";
group = "zigbee2mqtt"; group = "zigbee2mqtt";

View File

@@ -1,14 +1,11 @@
{ config, lib, pkgs, self, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ imports = [
self.inputs.nixos-hardware.nixosModules.raspberry-pi-4
./hardware-configuration.nix ./hardware-configuration.nix
../server.nix ../server.nix
]; ];
nixpkgs.hostPlatform = "aarch64-linux";
hardware = { hardware = {
raspberry-pi."4" = { raspberry-pi."4" = {
apply-overlays-dtmerge.enable = true; apply-overlays-dtmerge.enable = true;
@@ -49,13 +46,11 @@
}; };
services.udev.extraRules = '' services.udev.extraRules = ''
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660" SUBSYSTEM="dma_heap", GROUP="video", MODE="0600"
KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"
''; '';
nixpkgs.overlays = [ nixpkgs.overlays = [
(import ./../../overlays/libcamera.nix) (import ./../overlays/libcamera.nix)
]; ];
networking = { networking = {
@@ -87,8 +82,6 @@
--host=0.0.0.0 \ --host=0.0.0.0 \
--resolution=4608x2592 --resolution=4608x2592
''; '';
DynamicUser = "yes";
SupplementaryGroups = [ "video" ];
Restart = "always"; Restart = "always";
RestartSec = 10; RestartSec = 10;
}; };
@@ -97,7 +90,6 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
camera-streamer
git git
neovim neovim
libcamera libcamera

View File

@@ -1,4 +1,7 @@
{ config, pkgs, lib, ... }: {
lib,
...
}:
{ {
imports = [ imports = [
@@ -6,10 +9,9 @@
../server.nix ../server.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux";
networking = { networking = {
hostId = "08bf6db3"; hostId = "08bf6db3";
domain = "mesh.vimium.net";
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [
@@ -37,47 +39,10 @@
groups = { groups = {
jellyfin = { }; jellyfin = { };
}; };
extraGroups.acme.members = [ "kanidm" "nginx" ];
}; };
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password"; services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
security.acme.certs."auth.vimium.com" = {
postRun = "systemctl restart kanidm.service";
group = "acme";
};
services.kanidm = let
baseDomain = "vimium.com";
domain = "auth.${baseDomain}";
uri = "https://${domain}";
in {
package = pkgs.unstable.kanidm;
enableClient = true;
enableServer = true;
clientSettings = {
inherit uri;
};
serverSettings = {
bindaddress = "[::1]:3013";
ldapbindaddress = "[::1]:636";
domain = baseDomain;
origin = uri;
tls_chain = "${config.security.acme.certs.${domain}.directory}/full.pem";
tls_key = "${config.security.acme.certs.${domain}.directory}/key.pem";
};
};
services.nginx.virtualHosts = {
"auth.vimium.com" = {
useACMEHost = "auth.vimium.com";
forceSSL = true;
locations."/" = {
proxyPass = "https://[::1]:3013";
};
};
};
modules = rec { modules = rec {
databases.postgresql.enable = true; databases.postgresql.enable = true;
services = { services = {

View File

@@ -32,7 +32,6 @@
./editors/neovim ./editors/neovim
./editors/vscode.nix ./editors/vscode.nix
./hardware/presonus-studio.nix ./hardware/presonus-studio.nix
./networking/netbird.nix
./networking/tailscale.nix ./networking/tailscale.nix
./networking/wireless.nix ./networking/wireless.nix
./security/gpg.nix ./security/gpg.nix
@@ -43,7 +42,6 @@
./services/gitea ./services/gitea
./services/gitea-runner ./services/gitea-runner
./services/headscale ./services/headscale
./services/immich
./services/mail ./services/mail
./services/matrix ./services/matrix
./services/nginx ./services/nginx

View File

@@ -1,4 +1,4 @@
{ config, lib, self, ... }: { config, lib, pkgs, inputs, ... }:
let cfg = config.modules.desktop.apps.thunderbird; let cfg = config.modules.desktop.apps.thunderbird;
in { in {
@@ -10,7 +10,7 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = self.inputs.thunderbird-gnome-theme; home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = inputs.thunderbird-gnome-theme;
home.programs.thunderbird = { home.programs.thunderbird = {
enable = true; enable = true;

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, inputs, ... }:
let cfg = config.modules.desktop.browsers.brave; let cfg = config.modules.desktop.browsers.brave;
in { in {

View File

@@ -1,4 +1,4 @@
{ config, lib, self, ... }: { config, lib, inputs, ... }:
let cfg = config.modules.desktop.browsers.firefox; let cfg = config.modules.desktop.browsers.firefox;
in { in {
@@ -10,7 +10,7 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = self.inputs.firefox-gnome-theme; home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
home.programs.firefox = { home.programs.firefox = {
enable = true; enable = true;

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, self, ... }: { config, inputs, lib, pkgs, ... }:
let cfg = config.modules.desktop.gnome; let cfg = config.modules.desktop.gnome;
in { in {
@@ -207,7 +207,7 @@ in {
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} { "Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
General.theme = "KvLibadwaitaDark"; General.theme = "KvLibadwaitaDark";
}; };
"Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita"; "Kvantum/KvLibadwaita".source = "${inputs.kvlibadwaita}/src/KvLibadwaita";
}; };
user.packages = with pkgs; [ user.packages = with pkgs; [

View File

@@ -1,70 +0,0 @@
{ config, lib, self, ... }:
let
cfg = config.modules.networking.netbird;
hostname = config.networking.hostName;
in {
options.modules.networking.netbird = {
enable = lib.mkEnableOption "netbird";
coordinatorDomain = lib.mkOption {
type = lib.types.str;
default = "netbird.vimium.net";
};
meshDomain = lib.mkOption {
type = lib.types.str;
default = "mesh.vimium.net";
};
};
config = lib.mkIf cfg.enable {
age.secrets."passwords/services/netbird/data-store-encryption-key" = {
file = "${self.inputs.secrets}/passwords/services/netbird/data-store-encryption-key.age";
};
services.netbird = {
enable = true;
};
services.netbird.server = {
domain = cfg.coordinatorDomain;
enable = true;
enableNginx = true;
dashboard.settings = {
AUTH_AUTHORITY = "https://auth.vimium.com/oauth2/openid/netbird";
};
management = rec {
disableAnonymousMetrics = true;
dnsDomain = cfg.meshDomain;
oidcConfigEndpoint = "https://auth.vimium.com/oauth2/openid/netbird/.well-known/openid-configuration";
settings = {
DataStoreEncryptionKey = {
_secret = config.age.secrets."passwords/services/netbird/data-store-encryption-key".path;
};
HttpConfig = {
AuthAudience = "netbird";
};
StoreConfig = { Engine = "sqlite"; };
TURNConfig = {
Secret._secret = config.age.secrets."passwords/services/coturn/static-auth-secret".path;
TimeBasedCredentials = true;
};
PKCEAuthorizationFlow.ProviderConfig = {
AuthorizationEndpoint = "https://auth.vimium.com/ui/oauth2";
TokenEndpoint = "https://auth.vimium.com/oauth2/token";
};
};
singleAccountModeDomain = dnsDomain;
turnDomain = config.services.coturn.realm;
turnPort = config.services.coturn.listening-port;
};
};
systemd.services.netbird-signal.serviceConfig.RestartSec = "60";
systemd.services.netbird-management.serviceConfig.RestartSec = "60";
services.nginx.virtualHosts."netbird.vimium.net" = {
enableACME = true;
forceSSL = true;
};
};
}

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, self, ... }: { config, inputs, lib, pkgs, ... }:
let let
cfg = config.modules.networking.tailscale; cfg = config.modules.networking.tailscale;
@@ -18,7 +18,7 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets."passwords/services/tailscale/${hostname}-authkey" = { age.secrets."passwords/services/tailscale/${hostname}-authkey" = {
file = "${self.inputs.secrets}/passwords/services/tailscale/${hostname}-authkey.age"; file = "${inputs.secrets}/passwords/services/tailscale/${hostname}-authkey.age";
}; };
environment.systemPackages = [ pkgs.tailscale ]; environment.systemPackages = [ pkgs.tailscale ];

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, self, ... }: { config, lib, pkgs, inputs, ... }:
with lib; with lib;
@@ -19,7 +19,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
age.secrets."passwords/networks" = { age.secrets."passwords/networks" = {
file = "${self.inputs.secrets}/passwords/networks.age"; file = "${inputs.secrets}/passwords/networks.age";
}; };
networking = { networking = {

View File

@@ -1,4 +1,4 @@
{ config, options, lib, self, ... }: { config, options, lib, home-manager, inputs, ... }:
with lib; with lib;
{ {
@@ -29,7 +29,7 @@ with lib;
}; };
config = { config = {
age.secrets."passwords/users/jordan".file = "${self.inputs.secrets}/passwords/users/jordan.age"; age.secrets."passwords/users/jordan".file = "${inputs.secrets}/passwords/users/jordan.age";
user = user =
let user = builtins.getEnv "USER"; let user = builtins.getEnv "USER";
name = if elem user [ "" "root" ] then "jordan" else user; name = if elem user [ "" "root" ] then "jordan" else user;
@@ -68,8 +68,8 @@ with lib;
}; };
sharedModules = [ sharedModules = [
self.inputs.nixvim.homeManagerModules.nixvim inputs.nixvim.homeManagerModules.nixvim
self.inputs.plasma-manager.homeManagerModules.plasma-manager inputs.plasma-manager.homeManagerModules.plasma-manager
]; ];
}; };

View File

@@ -1,4 +1,4 @@
{ config, lib, self, ... }: { config, lib, pkgs, inputs, ... }:
let let
cfg = config.modules.services.borgmatic; cfg = config.modules.services.borgmatic;
@@ -27,7 +27,7 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets."passwords/services/borg/${hostname}-passphrase" = { age.secrets."passwords/services/borg/${hostname}-passphrase" = {
file = "${self.inputs.secrets}/passwords/services/borg/${hostname}-passphrase.age"; file = "${inputs.secrets}/passwords/services/borg/${hostname}-passphrase.age";
}; };
services.borgmatic = { services.borgmatic = {

View File

@@ -1,4 +1,9 @@
{ config, lib, self, ... }: {
config,
lib,
inputs,
...
}:
let let
cfg = config.modules.services.coturn; cfg = config.modules.services.coturn;
@@ -49,13 +54,13 @@ in {
age.secrets = { age.secrets = {
"passwords/services/coturn/static-auth-secret" = { "passwords/services/coturn/static-auth-secret" = {
file = "${self.inputs.secrets}/passwords/services/coturn/static-auth-secret.age"; file = "${inputs.secrets}/passwords/services/coturn/static-auth-secret.age";
owner = "turnserver"; owner = "turnserver";
group = "turnserver"; group = "turnserver";
}; };
} // (if cfg.matrixIntegration then { } // (if cfg.matrixIntegration then {
"passwords/services/coturn/matrix-turn-config.yml" = { "passwords/services/coturn/matrix-turn-config.yml" = {
file = "${self.inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age"; file = "${inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age";
owner = "matrix-synapse"; owner = "matrix-synapse";
group = "matrix-synapse"; group = "matrix-synapse";
}; };

View File

@@ -1,4 +1,4 @@
{ pkgs, config, lib, self, ... }: { pkgs, config, lib, inputs, ... }:
# Based on: https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix # Based on: https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix
@@ -176,7 +176,7 @@ in
users.groups.nix-ci-user = { }; users.groups.nix-ci-user = { };
age.secrets."files/services/gitea-runner/${hostname}-token" = { age.secrets."files/services/gitea-runner/${hostname}-token" = {
file = "${self.inputs.secrets}/files/services/gitea-runner/${hostname}-token.age"; file = "${inputs.secrets}/files/services/gitea-runner/${hostname}-token.age";
group = "podman"; group = "podman";
}; };

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, self, ... }: { config, lib, pkgs, inputs, ... }:
let let
cfg = config.modules.services.gitea; cfg = config.modules.services.gitea;
@@ -40,9 +40,9 @@ in {
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d '${config.services.gitea.customDir}/public/assets/css' 0750 ${config.services.gitea.user} ${config.services.gitea.group} - -" "d '${config.services.gitea.customDir}/public/assets/css' 0750 ${config.services.gitea.user} ${config.services.gitea.group} - -"
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github.css' - - - - ${self.inputs.gitea-github-theme}/theme-github.css" "L+ '${config.services.gitea.customDir}/public/assets/css/theme-github.css' - - - - ${inputs.gitea-github-theme}/theme-github.css"
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-auto.css' - - - - ${self.inputs.gitea-github-theme}/theme-github-auto.css" "L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-auto.css' - - - - ${inputs.gitea-github-theme}/theme-github-auto.css"
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-dark.css' - - - - ${self.inputs.gitea-github-theme}/theme-github-dark.css" "L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-dark.css' - - - - ${inputs.gitea-github-theme}/theme-github-dark.css"
]; ];
services.gitea = rec { services.gitea = rec {

View File

@@ -1,17 +1,19 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, inputs, ... }:
with lib;
let let
cfg = config.modules.services.headscale; cfg = config.modules.services.headscale;
fqdn = "headscale.vimium.net"; fqdn = "headscale.vimium.net";
in { in {
options.modules.services.headscale = { options.modules.services.headscale = {
enable = lib.mkOption { enable = mkOption {
default = false; default = false;
example = true; example = true;
}; };
}; };
config = lib.mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.headscale ]; environment.systemPackages = [ pkgs.headscale ];
services.headscale = { services.headscale = {
@@ -20,16 +22,10 @@ in {
port = 8080; port = 8080;
settings = { settings = {
acl_policy_path = null;
ip_prefixes = [ ip_prefixes = [
"100.64.0.0/10" "100.64.0.0/10"
]; ];
server_url = "https://${fqdn}"; server_url = "https://${fqdn}";
derp = {
auto_update_enable = false;
update_frequency = "24h";
urls = [];
};
dns_config = { dns_config = {
base_domain = "vimium.net"; base_domain = "vimium.net";
extra_records = [ extra_records = [
@@ -44,10 +40,6 @@ in {
value = "100.64.0.7"; value = "100.64.0.7";
} }
]; ];
magic_dns = true;
nameservers = [
"9.9.9.9"
];
}; };
logtail.enabled = false; logtail.enabled = false;
}; };

View File

@@ -1,54 +0,0 @@
{ config, lib, self, ... }:
with lib;
let cfg = config.modules.services.immich;
in {
options.modules.services.immich = {
enable = mkOption {
default = false;
example = true;
};
};
config = mkIf cfg.enable {
services.nginx = {
virtualHosts = {
"gallery.vimium.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString config.services.immich.port}";
extraConfig = ''
client_max_body_size 50000M;
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_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
'';
};
};
};
};
age.secrets."files/services/immich/envfile" = {
file = "${self.inputs.secrets}/files/services/immich/envfile.age";
};
services.immich = {
enable = true;
secretsFile = config.age.secrets."files/services/immich/envfile".path;
};
};
}

View File

@@ -1,4 +1,4 @@
{ config, lib, self, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.modules.services.mail; cfg = config.modules.services.mail;
@@ -22,10 +22,6 @@ in {
}; };
}; };
imports = [
self.inputs.nixos-mailserver.nixosModule
];
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.roundcube = { services.roundcube = {
enable = true; enable = true;

View File

@@ -1,4 +1,10 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
inputs,
...
}:
let let
cfg = config.modules.services.matrix; cfg = config.modules.services.matrix;
@@ -171,11 +177,6 @@ in {
}; };
} else {}); } else {});
nixpkgs.config.permittedInsecurePackages = [
"jitsi-meet-1.0.8043"
"olm-3.2.16"
];
services.matrix-synapse = { services.matrix-synapse = {
enable = true; enable = true;
enableRegistrationScript = true; enableRegistrationScript = true;
@@ -196,7 +197,7 @@ in {
age.secrets = if cfg.slidingSync.enable then { age.secrets = if cfg.slidingSync.enable then {
"files/services/matrix/sliding-sync" = { "files/services/matrix/sliding-sync" = {
file = "${self.inputs.secrets}/files/services/matrix/sliding-sync.age"; file = "${inputs.secrets}/files/services/matrix/sliding-sync.age";
}; };
} else {}; } else {};

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, inputs, ... }:
with lib; with lib;
@@ -118,12 +118,8 @@ in {
serverAliases = [ "www.jdholt.com" ]; serverAliases = [ "www.jdholt.com" ];
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders; extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
locations."/skycam/snapshot.jpg" = { locations."/skycam/snapshot.jpg" = {
proxyPass = "http://skycam.mesh.vimium.net:8080/snapshot";
extraConfig = '' extraConfig = ''
set $backend "skycam.mesh.vimium.net:8080";
resolver 100.100.100.100;
proxy_pass http://$backend/snapshot;
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;

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, self, ... }: { config, lib, pkgs, inputs, ... }:
with lib; with lib;
@@ -36,7 +36,7 @@ in {
}; };
age.secrets."passwords/services/photoprism/admin" = { age.secrets."passwords/services/photoprism/admin" = {
file = "${self.inputs.secrets}/passwords/services/photoprism/admin.age"; file = "${inputs.secrets}/passwords/services/photoprism/admin.age";
}; };
services.photoprism = { services.photoprism = {

View File

@@ -1,25 +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

View File

@@ -1,10 +1,10 @@
final: prev: self: super:
{ {
gnome = prev.gnome.overrideScope' (gself: gsuper: { gnome = super.gnome.overrideScope' (gself: gsuper: {
mutter = gsuper.mutter.overrideAttrs (oldAttrs: { mutter = gsuper.mutter.overrideAttrs (oldAttrs: {
src = prev.fetchurl { src = super.fetchurl {
url = "https://gitlab.gnome.org/Community/Ubuntu/mutter/-/archive/triple-buffering-v4-46/mutter-triple-buffering-v4-46.tar.gz"; url = "https://gitlab.gnome.org/Community/Ubuntu/mutter/-/archive/triple-buffering-v4-46/mutter-triple-buffering-v4-46.tar.gz";
sha256 = "9MVb53tcOTkcXJ025bF2kX1+fGSfffliA43q00x2c/Y="; sha256 = "mmFABDsRMzYnLO3+Cf3CJ60XyUBl3y9NAUj+vs7nLqE=";
}; };
}); });
}); });

View File

@@ -1,60 +1,21 @@
final: prev: 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: { libcamera = prev.libcamera.overrideAttrs (old: {
src = final.fetchFromGitHub {
owner = "raspberrypi";
repo = "libcamera";
rev = "eb00c13d7c9f937732305d47af5b8ccf895e700f";
hash = "sha256-p0/inkHPRUkxSIsTmj7VI7sIaX7OXdqjMGZ31W7cnt4=";
};
postPatch = '' postPatch = ''
patchShebangs utils/ src/py/ patchShebangs utils/ src/py/
''; '';
patches = [ patches = [
./0001-Remove-relative-config-lookups.patch ./0001-Remove-relative-config-lookups.patch
./0001-Ignore-IPA-signing.patch
]; ];
buildInputs = old.buildInputs ++ (with final; [
libpisp
libglibutil
]);
mesonFlags = old.mesonFlags ++ [ mesonFlags = old.mesonFlags ++ [
"--buildtype=release" "--buildtype=release"
"-Dpipelines=rpi/vc4,rpi/pisp" "-Dpipelines=rpi/vc4"
"-Dipas=rpi/vc4,rpi/pisp" "-Dipas=rpi/vc4"
"-Dgstreamer=enabled" "-Dgstreamer=enabled"
"-Dtest=false" "-Dtest=false"
"-Dcam=enabled" "-Dcam=enabled"
"-Dpycamera=disabled"
]; ];
}); });

View File

@@ -1,25 +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

View File

@@ -1,5 +1,5 @@
{ stdenv { stdenv
, fetchFromGitHub , fetchFromGitea
, cmake , cmake
, gnumake , gnumake
@@ -24,18 +24,15 @@ stdenv.mkDerivation (finalAttrs: {
pname = "camera-streamer"; pname = "camera-streamer";
version = "0.2.8"; version = "0.2.8";
src = fetchFromGitHub { src = fetchFromGitea {
owner = "ayufan"; domain = "git.vimium.com";
owner = "jordan";
repo = "camera-streamer"; repo = "camera-streamer";
rev = "refs/tags/v${finalAttrs.version}"; rev = "464f05172c725b4b302464eecdb8b6e85fda6e84";
hash = "sha256-8vV8BMFoDeh22I1/qxk6zttJROaD/lrThBxXHZSPpT4="; hash = "sha256-IkLR/oozYU+hfpct+GXej2T3GEhauQtqwWOcrQAErbM=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
patches = [
./0001-Disable-libdatachannel.patch
];
# Second replacement fixes literal newline in generated version.h. # Second replacement fixes literal newline in generated version.h.
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace Makefile \