BROKEN: Expanding desktop option

This commit is contained in:
Jurn Wubben 2025-05-24 00:03:47 +02:00
parent 562a8b7a2e
commit d0a41df000
44 changed files with 272 additions and 296 deletions

View file

@ -1,5 +1,4 @@
{
osConfig,
pkgs,
lib,
...
@ -7,7 +6,7 @@
profileName = "jsw.nixos-default";
in {
programs.firefox = {
enable = osConfig.niksos.desktop;
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
DisableFirefoxStudies = true;

View file

@ -4,7 +4,7 @@
...
}: {
programs.mpv = {
enable = osConfig.niksos.desktop;
enable = true;
config = {
vo = "gpu";
profile = "gpu-hq";

View file

@ -1,7 +1,6 @@
{osConfig, ...}: {
programs.nixcord = {
enable = osConfig.niksos.neovim;
enable = true;
discord.enable = false;
vesktop.enable = true;
vesktopConfig = {

View file

@ -4,7 +4,7 @@
osConfig,
...
}: {
home.packages = lib.mkIf osConfig.niksos.desktop [
home.packages = [
pkgs.spotify
pkgs.signal-desktop
];

View file

@ -1,6 +1,5 @@
{osConfig, ...}: {
{
services.udiskie = {
enable = osConfig.niksos.desktop;
tray = "never"; #NOTE: Don't have a bar (yet?)
};
}

View file

@ -10,21 +10,21 @@
pkgs.gh
pkgs.ripgrep
pkgs.p7zip
pkgs.rsync
pkgs.usbutils
pkgs.pciutils
pkgs.inetutils
pkgs.aria2
pkgs.dua
pkgs.file
]
++ lib.optionals osConfig.niksos.desktop [
inputs.somcli.defaultPackage.${pkgs.system}
pkgs.ffmpeg
pkgs.gurk-rs
pkgs.playerctl
]
++ lib.optionals osConfig.niksos.bluetooth [
pkgs.ear2ctl
]
++ lib.optionals osConfig.niksos.portable [
inputs.somcli.defaultPackage.${pkgs.system}
];
;
}

View file

@ -32,7 +32,9 @@
nixpkgsFromInputsPath = flake.inputs.nixpkgs.outPath or "";
nixpkgs =
flake.pkgs.${currentSystem}.nixpkgs
flake.pkgs.${
currentSystem
}.nixpkgs
or (
if nixpkgsFromInputsPath != ""
then import nixpkgsFromInputsPath {}

View file

@ -5,7 +5,7 @@
...
}: {
stylix = {
enable = osConfig.niksos.desktop;
enable = true;
autoEnable = lib.mkDefault true;
image = ./background.png;

View file

@ -5,7 +5,7 @@
...
}: let
inherit (lib) mkIf;
inherit (osConfig.niksos) desktop;
cfg = osConfig.niksos.desktop.hyprland;
in {
imports = [
./fuzzel.nix
@ -14,11 +14,11 @@ in {
./mako.nix
];
home.packages = mkIf desktop [
home.packages = mkIf cfg [
pkgs.wl-clipboard
];
home.sessionVariables = mkIf desktop {
home.sessionVariables = mkIf cfg { #FIXME: migrate to hyprconf
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
XDG_SESSION_TYPE = "wayland";

View file

@ -5,7 +5,7 @@
...
}: {
programs.fuzzel = {
enable = osConfig.niksos.desktop;
enable = osConfig.niksos.desktop.hyprland;
settings.main = {
launch-prefix = "${lib.getExe pkgs.uwsm} app --";
};

View file

@ -8,6 +8,7 @@
}: let
inherit (lib) getExe;
inherit (config.lib.stylix.colors) base0D;
inherit (osConfig.niksos) desktop games portable fingerprint;
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
uwsm = getExe pkgs.uwsm;
@ -35,11 +36,11 @@
nmtui = termapp "${pkgs.networkmanager}/bin/nmtui";
somcli = let
interactiveSom = pkgs.writeShellScriptBin "somcli" ''
somSleep = pkgs.writeShellScriptBin "somsleep" ''
${getExe inputs.somcli.defaultPackage.${pkgs.system}} && sleep 5
'';
termSom = pkgs.writeShellScriptBin "somfoot" ''
${foot} -a "foot-somcli" ${getExe interactiveSom}
${foot} -a "foot-somcli" ${getExe somSleep}
'';
in
appE termSom;
@ -61,7 +62,7 @@
)
10);
in {
config = lib.mkIf osConfig.niksos.desktop {
config = lib.mkIf desktop {
home.file.".XCompose".text = ''
<Multi_key> <s> <h> <r> <u> <g> : "¯\\_()_/¯" # Shrug.
'';
@ -88,7 +89,6 @@ in {
"$mod, Return, exec, ${foot}"
"$mod Shift, Return, exec, ${firefox}"
"$mod, Escape, exec, ${hyprlock}"
"$mod Shift, S, exec, ${somcli}"
"$mod, A, exec, ${pulsemixer}"
"$mod, B, exec, ${bluetui}"
@ -111,13 +111,18 @@ in {
"$mod SHIFT, j, movewindow, d"
]
++ workspaces
++ lib.optionals osConfig.niksos.games (let
++ lib.optionals games (let
suyu = "${appE pkgs.suyu} -ql";
dolphin = appE pkgs.dolphin-emu;
in [
"Super, s, exec, ${suyu}"
"Super, d, exec, ${dolphin}"
]);
])
++ lib.optionals portable [
"$mod Shift, S, exec, ${somcli}"
] ++ lib.optionals fingerprint [
", XF86PowerOff, exec, ${uwsm} app -- pgrep fprintd-verify && exit 0 || ${foot} -a 'foot-fprintd' sh -c 'fprintd-verify && systemctl sleep'" #NOTE: Also check home/wayland/hyprland/settings + system/hardware/fingerprint
];
bindl = [
# media controls

View file

@ -15,7 +15,7 @@ in {
];
wayland.windowManager.hyprland = {
enable = osConfig.niksos.desktop;
enable = osConfig.niksos.desktop.hyprland;
settings = {
env = [
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"

View file

@ -1,4 +1,4 @@
{
{lib, osConfig, ...}: {
wayland.windowManager.hyprland.settings = {
xwayland = {
force_zero_scaling = true;
@ -93,6 +93,10 @@
"float, class:com.github.phase1geo.annotator"
"float, class:foot-somcli"
"size >30% >30%, class:foot-somcli"
] ++ lib.optionals osConfig.niksos.fingerprint [
"float, class:foot-fprintd"
];
#NOTE: Also check home/wayland/hyprland/binds + system/hardware/fingerprint
};
}

View file

@ -1,12 +1,12 @@
{
config,
osConfig,
config,
...
}: let
inherit (config.lib.stylix.colors) base05;
in {
programs.hyprlock = {
enable = osConfig.niksos.desktop;
enable = osConfig.niksos.desktop.hyprland;
settings = {
general = {

View file

@ -1,6 +1,6 @@
{osConfig, ...}: {
{osConfig, ...}:{
services.mako = {
enable = osConfig.niksos.desktop;
enable = osConfig.niksos.desktop.hyprland;
settings.defaultTimeout = 5000;
};
}