mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-02-13 20:12:43 +00:00
improvements
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
@@ -11,10 +16,11 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users.${username}.linger = true;
|
||||
boot = {
|
||||
loader.timeout = 0;
|
||||
|
||||
# plymouth.enable = true;
|
||||
plymouth.enable = true;
|
||||
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
@@ -25,7 +31,31 @@ in
|
||||
"vt.global_cursor_default=0" # no cursor blinking
|
||||
];
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
initrd = {
|
||||
verbose = false;
|
||||
systemd = {
|
||||
enable = true;
|
||||
services = {
|
||||
#plymouth-quit.wantedBy = lib.mkForce [ ];
|
||||
# plymouth-quit-wait.wantedBy = lib.mkForce [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
services.greetd.greeterManagesPlymouth = true;
|
||||
/*
|
||||
systemd.services = {
|
||||
plymouth-quit-wait = {
|
||||
overrideStrategy = "asDropin";
|
||||
after = [ "graphical-session.target" ];
|
||||
wantedBy = lib.mkForce [ "graphical-session.target" ];
|
||||
};
|
||||
plymouth-quit = {
|
||||
overrideStrategy = "asDropin";
|
||||
after = [ "graphical-session.target" ];
|
||||
wantedBy = lib.mkForce [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
./boot/quiet.nix
|
||||
|
||||
./desktops/hyprland.nix
|
||||
./desktops/gamescope.nix
|
||||
|
||||
./fonts/fira-code.nix
|
||||
./fonts/noto-sans.nix
|
||||
@@ -30,8 +29,14 @@
|
||||
|
||||
./services/airprint.nix
|
||||
|
||||
./shell/waybar.nix
|
||||
./shell/dunst.nix
|
||||
./shell/firefox-pip.nix
|
||||
./shell/flameshot.nix
|
||||
./shell/gnome-keyring.nix
|
||||
./shell/hyprpicker.nix
|
||||
./shell/kitty.nix
|
||||
./shell/walker.nix
|
||||
./shell/waybar.nix
|
||||
|
||||
./xdg/forced-compliance.nix
|
||||
];
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.desktops.gamescope;
|
||||
in
|
||||
{
|
||||
options.desktops.gamescope.enable = mkEnableOption "Enable the SteamOS Compositor as a desktop environment";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession = {
|
||||
enable = true;
|
||||
args = [
|
||||
"--hide-cursor-delay"
|
||||
"3000"
|
||||
"--fadee-out-duration"
|
||||
"200"
|
||||
"--xwayland-count"
|
||||
"2"
|
||||
"-W"
|
||||
(placeholder "SCREEN_WIDTH")
|
||||
"-H"
|
||||
(placeholder "SCREEN_HEIGHT")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
services = {
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${pkgs.hyprland}/bin/Hyprland &> /dev/null";
|
||||
user = username;
|
||||
};
|
||||
default_session = "${pkgs.greetd.tuigreet}/bin/tuigreet";
|
||||
};
|
||||
};
|
||||
|
||||
dbus.enable = true;
|
||||
|
||||
pcscd.enable = true;
|
||||
|
||||
# nautilus on non-gnome
|
||||
gvfs.enable = true;
|
||||
# fix pinentry on non-gnome
|
||||
dbus.packages = with pkgs; [ gcr ];
|
||||
gnome.gnome-online-accounts.enable = true;
|
||||
gnome.evolution-data-server.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
hyprland.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
};
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
*/
|
||||
};
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
let
|
||||
cfg = config.desktops.hyprland;
|
||||
homeConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
options.desktops.hyprland = {
|
||||
@@ -15,12 +16,123 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
systemPackages = with pkgs; [ glib ];
|
||||
environment.systemPackages = with pkgs; [ glib ];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
home-manager.users.${username} = {
|
||||
wayland.windowManager.hyprland = {
|
||||
systemd.enable = false;
|
||||
};
|
||||
home.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GDK_BACKEND = "wayland,x11,*";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
};
|
||||
xdg.configFile."uwsm/env".source = pkgs.writeText "env" (
|
||||
lib.strings.concatLines (
|
||||
lib.attrsets.mapAttrsToList (
|
||||
k: v: "export ${builtins.toString k}=${builtins.toString v}"
|
||||
) config.home-manager.users.${username}.home.sessionVariables
|
||||
)
|
||||
);
|
||||
systemd.user.services = {
|
||||
"flatpak-managed-install".Unit = {
|
||||
After = [ "network-online.target" ];
|
||||
Wants = [ "network-online.target" ];
|
||||
};
|
||||
};
|
||||
/*
|
||||
programs.zsh.initExtraFirst = # sh
|
||||
''
|
||||
if uwsm check may-start; then
|
||||
exec uwsm start hyprland-uwsm.desktop > ${homeConfig.xdg.configHome}/uwsm.log 2> ${homeConfig.xdg.configHome}/uwsm.err
|
||||
fi
|
||||
'';
|
||||
*/
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
"flatpak-managed-install" = {
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
};
|
||||
greetd.serviceConfig = {
|
||||
Type = "idle";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
TTYReset = false;
|
||||
TTYVHangup = false;
|
||||
TTYVTDisallocate = false;
|
||||
};
|
||||
/*
|
||||
"uwsm-display-manager" = {
|
||||
description = "UWSM Display Manager";
|
||||
conflicts = [ "getty@tty1.service" ];
|
||||
after = [
|
||||
"systemd-user-sessions.service"
|
||||
"plymouth-quit-wait.service"
|
||||
"getty@tty1.service"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
IgnoreSIGPIPE = "no";
|
||||
SendSIGHUP = "yes";
|
||||
TimeoutStopSec = "30s";
|
||||
KeyringMode = "shared";
|
||||
Restart = "always";
|
||||
RestartSec = "5";
|
||||
StartLimitBurst = "5";
|
||||
StartLimitInterval = "30";
|
||||
};
|
||||
restartIfChanged = false;
|
||||
script = ''
|
||||
${pkgs.sudo}/bin/sudo -u ${username} --login uwsm start hyprland-uwsm.desktop
|
||||
'';
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
# XDG_RUNTIME_DIR = "/run/user/$(id -u ${username})";
|
||||
};
|
||||
aliases = [ "display-manager.service" ];
|
||||
};
|
||||
*/
|
||||
/*
|
||||
"getty@tty1" = {
|
||||
overrideStrategy = "asDropin";
|
||||
description = "Start Hyprland";
|
||||
after = [
|
||||
"sysinit.target"
|
||||
"initrd-switch-root.service"
|
||||
"systemd-udev-trigger.service"
|
||||
"seatd.service"
|
||||
"systemd-logind.service"
|
||||
];
|
||||
wants = [
|
||||
"systemd-udev-trigger.service"
|
||||
"seatd.service"
|
||||
"systemd-logind.service"
|
||||
];
|
||||
unitConfig.ConditionPathExists = "/home/${username}";
|
||||
onFailure = [ "emergency.target" ];
|
||||
serviceConfig.Type = "simple";
|
||||
preStart = "+${pkgs.coreutils}/bin/rm -f /run/nologin";
|
||||
script = ''
|
||||
-${pkgs.util-linux}/bin/agetty -o '-p -f -- \u' --noclear --autologin ${username} %I $TERM StandardOutput=null StandardError=journal
|
||||
'';
|
||||
wantedBy = [
|
||||
"graphical.target"
|
||||
"initrd-switch-root.service"
|
||||
];
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
@@ -35,38 +147,46 @@ in
|
||||
};
|
||||
|
||||
# https://github.com/sjcobb2022/nixos-config/blob/70fb548b961c19e9855d2de86ee9569a7a88d976/hosts/common/optional/greetd.nix#L23C1-L33C2
|
||||
systemd.services.greetd.serviceConfig = {
|
||||
Type = "idle";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
StandardError = "journal"; # Without this errors will spam on screen
|
||||
# Without these bootlogs will spam on screen
|
||||
TTYReset = true;
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
/*
|
||||
systemd.services = {
|
||||
greetd.serviceConfig = {
|
||||
Type = "idle";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
StandardError = "journal"; # Without this errors will spam on screen
|
||||
# Without these bootlogs will spam on screen
|
||||
TTYReset = true;
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
services = {
|
||||
greetd = {
|
||||
enable = true;
|
||||
greeterManagesPlymouth = false;
|
||||
vt = 2;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks --remember --remember-session --sessions ${pkgs.hyprland}/share/wayland-sessions";
|
||||
initial_session = {
|
||||
command = "uwsm start hyprland-uwsm.desktop";
|
||||
user = username;
|
||||
};
|
||||
default_session = {
|
||||
command = "${lib.getExe pkgs.greetd.tuigreet} --asterisks --remember --user-menu --cmd 'uwsm start hyprland-uwsm.desktop'";
|
||||
user = username;
|
||||
};
|
||||
terminal.switch = false;
|
||||
};
|
||||
};
|
||||
|
||||
dbus.enable = true;
|
||||
|
||||
dbus = {
|
||||
enable = true;
|
||||
implementation = "broker";
|
||||
};
|
||||
pcscd.enable = true;
|
||||
|
||||
# nautilus on non-gnome
|
||||
gvfs.enable = true;
|
||||
# fix pinentry on non-gnome
|
||||
dbus.packages = with pkgs; [ gcr ];
|
||||
gnome.gnome-online-accounts.enable = true;
|
||||
gnome.evolution-data-server.enable = true;
|
||||
};
|
||||
programs.dconf.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,12 +21,26 @@ in
|
||||
extraPackages = with pkgs; [ rocmPackages.clr.icd ];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules =
|
||||
let
|
||||
rocmEnv = pkgs.symlinkJoin {
|
||||
name = "rocm-combined";
|
||||
paths = with pkgs.rocmPackages; [
|
||||
rocblas
|
||||
hipblas
|
||||
clr
|
||||
];
|
||||
};
|
||||
in
|
||||
[
|
||||
"L+ /opt/rocm - - - - ${rocmEnv}"
|
||||
];
|
||||
|
||||
boot = {
|
||||
# https://docs.kernel.org/gpu/amdgpu/module-parameters.html
|
||||
kernelParams = [
|
||||
"amdgpu.seamless=1"
|
||||
"amdgpu.freesync_video=1"
|
||||
"initcall_blacklist=simpledrm_platform_driver_init"
|
||||
];
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
};
|
||||
@@ -36,6 +50,7 @@ in
|
||||
glxinfo
|
||||
libva-utils
|
||||
vulkan-tools
|
||||
clinfo
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
BIN
modules/nixos/hardware/fv43u.icc
Normal file
BIN
modules/nixos/hardware/fv43u.icc
Normal file
Binary file not shown.
@@ -17,15 +17,42 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fonts.fontconfig.subpixel.rgba = "bgr";
|
||||
hardware.gbmonctl.enable = true;
|
||||
boot.kernelParams = [ "video=3840x2160@144" ];
|
||||
hardware = {
|
||||
gbmonctl.enable = true;
|
||||
firmware = [
|
||||
(pkgs.runCommandNoCC "fv43u_edid" { } ''
|
||||
mkdir -p $out/lib/firmware/edid
|
||||
cp ${./fv43u_edid.bin} $out/lib/firmware/edid/fv43u.bin
|
||||
'')
|
||||
];
|
||||
};
|
||||
boot = {
|
||||
kernelParams = [
|
||||
"drm.edid_firmware=DP-3:edid/fv43u.bin"
|
||||
"video=DP-3:3840x2160-30@144"
|
||||
];
|
||||
initrd.extraFiles."lib/firmware/edid/fv43u.bin".source =
|
||||
pkgs.runCommandLocal "fv43u_edid" { }
|
||||
"cp ${./fv43u_edid.bin} $out";
|
||||
};
|
||||
services.colord.enable = true;
|
||||
environment.systemPackages = [
|
||||
(pkgs.runCommandNoCC "fv43u_icc" { } ''
|
||||
mkdir -p $out/share/color/icc
|
||||
cp ${./fv43u.icc} $out/share/color/icc/fv43u.icc
|
||||
'')
|
||||
];
|
||||
|
||||
home-manager.users.${username} = {
|
||||
home.sessionVariables = {
|
||||
ENABLE_HDR_WSI = "1";
|
||||
DXVK_HDR = "1";
|
||||
};
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general.layout = "master";
|
||||
master = {
|
||||
orientation = "center";
|
||||
always_center_master = true;
|
||||
slave_count_for_center_master = 0;
|
||||
mfact = 0.4;
|
||||
};
|
||||
monitor = [
|
||||
@@ -34,6 +61,13 @@ in
|
||||
];
|
||||
xwayland.force_zero_scaling = true;
|
||||
misc.vrr = 2; # VA suffers from VRR flicker
|
||||
cursor = {
|
||||
min_refresh_rate = 48;
|
||||
no_break_fs_vrr = true;
|
||||
};
|
||||
experimental = {
|
||||
xx_color_management_v4 = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar.settings.mainBar."custom/brightness" =
|
||||
@@ -81,16 +115,5 @@ in
|
||||
interval = "once";
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam.gamescopeSession = {
|
||||
env = {
|
||||
SCREEN_WIDTH = "3840";
|
||||
SCREEN_HEIGHT = "2160";
|
||||
};
|
||||
args = [
|
||||
"--hdr-enabled"
|
||||
"--hdr-itm-enable"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
BIN
modules/nixos/hardware/fv43u_edid.bin
Normal file
BIN
modules/nixos/hardware/fv43u_edid.bin
Normal file
Binary file not shown.
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
41
modules/nixos/shell/firefox-pip.nix
Normal file
41
modules/nixos/shell/firefox-pip.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.shell.components.firefox-pip;
|
||||
homeConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
options.shell.components.firefox-pip = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enable firefox-pip");
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
windowrulev2 =
|
||||
let
|
||||
firefoxPip = "class:^(firefox)$,title:^(Picture-in-Picture)$";
|
||||
firefoxPipInitial = "class:^(firefox)$,title:^(Firefox)$";
|
||||
pipPadding = toString (homeConfig.theme.md3-evo.padding * 2);
|
||||
in
|
||||
[
|
||||
"keepaspectratio,${firefoxPip}"
|
||||
"noborder,${firefoxPip}"
|
||||
"float,${firefoxPip}"
|
||||
"float,${firefoxPipInitial}"
|
||||
"pin,${firefoxPip}"
|
||||
"pin,${firefoxPipInitial}"
|
||||
"fullscreenstate 2 0,${firefoxPip}"
|
||||
"fullscreenstate 2 0,${firefoxPipInitial}"
|
||||
"move ${pipPadding} ${pipPadding},${firefoxPip}"
|
||||
"move ${pipPadding} ${pipPadding},${firefoxPipInitial}"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
56
modules/nixos/shell/flameshot.nix
Normal file
56
modules/nixos/shell/flameshot.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.shell.components.flameshot;
|
||||
in
|
||||
{
|
||||
options.shell.components.flameshot = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured flameshot");
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
bind = [
|
||||
"SUPER_SHIFT,V,exec,XDG_CURRENT_DESKTOP=sway uwsm app -- flameshot gui --clipboard"
|
||||
];
|
||||
windowrulev2 = [
|
||||
"float,class:^(flameshot)$"
|
||||
"animation fade,class:^(flameshot)$"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services."flameshot" = {
|
||||
Unit.After = lib.mkForce [ "graphical-session.target" ];
|
||||
Install.WantedBy = lib.mkForce [ "graphical-session.target" ];
|
||||
};
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
package = pkgs.flameshot.overrideAttrs (
|
||||
final: prev: {
|
||||
cmakeFlags = [
|
||||
"-DUSE_WAYLAND_CLIPBOARD=1"
|
||||
"-DUSE_WAYLAND_GRIM=true"
|
||||
];
|
||||
nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.libsForQt5.kguiaddons ];
|
||||
}
|
||||
);
|
||||
settings = {
|
||||
General = {
|
||||
uiColor = "#99d1db";
|
||||
showDesktopNotification = false;
|
||||
disabledTrayIcon = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
62
modules/nixos/shell/gnome-keyring.nix
Normal file
62
modules/nixos/shell/gnome-keyring.nix
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.shell.components.gnome-keyring;
|
||||
in
|
||||
{
|
||||
options.shell.components.gnome-keyring = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enable the gnome keyring");
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
wayland.windowManager.hyprland.settings.windowrulev2 = [
|
||||
"dimaround,class:^(gcr-prompter)$"
|
||||
"noborder,class:^(gcr-prompter)$"
|
||||
"rounding 10,class:^(gcr-prompter)$"
|
||||
"animation slide,class:^(gcr-prompter)$"
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
polkit_gnome
|
||||
gnome-keyring
|
||||
];
|
||||
/*
|
||||
systemd.user.services = {
|
||||
polkit-gnome-authentication-agent-1 = {
|
||||
Unit = {
|
||||
Description = "Gnome Polkit Agent";
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
"gnome-keyring-daemon.service"
|
||||
];
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service = {
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
gnome-keyring-daemon = {
|
||||
Unit = {
|
||||
Description = "Gnome Keyring Daemon";
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service = {
|
||||
ExecStart = "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon --start --components=secrets";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
||||
# fix pinentry on non-gnome
|
||||
services.dbus.packages = with pkgs; [ gcr ];
|
||||
};
|
||||
}
|
||||
28
modules/nixos/shell/hyprpicker.nix
Normal file
28
modules/nixos/shell/hyprpicker.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.shell.components.hyprpicker;
|
||||
in
|
||||
{
|
||||
options.shell.components.hyprpicker = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured hyprpicker");
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${username}.wayland.windowManager.hyprland.settings.bind =
|
||||
let
|
||||
color-picker = pkgs.writeShellScript "color-picker" ''
|
||||
${lib.getExe pkgs.hyprpicker} | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
'';
|
||||
in
|
||||
[
|
||||
"SUPER_SHIFT,C,exec,uwsm app -- ${color-picker}"
|
||||
];
|
||||
};
|
||||
}
|
||||
36
modules/nixos/shell/kitty.nix
Normal file
36
modules/nixos/shell/kitty.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.shell.components.kitty;
|
||||
in
|
||||
{
|
||||
options.shell.components.kitty = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enable pre-configured kitty");
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"SUPER,T,exec,uwsm app -- kitty"
|
||||
];
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
extraConfig = ''
|
||||
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono
|
||||
|
||||
font_size 12.75
|
||||
'';
|
||||
settings = {
|
||||
window_padding_width = 10;
|
||||
text_composition_strategy = "1.0 0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
54
modules/nixos/shell/walker.nix
Normal file
54
modules/nixos/shell/walker.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.shell.components.walker;
|
||||
hmConfig = config.home-manager.users.${username};
|
||||
in
|
||||
{
|
||||
options.shell.components.walker = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured walker setup");
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bindr = [ "SUPER,SUPER_L,exec,uwsm app -- ${lib.getExe pkgs.walker}" ];
|
||||
layerrule = [
|
||||
# TODO: Add layer rules for walker
|
||||
"blur, anyrun"
|
||||
"ignorealpha 0.3, anyrun"
|
||||
];
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
walker
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
xdg.configFile."walker/config.toml".source = (pkgs.formats.toml { }).generate "walker-config.toml" {
|
||||
app_launch_prefix = "uwsm app -- ";
|
||||
close_when_open = true;
|
||||
force_keyboard_focus = true;
|
||||
};
|
||||
systemd.user.services.walker = {
|
||||
Unit = {
|
||||
Description = "Walker - Application Runner";
|
||||
X-Restart-Triggers = [
|
||||
"${hmConfig.xdg.configFile."walker/config.toml".source}"
|
||||
];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service = {
|
||||
ExecStart = "${lib.getExe pkgs.walker} --gapplication-service";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -68,9 +68,9 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd = lib.mkIf config.desktops.hyprland.enable {
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "hyprland-session.target";
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user