Skip to content

Commit

Permalink
Moved dslr-webcam to separate nixos module
Browse files Browse the repository at this point in the history
Hoping to write a guide sometime soon!
  • Loading branch information
nikitawootten committed Dec 25, 2023
1 parent 2bc1a73 commit 82791a8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions hostModules/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
personal.imports = [ ./personal ];
raspi4sd.imports = [ ./raspi4sd ];
dslr-webcam.imports = [ ./dslr-webcam ];
}
6 changes: 6 additions & 0 deletions hostModules/dslr-webcam/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./dslr-webcam.nix
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# - https://www.tomoliver.net/posts/using-an-slr-as-a-webcam-nixos
{ pkgs, lib, config, ... }:
let
cfg = config.personal.dslr-webcam;
cfg = config.dslr-webcam;
in
{
options.personal.dslr-webcam = {
options.dslr-webcam = {
enable = lib.mkEnableOption "DSLR webcam";
virtual-device-name = lib.mkOption {
type = lib.types.str;
Expand Down Expand Up @@ -67,4 +67,4 @@ in
'';
};
};
}
}
1 change: 0 additions & 1 deletion hostModules/personal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
imports = [
./base.nix
./docker.nix
./dslr-webcam.nix
./flatpak.nix
./gnome.nix
./networkmanager.nix
Expand Down
3 changes: 2 additions & 1 deletion hosts/dionysus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
imports = [
./hardware-configuration.nix
self.nixosModules.personal
self.nixosModules.dslr-webcam
nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
];

Expand Down Expand Up @@ -31,7 +32,7 @@

personal.zsa.enable = true;

personal.dslr-webcam = {
dslr-webcam = {
enable = true;
camera-udev-product = "7b4/130/100"; # My beloved Olympus OM-D EM5 Mark II
ffmpeg-hwaccel = true;
Expand Down

0 comments on commit 82791a8

Please sign in to comment.