change sway
This commit is contained in:
parent
10b2bfdad1
commit
616fb718ec
4 changed files with 56 additions and 18 deletions
|
@ -1,7 +1,5 @@
|
||||||
desktop: { pkgs, ... }: {
|
desktop: { pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./base.nix
|
./base.nix
|
||||||
] ++ (if desktop then [
|
] ++ (if desktop then [] else []);
|
||||||
../programs/sway.nix
|
|
||||||
] else []);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
./systemd-boot.nix
|
./systemd-boot.nix
|
||||||
|
./services/sway.nix
|
||||||
];
|
];
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
@ -119,6 +120,5 @@
|
||||||
home-manager.users.darkkirb = import ./home-manager/darkkirb.nix true;
|
home-manager.users.darkkirb = import ./home-manager/darkkirb.nix true;
|
||||||
networking.nameservers = ["192.168.2.1"];
|
networking.nameservers = ["192.168.2.1"];
|
||||||
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
}
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
wayland.windowManager.sway = {
|
|
||||||
enable = true;
|
|
||||||
wrapperFeatures.gtk = true ;
|
|
||||||
};
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
swaylock
|
|
||||||
swayidle
|
|
||||||
wl-clipboard
|
|
||||||
mako # notification daemon
|
|
||||||
alacritty # Alacritty is the default terminal in the config
|
|
||||||
dmenu # Dmenu is the default in the config but i recommend wofi since its wayland native
|
|
||||||
];
|
|
||||||
}
|
|
54
config/services/sway.nix
Normal file
54
config/services/sway.nix
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
systemd.user.targets.sway-session = {
|
||||||
|
description = "Sway compositor session";
|
||||||
|
documentation = [ "man:systemd.special(7)" ];
|
||||||
|
bindsTo = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session-pre.target" ];
|
||||||
|
after = [ "graphical-session-pre.target" ];
|
||||||
|
};
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
dmenu
|
||||||
|
swaylock
|
||||||
|
swayidle
|
||||||
|
xwayland
|
||||||
|
mako
|
||||||
|
kanshi
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
wf-recorder
|
||||||
|
(python38.withPackages(ps: with ps; [ i3pystatus keyring ]))
|
||||||
|
];
|
||||||
|
extraSessionCommands = ''
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
# configuring kanshi
|
||||||
|
systemd.user.services.kanshi = {
|
||||||
|
description = "Kanshi output autoconfig ";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
partOf = [ "graphical-session.target" ];
|
||||||
|
environment = { XDG_CONFIG_HOME="/home/mschwaig/.config"; };
|
||||||
|
serviceConfig = {
|
||||||
|
# kanshi doesn't have an option to specifiy config file yet, so it looks
|
||||||
|
# at .config/kanshi/config
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.kanshi}/bin/kanshi
|
||||||
|
'';
|
||||||
|
RestartSec = 5;
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.displayManager.defaultSession = "sway";
|
||||||
|
services.xserver.displayManager.sddm.enable = true;
|
||||||
|
services.xserver.libinput.enable = true;
|
||||||
|
}
|
Loading…
Reference in a new issue