mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
improvements
This commit is contained in:
@@ -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