Added back gtk, qt, and cursor options in home.nix and formatted everything

This commit is contained in:
Tyler Kelley 2024-05-14 18:36:40 -05:00
parent dbd394567f
commit df588c8e39
15 changed files with 317 additions and 231 deletions

View File

@ -1,8 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
palette = config.colorScheme.palette;
in {
in
{
programs.wlogout = {
enable = true;
layout = [
@ -41,65 +47,65 @@ in {
"action" = "sleep 1; systemctl hibernate";
"text" = "Hibernate";
"keybind" = "h";
}
}
];
style = ''
* {
font-family: "JetBrainsMono NF", FontAwesome, sans-serif;
background-image: none;
transition: 20ms;
}
window {
background-color: rgba(12, 12, 12, 0.1);
}
button {
color: #${palette.base05};
font-size:20px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
border-style: solid;
background-color: rgba(12, 12, 12, 0.3);
border: 3px solid #${palette.base05};
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
button:focus,
button:active,
button:hover {
color: #${palette.base0E};
background-color: rgba(12, 12, 12, 0.5);
border: 3px solid #${palette.base0E};
}
#logout {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/logout.png"));
}
#suspend {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/suspend.png"));
}
#shutdown {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/shutdown.png"));
}
#reboot {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/reboot.png"));
}
#lock {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/lock.png"));
}
#hibernate {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/hibernate.png"));
}
* {
font-family: "JetBrainsMono NF", FontAwesome, sans-serif;
background-image: none;
transition: 20ms;
}
window {
background-color: rgba(12, 12, 12, 0.1);
}
button {
color: #${palette.base05};
font-size:20px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
border-style: solid;
background-color: rgba(12, 12, 12, 0.3);
border: 3px solid #${palette.base05};
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
button:focus,
button:active,
button:hover {
color: #${palette.base0E};
background-color: rgba(12, 12, 12, 0.5);
border: 3px solid #${palette.base0E};
}
#logout {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/logout.png"));
}
#suspend {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/suspend.png"));
}
#shutdown {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/shutdown.png"));
}
#reboot {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/reboot.png"));
}
#lock {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/lock.png"));
}
#hibernate {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/hibernate.png"));
}
'';
};
}

View File

@ -107,76 +107,79 @@ in
mutableUsers = true;
};
environment.systemPackages = let
sugar = pkgs.callPackage ../../pkgs/sddm-sugar-dark.nix {};
tokyo-night = pkgs.libsForQt5.callPackage ../../pkgs/sddm-tokyo-night.nix {};
in with pkgs; [
vim
wget
git
cmatrix
lolcat
neofetch
htop
btop
libvirt
lxqt.lxqt-policykit
lm_sensors
unzip
unrar
libnotify
eza
v4l-utils
ydotool
wl-clipboard
socat
cowsay
lsd
lshw
pkg-config
meson
gnumake
ninja
symbola
noto-fonts-color-emoji
material-icons
brightnessctl
virt-viewer
swappy
ripgrep
appimage-run
networkmanagerapplet
yad
playerctl
nh
nixfmt-rfc-style
discord
libvirt
swww
grim
slurp
gnome.file-roller
swaynotificationcenter
rofi-wayland
imv
transmission-gtk
distrobox
mpv
gimp
obs-studio
rustup
audacity
pavucontrol
tree
protonup-qt
font-awesome
spotify
neovide
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
sugar.sddm-sugar-dark # Name: sugar-dark
tokyo-night # Name: tokyo-night-sddm
pkgs.libsForQt5.qt5.qtgraphicaleffects
];
environment.systemPackages =
let
sugar = pkgs.callPackage ../../pkgs/sddm-sugar-dark.nix { };
tokyo-night = pkgs.libsForQt5.callPackage ../../pkgs/sddm-tokyo-night.nix { };
in
with pkgs;
[
vim
wget
git
cmatrix
lolcat
neofetch
htop
btop
libvirt
lxqt.lxqt-policykit
lm_sensors
unzip
unrar
libnotify
eza
v4l-utils
ydotool
wl-clipboard
socat
cowsay
lsd
lshw
pkg-config
meson
gnumake
ninja
symbola
noto-fonts-color-emoji
material-icons
brightnessctl
virt-viewer
swappy
ripgrep
appimage-run
networkmanagerapplet
yad
playerctl
nh
nixfmt-rfc-style
discord
libvirt
swww
grim
slurp
gnome.file-roller
swaynotificationcenter
rofi-wayland
imv
transmission-gtk
distrobox
mpv
gimp
obs-studio
rustup
audacity
pavucontrol
tree
protonup-qt
font-awesome
spotify
neovide
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
sugar.sddm-sugar-dark # Name: sugar-dark
tokyo-night # Name: tokyo-night-sddm
pkgs.libsForQt5.qt5.qtgraphicaleffects
];
environment.variables = {
ZANEYOS_VERSION = "2.0";

View File

@ -50,6 +50,27 @@ in
};
home.file.".config/starship.toml".source = ../../config/starship.toml;
home.file.".emoji".source = ../../config/emoji;
home.file.".config/neofetch/config.conf".text = ''
print_info() {
prin "$(color 6) ZaneyOS $ZANEYOS_VERSION"
info underline
info "$(color 7) VER" kernel
info "$(color 2) UP " uptime
info "$(color 4) PKG" packages
info "$(color 6) DE " de
info "$(color 5) TER" term
info "$(color 3) CPU" cpu
info "$(color 7) GPU" gpu
info "$(color 5) MEM" memory
prin " "
prin "$(color 1) $(color 2) $(color 3) $(color 4) $(color 5) $(color 6) $(color 7) $(color 8)"
}
distro_shorthand="on"
memory_unit="gib"
cpu_temp="C"
separator=" $(color 4)>"
stdout="off"
'';
# Install & Configure Git
programs.git = {
@ -73,19 +94,72 @@ in
};
};
# Configure Cursor Theme
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 24;
};
# Theme GTK
gtk = {
enable = true;
font = {
name = "Ubuntu";
size = 12;
package = pkgs.ubuntu_font_family;
};
theme = {
name = "${config.colorScheme.slug}";
package = gtkThemeFromScheme {scheme = config.colorScheme;};
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme=1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme=1;
};
};
# Theme QT -> GTK
qt = {
enable = true;
platformTheme = "gtk";
style = {
name = "adwaita-dark";
package = pkgs.adwaita-qt;
};
};
# Scripts
home.packages = with pkgs; [
(import ../../scripts/emopicker9000.nix { inherit pkgs; })
(import ../../scripts/task-waybar.nix { inherit pkgs; })
(import ../../scripts/squirtle.nix { inherit pkgs; })
(import ../../scripts/themechange.nix { inherit pkgs; inherit host; inherit username; })
(import ../../scripts/themechange.nix {
inherit pkgs;
inherit host;
inherit username;
})
(import ../../scripts/theme-selector.nix { inherit pkgs; })
(import ../../scripts/nvidia-offload.nix { inherit pkgs; })
(import ../../scripts/wallsetter.nix { inherit pkgs; inherit username; })
(import ../../scripts/wallsetter.nix {
inherit pkgs;
inherit username;
})
(import ../../scripts/web-search.nix { inherit pkgs; })
(import ../../scripts/rofi-launcher.nix { inherit pkgs; })
(import ../../scripts/screenshootin.nix { inherit pkgs; })
(import ../../scripts/list-hypr-bindings.nix { inherit pkgs; inherit host; })
(import ../../scripts/list-hypr-bindings.nix {
inherit pkgs;
inherit host;
})
];
programs = {

View File

@ -24,7 +24,10 @@ in
];
shell = pkgs.bash;
ignoreShellProgramCheck = true;
packages = with pkgs; [ obs-studio zeroad ];
packages = with pkgs; [
obs-studio
zeroad
];
};
# "newuser" = {
# homeMode = "755";

