virtiofsd: Implement
This commit is contained in:
53
modules/services/greetd/default.nix
Normal file
53
modules/services/greetd/default.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -83,10 +83,22 @@ 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 ];
|
||||
virtiofsd = {
|
||||
description = "vhost-user virtio-fs device backend written in Rust";
|
||||
wantedBy = [ "default.target" "libvirtd.service" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.virtiofsd}/bin/virtiofsd --socket-path=/tmp/vfsd.sock --shared-dir /mnt/Storage/Games --announce-submounts --inode-file-handles=mandatory";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
|
||||
Reference in New Issue
Block a user