Compare commits
4 Commits
c0b061a79d
...
b8d905ba8f
Author | SHA1 | Date | |
---|---|---|---|
b8d905ba8f | |||
fb4815a7dd | |||
1fa05e9822 | |||
91298bbfe5 |
@ -16,7 +16,12 @@
|
||||
};
|
||||
"/mnt/Storage" = {
|
||||
device = "/dev/disk/by-label/storage";
|
||||
fsType = "ext4";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodev"
|
||||
"nosuid"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@ -24,20 +29,17 @@
|
||||
gajim-mainwindow
|
||||
virt-manager qemu scream
|
||||
replaysorcery # Custom package
|
||||
#evdev-proxy # Custom package
|
||||
vfio-isolate # Custom Package
|
||||
steam-wrapped discord-wrapped # Custom package
|
||||
mumble
|
||||
piper
|
||||
trackma # Custom package
|
||||
piper trackma # Custom package
|
||||
anime-dl # Custom package
|
||||
thunderbird
|
||||
#multimc-wrapped # Custom package
|
||||
#nwg-launchers
|
||||
gnome-podcasts
|
||||
cantata
|
||||
newsflash
|
||||
sublime-music-no-test
|
||||
sublime-music
|
||||
anki
|
||||
#psst
|
||||
];
|
||||
@ -48,7 +50,16 @@
|
||||
primaryScreen = "C27F398";
|
||||
enable = true;
|
||||
};
|
||||
sway.enable = true;
|
||||
sway = {
|
||||
enable = true;
|
||||
extraSessionCommands = ''
|
||||
# Pick the dGPU as the first one
|
||||
#DGPU_DRM_NODE=$(ls /sys/bus/pci/devices/0000:01:00.0/drm | grep card)
|
||||
#IGPU_DRM_NODE=$(ls /sys/bus/pci/devices/0000:08:00.0/drm | grep card)
|
||||
|
||||
#export WLR_DRM_DEVICES=/dev/dri/$DGPU_DRM_NODE:/dev/dri/$IGPU_DRM_NODE
|
||||
'';
|
||||
};
|
||||
alacritty.enable = true;
|
||||
emacs.enable = true;
|
||||
firefox.enable = true;
|
||||
@ -67,7 +78,17 @@
|
||||
};
|
||||
services = {
|
||||
gamemode.enable = true;
|
||||
gnome.enable = true;
|
||||
#gnome.enable = true;
|
||||
greetd = {
|
||||
enable = false;
|
||||
/*
|
||||
swayExtra = ''
|
||||
output HDMI-A-3 transform 90 anticlockwise
|
||||
|
||||
workspace 1 output HDMI-A-3
|
||||
'';
|
||||
*/
|
||||
};
|
||||
kanshi = let
|
||||
horizontal = "Samsung Electric Company C27F398 H4ZR101145";
|
||||
vertical = "Goldstar Company Ltd IPS235 305NDPHKN600";
|
||||
@ -105,7 +126,7 @@
|
||||
swaync.enable = true;
|
||||
input-remapper = {
|
||||
enable = true;
|
||||
postStartCommand = "${pkgs.input-remapper}/bin/input-remapper-control --command start --preset NOOP --device \"Razer Razer Tartarus V2\"; exit 0";
|
||||
postStartCommand = "${pkgs.input-remapper}/bin/input-remapper-control --command start --preset NOOP --device \"Razer Razer Tartarus V2\"";
|
||||
};
|
||||
};
|
||||
system = {
|
||||
@ -149,7 +170,7 @@
|
||||
};
|
||||
kernelParams = [
|
||||
"amd_iommu=on"
|
||||
"iommu=pt"
|
||||
"iommu=on"
|
||||
"sysrq_always_enabled=1"
|
||||
"kvm.ignore_msrs=1"
|
||||
"kvm.report_ignored_msrs=N"
|
||||
@ -160,6 +181,7 @@
|
||||
"nospec"
|
||||
"clocksource=tsc"
|
||||
"tsc=reliable"
|
||||
"pci=noaer"
|
||||
];
|
||||
|
||||
extraModulePackages = [ pkgs.linuxPackages_zen.vendor-reset ];
|
||||
@ -185,6 +207,7 @@
|
||||
wayland = true;
|
||||
enable = true;
|
||||
};
|
||||
desktopManager.plasma5.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
@ -206,15 +229,6 @@
|
||||
};
|
||||
};
|
||||
user.services = {
|
||||
scream = {
|
||||
description = "Audio receiver for the Scream virtual network sound card";
|
||||
#wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.scream}/bin/scream -i virbr0 -o pulse";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
replaysorcery-kms = {
|
||||
description = "An open-source, instant-replay solution for Linux; KMS service";
|
||||
#wantedBy = [ "default.target" ];
|
||||
|
@ -43,6 +43,8 @@ in inputs.nixpkgs.lib.nixosSystem {
|
||||
emacs.overlay
|
||||
(import ../packages)
|
||||
(import ../overlays/simple.nix)
|
||||
|
||||
# Always keep sandbox.nix as the last overlay
|
||||
(import ../overlays/sandbox.nix)
|
||||
];
|
||||
}
|
||||
|
@ -28,6 +28,7 @@
|
||||
./services/input-remapper
|
||||
./services/gamemode
|
||||
./services/i18n
|
||||
./services/greetd
|
||||
|
||||
# User
|
||||
#./users/default.nix
|
||||
|
@ -66,7 +66,7 @@ in {
|
||||
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager.gdm = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
wayland = true;
|
||||
};
|
||||
};
|
||||
|
@ -35,6 +35,10 @@ let
|
||||
in {
|
||||
options.ptw.programs.sway = {
|
||||
enable = lib.mkEnableOption "Configure sway using HomeManager";
|
||||
extraSessionCommands = lib.mkOption {
|
||||
description = "Commands to be run before sway is started. See programs.sway.extraSessionCommands";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@ -61,10 +65,14 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
programs.sway.enable = true;
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
extraSessionCommands = cfg.extraSessionCommands;
|
||||
};
|
||||
home-manager.users."${config.ptw.system.singleUser}" = {
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
extraSessionCommands = cfg.extraSessionCommands;
|
||||
config = {
|
||||
bars = [ ];
|
||||
startup = [
|
||||
|
53
modules/services/greetd/default.nix
Normal file
53
modules/services/greetd/default.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.ptw.services.greetd;
|
||||
in {
|
||||
options.ptw.services.greetd = {
|
||||
enable = lib.mkEnableOption "Enable greetd with gtkgreet";
|
||||
swayExtra = lib.mkOption {
|
||||
description = "Extra options to include in the sway config";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.greeter = {
|
||||
isSystemUser = lib.mkForce false;
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
uid = 992;
|
||||
};
|
||||
|
||||
services = {
|
||||
greetd = {
|
||||
enable = true;
|
||||
restart = true;
|
||||
settings = {
|
||||
default_session = let
|
||||
swayConfig = pkgs.writeText "login-sway-config" ''
|
||||
exec ${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; ${pkgs.sway}/bin/swaymsg exit;
|
||||
|
||||
bindsym Mod4+shift+e exec swaynag \
|
||||
-t warning \
|
||||
-m 'What do you want to do?' \
|
||||
-b 'Poweroff' 'systemctl poweroff' \
|
||||
-b 'Reboot' 'systemctl reboot'
|
||||
|
||||
input "*" {
|
||||
xkb_layout de
|
||||
}
|
||||
|
||||
${cfg.swayExtra}
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
'';
|
||||
in {
|
||||
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -23,12 +23,9 @@ in {
|
||||
"/dev/random", "/dev/urandom",
|
||||
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
|
||||
"/dev/rtc","/dev/hpet",
|
||||
"/dev/input/by-id/usb-Logitech_G700s_Rechargeable_Gaming_Mouse_93DF48160007-event-mouse",
|
||||
"/dev/input/by-id/usb-Logitech_USB_Receiver-if02-event-mouse",
|
||||
"/dev/input/by-id/usb-Razer_Razer_Tartarus_V2-event-kbd",
|
||||
"/dev/input/by-id/virtual-event-EvdevProxyMouse",
|
||||
"/dev/input/by-id/virtual-event-EvdevProxyTartarus",
|
||||
"/dev/input/by-id/usb-Razer_Razer_BlackWidow_Ultimate-event-kbd"
|
||||
"/dev/input/by-id/virtual-event-EvdevProxyKeyboard",
|
||||
"/dev/input/by-id/usb-Logitech_USB_Receiver-if02-event-mouse"
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ in {
|
||||
USBIDClass = {vendor=0x046d, model=0xc07c, class="Mouse"}
|
||||
[[device]]
|
||||
[device.Simple]
|
||||
name = "EvdevProxyTartarus"
|
||||
name = "EvdevProxyKeyboard"
|
||||
vendor = 0x1337
|
||||
model = 0x1338
|
||||
class = "Keyboard"
|
||||
@ -32,7 +32,9 @@ in {
|
||||
# the mapped version of the Tartarus evdev node.
|
||||
# (Useful for qemu)
|
||||
[[device.Simple.selector]]
|
||||
EVDEVClass = {phys="\"key-mapper\""}
|
||||
EVDEVClass = {phys="\"input-remapper\""}
|
||||
[[device.Simple.selector]]
|
||||
USBIDClass = {vendor=0x1532, model=0x011a, class="Keyboard"}
|
||||
'';
|
||||
"libvirt/hooks/qemu".source = let
|
||||
vfio-isolate-state = "/tmp/vfio-isolate-state";
|
||||
@ -43,16 +45,14 @@ in {
|
||||
phase=$3
|
||||
extra=$4
|
||||
|
||||
if [[ "$guest" = "win10" ]]; then
|
||||
echo "called with $1 $2 $3 $4" > /dev/stderr
|
||||
if [[ "$guest" = "win10-gaming" ]]; then
|
||||
case "$action" in
|
||||
prepare)
|
||||
# Only do this while in preparation
|
||||
[[ ! "$phase" = "prepare" ]] && exit 0
|
||||
|
||||
sudo -u alexander systemctl --user start evdev-proxy.service
|
||||
sudo -u alexander systemctl --user start scream.service
|
||||
sleep 2
|
||||
|
||||
GUEST_CORES="C1-3,5-7"
|
||||
${pkgs.vfio-isolate}/bin/vfio-isolate \
|
||||
-u ${vfio-isolate-state} \
|
||||
cpu-governor performance "$GUEST_CORES" \
|
||||
@ -64,9 +64,6 @@ in {
|
||||
stopped)
|
||||
# Only run when the VM is fully stopped
|
||||
[[ ! "$phase" = "end" ]] && exit 0
|
||||
sudo -u alexander systemctl --user stop evdev-proxy.service
|
||||
sudo -u alexander systemctl --user stop scream.service
|
||||
|
||||
${pkgs.vfio-isolate}/bin/vfio-isolate \
|
||||
restore ${vfio-isolate-state}
|
||||
esac
|
||||
@ -83,10 +80,13 @@ in {
|
||||
services.udev.packages = with pkgs; [ evdev-proxy ];
|
||||
|
||||
systemd = {
|
||||
services.libvirtd.path = with pkgs; [ vfio-isolate systemd bash ];
|
||||
services = {
|
||||
libvirtd.path = with pkgs; [ vfio-isolate systemd bash ];
|
||||
};
|
||||
|
||||
user.services.evdev-proxy = {
|
||||
description = "Creates virtual device to proxy evdev devices events";
|
||||
#wantedBy = [ "default.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.evdev-proxy}/bin/evdev-proxy";
|
||||
|
@ -89,4 +89,13 @@ final: prev:
|
||||
sha256 = "1d17lvydlny9pvaxa9xy53wxs7i6d563lp5r9g3r1xpgnb7zli8v";
|
||||
};
|
||||
});
|
||||
|
||||
# TODO: Remove when updated in nixos-unstable
|
||||
discord = prev.discord.overrideAttrs (old: {
|
||||
version = "0.0.17";
|
||||
src = prev.fetchurl {
|
||||
url = "https://dl.discordapp.net/apps/linux/0.0.17/discord-0.0.17.tar.gz";
|
||||
sha256 = "sha256-NGJzLl1dm7dfkB98pQR3gv4vlldrII6lOMWTuioDExU=";
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -1,91 +0,0 @@
|
||||
{ fetchFromGitLab
|
||||
, lib
|
||||
, python3Packages
|
||||
, gobject-introspection
|
||||
, gtk3
|
||||
, pango
|
||||
, wrapGAppsHook
|
||||
, xvfb-run
|
||||
, chromecastSupport ? false
|
||||
, serverSupport ? false
|
||||
, keyringSupport ? true
|
||||
, notifySupport ? true, libnotify
|
||||
, networkSupport ? true, networkmanager
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "sublime-music";
|
||||
version = "0.11.16";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "sublime-music";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0n06x7l4i9nqbc74yhrjgg10zffdb75jz43mbxd03hr5057fdglz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gobject-introspection
|
||||
python3Packages.poetry-core
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
pango
|
||||
]
|
||||
++ lib.optional notifySupport libnotify
|
||||
++ lib.optional networkSupport networkmanager
|
||||
;
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
bleach
|
||||
dataclasses-json
|
||||
deepdiff
|
||||
fuzzywuzzy
|
||||
mpv
|
||||
peewee
|
||||
pygobject3
|
||||
python-Levenshtein
|
||||
python-dateutil
|
||||
requests
|
||||
semver
|
||||
]
|
||||
++ lib.optional chromecastSupport PyChromecast
|
||||
++ lib.optional keyringSupport keyring
|
||||
++ lib.optional serverSupport bottle
|
||||
;
|
||||
|
||||
# hook for gobject-introspection doesn't like strictDeps
|
||||
# https://github.com/NixOS/nixpkgs/issues/56943
|
||||
strictDeps = false;
|
||||
|
||||
# Use the test suite provided by the upstream project.
|
||||
doCheck = false;
|
||||
checkInputs = with python3Packages; [
|
||||
pytest
|
||||
pytest-cov
|
||||
];
|
||||
checkPhase = "${xvfb-run}/bin/xvfb-run pytest";
|
||||
|
||||
# Also run the python import check for sanity
|
||||
#pythonImportsCheck = [ "sublime_music" ];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 sublime-music.desktop -t $out/share/applications
|
||||
install -Dm444 sublime-music.metainfo.xml -t $out/share/metainfo
|
||||
|
||||
for size in 16 22 32 48 64 72 96 128 192 512 1024; do
|
||||
install -Dm444 logo/rendered/"$size".png \
|
||||
$out/share/icons/hicolor/"$size"x"$size"/apps/sublime-music.png
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GTK3 Subsonic/Airsonic client";
|
||||
homepage = "https://sublimemusic.app/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ albakham sumnerevans ];
|
||||
};
|
||||
}
|
@ -1,16 +1,17 @@
|
||||
{
|
||||
lib, stdenv, pkgs
|
||||
, extraStartupArgs ? ""
|
||||
, upstreamElectron ? pkgs.electron
|
||||
}:
|
||||
|
||||
pkgs.unstable.discord.overrideAttrs (old: let
|
||||
pkgs.discord.overrideAttrs (old: let
|
||||
asar = pkgs.nodePackages.asar;
|
||||
gtk3 = pkgs.gtk3;
|
||||
binaryName = "Discord";
|
||||
system-electron = "$out/opt/${binaryName}/system-electron.sh";
|
||||
in rec {
|
||||
version = "0.0.16";
|
||||
nativeBuildInputs = with pkgs.unstable; old.nativeBuildInputs ++ [ electron asar ];
|
||||
nativeBuildInputs = with pkgs.unstable; old.nativeBuildInputs ++ [ upstreamElectron asar ];
|
||||
buildPhase = ''
|
||||
${asar}/bin/asar e resources/app.asar resources/app
|
||||
rm resources/app.asar
|
||||
|
@ -6,10 +6,13 @@ let
|
||||
discord-system-electron = prev.callPackage ./applications/networking/instant-messengers/discord {
|
||||
# Wayland
|
||||
# NOTE: electron under Wayland has no window titlebars
|
||||
upstreamElectron = prev.electron_16;
|
||||
extraStartupArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
|
||||
#extraStartupArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer";
|
||||
};
|
||||
in {
|
||||
inherit discord-system-electron;
|
||||
|
||||
input-remapper = prev.callPackage ./tools/games/input-remapper {};
|
||||
vfio-isolate = prev.callPackage ./tools/virtualisation/vfio-isolate {};
|
||||
mopidy-funkwhale = prev.callPackage ./applications/audio/mopidy/funkwhale.nix {};
|
||||
@ -20,6 +23,7 @@ in {
|
||||
|
||||
replaysorcery = prev.callPackage ./tools/games/replaysorcery {};
|
||||
evdev-proxy = prev.callPackage ./tools/virtualisation/evdev-proxy {};
|
||||
virtiofsd = prev.callPackage ./tools/virtualisation/virtiofsd {};
|
||||
anime4k = prev.callPackage ./misc/video/anime4k {};
|
||||
anime-dl = prev.callPackage ./tools/video/animedl {
|
||||
pySmartDL = pySmartDL;
|
||||
@ -46,13 +50,13 @@ in {
|
||||
|
||||
swaync = prev.callPackage ./tools/desktop/swaync {};
|
||||
|
||||
# TODO: Remove once NixOS has version 0.11.16 in their repos
|
||||
sublime-music-no-test = prev.callPackage ./applications/audio/sublime-music {};
|
||||
|
||||
sound-gambit = prev.callPackage tools/audio/sound-gambit {};
|
||||
ebu-norm = prev.callPackage tools/audio/ebu-norm {};
|
||||
|
||||
payload-dumper = prev.callPackage tools/system/payload-dumper {};
|
||||
|
||||
psst = prev.callPackage tools/audio/psst {};
|
||||
|
||||
wlrootsqt = prev.libsForQt5.callPackage ./wlrootsqt.nix {};
|
||||
qtgreet = prev.libsForQt5.callPackage ./qtgreet.nix {};
|
||||
}
|
||||
|
32
packages/tools/virtualisation/virtiofsd/default.nix
Normal file
32
packages/tools/virtualisation/virtiofsd/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
lib
|
||||
, rustPlatform
|
||||
, pkgconfig, libcap_ng, libseccomp
|
||||
, fetchFromGitLab
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "virtiofsd";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "virtio-fs";
|
||||
repo = "virtiofsd";
|
||||
rev = "a31ad19efc302836a364fd6d79bda63160404b01";
|
||||
sha256 = "12nxm40sjx2jzl1j2czzanmk9b922dvfh64ndvgf5z4g4cviv33x";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-uRPmZE/xc0yeurBZ4rnrZua5d4lbPwStMUacFgbquuk=";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
buildInputs = [ libcap_ng libseccomp ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "vhost-user virtio-fs device backend written in Rust";
|
||||
homepage = "https://gitlab.com/virtio-fs/virtiofsd";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user