Adding sway

This commit is contained in:
Lyes Saadi 2025-02-01 14:42:49 +01:00
parent 35dc350142
commit 2169525730
No known key found for this signature in database
GPG key ID: 17418538BAA17767
4 changed files with 71 additions and 19 deletions

36
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735344290, "lastModified": 1736373539,
"narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "613691f285dad87694c2ba1c9e6298d04736292d", "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -39,11 +39,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1735388221, "lastModified": 1737751639,
"narHash": "sha256-e5IOgjQf0SZcFCEV/gMGrsI0gCJyqOKShBQU0iiM3Kg=", "narHash": "sha256-ZEbOJ9iT72iwqXsiEMbEa8wWjyFvRA9Ugx8utmYbpz4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "7c674c6734f61157e321db595dbfcd8523e04e19", "rev": "dfad538f751a5aa5d4436d9781ab27a6128ec9d4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -55,11 +55,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1735531152, "lastModified": 1737672001,
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", "narHash": "sha256-YnHJJ19wqmibLQdUeq9xzE6CjrMA568KN/lFPuSVs4I=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", "rev": "035f8c0853c2977b24ffc4d0a42c74f00b182cd8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -71,11 +71,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1735471104, "lastModified": 1737746512,
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "narHash": "sha256-nU6AezEX4EuahTO1YopzueAXfjFfmCHylYEFCagduHU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "rev": "825479c345a7f806485b7f00dbe3abb50641b083",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -87,11 +87,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1734649271, "lastModified": 1735471104,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -116,11 +116,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1735092772, "lastModified": 1737869730,
"narHash": "sha256-u9uEmMRE3RR8hwZto4USSDvee7X2FEYeWcSSLf4Jjrs=", "narHash": "sha256-4u/VS7fiqAtnEnm2z7DSNzNyM7sUB+nq3aGKcKBwodg=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "cea051b6f908304f4af6484b14a532c729f0cc34", "rev": "39c4c603ee641aed350dce31562ad6dd6f0044d8",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -27,6 +27,7 @@
./modules/nvidia ./modules/nvidia
./modules/specialisations/old-kernel.nix ./modules/specialisations/old-kernel.nix
./modules/specialisations/gaming.nix ./modules/specialisations/gaming.nix
./modules/sway
nix-flatpak.nixosModules.nix-flatpak nix-flatpak.nixosModules.nix-flatpak
nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4 nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4

View file

@ -67,7 +67,7 @@ in {
heroic heroic
# cemu # cemu
prismlauncher prismlauncher
vvvvvv # vvvvvv
ryujinx ryujinx
dolphin-emu dolphin-emu
parsec-bin parsec-bin
@ -127,6 +127,7 @@ in {
gnome-firmware gnome-firmware
# Utilities # Utilities
ghostty
impression impression
resources resources
file-roller file-roller

50
modules/sway/default.nix Normal file
View file

@ -0,0 +1,50 @@
{ pkgs, ... }:
let xwayland-sway =
(pkgs.writeScriptBin "Xwayland-sway" ''
#! ${pkgs.bash}/bin/bash
exec ${pkgs.xwayland}/bin/Xwayland "$@" -hidpi
'');
in
{
programs.sway = {
enable = true;
wrapperFeatures = {
base = true;
gtk = true;
};
extraOptions = [
"--unsupported-gpu"
];
extraSessionCommands = ''
# SDL:
export SDL_VIDEODRIVER=wayland
# QT (needs qt5.qtwayland in systemPackages):
export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
export WLR_XWAYLAND=${xwayland-sway}
'';
extraPackages = with pkgs; [
brightnessctl
grim
swayidle
swaylock
wmenu
mako
waybar
poweralertd
lxde.lxsession
networkmanagerapplet
wofi
wlogout
slurp
];
};
environment.systemPackages = [
xwayland-sway
];
}