View File

@ -14,11 +14,8 @@ in
};
config = mkIf cfg.enable {
nixpkgs.config.packageOverrides =
pkgs: {
vaapiIntel = pkgs.vaapiIntel.override {
enableHybridCodec = true;
};
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
# OpenGL

View File

@ -13,7 +13,5 @@ in
enable = mkEnableOption "Change Hardware Clock To Local Time";
};
config = mkIf cfg.enable {
time.hardwareClockInLocalTime = true;
};
config = mkIf cfg.enable { time.hardwareClockInLocalTime = true; };
}

View File

@ -25,9 +25,9 @@ in
hardware.nvidia = {
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
enable = true;
enableOffloadCmd = true;
};
# Make sure to use the correct Bus ID values for your system!
intelBusId = "${cfg.intelBusID}";
nvidiaBusId = "${cfg.nvidiaBusID}";

View File

@ -1,9 +1,12 @@
{ lib, qtbase, qtsvg
, qtgraphicaleffects
, qtquickcontrols2
, wrapQtAppsHook
, stdenvNoCC
, fetchFromGitHub
{
lib,
qtbase,
qtsvg,
qtgraphicaleffects,
qtquickcontrols2,
wrapQtAppsHook,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation rec {
pname = "tokyo-night-sddm";
@ -15,9 +18,7 @@ stdenvNoCC.mkDerivation rec {
rev = "320c8e74ade1e94f640708eee0b9a75a395697c6";
sha256 = "sha256-JRVVzyefqR2L3UrEK2iWyhUKfPMUNUnfRZmwdz05wL0=";
};
nativeBuildInputs = [
wrapQtAppsHook
];
nativeBuildInputs = [ wrapQtAppsHook ];
propagatedUserEnvPkgs = [
qtbase

View File

@ -1,18 +1,18 @@
{ pkgs }:
pkgs.writeShellScriptBin "emopicker9000" ''
# Get user selection via wofi from emoji file.
chosen=$(cat $HOME/.emoji | ${pkgs.rofi-wayland}/bin/rofi -dmenu | awk '{print $1}')
# Get user selection via wofi from emoji file.
chosen=$(cat $HOME/.emoji | ${pkgs.rofi-wayland}/bin/rofi -dmenu | awk '{print $1}')
# Exit if none chosen.
[ -z "$chosen" ] && exit
# Exit if none chosen.
[ -z "$chosen" ] && exit
# If you run this command with an argument, it will automatically insert the
# character. Otherwise, show a message that the emoji has been copied.
if [ -n "$1" ]; then
${pkgs.ydotool}/bin/ydotool type "$chosen"
else
printf "$chosen" | ${pkgs.wl-clipboard}/bin/wl-copy
${pkgs.libnotify}/bin/notify-send "'$chosen' copied to clipboard." &
fi
# If you run this command with an argument, it will automatically insert the
# character. Otherwise, show a message that the emoji has been copied.
if [ -n "$1" ]; then
${pkgs.ydotool}/bin/ydotool type "$chosen"
else
printf "$chosen" | ${pkgs.wl-clipboard}/bin/wl-copy
${pkgs.libnotify}/bin/notify-send "'$chosen' copied to clipboard." &
fi
''

View File

@ -1,7 +1,7 @@
{ pkgs, host, ... }:
let
inherit ( import ../hosts/${host}/variables.nix ) terminal browser;
inherit (import ../hosts/${host}/variables.nix) terminal browser;
in
pkgs.writeShellScriptBin "list-hypr-bindings" ''
yad --width=800 --height=650 \

View File

@ -1,23 +1,23 @@
{ pkgs }:
pkgs.writeShellScriptBin "squirtle" ''
echo "

  
  
  



 
 
 
 
 
 
 
 
 
 
"
echo "

  
  
  



 
 
 
 
 
 
 
 
 
 
"
''

View File

@ -1,7 +1,6 @@
{ pkgs }:
pkgs.writeShellScriptBin "task-waybar" ''
sleep 0.1
${pkgs.swaynotificationcenter}/bin/swaync-client -t &
sleep 0.1
${pkgs.swaynotificationcenter}/bin/swaync-client -t &
''

View File

@ -1,17 +1,17 @@
{ pkgs }:
pkgs.writeShellScriptBin "theme-selector" ''
# Get user selection for new theme from base16-themes file
chosen=$(cat $HOME/.base16-themes | ${pkgs.rofi-wayland}/bin/rofi -dmenu)
# Get user selection for new theme from base16-themes file
chosen=$(cat $HOME/.base16-themes | ${pkgs.rofi-wayland}/bin/rofi -dmenu)
# Exit if none chosen.
[ -z "$chosen" ] && exit
# Exit if none chosen.
[ -z "$chosen" ] && exit
if [ -n "$1" ]; then
themechange "$chosen"
else
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
themechange "$chosen"
${pkgs.libnotify}/bin/notify-send "Theme: $chosen has been applied." &
fi
if [ -n "$1" ]; then
themechange "$chosen"
else
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
themechange "$chosen"
${pkgs.libnotify}/bin/notify-send "Theme: $chosen has been applied." &
fi
''

View File

@ -1,4 +1,9 @@
{ pkgs, host, username, ... }:
{
pkgs,
host,
username,
...
}:
pkgs.writeShellScriptBin "themechange" ''
if [[ ! $@ ]];then

View File

@ -1,43 +1,43 @@
{ pkgs }:
pkgs.writeShellScriptBin "web-search" ''
declare -A URLS
declare -A URLS
URLS=(
["🌎 Search"]="https://search.brave.com/search?q="
[" Unstable Packages"]="https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query="
["🎞 YouTube"]="https://www.youtube.com/results?search_query="
["🦥 Arch Wiki"]="https://wiki.archlinux.org/title/"
["🐃 Gentoo Wiki"]="https://wiki.gentoo.org/index.php?title="
)
URLS=(
["🌎 Search"]="https://search.brave.com/search?q="
[" Unstable Packages"]="https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query="
["🎞 YouTube"]="https://www.youtube.com/results?search_query="
["🦥 Arch Wiki"]="https://wiki.archlinux.org/title/"
["🐃 Gentoo Wiki"]="https://wiki.gentoo.org/index.php?title="
)
# List for rofi
gen_list() {
for i in "''${!URLS[@]}"
do
echo "$i"
done
}
# List for rofi
gen_list() {
for i in "''${!URLS[@]}"
do
echo "$i"
done
}
main() {
# Pass the list to rofi
platform=$( (gen_list) | ${pkgs.rofi-wayland}/bin/rofi -dmenu )
main() {
# Pass the list to rofi
platform=$( (gen_list) | ${pkgs.rofi-wayland}/bin/rofi -dmenu )
if [[ -n "$platform" ]]; then
query=$( (echo ) | ${pkgs.rofi-wayland}/bin/rofi -dmenu )
if [[ -n "$platform" ]]; then
query=$( (echo ) | ${pkgs.rofi-wayland}/bin/rofi -dmenu )
if [[ -n "$query" ]]; then
url=''${URLS[$platform]}$query
xdg-open "$url"
if [[ -n "$query" ]]; then
url=''${URLS[$platform]}$query
xdg-open "$url"
else
exit
fi
else
exit
exit
fi
else
exit
fi
}
}
main
main
exit 0
exit 0
''