niri config
This commit is contained in:
parent
4d65ec9ae6
commit
180a071620
7 changed files with 141 additions and 22 deletions
|
|
@ -113,6 +113,7 @@
|
||||||
};
|
};
|
||||||
workstationOverlay = final: prev: {
|
workstationOverlay = final: prev: {
|
||||||
plasticity = nixpkgs.legacyPackages."x86_64-linux".callPackage ./packages/plasticity.nix { };
|
plasticity = nixpkgs.legacyPackages."x86_64-linux".callPackage ./packages/plasticity.nix { };
|
||||||
|
niri = nixpkgs.legacyPackages."x86_64-linux".callPackage ./packages/niri.nix { };
|
||||||
};
|
};
|
||||||
serverOverlay = final: prev: {
|
serverOverlay = final: prev: {
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
compositor = "kwin";
|
compositor = "kwin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
desktopManager.plasma6.enable = true;
|
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
|
|
@ -35,8 +34,12 @@
|
||||||
wireplumber.enable = true;
|
wireplumber.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
programs.niri.enable = true;
|
||||||
# programs.hyprland.enable = true;
|
environment.systemPackages = with pkgs; [
|
||||||
|
anyrun
|
||||||
|
foot
|
||||||
|
xwayland-satellite
|
||||||
|
];
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
xpadneo.enable = true;
|
xpadneo.enable = true;
|
||||||
|
|
@ -52,7 +55,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
xdgOpenUsePortal = true;
|
xdgOpenUsePortal = true;
|
||||||
extraPortals = with pkgs; [
|
extraPortals = with pkgs; [
|
||||||
kdePackages.xdg-desktop-portal-kde
|
# kdePackages.xdg-desktop-portal-kde
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
xdg-desktop-portal-gnome
|
xdg-desktop-portal-gnome
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,12 @@
|
||||||
];
|
];
|
||||||
directories = [
|
directories = [
|
||||||
"/etc/NetworkManager/system-connections"
|
"/etc/NetworkManager/system-connections"
|
||||||
"/etc/waydroid-extra/images/"
|
|
||||||
"/var/lib/bluetooth"
|
"/var/lib/bluetooth"
|
||||||
"/var/lib/flatpak"
|
"/var/lib/flatpak"
|
||||||
"/var/lib/nixos"
|
"/var/lib/nixos"
|
||||||
"/var/lib/systemd/coredump"
|
"/var/lib/systemd/coredump"
|
||||||
"/var/lib/systemd/timers"
|
"/var/lib/systemd/timers"
|
||||||
"/var/lib/tailscale"
|
"/var/lib/tailscale"
|
||||||
"/var/lib/waydroid"
|
|
||||||
"/var/log"
|
"/var/log"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@
|
||||||
let
|
let
|
||||||
kdepkgs = with pkgs.kdePackages; [
|
kdepkgs = with pkgs.kdePackages; [
|
||||||
ark
|
ark
|
||||||
|
dolphin
|
||||||
dolphin-plugins
|
dolphin-plugins
|
||||||
kolourpaint
|
kolourpaint
|
||||||
];
|
];
|
||||||
|
|
@ -156,18 +157,6 @@
|
||||||
roboto
|
roboto
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.plasma6.excludePackages = (
|
|
||||||
with pkgs.kdePackages;
|
|
||||||
[
|
|
||||||
discover
|
|
||||||
elisa
|
|
||||||
gwenview
|
|
||||||
kate
|
|
||||||
khelpcenter
|
|
||||||
oxygen
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
libvirtd.enable = true;
|
libvirtd.enable = true;
|
||||||
lxd.enable = true;
|
lxd.enable = true;
|
||||||
waydroid.enable = true;
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
|
||||||
129
packages/niri.nix
Normal file
129
packages/niri.nix
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
dbus,
|
||||||
|
eudev,
|
||||||
|
fetchFromGitHub,
|
||||||
|
libdisplay-info,
|
||||||
|
libglvnd,
|
||||||
|
libinput,
|
||||||
|
libxkbcommon,
|
||||||
|
libgbm,
|
||||||
|
versionCheckHook,
|
||||||
|
nix-update-script,
|
||||||
|
pango,
|
||||||
|
pipewire,
|
||||||
|
pkg-config,
|
||||||
|
rustPlatform,
|
||||||
|
seatd,
|
||||||
|
systemd,
|
||||||
|
wayland,
|
||||||
|
withDbus ? true,
|
||||||
|
withDinit ? false,
|
||||||
|
withScreencastSupport ? true,
|
||||||
|
withSystemd ? true,
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
|
pname = "niri";
|
||||||
|
version = "25.05";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "YaLTeR";
|
||||||
|
repo = "niri";
|
||||||
|
tag = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-ngQ+iTHmBJkEbsjYfCWTJdV8gHhOCTkV8K0at6Y+YHI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs resources/niri-session
|
||||||
|
substituteInPlace resources/niri.service \
|
||||||
|
--replace-fail '/usr/bin' "$out/bin"
|
||||||
|
'';
|
||||||
|
|
||||||
|
useFetchCargoVendor = true;
|
||||||
|
cargoHash = "sha256-tZp7AhhddEhKWzEUTgosxXMEzALbv6FxqnJEb9MBhzc=";
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
rustPlatform.bindgenHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
[
|
||||||
|
libdisplay-info
|
||||||
|
libglvnd # For libEGL
|
||||||
|
libinput
|
||||||
|
libxkbcommon
|
||||||
|
libgbm
|
||||||
|
pango
|
||||||
|
seatd
|
||||||
|
wayland # For libwayland-client
|
||||||
|
]
|
||||||
|
++ lib.optional (withDbus || withScreencastSupport || withSystemd) dbus
|
||||||
|
++ lib.optional withScreencastSupport pipewire
|
||||||
|
++ lib.optional withSystemd systemd # Includes libudev
|
||||||
|
++ lib.optional (!withSystemd) eudev; # Use an alternative libudev implementation when building w/o systemd
|
||||||
|
|
||||||
|
buildFeatures =
|
||||||
|
lib.optional withDbus "dbus"
|
||||||
|
++ lib.optional withDinit "dinit"
|
||||||
|
++ lib.optional withScreencastSupport "xdp-gnome-screencast"
|
||||||
|
++ lib.optional withSystemd "systemd";
|
||||||
|
buildNoDefaultFeatures = true;
|
||||||
|
|
||||||
|
postInstall =
|
||||||
|
''
|
||||||
|
install -Dm0644 resources/niri.desktop -t $out/share/wayland-sessions
|
||||||
|
''
|
||||||
|
+ lib.optionalString withDbus ''
|
||||||
|
install -Dm0644 resources/niri-portals.conf -t $out/share/xdg-desktop-portal
|
||||||
|
''
|
||||||
|
+ lib.optionalString (withSystemd || withDinit) ''
|
||||||
|
install -Dm0755 resources/niri-session -t $out/bin
|
||||||
|
''
|
||||||
|
+ lib.optionalString withSystemd ''
|
||||||
|
install -Dm0644 resources/niri{-shutdown.target,.service} -t $out/lib/systemd/user
|
||||||
|
''
|
||||||
|
+ lib.optionalString withDinit ''
|
||||||
|
install -Dm0644 resources/dinit/niri{-shutdown,} -t $out/lib/dinit.d/user
|
||||||
|
'';
|
||||||
|
|
||||||
|
env = {
|
||||||
|
# Force linking with libEGL and libwayland-client
|
||||||
|
# so they can be discovered by `dlopen()`
|
||||||
|
RUSTFLAGS = toString (
|
||||||
|
map (arg: "-C link-arg=" + arg) [
|
||||||
|
"-Wl,--push-state,--no-as-needed"
|
||||||
|
"-lEGL"
|
||||||
|
"-lwayland-client"
|
||||||
|
"-Wl,--pop-state"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||||
|
versionCheckProgramArg = "--version";
|
||||||
|
doInstallCheck = true;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
providedSessions = [ "niri" ];
|
||||||
|
updateScript = nix-update-script { };
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Scrollable-tiling Wayland compositor";
|
||||||
|
homepage = "https://github.com/YaLTeR/niri";
|
||||||
|
changelog = "https://github.com/YaLTeR/niri/releases/tag/v${finalAttrs.version}";
|
||||||
|
license = lib.licenses.gpl3Only;
|
||||||
|
maintainers = with lib.maintainers; [
|
||||||
|
iogamaster
|
||||||
|
foo-dogsquared
|
||||||
|
sodiboo
|
||||||
|
getchoo
|
||||||
|
];
|
||||||
|
mainProgram = "niri";
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
@ -111,9 +111,9 @@
|
||||||
(lib.mkIf hostType.isWorkstation {
|
(lib.mkIf hostType.isWorkstation {
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
# home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# ulauncher
|
rmenu
|
||||||
# ];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
password-store.package = pkgs.pass-wayland;
|
password-store.package = pkgs.pass-wayland;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue