From a358c678cddee04e7b28e913442c4ef5d539da6c Mon Sep 17 00:00:00 2001 From: L-Nafaryus Date: Sat, 6 Jan 2024 18:05:24 +0500 Subject: [PATCH] update: astora: improve audio + some packages --- flake.lock | 105 +++++++++--------------- flake.nix | 5 +- nixosConfigurations/astora/default.nix | 4 +- nixosConfigurations/astora/hardware.nix | 10 ++- nixosConfigurations/astora/users.nix | 19 +++++ 5 files changed, 67 insertions(+), 76 deletions(-) diff --git a/flake.lock b/flake.lock index d9aeac5..65b77f9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,27 +1,5 @@ { "nodes": { - "agenix": { - "inputs": { - "darwin": "darwin", - "home-manager": "home-manager", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701216516, - "narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=", - "owner": "ryantm", - "repo": "agenix", - "rev": "13ac9ac6d68b9a0896e3d43a082947233189e247", - "type": "github" - }, - "original": { - "owner": "ryantm", - "repo": "agenix", - "type": "github" - } - }, "cachix": { "inputs": { "flake-compat": "flake-compat", @@ -66,28 +44,6 @@ "type": "github" } }, - "darwin": { - "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1673295039, - "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", - "type": "github" - }, - "original": { - "owner": "lnl7", - "ref": "master", - "repo": "nix-darwin", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -119,6 +75,21 @@ "type": "github" } }, + "flake-utils_2": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -142,27 +113,6 @@ } }, "home-manager": { - "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1682203081, - "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -222,6 +172,27 @@ "type": "github" } }, + "nixgl": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685908677, + "narHash": "sha256-E4zUPEUFyVWjVm45zICaHRpfGepfkE9Z2OECV9HXfA4=", + "owner": "guibou", + "repo": "nixGL", + "rev": "489d6b095ab9d289fe11af0219a9ff00fe87c7c5", + "type": "github" + }, + "original": { + "owner": "guibou", + "repo": "nixGL", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1702312524, @@ -300,10 +271,10 @@ }, "root": { "inputs": { - "agenix": "agenix", "cachix": "cachix", "crane": "crane", - "home-manager": "home-manager_2", + "home-manager": "home-manager", + "nixgl": "nixgl", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index ec3f201..393fb0b 100644 --- a/flake.nix +++ b/flake.nix @@ -10,11 +10,11 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; cachix = { url = "github:cachix/devenv/v0.6.3"; inputs.nixpkgs.follows = "nixpkgs"; }; - agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; crane = { url = "github:ipetkov/crane"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixgl = { url = "github:guibou/nixGL"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = inputs @ { self, nixpkgs, home-manager, agenix, crane, ... }: { + outputs = inputs @ { self, nixpkgs, home-manager, crane, nixgl, ... }: { lib = import ./lib {}; @@ -23,7 +23,6 @@ system = "x86_64-linux"; modules = [ home-manager.nixosModules.home-manager - agenix.nixosModules.default ./nixosConfigurations/astora ./nixosModules/bonfire.nix self.nixosModules.spoofdpi diff --git a/nixosConfigurations/astora/default.nix b/nixosConfigurations/astora/default.nix index 92ae95a..d14d46f 100644 --- a/nixosConfigurations/astora/default.nix +++ b/nixosConfigurations/astora/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, agenix, inputs, ... }: +{ config, pkgs, lib, inputs, ... }: { system.stateVersion = "23.11"; @@ -31,6 +31,7 @@ (final: prev: { blender = prev.blender.override { cudaSupport = true; }; }) + inputs.nixgl.overlay ]; }; @@ -104,7 +105,6 @@ gcc cachix - inputs.agenix.packages.${system}.default ]; programs = { diff --git a/nixosConfigurations/astora/hardware.nix b/nixosConfigurations/astora/hardware.nix index 0c6bddd..8930323 100644 --- a/nixosConfigurations/astora/hardware.nix +++ b/nixosConfigurations/astora/hardware.nix @@ -3,7 +3,7 @@ # Boot boot = { loader.systemd-boot.enable = true; - loader.systemd-boot.configurationLimit = 2; + loader.systemd-boot.configurationLimit = 5; loader.efi.canTouchEfiVariables = true; tmp.useTmpfs = lib.mkDefault true; @@ -12,7 +12,10 @@ initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; initrd.kernelModules = [ ]; kernelModules = [ "kvm-amd" "tcp_bbr" "coretemp" "nct6775" ]; - extraModulePackages = [ ]; + extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; + extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=1 card_label="OBS Camera" exclusive_caps=1 + ''; kernelParams = [ "threadirqs" ]; kernel.sysctl = { @@ -69,6 +72,7 @@ { domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; } { domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; } ]; + polkit.enable = true; }; users.users.root.initialPassword = "nixos"; @@ -143,6 +147,4 @@ LC_TIME = "en_US.UTF-8"; }; }; - - } diff --git a/nixosConfigurations/astora/users.nix b/nixosConfigurations/astora/users.nix index 4413884..e571d72 100644 --- a/nixosConfigurations/astora/users.nix +++ b/nixosConfigurations/astora/users.nix @@ -29,6 +29,7 @@ gparted gnomeExtensions.appindicator + gnomeExtensions.vitals xclip firefox @@ -40,8 +41,13 @@ qpwgraph wireplumber + lutris + wine + winetricks gamemode + vlc + lollypop gimp inkscape imagemagick @@ -50,6 +56,19 @@ calf zynaddsubfx + lsp-plugins + x42-plugins + + obs-studio + obs-studio-plugins.obs-vkcapture + obs-studio-plugins.input-overlay + obs-studio-plugins.obs-pipewire-audio-capture + + qbittorrent + + onlyoffice-bin + + anydesk ]; xdg.enable = true;