diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-02-07 18:18:23 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-02-07 18:18:23 +0200 |
commit | bb120b4e3d7c312d4b1c6303104cf06604e62d3d (patch) | |
tree | 8e87d2b1eacc041f6f2e40a3965e260c068c26fe | |
parent | db83134e6b46f189a4bf002637363fe4cd501c7a (diff) | |
download | nixos-configuration-bb120b4e3d7c312d4b1c6303104cf06604e62d3d.tar.gz nixos-configuration-bb120b4e3d7c312d4b1c6303104cf06604e62d3d.tar.bz2 nixos-configuration-bb120b4e3d7c312d4b1c6303104cf06604e62d3d.zip |
feat: a bunch of misc updates
-rw-r--r-- | common/variables.nix | 2 | ||||
-rw-r--r-- | flake.lock | 96 | ||||
-rw-r--r-- | flake.nix | 45 | ||||
-rw-r--r-- | home-manager/stvnliu/home.nix | 33 | ||||
-rw-r--r-- | home-manager/stvnliu/hypr/hyprland/binds.nix | 57 | ||||
-rw-r--r-- | home-manager/stvnliu/hypr/hyprland/default.nix | 10 | ||||
-rw-r--r-- | home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix | 4 | ||||
-rw-r--r-- | home-manager/stvnliu/nixvim/default.nix | 1 | ||||
-rw-r--r-- | home-manager/stvnliu/nixvim/twilight.nix | 6 | ||||
-rw-r--r-- | home-manager/stvnliu/packages/default.nix | 1 | ||||
-rw-r--r-- | home-manager/stvnliu/packages/hypr.nix | 4 | ||||
-rw-r--r-- | home-manager/stvnliu/packages/util-programs.nix | 37 | ||||
-rw-r--r-- | home-manager/stvnliu/programs/git.nix | 1 | ||||
-rw-r--r-- | home-manager/stvnliu/stylix.nix | 2 | ||||
-rw-r--r-- | nixos/configuration.nix | 27 | ||||
-rw-r--r-- | nixos/custom-hosts.nix | 19 | ||||
-rw-r--r-- | nixos/droidcam.nix | 26 | ||||
-rw-r--r-- | nixos/virtualisation.nix | 6 |
18 files changed, 256 insertions, 121 deletions
diff --git a/common/variables.nix b/common/variables.nix index 4814389..3998329 100644 --- a/common/variables.nix +++ b/common/variables.nix @@ -42,7 +42,7 @@ in myAutostartCommands = [ "${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMinBrightness}" ]; }; myConfigLocation = "/home/${myUserName}/Development/Nix/nixos-configuration"; - desktopFontFullName = "BlexMono Nerd Font:style=Regular"; + desktopFontFullName = "UbuntuMono Nerd Font:style=Regular"; myAutostartCommands = [ "${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMaxBrightness}" "fcitx5" @@ -151,6 +151,24 @@ }, "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": { "nixpkgs-lib": [ "nixvim", "nixpkgs" @@ -446,6 +464,27 @@ "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": { "inputs": { "nixpkgs": [ @@ -536,6 +575,18 @@ "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": { "locked": { "lastModified": 1737057197, @@ -570,6 +621,21 @@ }, "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": { "lastModified": 1736883708, "narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=", "owner": "nixos", @@ -584,7 +650,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1736798957, "narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=", @@ -604,7 +670,7 @@ "inputs": { "devshell": "devshell", "flake-compat": "flake-compat", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", @@ -655,7 +721,8 @@ "inputs": { "home-manager": "home-manager", "hyprland-qtutils": "hyprland-qtutils", - "nixpkgs": "nixpkgs_2", + "hyprswitch": "hyprswitch", + "nixpkgs": "nixpkgs_3", "nixpkgs-master": "nixpkgs-master", "nixpkgs-stable": "nixpkgs-stable", "nixvim": "nixvim", @@ -663,6 +730,27 @@ "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": { "inputs": { "flake-compat": "flake-compat_2", @@ -696,7 +784,7 @@ "git-hooks": "git-hooks_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "systems": "systems_3", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", @@ -2,6 +2,7 @@ description = "Your new nix config"; inputs = { + hyprswitch.url = "github:h3rmt/hyprswitch/release"; # Nixpkgs nixpkgs-master.url = "github:nixos/nixpkgs/master"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -15,12 +16,11 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - /* - lix-module = { - url = - "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + /* lix-module = { + url = + "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz"; + inputs.nixpkgs.follows = "nixpkgs"; + }; */ stylix = { url = "github:danth/stylix"; }; spicetify-nix = { @@ -30,14 +30,7 @@ hyprland-qtutils.url = "github:hyprwm/hyprland-qtutils"; }; - outputs = - { self - , nixpkgs - , home-manager - , stylix - , spicetify-nix - , ... - } @ inputs: + outputs = { self, nixpkgs, home-manager, stylix, spicetify-nix, ... }@inputs: let inherit (self) outputs; myHostName = "nixos-msi"; @@ -59,17 +52,19 @@ # Standalone home-manager configuration entrypoint # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { - "${stevenUserName}@${myHostName}" = home-manager.lib.homeManagerConfiguration { - pkgs = - nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - extraSpecialArgs = { inherit inputs outputs; }; - modules = [ - ./home-manager/${stevenUserName}/home.nix - stylix.homeManagerModules.stylix - inputs.nixvim.homeManagerModules.nixvim - spicetify-nix.homeManagerModules.default - ]; - }; + "${stevenUserName}@${myHostName}" = + home-manager.lib.homeManagerConfiguration { + pkgs = + nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + extraSpecialArgs = { inherit inputs outputs; }; + modules = [ + ./home-manager/${stevenUserName}/home.nix + stylix.homeManagerModules.stylix + inputs.nixvim.homeManagerModules.nixvim + spicetify-nix.homeManagerModules.default + + ]; + }; }; }; } diff --git a/home-manager/stvnliu/home.nix b/home-manager/stvnliu/home.nix index d1f3702..cffdd64 100644 --- a/home-manager/stvnliu/home.nix +++ b/home-manager/stvnliu/home.nix @@ -1,7 +1,4 @@ -{ config -, pkgs -, ... -}: { +{ config, pkgs, ... }: { imports = [ ./hypr ./shells @@ -13,11 +10,13 @@ ./ags ./xdg.nix ./stylix.nix + #./dwl ./scripts ./programs ./packages ]; + #services.pass-secret-service.enable = true; nixpkgs = { # You can add overlays here overlays = [ @@ -59,6 +58,7 @@ kdenlive obsidian heroic + rustdesk ]; myAutostartCommands = [ #"${pkgs.clash-verge-rev}/bin/clash-verge" @@ -67,22 +67,23 @@ programs = { obs-studio = { 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; firefox = { enable = true; - package = with pkgs; (firefox-devedition.override { - nativeMessagingHosts = [ - (passff-host.overrideAttrs (_old: { - dontStrip = true; - patchPhase = '' - sed -i 's#COMMAND = "pass"#COMMAND = "${ - pass.withExtensions (ext: with ext; [pass-otp pass-import]) - }/bin/pass"#' src/passff.py''; - })) - ]; - }); + package = with pkgs; + (firefox-devedition.override { + nativeMessagingHosts = [ + (passff-host.overrideAttrs (_old: { + dontStrip = true; + patchPhase = '' + sed -i 's#COMMAND = "pass"#COMMAND = "${ + pass.withExtensions (ext: with ext; [ pass-otp pass-import ]) + }/bin/pass"#' src/passff.py''; + })) + ]; + }); }; thunderbird = { enable = true; diff --git a/home-manager/stvnliu/hypr/hyprland/binds.nix b/home-manager/stvnliu/hypr/hyprland/binds.nix index c1f0ace..f795983 100644 --- a/home-manager/stvnliu/hypr/hyprland/binds.nix +++ b/home-manager/stvnliu/hypr/hyprland/binds.nix @@ -1,10 +1,8 @@ -{ config -, pkgs -, ... -}: +{ config, pkgs, inputs, ... }: let 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 [ "$mod SHIFT, L, exec, ${pkgs.wlogout}/bin/wlogout" @@ -17,7 +15,7 @@ in "$mod, S, togglespecialworkspace" "$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 # 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}" # cmdline utilities - /* - NOTE Replaced by network manager applet - nmtui interface is no longer needed - TODO Fix floating window rule - */ + /* NOTE Replaced by network manager applet + nmtui interface is no longer needed + TODO Fix floating window rule + */ # "$mod, N, exec, [float] ${terminalCmd} ${pkgs.networkmanager}/bin/nmtui" #"$mod, M, exec, [float] ${terminalCmd} ${pkgs.zenith}/bin/zenith" @@ -43,35 +40,29 @@ in "$mod, J, movefocus, d" "$mod, K, movefocus, u" "$mod, L, movefocus, r" -] -++ ( - if config.services.mpd.enable then [ "$mod, M, exec, ${terminalCmd} --title=ncmpc ${pkgs.ncmpcpp}/bin/ncmpcpp" ] else [ ] -) -++ ( - if config.services.swaync.enable - then [ "$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t" ] - else [ ] -) -++ ( +] ++ (if config.services.mpd.enable then + [ "$mod, M, exec, ${terminalCmd} --title=ncmpc ${pkgs.ncmpcpp}/bin/ncmpcpp" ] +else + [ ]) ++ (if config.services.swaync.enable then + [ "$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t" ] +else + [ ]) ++ ( # workspaces # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} builtins.concatLists (builtins.genList (x: - let - ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); - in - [ + let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); + in [ "$mod, ${ws}, workspace, ${toString (x + 1)}" "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" ]) 10) # workspaces # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - /* - builtins.concatLists (builtins.genList (x: - let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); - in [ - "$mod M, ${ws}, workspace, ${toString (x + 10 + 1)}" - "$mod SHIFT M, ${ws}, movetoworkspace, ${toString (x + 10 + 1)}" - ]) 10) - */ + /* builtins.concatLists (builtins.genList (x: + let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); + in [ + "$mod M, ${ws}, workspace, ${toString (x + 10 + 1)}" + "$mod SHIFT M, ${ws}, movetoworkspace, ${toString (x + 10 + 1)}" + ]) 10) + */ ) diff --git a/home-manager/stvnliu/hypr/hyprland/default.nix b/home-manager/stvnliu/hypr/hyprland/default.nix index c00fbe4..ee47242 100644 --- a/home-manager/stvnliu/hypr/hyprland/default.nix +++ b/home-manager/stvnliu/hypr/hyprland/default.nix @@ -8,7 +8,7 @@ package = pkgs.hyprland; plugins = with pkgs.hyprlandPlugins; [ - hyprexpo + # hyprexpo # hyprfocus # hycov ]; @@ -40,8 +40,11 @@ repeat_delay = 250; accel_profile = "flat"; }; - exec-once = config.myAutostartCommands - ++ (import ./hypr_autostart.nix { inherit config; inherit pkgs; }); + exec-once = config.myAutostartCommands ++ (import ./hypr_autostart.nix { + inherit config; + inherit pkgs; + inherit inputs; + }); misc = { disable_hyprland_logo = true; disable_splash_rendering = true; @@ -53,6 +56,7 @@ bind = import ./binds.nix { inherit config; inherit pkgs; + inherit inputs; }; bindm = [ # mouse movements diff --git a/home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix b/home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix index df12b0e..12438f1 100644 --- a/home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix +++ b/home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix @@ -1,4 +1,4 @@ -{ config, pkgs }: +{ config, pkgs, inputs }: let term = config.defaultApplications.terminal; shell = config.myShells.defaultShell; @@ -7,4 +7,6 @@ in "${term} --title=autorun ${shell}" "${pkgs.mpris-notifier}/bin/mpris-notifier" "${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" ] diff --git a/home-manager/stvnliu/nixvim/default.nix b/home-manager/stvnliu/nixvim/default.nix index daeea20..eef2ecd 100644 --- a/home-manager/stvnliu/nixvim/default.nix +++ b/home-manager/stvnliu/nixvim/default.nix @@ -23,6 +23,7 @@ ./devicons.nix ./tagbar.nix ./wrapping.nix + ./twilight.nix ]; enable = true; enableMan = true; diff --git a/home-manager/stvnliu/nixvim/twilight.nix b/home-manager/stvnliu/nixvim/twilight.nix new file mode 100644 index 0000000..5443b00 --- /dev/null +++ b/home-manager/stvnliu/nixvim/twilight.nix @@ -0,0 +1,6 @@ +{ ... }: { + plugins = { + zen-mode = { enable = true; }; + twilight = { enable = true; }; + }; +} diff --git a/home-manager/stvnliu/packages/default.nix b/home-manager/stvnliu/packages/default.nix index 2c8c3e2..de0169f 100644 --- a/home-manager/stvnliu/packages/default.nix +++ b/home-manager/stvnliu/packages/default.nix @@ -8,5 +8,6 @@ ./pentesting.nix ./dev.nix ./gaming.nix + ./hypr.nix ]; } diff --git a/home-manager/stvnliu/packages/hypr.nix b/home-manager/stvnliu/packages/hypr.nix new file mode 100644 index 0000000..db9a1d9 --- /dev/null +++ b/home-manager/stvnliu/packages/hypr.nix @@ -0,0 +1,4 @@ +{ inputs, ... }: +{ + home.packages = [ inputs.hyprswitch.packages.x86_64-linux.default ]; +} diff --git a/home-manager/stvnliu/packages/util-programs.nix b/home-manager/stvnliu/packages/util-programs.nix index d4ed868..aeff855 100644 --- a/home-manager/stvnliu/packages/util-programs.nix +++ b/home-manager/stvnliu/packages/util-programs.nix @@ -1,21 +1,22 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - bottom - libnotify - tree - android-file-transfer - mtpfs - usbutils - glow - tmux - ranger - lazygit + home.packages = with pkgs; + [ + bottom + libnotify + tree + android-file-transfer + mtpfs + usbutils + glow + tmux + ranger + lazygit - cheat - thefuck - pcmanfm - udiskie - sxiv - transmission_4-gtk - ]; + cheat + thefuck + pcmanfm + udiskie + sxiv + transmission_4-gtk + ]; } diff --git a/home-manager/stvnliu/programs/git.nix b/home-manager/stvnliu/programs/git.nix index 73ec71b..ebf934f 100644 --- a/home-manager/stvnliu/programs/git.nix +++ b/home-manager/stvnliu/programs/git.nix @@ -4,6 +4,7 @@ }: { programs.git = { enable = true; + lfs.enable = true; package = pkgs.gitFull; userName = config.myDisplayName; userEmail = config.myEmail; diff --git a/home-manager/stvnliu/stylix.nix b/home-manager/stvnliu/stylix.nix index 002079d..c9ff740 100644 --- a/home-manager/stvnliu/stylix.nix +++ b/home-manager/stvnliu/stylix.nix @@ -18,7 +18,7 @@ in }; monospace = { name = config.desktopFontFullName; - package = pkgs.nerd-fonts.blex-mono; + package = pkgs.nerd-fonts.ubuntu-mono; }; sizes = { terminal = 16; diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 9aac1dd..f7e890f 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,11 +1,6 @@ # This is your system's configuration file. # Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) -{ inputs -, lib -, config -, pkgs -, ... -}: { +{ inputs, lib, config, pkgs, ... }: { imports = [ ../common/variables.nix ./greetd.nix @@ -15,7 +10,10 @@ ./services/laptop.preset.nix ./virtualisation.nix ./hardware-configuration.nix + ./custom-hosts.nix ]; + + # Virtual cam settings: see https://wiki.nixos.org/wiki/OBS_Studio#Using_the_Virtual_Camera environment.sessionVariables = { GDK_SCALE = config.displayScale; FLAKE = config.myConfigLocation; @@ -103,6 +101,10 @@ gamemode.enable = true; }; 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; supportedFilesystems = [ "ntfs" ]; }; @@ -121,10 +123,9 @@ zed-editor libsForQt5.qt5.qtquickcontrols2 libsForQt5.qt5.qtgraphicaleffects - /* - (blender.override { - cudaSupport = true; - }) + /* (blender.override { + cudaSupport = true; + }) */ trash-cli #inputs.hyprswitch.packages.x86_64-linux.default @@ -164,10 +165,8 @@ }; nix = - let - flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; - in - { + let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; + in { settings = { experimental-features = "nix-command flakes"; # flake-registry = ""; diff --git a/nixos/custom-hosts.nix b/nixos/custom-hosts.nix index 69dcbc6..495adb4 100644 --- a/nixos/custom-hosts.nix +++ b/nixos/custom-hosts.nix @@ -1,9 +1,18 @@ { ... -}: { +}: +let + rootDomainName = "stvnliu.me"; + subdomains = [ + "git" + "kellnr" + "www" + "blog" + "files" + ]; +in +{ networking.extraHosts = '' - # home IP mapping - - 192.168.2.1 router.home - 192.168.2.2 server.home + # home IP mapping + 100.91.33.34 ${rootDomainName} ${builtins.concatStringsSep " " (map (x: x + "." + rootDomainName) subdomains)} ''; } diff --git a/nixos/droidcam.nix b/nixos/droidcam.nix new file mode 100644 index 0000000..5db1483 --- /dev/null +++ b/nixos/droidcam.nix @@ -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 + ]; + }) + # ... + ]; + }; +} diff --git a/nixos/virtualisation.nix b/nixos/virtualisation.nix index fc5957c..0bc88c9 100644 --- a/nixos/virtualisation.nix +++ b/nixos/virtualisation.nix @@ -1,10 +1,16 @@ { config +, pkgs , ... }: { virtualisation = { libvirtd.enable = true; waydroid.enable = true; + podman = { + enable = true; + dockerCompat = true; + }; }; + environment.systemPackages = [ pkgs.distrobox pkgs.distrobox-tui ]; programs.virt-manager.enable = true; #virtualisation.vmware.host.enable = true; #virtualisation.virtualbox.host = { |