feat: a bunch of misc updates

This commit is contained in:
Zhongheng Liu 2025-02-07 18:18:23 +02:00
commit bb120b4e3d
Signed by: steven
GPG key ID: 805A28B071DAD84B
18 changed files with 256 additions and 121 deletions

View file

@ -42,7 +42,7 @@ in
myAutostartCommands = [ "${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMinBrightness}" ]; myAutostartCommands = [ "${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMinBrightness}" ];
}; };
myConfigLocation = "/home/${myUserName}/Development/Nix/nixos-configuration"; myConfigLocation = "/home/${myUserName}/Development/Nix/nixos-configuration";
desktopFontFullName = "BlexMono Nerd Font:style=Regular"; desktopFontFullName = "UbuntuMono Nerd Font:style=Regular";
myAutostartCommands = [ myAutostartCommands = [
"${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMaxBrightness}" "${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMaxBrightness}"
"fcitx5" "fcitx5"

96
flake.lock generated
View file

@ -150,6 +150,24 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1735774679,
"narHash": "sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq+raipRI=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f2f7418ce0ab4a5309a4596161d154cfc877af66",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixvim", "nixvim",
@ -446,6 +464,27 @@
"type": "github" "type": "github"
} }
}, },
"hyprswitch": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1736298372,
"narHash": "sha256-FSl0UFtnQARckhZCBQSCDDkkFYoJrYW8JvkJjo3zy5c=",
"owner": "h3rmt",
"repo": "hyprswitch",
"rev": "d583793c7e45d424161402aa98f59d5099e3fa55",
"type": "github"
},
"original": {
"owner": "h3rmt",
"ref": "release",
"repo": "hyprswitch",
"type": "github"
}
},
"hyprutils": { "hyprutils": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -536,6 +575,18 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1735774519,
"narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
}
},
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1737057197, "lastModified": 1737057197,
@ -569,6 +620,21 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1735831304,
"narHash": "sha256-92A/Zr8UzZzlFYmkgO3HAgX/Cr53eodgNyvJA+Ibkz0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0725951bfc4bbc2efff3a537837ca13159b4aec9",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1736883708, "lastModified": 1736883708,
"narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=", "narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=",
@ -584,7 +650,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1736798957, "lastModified": 1736798957,
"narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=", "narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=",
@ -604,7 +670,7 @@
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
@ -655,7 +721,8 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland-qtutils": "hyprland-qtutils", "hyprland-qtutils": "hyprland-qtutils",
"nixpkgs": "nixpkgs_2", "hyprswitch": "hyprswitch",
"nixpkgs": "nixpkgs_3",
"nixpkgs-master": "nixpkgs-master", "nixpkgs-master": "nixpkgs-master",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixvim": "nixvim", "nixvim": "nixvim",
@ -663,6 +730,27 @@
"stylix": "stylix" "stylix": "stylix"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": [
"hyprswitch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735784864,
"narHash": "sha256-tIl5p3ueaPw7T5T1UXkLc8ISMk6Y8CI/D/rd0msf73I=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "04d5f1836721461b256ec452883362c5edc5288e",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"spicetify-nix": { "spicetify-nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@ -696,7 +784,7 @@
"git-hooks": "git-hooks_2", "git-hooks": "git-hooks_2",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"home-manager": "home-manager_3", "home-manager": "home-manager_3",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"systems": "systems_3", "systems": "systems_3",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",

View file

