refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
19
modules/nixos/desktop/addons/electron-support/default.nix
Normal file
19
modules/nixos/desktop/addons/electron-support/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.electron-support;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.electron-support = with types; {
|
||||
enable = mkBoolOpt false
|
||||
"Whether to enable electron support in the desktop environment.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
plusultra.home.configFile."electron-flags.conf".source =
|
||||
./electron-flags.conf;
|
||||
|
||||
environment.sessionVariables = { NIXOS_OZONE_WL = "1"; };
|
||||
};
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
--enable-features=UseOzonePlatform
|
||||
--ozone-platform=wayland
|
|
@ -0,0 +1,23 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.desktop.addons.firefox-nordic-theme;
|
||||
profileDir = ".mozilla/firefox/${config.plusultra.user.name}";
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.firefox-nordic-theme = with types; {
|
||||
enable = mkBoolOpt false "Whether to enable the Nordic theme for firefox.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
plusultra.apps.firefox = {
|
||||
extraConfig = builtins.readFile
|
||||
"${pkgs.plusultra.firefox-nordic-theme}/configuration/user.js";
|
||||
userChrome = ''
|
||||
@import "${pkgs.plusultra.firefox-nordic-theme}/userChrome.css";
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
20
modules/nixos/desktop/addons/foot/default.nix
Normal file
20
modules/nixos/desktop/addons/foot/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.foot;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.foot = with types; {
|
||||
enable = mkBoolOpt false "Whether to enable the gnome file manager.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
plusultra.desktop.addons.term = {
|
||||
enable = true;
|
||||
pkg = pkgs.foot;
|
||||
};
|
||||
|
||||
plusultra.home.configFile."foot/foot.ini".source = ./foot.ini;
|
||||
};
|
||||
}
|
50
modules/nixos/desktop/addons/foot/foot.ini
Normal file
50
modules/nixos/desktop/addons/foot/foot.ini
Normal file
|
@ -0,0 +1,50 @@
|
|||
###########################################
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░#
|
||||
#░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░#
|
||||
#░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░#
|
||||
#░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░#
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░#
|
||||
###########################################
|
||||
|
||||
[main]
|
||||
font=Hack Nerd Font Mono:size=12
|
||||
#,Noto Color Emoji:size=12
|
||||
line-height=14
|
||||
underline-offset=2
|
||||
pad=20x4 center
|
||||
term=xterm-256color
|
||||
|
||||
[scrollback]
|
||||
lines=2000
|
||||
|
||||
[url]
|
||||
protocols=http,https,ftp,ftps,file,gemini,gopher,mailto
|
||||
|
||||
[cursor]
|
||||
blink=yes
|
||||
|
||||
[colors]
|
||||
# Nord
|
||||
foreground=D8DEE9
|
||||
background=2E3440
|
||||
|
||||
regular0=2E3440
|
||||
regular1=BF616A
|
||||
regular2=A3BE8C
|
||||
regular3=EBCB8B
|
||||
regular4=81A1C1
|
||||
regular5=B48EAD
|
||||
regular6=88C0D0
|
||||
regular7=E5E9F0
|
||||
|
||||
bright0=4C566A
|
||||
bright1=BF616A
|
||||
bright2=A3BE8C
|
||||
bright3=EBCB8B
|
||||
bright4=8FBCBB
|
||||
bright5=B48EAD
|
||||
bright6=8FBCBB
|
||||
bright7=ECEFF4
|
||||
|
||||
[csd]
|
||||
size=0
|
118
modules/nixos/desktop/addons/gtk/default.nix
Normal file
118
modules/nixos/desktop/addons/gtk/default.nix
Normal file
|
@ -0,0 +1,118 @@
|
|||
{ options
|
||||
, config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
with lib.plusultra; let
|
||||
cfg = config.plusultra.desktop.addons.gtk;
|
||||
gdmCfg = config.services.xserver.displayManager.gdm;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.gtk = with types; {
|
||||
enable = mkBoolOpt false "Whether to customize GTK and apply themes.";
|
||||
theme = {
|
||||
name =
|
||||
mkOpt str "Nordic-darker"
|
||||
"The name of the GTK theme to apply.";
|
||||
pkg = mkOpt package pkgs.nordic "The package to use for the theme.";
|
||||
};
|
||||
cursor = {
|
||||
name =
|
||||
mkOpt str "Bibata-Modern-Ice"
|
||||
"The name of the cursor theme to apply.";
|
||||
pkg = mkOpt package pkgs.plusultra.bibata-cursors "The package to use for the cursor theme.";
|
||||
};
|
||||
icon = {
|
||||
name =
|
||||
mkOpt str "Papirus"
|
||||
"The name of the icon theme to apply.";
|
||||
pkg = mkOpt package pkgs.papirus-icon-theme "The package to use for the icon theme.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
cfg.icon.pkg
|
||||
cfg.cursor.pkg
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
XCURSOR_THEME = cfg.cursor.name;
|
||||
};
|
||||
|
||||
plusultra.home.extraOptions = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
name = cfg.theme.name;
|
||||
package = cfg.theme.pkg;
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
name = cfg.cursor.name;
|
||||
package = cfg.cursor.pkg;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = cfg.icon.name;
|
||||
package = cfg.icon.pkg;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# NOTE: In order to set the cursor theme in GDM we have to specify it in the
|
||||
# dconf profile. However, the NixOS module doesn't provide an easy way to do this so the relevant
|
||||
# parts have been extracted from:
|
||||
# https://github.com/NixOS/nixpkgs/blob/96e18717904dfedcd884541e5a92bf9ff632cf39/nixos/modules/services/x11/display-managers/gdm.nix
|
||||
#
|
||||
# NOTE: The GTK and icon themes don't seem to affect recent GDM versions. I've
|
||||
# left them here as reference for the future.
|
||||
programs.dconf.profiles = mkIf gdmCfg.enable {
|
||||
gdm =
|
||||
let
|
||||
customDconf = pkgs.writeTextFile {
|
||||
name = "gdm-dconf";
|
||||
destination = "/dconf/gdm-custom";
|
||||
text = ''
|
||||
${optionalString (!gdmCfg.autoSuspend) ''
|
||||
[org/gnome/settings-daemon/plugins/power]
|
||||
sleep-inactive-ac-type='nothing'
|
||||
sleep-inactive-battery-type='nothing'
|
||||
sleep-inactive-ac-timeout=0
|
||||
sleep-inactive-battery-timeout=0
|
||||
''}
|
||||
|
||||
[org/gnome/desktop/interface]
|
||||
gtk-theme='${cfg.theme.name}'
|
||||
cursor-theme='${cfg.cursor.name}'
|
||||
icon-theme='${cfg.icon.name}'
|
||||
'';
|
||||
};
|
||||
|
||||
customDconfDb = pkgs.stdenv.mkDerivation {
|
||||
name = "gdm-dconf-db";
|
||||
buildCommand = ''
|
||||
${pkgs.dconf}/bin/dconf compile $out ${customDconf}/dconf
|
||||
'';
|
||||
};
|
||||
in
|
||||
mkForce (
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "dconf-gdm-profile";
|
||||
buildCommand = ''
|
||||
# Check that the GDM profile starts with what we expect.
|
||||
if [ $(head -n 1 ${pkgs.gnome.gdm}/share/dconf/profile/gdm) != "user-db:user" ]; then
|
||||
echo "GDM dconf profile changed, please update gtk/default.nix"
|
||||
exit 1
|
||||
fi
|
||||
# Insert our custom DB behind it.
|
||||
sed '2ifile-db:${customDconfDb}' ${pkgs.gnome.gdm}/share/dconf/profile/gdm > $out
|
||||
'';
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
3
modules/nixos/desktop/addons/kanshi/config
Normal file
3
modules/nixos/desktop/addons/kanshi/config
Normal file
|
@ -0,0 +1,3 @@
|
|||
profile {
|
||||
output eDP-1 enable scale 2
|
||||
}
|
41
modules/nixos/desktop/addons/kanshi/default.nix
Normal file
41
modules/nixos/desktop/addons/kanshi/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.desktop.addons.kanshi;
|
||||
user = config.plusultra.user;
|
||||
home = config.users.users.${user.name}.home;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.kanshi = with types; {
|
||||
enable =
|
||||
mkBoolOpt false "Whether to enable Kanshi in the desktop environment.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
plusultra.home.configFile."kanshi/config".source = ./config;
|
||||
|
||||
environment.systemPackages = with pkgs; [ kanshi ];
|
||||
|
||||
# configuring kanshi
|
||||
systemd.user.services.kanshi = {
|
||||
description = "Kanshi output autoconfig ";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
environment = { XDG_CONFIG_HOME = "${home}/.config"; };
|
||||
serviceConfig = {
|
||||
ExecCondition = ''
|
||||
${pkgs.bash}/bin/bash -c '[ -n "$WAYLAND_DISPLAY" ]'
|
||||
'';
|
||||
|
||||
ExecStart = ''
|
||||
${pkgs.kanshi}/bin/kanshi
|
||||
'';
|
||||
|
||||
RestartSec = 5;
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
17
modules/nixos/desktop/addons/keyring/default.nix
Normal file
17
modules/nixos/desktop/addons/keyring/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.keyring;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.keyring = with types; {
|
||||
enable = mkBoolOpt false "Whether to enable the gnome keyring.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ gnome.seahorse ];
|
||||
};
|
||||
}
|
18
modules/nixos/desktop/addons/mako/config
Normal file
18
modules/nixos/desktop/addons/mako/config
Normal file
|
@ -0,0 +1,18 @@
|
|||
###########################################
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░#
|
||||
#░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░#
|
||||
#░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░#
|
||||
#░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░#
|
||||
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░#
|
||||
###########################################
|
||||
|
||||
font=Hack Nerd Font Mono 10
|
||||
border-radius=8
|
||||
text-color=#2e3440ff
|
||||
background-color=#eceff4f4
|
||||
border-color=#d8dee9ff
|
||||
border-size=0
|
||||
margin=12,12,6
|
||||
padding=12,12,12,12
|
||||
default-timeout=5000
|
||||
max-visible=3
|
44
modules/nixos/desktop/addons/mako/default.nix
Normal file
44
modules/nixos/desktop/addons/mako/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.mako;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.mako = with types; {
|
||||
enable = mkBoolOpt false "Whether to enable Mako in Sway.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ mako libnotify ];
|
||||
|
||||
systemd.user.services.mako = {
|
||||
description = "Mako notification daemon";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "org.freedesktop.Notifications";
|
||||
|
||||
ExecCondition = ''
|
||||
${pkgs.bash}/bin/bash -c '[ -n "$WAYLAND_DISPLAY" ]'
|
||||
'';
|
||||
|
||||
ExecStart = ''
|
||||
${pkgs.mako}/bin/mako
|
||||
'';
|
||||
|
||||
ExecReload = ''
|
||||
${pkgs.mako}/bin/makoctl reload
|
||||
'';
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
|
||||
plusultra.home.configFile."mako/config".source = ./config;
|
||||
};
|
||||
}
|
20
modules/nixos/desktop/addons/nautilus/default.nix
Normal file
20
modules/nixos/desktop/addons/nautilus/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.nautilus;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.nautilus = with types; {
|
||||
enable = mkBoolOpt false "Whether to enable the gnome file manager.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Enable support for browsing samba shares.
|
||||
services.gvfs.enable = true;
|
||||
networking.firewall.extraCommands =
|
||||
"iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns";
|
||||
|
||||
environment.systemPackages = with pkgs; [ gnome.nautilus ];
|
||||
};
|
||||
}
|
42
modules/nixos/desktop/addons/rofi/config.rasi
Normal file
42
modules/nixos/desktop/addons/rofi/config.rasi
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
vim: filetype=css
|
||||
*/
|
||||
|
||||
configuration {
|
||||
fullscreen: false;
|
||||
show-icons: false;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
* {
|
||||
// Default bg is transparent.
|
||||
background-color: transparent;
|
||||
// Default text is white
|
||||
text-color: white;
|
||||
spacing: 30;
|
||||
}
|
||||
|
||||
#window {
|
||||
// Default font
|
||||
font: "Nerd Font Hack 18";
|
||||
fullscreen: true;
|
||||
transparency: "background";
|
||||
|
||||
background-color: #282a36BA;
|
||||
|
||||
// Add dummy widgets on top and bottom so the sizing
|
||||
// nicely centers hdum, independent of resolution.
|
||||
children: [ dummy1, hdum, dummy2 ];
|
||||
}
|
||||
|
||||
#hdum {
|
||||
orientation: horizontal;
|
||||
// Add dummy widgets on left and right so the sizing
|
||||
// nicely centers mainbox, independent of resolution.
|
||||
children: [ dummy3, mainbox, dummy4 ];
|
||||
}
|
||||
|
||||
#element selected {
|
||||
text-color: #caa9fa;
|
||||
}
|
||||
|
18
modules/nixos/desktop/addons/rofi/default.nix
Normal file
18
modules/nixos/desktop/addons/rofi/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.rofi;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.rofi = with types; {
|
||||
enable =
|
||||
mkBoolOpt false "Whether to enable Rofi in the desktop environment.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ rofi ];
|
||||
|
||||
plusultra.home.configFile."rofi/config.rasi".source = ./config.rasi;
|
||||
};
|
||||
}
|
3
modules/nixos/desktop/addons/swappy/config
Normal file
3
modules/nixos/desktop/addons/swappy/config
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Default]
|
||||
save_dir=$HOME/Pictures/screenshots
|
||||
save_filename_format=%Y%m%d-%H%M%S.png
|
19
modules/nixos/desktop/addons/swappy/default.nix
Normal file
19
modules/nixos/desktop/addons/swappy/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.swappy;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.swappy = with types; {
|
||||
enable =
|
||||
mkBoolOpt false "Whether to enable Swappy in the desktop environment.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ swappy ];
|
||||
|
||||
plusultra.home.configFile."swappy/config".source = ./config;
|
||||
plusultra.home.file."Pictures/screenshots/.keep".text = "";
|
||||
};
|
||||
}
|
14
modules/nixos/desktop/addons/term/default.nix
Normal file
14
modules/nixos/desktop/addons/term/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.term;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.term = with types; {
|
||||
enable = mkBoolOpt false "Whether to enable the gnome file manager.";
|
||||
pkg = mkOpt package pkgs.foot "The terminal to install.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable { environment.systemPackages = [ cfg.pkg ]; };
|
||||
}
|
26
modules/nixos/desktop/addons/wallpapers/default.nix
Normal file
26
modules/nixos/desktop/addons/wallpapers/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.desktop.addons.wallpapers;
|
||||
inherit (pkgs.plusultra) wallpapers;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.wallpapers = with types; {
|
||||
enable = mkBoolOpt false
|
||||
"Whether or not to add wallpapers to ~/Pictures/wallpapers.";
|
||||
};
|
||||
|
||||
config = {
|
||||
plusultra.home.file = lib.foldl
|
||||
(acc: name:
|
||||
let wallpaper = wallpapers.${name};
|
||||
in
|
||||
acc // {
|
||||
"Pictures/wallpapers/${wallpaper.fileName}".source = wallpaper;
|
||||
})
|
||||
{ }
|
||||
(wallpapers.names);
|
||||
};
|
||||
}
|
119
modules/nixos/desktop/addons/waybar/config
Normal file
119
modules/nixos/desktop/addons/waybar/config
Normal file
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"modules-left": [
|
||||
"sway/workspaces",
|
||||
"custom/media",
|
||||
"sway/mode"
|
||||
],
|
||||
"modules-center": [],
|
||||
"modules-right": [
|
||||
"network",
|
||||
"pulseaudio",
|
||||
"cpu",
|
||||
"battery",
|
||||
"tray",
|
||||
"clock#date",
|
||||
"clock#time"
|
||||
],
|
||||
"sway/mode": {
|
||||
"format": "{}"
|
||||
},
|
||||
"custom/media": {
|
||||
"format": "{icon}",
|
||||
"return-type": "json",
|
||||
"format-icons": {
|
||||
"Playing": "",
|
||||
"Paused": "ﳌ"
|
||||
},
|
||||
"max-length": 70,
|
||||
"exec": "playerctl -a metadata --format '{\"text\": \"{{playerName}}\", \"tooltip\": \"{{playerName}}: {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F",
|
||||
"on-click": "playerctl play-pause"
|
||||
},
|
||||
"mpd": {
|
||||
"tooltip": false,
|
||||
"format": "{stateIcon} {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",
|
||||
"format-disconnected": "ﳌ",
|
||||
"format-stopped": "",
|
||||
"state-icons": {
|
||||
"playing": "",
|
||||
"paused": ""
|
||||
}
|
||||
},
|
||||
"pulseaudio": {
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{volume}%",
|
||||
"scroll-step": 5,
|
||||
"format": "{icon}",
|
||||
"format-bluetooth": "",
|
||||
"format-muted": "婢",
|
||||
"format-icons": {
|
||||
"default": [
|
||||
"奄",
|
||||
"奔",
|
||||
"墳"
|
||||
]
|
||||
},
|
||||
"on-click": "gnome-control-center sound"
|
||||
},
|
||||
"network": {
|
||||
"tooltip": true,
|
||||
"format-wifi": " ",
|
||||
"tooltip-format-wifi": "{essid} @ {signalStrength}%",
|
||||
"format-ethernet": "",
|
||||
"on-click": "gnome-control-center wifi"
|
||||
},
|
||||
"temperature": {
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{temperatureC} 糖",
|
||||
"critical-threshold": 70,
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"format": "{icon}"
|
||||
},
|
||||
"cpu": {
|
||||
"tooltip": true,
|
||||
"format": "",
|
||||
"states": {
|
||||
"heavy": 70,
|
||||
"full": 90
|
||||
}
|
||||
},
|
||||
"memory": {
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{used:0.1f}G/{total:0.1f}G",
|
||||
"format": "",
|
||||
"states": {
|
||||
"heavy": 70,
|
||||
"full": 90
|
||||
}
|
||||
},
|
||||
"battery": {
|
||||
"bat": "BAT1",
|
||||
"interval": 60,
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon}",
|
||||
"format-critical": "",
|
||||
"format-icons": {
|
||||
"default": ["", "", "", "", "", "", "", "", "", ""],
|
||||
"charging": ["", "", "", "", "", "", ""],
|
||||
"not": "",
|
||||
"plugged": ""
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"spacing": 10
|
||||
},
|
||||
"clock#date": {
|
||||
"format": "{:%a, %b %d}"
|
||||
},
|
||||
"clock#time": {
|
||||
"format": "{:%I:%M %p}"
|
||||
}
|
||||
}
|
19
modules/nixos/desktop/addons/waybar/default.nix
Normal file
19
modules/nixos/desktop/addons/waybar/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.waybar;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.waybar = with types; {
|
||||
enable =
|
||||
mkBoolOpt false "Whether to enable Waybar in the desktop environment.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ waybar ];
|
||||
|
||||
plusultra.home.configFile."waybar/config".source = ./config;
|
||||
plusultra.home.configFile."waybar/style.css".source = ./style.css;
|
||||
};
|
||||
}
|
314
modules/nixos/desktop/addons/waybar/style.css
Normal file
314
modules/nixos/desktop/addons/waybar/style.css
Normal file
|
@ -0,0 +1,314 @@
|
|||
/*
|
||||
********************************************
|
||||
*░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░*
|
||||
*░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░*
|
||||
*░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░*
|
||||
*░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░*
|
||||
*░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░*
|
||||
********************************************
|
||||
*/
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: Nerd Font Hack;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin-top: 8px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
color: transparent;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window#waybar.termite #window,
|
||||
window#waybar.Firefox #window,
|
||||
window#waybar.Navigator #window,
|
||||
window#waybar.PCSX2 #window {
|
||||
color: #4d4d4d;
|
||||
background: #e6e6e6;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
border-radius: 12px;
|
||||
background: #eceff4;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
color: #2e3440;
|
||||
text-shadow: none;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#workspaces button,
|
||||
#mode,
|
||||
#mpd,
|
||||
#custom-media,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#temperature,
|
||||
#cpu,
|
||||
#memory,
|
||||
#tray,
|
||||
#clock,
|
||||
#battery {
|
||||
color: #2e3440;
|
||||
background: #eceff4;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin-top: 8px;
|
||||
margin-left: 12px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
background: #d8dee9;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
font-size: 16px;
|
||||
border-radius: 8px;
|
||||
padding: 4px 8px;
|
||||
font-weight: bold;
|
||||
background: #d8dee9;
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
color: #88c0d0;
|
||||
background: #eceff4;
|
||||
}
|
||||
|
||||
#workspaces button.visible:hover {
|
||||
color: #88c0d0;
|
||||
background: #eceff4;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
color: #81a1c1;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#custom-media.Paused {
|
||||
color: #4c566a;
|
||||
background: #d8dee9;
|
||||
}
|
||||
|
||||
#custom-media.Playing {
|
||||
color: #eceff4;
|
||||
background: #8fbcbb;
|
||||
}
|
||||
|
||||
#network {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#network.disconnected,
|
||||
#network.disabled {
|
||||
color: #2e3440;
|
||||
background: #eceff4;
|
||||
}
|
||||
|
||||
#network.wifi {
|
||||
color: #d8dee9;
|
||||
background: #8fbcbb;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#pulseaudio.bluetooth {
|
||||
color: #d8dee9;
|
||||
background: #81a1c1;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #d8dee9;
|
||||
background: #bf616a;
|
||||
}
|
||||
|
||||
#battery {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: #eceff4;
|
||||
background: #d08770;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: #eceff4;
|
||||
background: #bf616a;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: #d8dee9;
|
||||
background: #bf616a;
|
||||
animation: red-flash 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes red-flash {
|
||||
0% {
|
||||
background: #bf616a;
|
||||
}
|
||||
|
||||
50% {
|
||||
background: #d37f87;
|
||||
}
|
||||
|
||||
100% {
|
||||
background: #bf616a;
|
||||
}
|
||||
}
|
||||
|
||||
#cpu {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#cpu.heavy {
|
||||
color: #d8dee9;
|
||||
background: #d08770;
|
||||
}
|
||||
|
||||
#cpu.full {
|
||||
color: #d8dee9;
|
||||
background: #bf616a;
|
||||
}
|
||||
|
||||
#memory {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#memory.heavy {
|
||||
color: #d8dee9;
|
||||
background: #d08770;
|
||||
}
|
||||
|
||||
#memory.full {
|
||||
color: #d8dee9;
|
||||
background: #bf616a;
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px;
|
||||
transition: none;
|
||||
/* font-size: 20px; */
|
||||
color: #eceff4;
|
||||
background: #d08770;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 0;
|
||||
transition: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#clock.date {
|
||||
margin-left: 8px;
|
||||
border-radius: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 10px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background: #e5e9f0;
|
||||
}
|
||||
|
||||
#clock.time {
|
||||
padding-left: 10px;
|
||||
padding-right: 16px;
|
||||
border-radius: 8px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
margin-right: 12px;
|
||||
background: #d8dee9;
|
||||
}
|
3
modules/nixos/desktop/addons/wofi/config
Normal file
3
modules/nixos/desktop/addons/wofi/config
Normal file
|
@ -0,0 +1,3 @@
|
|||
stylesheet=./style.css
|
||||
term=foot
|
||||
insensitive=true
|
23
modules/nixos/desktop/addons/wofi/default.nix
Normal file
23
modules/nixos/desktop/addons/wofi/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.wofi;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.wofi = with types; {
|
||||
enable =
|
||||
mkBoolOpt false "Whether to enable the Wofi in the desktop environment.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ wofi wofi-emoji ];
|
||||
|
||||
# config -> .config/wofi/config
|
||||
# css -> .config/wofi/style.css
|
||||
# colors -> $XDG_CACHE_HOME/wal/colors
|
||||
# plusultra.home.configFile."foot/foot.ini".source = ./foot.ini;
|
||||
plusultra.home.configFile."wofi/config".source = ./config;
|
||||
plusultra.home.configFile."wofi/style.css".source = ./style.css;
|
||||
};
|
||||
}
|
127
modules/nixos/desktop/addons/wofi/style.css
Normal file
127
modules/nixos/desktop/addons/wofi/style.css
Normal file
|
@ -0,0 +1,127 @@
|
|||
window {
|
||||
font-family: "Hack Nerd Font";
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
background: #2e3440;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
/* The Nordic gtk theme adds an outline to show scroll areas... */
|
||||
outline-color: transparent;
|
||||
}
|
||||
|
||||
#input {
|
||||
color: #e5e9f0;
|
||||
caret-color: #e5e9f0;
|
||||
background: #3b4252;
|
||||
border-top-color: #3b4252;
|
||||
border-left-color: #3b4252;
|
||||
border-right-color: #3b4252;
|
||||
border-bottom-color: #3b4252;
|
||||
box-shadow: 0 0 0 1px transparent inset;
|
||||
outline-color: transparent !important;
|
||||
}
|
||||
|
||||
#input:focus {
|
||||
background: #3b4252;
|
||||
border-color: #3b4252 !important;
|
||||
box-shadow: 0 0 0 1px transparent inset;
|
||||
border-top-color: #3b4252 !important;
|
||||
border-left-color: #3b4252 !important;
|
||||
border-right-color: #3b4252 !important;
|
||||
border-bottom-color: #3b4252 !important;
|
||||
box-shadow: none !important;
|
||||
outline-color: transparent !important;
|
||||
}
|
||||
|
||||
#input image.left {
|
||||
color: #d8dee9;
|
||||
}
|
||||
|
||||
#input:focus image.left {
|
||||
color: #e5e9f0;
|
||||
}
|
||||
|
||||
#input image.right {
|
||||
color: #d8dee9;
|
||||
}
|
||||
|
||||
#input:focus image.right {
|
||||
color: #e5e9f0;
|
||||
}
|
||||
|
||||
label {
|
||||
/* We set backgrounds on the block level. */
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
#entry {
|
||||
color: #4c566a;
|
||||
padding: 8px 8px;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
color: #eceff4;
|
||||
background: #8fbcbb;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
expander arrow {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
#entry #selected #text {
|
||||
color: #eceff4;
|
||||
}
|
||||
|
||||
expander list {
|
||||
margin-top: 8px;
|
||||
/* background: #8fbcbb; */
|
||||
background: transparent;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
expander list #entry {
|
||||
transition: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
expander list #entry:hover,
|
||||
expander list #entry:active {
|
||||
/* color: #8fbcbb;
|
||||
background: #e5e9f0; */
|
||||
}
|
||||
|
||||
expander list #entry #selected {
|
||||
background: #8fbcbb;
|
||||
}
|
||||
|
||||
expander list #entry #selected label {
|
||||
color: #eceff4;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
expander list #entry:hover,
|
||||
expander list #entry:active {
|
||||
background: #8fbcbb;
|
||||
}
|
||||
|
||||
expander list #entry:hover label,
|
||||
expander list #entry:active label {
|
||||
color: #eceff4;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
expander list label {
|
||||
color: #d8dee9;
|
||||
}
|
24
modules/nixos/desktop/addons/xdg-portal/default.nix
Normal file
24
modules/nixos/desktop/addons/xdg-portal/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.desktop.addons.xdg-portal;
|
||||
in
|
||||
{
|
||||
options.plusultra.desktop.addons.xdg-portal = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to add support for xdg portal.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
gtkUsePortal = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue