From 1c4f59a49439567f476b791e28d289e1626f3ae5 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Jun 2022 15:49:55 +0300 Subject: [PATCH] update --- Desktop/common.nix | 254 +++++++++++++++++++++++++++++++++++++ Desktop/configuration.nix | 173 ++----------------------- Desktop/modules/gnome.nix | 15 +-- Desktop/modules/vscode.nix | 114 +++++++++++++++++ Desktop/pipewire.nix | 94 ++++++++++++++ Desktop/pulsed.nix | 15 +++ Desktop/software.nix | 107 ++++++++++------ Desktop/vscode.nix | 14 ++ 8 files changed, 577 insertions(+), 209 deletions(-) create mode 100644 Desktop/common.nix create mode 100644 Desktop/modules/vscode.nix create mode 100644 Desktop/pipewire.nix create mode 100644 Desktop/pulsed.nix create mode 100644 Desktop/vscode.nix diff --git a/Desktop/common.nix b/Desktop/common.nix new file mode 100644 index 0000000..545e054 --- /dev/null +++ b/Desktop/common.nix @@ -0,0 +1,254 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, lib, fetchpatch, ... }: + +let + unstable = import { }; +in +{ + imports = + [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ./software.nix + ./modules/gnome.nix + ./modules/zsh.nix + ./modules/vscode.nix + ./vscode.nix + ]; + + nix.trustedUsers = [ "root" "inex" ]; + + nixpkgs.config = { + allowUnfree = true; + android_sdk.accept_license = true; + }; + + nixpkgs.overlays = [ + (self: super: + { + openhmd = super.openhmd.overrideAttrs (old: { + src = super.fetchFromGitHub { + owner = "OpenHMD"; + repo = "OpenHMD"; + rev = "dfac0203376552c5274976c42f0757b31310c483"; + sha256 = "1rm8iw03glfgnhggg221p8zycm9yjw84bv9ldb0vg2ygybds9m27"; + }; + }); + vscode-extensions = super.vscode-extensions // { + github.copilot = pkgs.vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "github"; + name = "copilot"; + version = "1.22.5957"; + sha256 = "04jak6ml7l19ryv2q6qn7qvvgw31jllgvd9g8xlac89xnndsfl6s"; + }; + }; + }; + } + ) + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + grub.useOSProber = true; + grub.memtest86.enable = true; + }; + + boot.supportedFilesystems = [ "btrfs" "ntfs" ]; + + fileSystems."/mediastorage" = { + device = "/dev/disk/by-uuid/aed202ac-7414-40b9-9d71-011b7043c850"; + fsType = "ext4"; + }; + + fileSystems."/backups" = { + device = "/dev/disk/by-uuid/63db910e-f906-4211-bac5-4330777c8283"; + fsType = "ext4"; + }; + + # fileSystems."/nvme" = { + # device = "/dev/disk/by-uuid/8c1c5508-ecaa-433d-87c0-49d131395ddd"; + # fsType = "btrfs"; + # }; + + networking = { + hostName = "inex-pc"; + networkmanager.enable = true; + useDHCP = false; + interfaces = { + enp8s0 = { + useDHCP = true; + }; + wlp5s0 = { + useDHCP = true; + }; + }; + firewall = { + enable = false; + allowedTCPPorts = [ 8437 1716 51820 24642 27036 27037 24800 ]; + allowedUDPPorts = [ 8437 1716 51820 24642 27031 27036 24800 ]; + checkReversePath = false; + }; + wireguard.interfaces = { + wg0 = { + # Determines the IP address and subnet of the client's end of the tunnel interface. + ips = [ "10.100.0.6/24" ]; + listenPort = 51820; + + postSetup = "${pkgs.iproute}/bin/ip route add 135.181.97.221 via 192.168.1.1"; + postShutdown = "${pkgs.iproute}/bin/ip route del 135.181.97.221 via 192.168.1.1"; + + # Path to the private key file. + # + # Note: The private key can also be included inline via the privateKey option, + # but this makes the private key world-readable; thus, using privateKeyFile is + # recommended. + privateKeyFile = "/home/inex/wireguard-keys/private"; + + peers = [ + # For a client configuration, one peer entry for the server will suffice. + { + # Public key of the server (not a file path). + publicKey = "8sEAHYhydEGKTVecXcOb28zeGHGLGCsri5evbSQV8mY="; + + # Forward all the traffic via VPN. + #allowedIPs = [ "0.0.0.0/0" ]; + # Or forward only particular subnets + allowedIPs = [ "10.100.0.0/24" ]; + + # Set this to the server IP and port. + endpoint = "135.181.97.221:51820"; + + # Send keepalives every 25 seconds. Important to keep NAT tables alive. + persistentKeepalive = 25; + } + ]; + }; + }; + }; + + + # Select internationalisation properties. + # i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + }; + + # Set your time zone. + time.timeZone = "Europe/Moscow"; + + services = { + printing.enable = true; + xserver = { + enable = true; + layout = "us"; + xkbVariant = "colemak"; + videoDrivers = [ "amdgpu" ]; + libinput.enable = true; + exportConfiguration = true; + wacom.enable = true; + }; + openssh = { + enable = true; + passwordAuthentication = false; + forwardX11 = true; + }; + flatpak.enable = true; + udev.packages = [ + (pkgs.writeTextFile { + name = "wacom_udev"; + text = '' + KERNEL!="event[0-9]*", GOTO="wacom_end" + DRIVERS=="wacom", ATTRS{bInterfaceNumber}=="00", ENV{WACOM_TYPE}="stylus" + DRIVERS=="wacom", ATTRS{bInterfaceNumber}=="01", ENV{WACOM_TYPE}="touch" + ATTRS{idVendor}=="056a", ENV{WACOM_TYPE}!="touch", SYMLINK+="input/wacom" + ATTRS{idVendor}=="056a", ENV{WACOM_TYPE}=="touch", SYMLINK+="input/wacom-touch" + #ATTRS{idVendor}=="056a", ACTION=="add", RUN+="check_driver wacom $devpath $env{ID_BUS}" + LABEL="wacom_end" + ''; + destination = "/etc/udev/rules.d/50-wacom.rules"; + + }) + ]; + }; + + + sound.enable = true; + + # Video driver + hardware = { + opengl = { + enable = true; + driSupport32Bit = true; + extraPackages = [ pkgs.amdvlk pkgs.rocm-opencl-icd pkgs.rocm-runtime pkgs.rocm-opencl-runtime ]; + }; + steam-hardware.enable = true; + bluetooth = { + enable = true; + package = pkgs.bluezFull; + }; + pulseaudio = { + package = pkgs.pulseaudioFull; + support32Bit = true; + extraModules = [ pkgs.pulseaudio-modules-bt ]; + }; + }; + + environment.variables.VK_ICD_FILENAMES = "${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json"; + + programs = { + adb.enable = true; + java = { + enable = true; + }; + }; + + virtualisation = { + docker = { + enable = true; + enableOnBoot = false; + }; + waydroid.enable = true; + virtualbox.host = { + enable = false; + }; + }; + + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.inex = { + isNormalUser = true; + home = "/home/inex"; + description = "Inex Code"; + extraGroups = [ "wheel" "networkmanager" "jackaudio" "audio" "video" "adbusers" "docker" "cdrom" ]; # Enable ‘sudo’ for the user. + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzL0gmvpMOZbijqZOlTuNqtVHZGoNrxCiWJXIDcUwr1cx8M2o61qK/wNMZmyYGROpJbpsFERAjXIXBpwg2KQ3ONRL6q44nPrOSbHm3zL8pnFEvzM0BUKV1Mq2T1dM+geMhQnLrwZhOxvp3+9uhFSTPP/dVzWQ19pEiK5hHpXlD3eyO+LIaS/wkTJvBy/wCKz+O/coLyBQ+Mn5hGQaJAyDec/ovu8OhBkJbbvWp03F2zcWUCxwVfZ1VnLQxn7tk9L4iTw1+rDt0kaRQvVISV3KdqLJnPODku6eC38LcMfHIFXAWBdSUslGUl9Qkd1c+6Gorzt3BrfYL/HDW2Xk3UTQF inex-envy" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCbUS/AblfzZcfr/iMxHJ5pubzCuriVTu12TKt1iRQFDjQDo+/j0/Ga07zqyB9VUhpJg/IOcJ6o2T4PBixNuHQQX5z4sb/tqzbx3buBz0HIp8VHRC3TtLAmsFj24AldxlADlQpGnlt+g3p200m2dwu/Yoe4+GD8Twwg6FCsyiRjstbfo89Kmwi9yVbXx5aBssscEkXBQODTpwOB05nCz3oUuvQ5ex+yH+o02cTlYyBoglgfzM6HzR0GkmCRDlx613nqa1+ICxwWY0cXMbhnUwDoJASk5eJovtmEqC29qJKABxZaKRYsaW3sMJiMOvPHf9BkVKp4uPINhLc5vopwZI10xsNOn75AXRptkHzenn7ymC+qwJr53Z1tAAfMb5ypJ+u+SE8wazd4x2CIFHH+LbaputqxyfUxNoMbFMGNXICDAOCCQ0nkax7Ifr1NlTp07zTYH6VP0kzqqYiAlBu5qo3qIi5dRsLvb6/McerDNhRmYh25Ww7zpEY4Q9uTWDZkCP8= u0_a122@localhost" + ]; + }; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "20.03"; # Did you read the comment? + system.autoUpgrade.enable = true; + + environment.shellInit = '' + export VST_PATH=/nix/var/nix/profiles/default/lib/vst:/var/run/current-system/sw/lib/vst:~/.vst + export LXVST_PATH=/nix/var/nix/profiles/default/lib/lxvst:/var/run/current-system/sw/lib/lxvst:~/.lxvst + export LADSPA_PATH=/nix/var/nix/profiles/default/lib/ladspa:/var/run/current-system/sw/lib/ladspa:~/.ladspa + export LV2_PATH=/nix/var/nix/profiles/default/lib/lv2:/var/run/current-system/sw/lib/lv2:~/.lv2 + export DSSI_PATH=/nix/var/nix/profiles/default/lib/dssi:/var/run/current-system/sw/lib/dssi:~/.dssi + export VST3_PATH=/nix/var/nix/profiles/default/lib/vst3:/var/run/current-system/sw/lib/vst3:~/.vst3 + ''; + +} diff --git a/Desktop/configuration.nix b/Desktop/configuration.nix index 98619ff..fed09fa 100644 --- a/Desktop/configuration.nix +++ b/Desktop/configuration.nix @@ -2,179 +2,24 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ config, pkgs, lib, fetchpatch, ... }: let - unstable = import {}; -in { + unstable = import { }; +in +{ imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ./software.nix - ./modules/gnome.nix - ./modules/zsh.nix + [ + # Include the results of the hardware scan. + ./common.nix + ./pipewire.nix ]; - nixpkgs.config = { - allowUnfree = true; - android_sdk.accept_license = true; - }; - - # Use the systemd-boot EFI boot loader. - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - grub.useOSProber = true; - }; - - fileSystems."/mediastorage" = { - device = "/dev/disk/by-uuid/aed202ac-7414-40b9-9d71-011b7043c850"; - fsType = "ext4"; - }; - - fileSystems."/backups" = { - device = "/dev/disk/by-uuid/63db910e-f906-4211-bac5-4330777c8283"; - fsType = "ext4"; - }; - - - networking = { - hostName = "inex-pc"; - networkmanager.enable = true; - useDHCP = false; - interfaces = { - enp7s0 = { - useDHCP = true; - }; - wlp8s0 = { - useDHCP = true; - }; - }; - firewall = { - enable = false; - allowedTCPPorts = [ 1716 51820 24642 27036 27037 ]; - allowedUDPPorts = [ 1716 51820 24642 27031 27036 ]; - }; - wireguard.interfaces = { - wg0 = { - # Determines the IP address and subnet of the client's end of the tunnel interface. - ips = [ "10.100.0.6/24" ]; - - # Path to the private key file. - # - # Note: The private key can also be included inline via the privateKey option, - # but this makes the private key world-readable; thus, using privateKeyFile is - # recommended. - privateKeyFile = "/home/inex/wireguard-keys/private"; - - peers = [ - # For a client configuration, one peer entry for the server will suffice. - { - # Public key of the server (not a file path). - publicKey = "8sEAHYhydEGKTVecXcOb28zeGHGLGCsri5evbSQV8mY="; - - # Forward all the traffic via VPN. - # allowedIPs = [ "0.0.0.0/0" ]; - # Or forward only particular subnets - allowedIPs = [ "10.100.0.0/24" ]; - - # Set this to the server IP and port. - endpoint = "135.181.97.221:51820"; - - # Send keepalives every 25 seconds. Important to keep NAT tables alive. - persistentKeepalive = 25; - } - ]; - }; - }; - }; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - console = { - font = "Lat2-Terminus16"; - keyMap = "us"; - }; - - # Set your time zone. - time.timeZone = "Europe/Moscow"; - - services = { - printing.enable = true; - xserver = { - enable = true; - layout = "us"; - xkbVariant = "colemak"; - videoDrivers = [ "amdgpu" ]; - libinput.enable = true; - exportConfiguration = true; - wacom.enable = true; - }; - openssh = { - enable = true; - passwordAuthentication = false; - forwardX11 = true; - }; - pipewire.enable = true; - flatpak.enable = true; - }; - - - sound.enable = true; - # Video driver hardware = { - opengl = { - enable = true; - driSupport32Bit = true; - extraPackages = [ pkgs.amdvlk pkgs.rocm-opencl-icd pkgs.rocm-runtime ]; - }; - steam-hardware.enable = true; - bluetooth = { - enable = true; - package = pkgs.bluezFull; - }; pulseaudio = { - enable = true; - package = pkgs.pulseaudioFull; - support32Bit = true; - extraModules = [ pkgs.pulseaudio-modules-bt ]; + enable = false; }; }; - environment.variables.VK_ICD_FILENAMES = "${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json"; - - programs = { - adb.enable = true; - java = { - enable = true; - }; - }; - - virtualisation.docker = { - enable = true; - enableOnBoot = false; - }; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.inex = { - isNormalUser = true; - home = "/home/inex"; - description = "Inex Code"; - extraGroups = [ "wheel" "networkmanager" "jackaudio" "audio" "video" "adbusers" "docker" ]; # Enable ‘sudo’ for the user. - openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzL0gmvpMOZbijqZOlTuNqtVHZGoNrxCiWJXIDcUwr1cx8M2o61qK/wNMZmyYGROpJbpsFERAjXIXBpwg2KQ3ONRL6q44nPrOSbHm3zL8pnFEvzM0BUKV1Mq2T1dM+geMhQnLrwZhOxvp3+9uhFSTPP/dVzWQ19pEiK5hHpXlD3eyO+LIaS/wkTJvBy/wCKz+O/coLyBQ+Mn5hGQaJAyDec/ovu8OhBkJbbvWp03F2zcWUCxwVfZ1VnLQxn7tk9L4iTw1+rDt0kaRQvVISV3KdqLJnPODku6eC38LcMfHIFXAWBdSUslGUl9Qkd1c+6Gorzt3BrfYL/HDW2Xk3UTQF inex-envy" - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCbUS/AblfzZcfr/iMxHJ5pubzCuriVTu12TKt1iRQFDjQDo+/j0/Ga07zqyB9VUhpJg/IOcJ6o2T4PBixNuHQQX5z4sb/tqzbx3buBz0HIp8VHRC3TtLAmsFj24AldxlADlQpGnlt+g3p200m2dwu/Yoe4+GD8Twwg6FCsyiRjstbfo89Kmwi9yVbXx5aBssscEkXBQODTpwOB05nCz3oUuvQ5ex+yH+o02cTlYyBoglgfzM6HzR0GkmCRDlx613nqa1+ICxwWY0cXMbhnUwDoJASk5eJovtmEqC29qJKABxZaKRYsaW3sMJiMOvPHf9BkVKp4uPINhLc5vopwZI10xsNOn75AXRptkHzenn7ymC+qwJr53Z1tAAfMb5ypJ+u+SE8wazd4x2CIFHH+LbaputqxyfUxNoMbFMGNXICDAOCCQ0nkax7Ifr1NlTp07zTYH6VP0kzqqYiAlBu5qo3qIi5dRsLvb6/McerDNhRmYh25Ww7zpEY4Q9uTWDZkCP8= u0_a122@localhost" - ]; - }; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "20.03"; # Did you read the comment? - } - diff --git a/Desktop/modules/gnome.nix b/Desktop/modules/gnome.nix index 56708a6..890999b 100644 --- a/Desktop/modules/gnome.nix +++ b/Desktop/modules/gnome.nix @@ -11,21 +11,20 @@ }; }; desktopManager = { - gnome3.enable = true; - kodi.enable = true; + gnome.enable = true; }; }; - + qt5.platformTheme = "gnome"; environment.systemPackages = with pkgs; [ - gnome3.pomodoro - gnome3.gnome-tweaks - gnome3.networkmanager-openvpn - gnome3.evolution + gnome.pomodoro + gnome.gnome-tweaks + gnome.networkmanager-openvpn + rhythmbox + evolution gnomeExtensions.gsconnect paper-icon-theme ]; } - diff --git a/Desktop/modules/vscode.nix b/Desktop/modules/vscode.nix new file mode 100644 index 0000000..4755345 --- /dev/null +++ b/Desktop/modules/vscode.nix @@ -0,0 +1,114 @@ +{ config, pkgs, ... }: + +let + unstable = import { config.allowUnfree = true; }; + extensions = (with pkgs.vscode-extensions; [ + unstable.vscode-extensions.ms-vsliveshare.vsliveshare + arcticicestudio.nord-visual-studio-code + bbenoist.nix + davidanson.vscode-markdownlint + dbaeumer.vscode-eslint + jakebecker.elixir-ls + james-yu.latex-workshop + jnoortheen.nix-ide + mhutchie.git-graph + ms-azuretools.vscode-docker + ms-python.vscode-pylance + ms-python.python + ms-toolsai.jupyter + ms-vscode-remote.remote-ssh + ms-vscode.cpptools + github.copilot + ]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + { + name = "vscode-standardjs"; + publisher = "chenxsan"; + version = "1.4.1"; + sha256 = "0hiaqflp0d3k2pq3p44wrpyn4v6n0x660f4v47nf9bsdn5lidih3"; + } + { + name = "npm-intellisense"; + publisher = "christian-kohler"; + version = "1.4.1"; + sha256 = "0hph57g8fbwrvj1sdzc7vqsiaf7n2qzvkakc9ir0kkkwwdxc6c5a"; + } + { + name = "dart-code"; + publisher = "Dart-Code"; + version = "3.40.0"; + sha256 = "1cvibhazgz42zzwlk354sihrimw26qvgsq5nirvwx4v27gcirq81"; + } + { + name = "flutter"; + publisher = "Dart-Code"; + version = "3.40.0"; + sha256 = "0yxkqr6ajpdl06rxxad4c1zx5ci4sbaj2lk2xl9bws51imn58wry"; + } + { + name = "vscode-html-css"; + publisher = "ecmel"; + version = "1.12.2"; + sha256 = "059s1yg0b875b3ijhwgpg8v408as5z6r876jv5jing1vjb20pgvb"; + } + { + name = "vscode-npm-script"; + publisher = "eg2"; + version = "0.3.25"; + sha256 = "0z01i0fhl0phmz5bx5fh80flarldk7sdqgr14vx9kjz5yjzz48ys"; + } + { + name = "vsc-community-material-theme"; + publisher = "Equinusocio"; + version = "1.4.4"; + sha256 = "005l4pr9x3v6x8450jn0dh7klv0pv7gv7si955r7b4kh19r4hz9y"; + } + { + name = "vsc-material-theme"; + publisher = "Equinusocio"; + version = "33.4.0"; + sha256 = "11ljird5ja3r0ada639k0bdfdfq2rx0q49nh42cpglg3djh4mn06"; + } + { + name = "vsc-material-theme-icons"; + publisher = "equinusocio"; + version = "2.3.1"; + sha256 = "1djm4k3hcn4aq63d4mxs2n4ffq5x1qr82q6gxwi5pmabrb0hrb30"; + } + { + name = "vscode-firefox-debug"; + publisher = "firefox-devtools"; + version = "2.9.6"; + sha256 = "0mx70gyigz26x56r01vvpdrvgs10zzqzv204jbkjzfwh4za45zv7"; + } + { + name = "vscode-systemd-support"; + publisher = "hangxingliu"; + version = "1.0.1"; + sha256 = "0f7j6y1jngicm475nilx08j55d94nnmymifxcbkszlxg0lnjrqys"; + } + { + name = "materialdesignicons-intellisense"; + publisher = "lukas-tr"; + version = "4.0.0"; + sha256 = "1748pj3jcgddpiamcs4ii2bjsmn9m9fx0dn2swfki8c6ibwrhy0w"; + } + { + name = "remote-containers"; + publisher = "ms-vscode-remote"; + version = "0.234.0"; + sha256 = "07mx08nwvw7jdlvkbr5iwikrcriib4zc1im1lbrqxjv7paj1an86"; + } + + ]; + vscode-with-extensions = pkgs.vscode-with-extensions.override { + vscodeExtensions = extensions; + }; + +in +{ + config = { + environment.systemPackages = [ + vscode-with-extensions + ]; + }; +} diff --git a/Desktop/pipewire.nix b/Desktop/pipewire.nix new file mode 100644 index 0000000..69b283c --- /dev/null +++ b/Desktop/pipewire.nix @@ -0,0 +1,94 @@ +{ + security.rtkit.enable = true; + services = { + pipewire = { + enable = true; + config.pipewire = { + "context.properties" = { + "link.max-buffers" = 16; + "log.level" = 2; + "default.clock.rate" = 48000; + "default.clock.quantum" = 512; + "default.clock.min-quantum" = 512; + "default.clock.max-quantum" = 512; + "core.daemon" = true; + "core.name" = "pipewire-0"; + }; + "context.modules" = [ + { + name = "libpipewire-module-rtkit"; + args = { + "nice.level" = -15; + "rt.prio" = 88; + "rt.time.soft" = 200000; + "rt.time.hard" = 200000; + }; + flags = [ "ifexists" "nofail" ]; + } + { name = "libpipewire-module-protocol-native"; } + { name = "libpipewire-module-profiler"; } + { name = "libpipewire-module-metadata"; } + { name = "libpipewire-module-spa-device-factory"; } + { name = "libpipewire-module-spa-node-factory"; } + { name = "libpipewire-module-client-node"; } + { name = "libpipewire-module-client-device"; } + { + name = "libpipewire-module-portal"; + flags = [ "ifexists" "nofail" ]; + } + { + name = "libpipewire-module-access"; + args = { }; + } + { name = "libpipewire-module-adapter"; } + { name = "libpipewire-module-link-factory"; } + { name = "libpipewire-module-session-manager"; } + ]; + }; + config.pipewire-pulse = { + "context.properties" = { + "log.level" = 2; + }; + "context.modules" = [ + { + name = "libpipewire-module-rtkit"; + args = { + "nice.level" = -15; + "rt.prio" = 88; + "rt.time.soft" = 200000; + "rt.time.hard" = 200000; + }; + flags = [ "ifexists" "nofail" ]; + } + { name = "libpipewire-module-protocol-native"; } + { name = "libpipewire-module-client-node"; } + { name = "libpipewire-module-adapter"; } + { name = "libpipewire-module-metadata"; } + { + name = "libpipewire-module-protocol-pulse"; + args = { + "pulse.min.req" = "512/48000"; + "pulse.default.req" = "512/48000"; + "pulse.max.req" = "512/48000"; + "pulse.min.quantum" = "512/48000"; + "pulse.max.quantum" = "512/48000"; + "server.address" = [ "unix:native" ]; + }; + } + ]; + "stream.properties" = { + "node.latency" = "512/48000"; + "resample.quality" = 1; + }; + }; + config.jack = { + "jack.properties" = { + "node.latency" = "512/48000"; + "node.lock-quantum" = true; + }; + }; + pulse.enable = true; + jack.enable = true; + }; + }; +} diff --git a/Desktop/pulsed.nix b/Desktop/pulsed.nix new file mode 100644 index 0000000..7b5a891 --- /dev/null +++ b/Desktop/pulsed.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./common.nix + ]; + + services.pipewire = { + pulse.enable = false; + }; + + hardware.pulseaudio.enable = true; + +} diff --git a/Desktop/software.nix b/Desktop/software.nix index c622ae2..d091a22 100644 --- a/Desktop/software.nix +++ b/Desktop/software.nix @@ -1,10 +1,18 @@ { config, pkgs, ... }: let - unstable = import {}; -in { + unstable = import { config.allowUnfree = true; }; + MyOBS = pkgs.wrapOBS.override { obs-studio = pkgs.obs-studio; } { + plugins = with pkgs.obs-studio-plugins; [ + wlrobs + obs-gstreamer + obs-multi-rtmp + ]; +}; +in +{ environment.systemPackages = with pkgs; [ - # Utils + # Utils pciutils usbutils i2c-tools @@ -13,13 +21,16 @@ in { nix-bundle file restic - + jq # Connectivity nmap libcec + clinfo + alfis # File systems gparted + btrfs-progs # Archives unzip @@ -39,6 +50,8 @@ in { neofetch ponysay bpytop + httpie + htop # Voice speechd @@ -61,101 +74,121 @@ in { # Downloaders transmission-gtk - youtube-dl syncthing wget + yt-dlp # Messangers tdesktop - #discord mumble - #riot-desktop qtox dino - #zoom-us - #teams - teamspeak_client - + gomuks + deltachat-desktop + # Games steam steam-run-native openttd minecraft vulkan-tools - wineWowPackages.full - wineWowPackages.fonts + wineWowPackages.stable winetricks + protontricks xonotic - + cataclysm-dda + + lutris + bottles + + # VR + monado + openhmd + # VCS git gitAndTools.git-bug # IDE - vscode - (pkgs.callPackage ./modules/my_vim.nix {}) + + (pkgs.callPackage ./modules/my_vim.nix { }) + lens + postman + androidStudioPackages.canary # Compilers and interpretators ccls cmake gcc-unwrapped octaveFull - texlive.combined.scheme-full python3Full nodejs - fdroidserver + nixpkgs-fmt + pandoc # Docker and orchestration - ansible_2_9 + ansible docker-compose - + + cookiecutter + # Maps josm - + # Screen recording - unstable.obs-studio - unstable.obs-wlrobs - unstable.obs-v4l2sink - #unstable.obs-linuxbrowser - peek - + obs-studio + kooha + # Graphics krita gmic_krita_qt potrace ffmpeg - + blender + unstable.shotwell + inkscape + kdenlive + # Audio audacity # lmms picard cmus spotify - pulseeffects + pulseeffects-pw vlc syncplay + mpv - kruler + brasero + libsForQt5.k3b - # Plugins - # ladspaPlugins - # lsp-plugins - + # DAW + zrythm + distrho + helvum + zam-plugins + x42-plugins + helm + zyn-fusion + lsp-plugins + ardour # Documents anki libreoffice homebank - trilium-desktop klavaro liberation_ttf keepassxc glow - + unstable.obsidian + aegisub + # Themes paper-icon-theme plata-theme - + ]; } diff --git a/Desktop/vscode.nix b/Desktop/vscode.nix new file mode 100644 index 0000000..008f39d --- /dev/null +++ b/Desktop/vscode.nix @@ -0,0 +1,14 @@ +{ + imports = [ + (fetchTarball "https://github.com/msteen/nixos-vscode-server/tarball/master") + ]; + + services.vscode-server.enable = true; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryFlavor = "curses"; + }; + +}