@ -2,6 +2,7 @@
description = "Your new nix config"; description = "Your new nix config";
inputs = { inputs = {
hyprswitch.url = "github:h3rmt/hyprswitch/release";
# Nixpkgs # Nixpkgs
nixpkgs-master.url = "github:nixos/nixpkgs/master"; nixpkgs-master.url = "github:nixos/nixpkgs/master";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
@ -15,12 +16,11 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
/* /* lix-module = {
lix-module = { url =
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
"https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz"; inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs"; };
};
*/ */
stylix = { url = "github:danth/stylix"; }; stylix = { url = "github:danth/stylix"; };
spicetify-nix = { spicetify-nix = {
@ -30,14 +30,7 @@
hyprland-qtutils.url = "github:hyprwm/hyprland-qtutils"; hyprland-qtutils.url = "github:hyprwm/hyprland-qtutils";
}; };
outputs = outputs = { self, nixpkgs, home-manager, stylix, spicetify-nix, ... }@inputs:
{ self
, nixpkgs
, home-manager
, stylix
, spicetify-nix
, ...
} @ inputs:
let let
inherit (self) outputs; inherit (self) outputs;
myHostName = "nixos-msi"; myHostName = "nixos-msi";
@ -59,17 +52,19 @@
# Standalone home-manager configuration entrypoint # Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname' # Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = { homeConfigurations = {
"${stevenUserName}@${myHostName}" = home-manager.lib.homeManagerConfiguration { "${stevenUserName}@${myHostName}" =
pkgs = home-manager.lib.homeManagerConfiguration {
nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance pkgs =
extraSpecialArgs = { inherit inputs outputs; }; nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
modules = [ extraSpecialArgs = { inherit inputs outputs; };
./home-manager/${stevenUserName}/home.nix modules = [
stylix.homeManagerModules.stylix ./home-manager/${stevenUserName}/home.nix
inputs.nixvim.homeManagerModules.nixvim stylix.homeManagerModules.stylix
spicetify-nix.homeManagerModules.default inputs.nixvim.homeManagerModules.nixvim
]; spicetify-nix.homeManagerModules.default
};
];
};
}; };
}; };
} }

View file

@ -1,7 +1,4 @@
{ config { config, pkgs, ... }: {
, pkgs
, ...
}: {
imports = [ imports = [
./hypr ./hypr
./shells ./shells
@ -13,11 +10,13 @@
./ags ./ags
./xdg.nix ./xdg.nix
./stylix.nix ./stylix.nix
#./dwl
./scripts ./scripts
./programs ./programs
./packages ./packages
]; ];
#services.pass-secret-service.enable = true;
nixpkgs = { nixpkgs = {
# You can add overlays here # You can add overlays here
overlays = [ overlays = [
@ -59,6 +58,7 @@
kdenlive kdenlive
obsidian obsidian
heroic heroic
rustdesk
]; ];
myAutostartCommands = [ myAutostartCommands = [
#"${pkgs.clash-verge-rev}/bin/clash-verge" #"${pkgs.clash-verge-rev}/bin/clash-verge"
@ -67,22 +67,23 @@
programs = { programs = {
obs-studio = { obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ wlrobs input-overlay ]; plugins = with pkgs.obs-studio-plugins; [ wlrobs input-overlay droidcam-obs ];
}; };
home-manager.enable = true; home-manager.enable = true;
firefox = { firefox = {
enable = true; enable = true;
package = with pkgs; (firefox-devedition.override { package = with pkgs;
nativeMessagingHosts = [ (firefox-devedition.override {
(passff-host.overrideAttrs (_old: { nativeMessagingHosts = [
dontStrip = true; (passff-host.overrideAttrs (_old: {
patchPhase = '' dontStrip = true;
sed -i 's#COMMAND = "pass"#COMMAND = "${ patchPhase = ''
pass.withExtensions (ext: with ext; [pass-otp pass-import]) sed -i 's#COMMAND = "pass"#COMMAND = "${
}/bin/pass"#' src/passff.py''; pass.withExtensions (ext: with ext; [ pass-otp pass-import ])
})) }/bin/pass"#' src/passff.py'';
]; }))
}); ];
});
}; };
thunderbird = { thunderbird = {
enable = true; enable = true;

View file

@ -1,10 +1,8 @@
{ config { config, pkgs, inputs, ... }:
, pkgs
, ...
}:
let let
terminalCmd = config.defaultApplications.terminal; terminalCmd = config.defaultApplications.terminal;
screenshotLocation = "/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png"; screenshotLocation =
"/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png";
in in
[ [
"$mod SHIFT, L, exec, ${pkgs.wlogout}/bin/wlogout" "$mod SHIFT, L, exec, ${pkgs.wlogout}/bin/wlogout"
@ -17,7 +15,7 @@ in
"$mod, S, togglespecialworkspace" "$mod, S, togglespecialworkspace"
"$mod SHIFT, S, movetoworkspace, special" "$mod SHIFT, S, movetoworkspace, special"
"$mod, Tab, hyprexpo:expo, toggle" "alt, Tab, exec, ${inputs.hyprswitch.packages.x86_64-linux.default}/bin/hyprswitch gui --mod-key alt --key Tab --close mod-key-release --reverse-key=key=grave && hyprswitch dispatch"
# keysyms for util functions # keysyms for util functions
# Example volume button that allows press and hold, volume limited to 150% # Example volume button that allows press and hold, volume limited to 150%
@ -30,11 +28,10 @@ in
"$mod SHIFT, Return, exec, ${terminalCmd} --title=floats ${config.myShells.defaultShell}" "$mod SHIFT, Return, exec, ${terminalCmd} --title=floats ${config.myShells.defaultShell}"
# cmdline utilities # cmdline utilities
/* /* NOTE Replaced by network manager applet
NOTE Replaced by network manager applet nmtui interface is no longer needed
nmtui interface is no longer needed TODO Fix floating window rule
TODO Fix floating window rule */
*/
# "$mod, N, exec, [float] ${terminalCmd} ${pkgs.networkmanager}/bin/nmtui" # "$mod, N, exec, [float] ${terminalCmd} ${pkgs.networkmanager}/bin/nmtui"
#"$mod, M, exec, [float] ${terminalCmd} ${pkgs.zenith}/bin/zenith" #"$mod, M, exec, [float] ${terminalCmd} ${pkgs.zenith}/bin/zenith"
@ -43,35 +40,29 @@ in
"$mod, J, movefocus, d" "$mod, J, movefocus, d"
"$mod, K, movefocus, u" "$mod, K, movefocus, u"
"$mod, L, movefocus, r" "$mod, L, movefocus, r"
] ] ++ (if config.services.mpd.enable then
++ ( [ "$mod, M, exec, ${terminalCmd} --title=ncmpc ${pkgs.ncmpcpp}/bin/ncmpcpp" ]
if config.services.mpd.enable then [ "$mod, M, exec, ${terminalCmd} --title=ncmpc ${pkgs.ncmpcpp}/bin/ncmpcpp" ] else [ ] else
) [ ]) ++ (if config.services.swaync.enable then
++ ( [ "$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t" ]
if config.services.swaync.enable else
then [ "$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t" ] [ ]) ++ (
else [ ]
)
++ (
# workspaces # workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10} # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList builtins.concatLists (builtins.genList
(x: (x:
let let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); in [
in
[
"$mod, ${ws}, workspace, ${toString (x + 1)}" "$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]) 10) ]) 10)
# workspaces # workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10} # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
/* /* builtins.concatLists (builtins.genList (x:
builtins.concatLists (builtins.genList (x: let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); in [
in [ "$mod M, ${ws}, workspace, ${toString (x + 10 + 1)}"
"$mod M, ${ws}, workspace, ${toString (x + 10 + 1)}" "$mod SHIFT M, ${ws}, movetoworkspace, ${toString (x + 10 + 1)}"
"$mod SHIFT M, ${ws}, movetoworkspace, ${toString (x + 10 + 1)}" ]) 10)
]) 10) */
*/
) )

View file

@ -8,7 +8,7 @@
package = pkgs.hyprland; package = pkgs.hyprland;
plugins = with pkgs.hyprlandPlugins; plugins = with pkgs.hyprlandPlugins;
[ [
hyprexpo # hyprexpo
# hyprfocus # hyprfocus
# hycov # hycov
]; ];
@ -40,8 +40,11 @@
repeat_delay = 250; repeat_delay = 250;
accel_profile = "flat"; accel_profile = "flat";
}; };
exec-once = config.myAutostartCommands exec-once = config.myAutostartCommands ++ (import ./hypr_autostart.nix {
++ (import ./hypr_autostart.nix { inherit config; inherit pkgs; }); inherit config;
inherit pkgs;
inherit inputs;
});
misc = { misc = {
disable_hyprland_logo = true; disable_hyprland_logo = true;
disable_splash_rendering = true; disable_splash_rendering = true;
@ -53,6 +56,7 @@
bind = import ./binds.nix { bind = import ./binds.nix {
inherit config; inherit config;
inherit pkgs; inherit pkgs;
inherit inputs;
}; };
bindm = [ bindm = [
# mouse movements # mouse movements

View file

@ -1,4 +1,4 @@
{ config, pkgs }: { config, pkgs, inputs }:
let let
term = config.defaultApplications.terminal; term = config.defaultApplications.terminal;
shell = config.myShells.defaultShell; shell = config.myShells.defaultShell;
@ -7,4 +7,6 @@ in
"${term} --title=autorun ${shell}" "${term} --title=autorun ${shell}"
"${pkgs.mpris-notifier}/bin/mpris-notifier" "${pkgs.mpris-notifier}/bin/mpris-notifier"
"${pkgs.mpd-discord-rpc}/bin/mpd-discord-rpc" "${pkgs.mpd-discord-rpc}/bin/mpd-discord-rpc"
"${pkgs.easyeffects}/bin/easyeffects --gapplication-service"
"${inputs.hyprswitch.packages.x86_64-linux.default}/bin/hyprswitch init --show-title --size-factor 5.5 --workspaces-per-row 5"
] ]

View file

@ -23,6 +23,7 @@
./devicons.nix ./devicons.nix
./tagbar.nix ./tagbar.nix
./wrapping.nix ./wrapping.nix
./twilight.nix
]; ];
enable = true; enable = true;
enableMan = true; enableMan = true;

View file

@ -0,0 +1,6 @@
{ ... }: {
plugins = {
zen-mode = { enable = true; };
twilight = { enable = true; };
};
}

View file

@ -8,5 +8,6 @@
./pentesting.nix ./pentesting.nix
./dev.nix ./dev.nix
./gaming.nix ./gaming.nix
./hypr.nix
]; ];
} }

View file

@ -0,0 +1,4 @@
{ inputs, ... }:
{
home.packages = [ inputs.hyprswitch.packages.x86_64-linux.default ];
}

View file

@ -1,21 +1,22 @@
{ pkgs, ... }: { { pkgs, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs;
bottom [
libnotify bottom
tree libnotify
android-file-transfer tree
mtpfs android-file-transfer
usbutils mtpfs
glow usbutils
tmux glow
ranger tmux
lazygit ranger
lazygit
cheat cheat
thefuck thefuck
pcmanfm pcmanfm
udiskie udiskie
sxiv sxiv
transmission_4-gtk transmission_4-gtk
]; ];
} }

View file

@ -4,6 +4,7 @@
}: { }: {
programs.git = { programs.git = {
enable = true; enable = true;
lfs.enable = true;
package = pkgs.gitFull; package = pkgs.gitFull;
userName = config.myDisplayName; userName = config.myDisplayName;
userEmail = config.myEmail; userEmail = config.myEmail;

View file

@ -18,7 +18,7 @@ in
}; };
monospace = { monospace = {
name = config.desktopFontFullName; name = config.desktopFontFullName;
package = pkgs.nerd-fonts.blex-mono; package = pkgs.nerd-fonts.ubuntu-mono;
}; };
sizes = { sizes = {
terminal = 16; terminal = 16;

View file

@ -1,11 +1,6 @@
# This is your system's configuration file. # This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) # Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{ inputs { inputs, lib, config, pkgs, ... }: {
, lib
, config
, pkgs
, ...
}: {
imports = [ imports = [
../common/variables.nix ../common/variables.nix
./greetd.nix ./greetd.nix
@ -15,7 +10,10 @@
./services/laptop.preset.nix ./services/laptop.preset.nix
./virtualisation.nix ./virtualisation.nix
./hardware-configuration.nix ./hardware-configuration.nix
./custom-hosts.nix
]; ];
# Virtual cam settings: see https://wiki.nixos.org/wiki/OBS_Studio#Using_the_Virtual_Camera
environment.sessionVariables = { environment.sessionVariables = {
GDK_SCALE = config.displayScale; GDK_SCALE = config.displayScale;
FLAKE = config.myConfigLocation; FLAKE = config.myConfigLocation;
@ -103,6 +101,10 @@
gamemode.enable = true; gamemode.enable = true;
}; };
boot = { boot = {
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
kernelPackages = pkgs.linuxPackages_zen; kernelPackages = pkgs.linuxPackages_zen;
supportedFilesystems = [ "ntfs" ]; supportedFilesystems = [ "ntfs" ];
}; };
@ -121,10 +123,9 @@
zed-editor zed-editor
libsForQt5.qt5.qtquickcontrols2 libsForQt5.qt5.qtquickcontrols2
libsForQt5.qt5.qtgraphicaleffects libsForQt5.qt5.qtgraphicaleffects
/* /* (blender.override {
(blender.override { cudaSupport = true;
cudaSupport = true; })
})
*/ */
trash-cli trash-cli
#inputs.hyprswitch.packages.x86_64-linux.default #inputs.hyprswitch.packages.x86_64-linux.default
@ -164,10 +165,8 @@
}; };
nix = nix =
let let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; in {
in
{
settings = { settings = {
experimental-features = "nix-command flakes"; experimental-features = "nix-command flakes";
# flake-registry = ""; # flake-registry = "";

View file

@ -1,9 +1,18 @@
{ ... { ...
}: { }:
let
rootDomainName = "stvnliu.me";
subdomains = [
"git"
"kellnr"
"www"
"blog"
"files"
];
in
{
networking.extraHosts = '' networking.extraHosts = ''
# home IP mapping # home IP mapping
100.91.33.34 ${rootDomainName} ${builtins.concatStringsSep " " (map (x: x + "." + rootDomainName) subdomains)}
192.168.2.1 router.home
192.168.2.2 server.home
''; '';
} }

26
nixos/droidcam.nix Normal file
View file

@ -0,0 +1,26 @@
# /etc/nixos/configuration.nix
{ config, pkgs, ... }:
{
# Virtual cam settings: see https://wiki.nixos.org/wiki/OBS_Studio#Using_the_Virtual_Camera
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
security.polkit.enable = true;
# Install OBS Studio with droidcam-obs
users.users.foo = {
packages = with pkgs; [
# ...
(wrapOBS {
plugins = with obs-studio-plugins; [
droidcam-obs
];
})
# ...
];
};
}

View file

@ -1,10 +1,16 @@
{ config { config
, pkgs
, ... , ...
}: { }: {
virtualisation = { virtualisation = {
libvirtd.enable = true; libvirtd.enable = true;
waydroid.enable = true; waydroid.enable = true;
podman = {
enable = true;
dockerCompat = true;
};
}; };
environment.systemPackages = [ pkgs.distrobox pkgs.distrobox-tui ];
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
#virtualisation.vmware.host.enable = true; #virtualisation.vmware.host.enable = true;
#virtualisation.virtualbox.host = { #virtualisation.virtualbox.host = {