Switch desktop configuration over to niri, niri monitor configuration for desktop, fix bug with cd, disable emacs daemon

This commit is contained in:
Curt Spark 2024-08-13 12:52:54 +01:00
parent a9e1c26974
commit 35ebd4983a
6 changed files with 67 additions and 31 deletions

View File

@ -28,9 +28,9 @@
# Custom desktop environments
# cspark-desktop-plasma.enable = true;
cspark-desktop-gnome.enable = true;
# cspark-desktop-gnome.enable = true;
# cspark-desktop-sway.enable = true;
# cspark-desktop-niri.enable = true;
cspark-desktop-niri.enable = true;
# My audio interface has issues after coming out from suspend/hibernate, this will reset it to fix it when necessary.
systemd.services.audiointerface-reset-unbind = {

View File

@ -17,9 +17,9 @@
# Custom Desktop Configurations
# cspark-desktop-plasma-config-1.enable = true;
cspark-desktop-gnome-config-1.enable = true;
# cspark-desktop-gnome-config-1.enable = true;
# cspark-desktop-sway-config-1.enable = true;
# cspark-desktop-niri-config-1.enable = true;
cspark-desktop-niri-config-1.enable = true;
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.

View File

@ -53,7 +53,7 @@ in
# Scripts to replace user utils with ones that can interface with the neovim inbuilt terminal
(pkgs.writeShellScriptBin "cd-nvim" ''
if [ $1 ]; then
if [ "$1" ]; then
builtin cd "''$(realpath "$1")" && printf "\033]7;file://''${PWD}\033\\"
else
builtin cd "''${HOME}" && printf "\033]7;file://''${PWD}\033\\"
@ -234,10 +234,10 @@ fi
};
# Emacs install and enable daemon/server mode. Set to use unstable pure gtk branch (From emacs-overlay)
services.emacs = {
enable = true;
package = pkgs.emacs-gtk;
};
#services.emacs = {
# enable = true;
# package = pkgs.emacs-gtk;
#};
# MPDCRON to automate MPD related events, using it to automatically restart mpd-discord-rpc service to solve issues
systemd.user.services.mpdcron = let

View File

@ -44,6 +44,7 @@
nixd
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
emacs-gtk
fastfetch
appimage-run
imagemagick
@ -216,23 +217,23 @@
};
# Emacs install and enable daemon/server mode.
services.emacs = {
enable = true;
package = pkgs.emacs-gtk;
};
systemd.services.emacs = {
description = "Emacs server daemon for root";
wantedBy = [ "multi-user.target" ];
path = with pkgs; [ emacs-gtk ];
enable = true;
serviceConfig = {
User = "root";
Group = "root";
};
script = "
emacs --daemon
";
};
#services.emacs = {
# enable = true;
# package = pkgs.emacs-gtk;
#};
#systemd.services.emacs = {
# description = "Emacs server daemon for root";
# wantedBy = [ "multi-user.target" ];
# path = with pkgs; [ emacs-gtk ];
# enable = true;
# serviceConfig = {
# User = "root";
# Group = "root";
# };
# script = "
# emacs --daemon
# ";
#};
# Virt Manager Installation
virtualisation.libvirtd.enable = true;

View File

@ -25,6 +25,7 @@ in
foot # Terminal Emulator
fuzzel # Application Launcher - Wayland
wdisplays # Manage wayland displays
wlr-randr # Manage wayland displays - xrandr clone
wlsunset # Day/night gamma adjustment/filter for wayland
light # GNU/Linux application to control backlights
mako # Notification Daemon
@ -41,6 +42,7 @@ in
lxappearance # Manage GTK Themes
kdePackages.polkit-kde-agent-1 # Polkit Prompt for password prompts etc
lxqt.lxqt-openssh-askpass # GUI to query passwords on behalf of SSH agents
pavucontrol # Audio control
(writeShellScriptBin "niri-start-session"
''
@ -59,7 +61,7 @@ in
# Xwayland support via xwayland-satellite-flake
export DISPLAY=":0"
DISPLAY=":0" niri-session
niri-session
'')
];
# The minimal login manager I'm using for niri

View File

@ -48,7 +48,10 @@ input {
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
// Remember to uncomment the node by removing "/-"!
/-output "eDP-1" {
// Desktop monitor configuration
output "DP-2" {
// Uncomment this line to disable this output.
// off
@ -58,10 +61,10 @@ input {
// for the resolution.
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
mode "1920x1080@120.030"
mode "1920x1080@60.000"
// Scale is a floating-point number, but at the moment only integer values work.
scale 2.0
scale 1.0
// Transform allows to rotate the output counter-clockwise, valid values are:
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
@ -76,7 +79,37 @@ input {
// so to put another output directly adjacent to it on the right, set its x to 1920.
// If the position is unset or results in an overlap, the output is instead placed
// automatically.
position x=1280 y=0
position x=0 y=0
}
output "HDMI-A-1" {
// Uncomment this line to disable this output.
// off
// Resolution and, optionally, refresh rate of the output.
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
// If the refresh rate is omitted, niri will pick the highest refresh rate
// for the resolution.
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
mode "1920x1080@60.000"
// Scale is a floating-point number, but at the moment only integer values work.
scale 1.0
// Transform allows to rotate the output counter-clockwise, valid values are:
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
transform "normal"
// Position of the output in the global coordinate space.
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
// The cursor can only move between directly adjacent outputs.
// Output scale and rotation has to be taken into account for positioning:
// outputs are sized in logical, or scaled, pixels.
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
// so to put another output directly adjacent to it on the right, set its x to 1920.
// If the position is unset or results in an overlap, the output is instead placed
// automatically.
position x=1920 y=0
}
// Settings that influence how windows are positioned and sized.