Compare commits

..

9 Commits

Author SHA1 Message Date
d7d5b44f13 Sysupdate 2024-11-15 20:54:55 +01:00
555e6ae91e Multi input settings fix 2024-11-15 20:54:41 +01:00
0057f46567 nvidia configuration moved 2024-11-15 20:54:05 +01:00
be7c364c30 Wlogout, waybar, rofi, cleanup 2024-11-15 16:12:59 +01:00
190c41587c wlogout and waybar fix 2024-11-15 14:24:31 +01:00
26b2fc568b Rofi fix 2024-11-15 07:52:41 +01:00
e2b283221a Code 2024-11-15 07:52:31 +01:00
a5882a2315 System update 2024-11-14 21:00:44 +01:00
2c9c5e4c32 printing 2024-11-14 21:00:36 +01:00
14 changed files with 637 additions and 359 deletions

View File

@ -1,9 +1,9 @@
# TODO
- [ ] Wallpaper switch
- [ ] Keyboard switch
- [ ] Waybar fix
- [ ] Rofi config
- [x] Keyboard switch
- [x] Waybar fix
- [x] Rofi config
- [ ] Cliphist manager fix
- [x] Stylix theming
- [ ] Enabling nvidia graphics and disabling it

105
config/keyboard.svg Normal file
View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="800px"
width="800px"
viewBox="0 0 24 24"
fill="none"
version="1.1"
id="svg12"
sodipodi:docname="keyboard.svg"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
inkscape:export-filename="keyboard.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12" />
<sodipodi:namedview
id="namedview12"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="1.6075631"
inkscape:cx="190.35023"
inkscape:cy="99.218502"
inkscape:window-width="1265"
inkscape:window-height="1032"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg12" />
<g
id="SVGRepo_iconCarrier"
inkscape:label="kbd"
transform="matrix(0.71618532,0,0,0.71618532,3.4057762,3.4057762)"
style="display:inline">
<path
opacity="0.5"
d="M 16,5 H 8 C 5.17157,5 3.75736,5 2.87868,5.87868 2,6.75736 2,8.17157 2,11 v 2 c 0,2.8284 0,4.2426 0.87868,5.1213 C 3.75736,19 5.17157,19 8,19 h 8 c 2.8284,0 4.2426,0 5.1213,-0.8787 C 22,17.2426 22,15.8284 22,13 V 11 C 22,8.17157 22,6.75736 21.1213,5.87868 20.2426,5 18.8284,5 16,5 Z"
fill="#1c274c"
id="path1"
style="fill:#a7adba;fill-opacity:1" />
<path
d="M 6,10 C 6.55228,10 7,9.55228 7,9 7,8.44772 6.55228,8 6,8 5.44772,8 5,8.44772 5,9 c 0,0.55228 0.44772,1 1,1 z"
fill="#1c274c"
id="path2"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 6,13 c 0.55228,0 1,-0.4477 1,-1 0,-0.5523 -0.44772,-1 -1,-1 -0.55228,0 -1,0.4477 -1,1 0,0.5523 0.44772,1 1,1 z"
fill="#1c274c"
id="path3"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 9,13 c 0.55228,0 1,-0.4477 1,-1 0,-0.5523 -0.44772,-1 -1,-1 -0.55228,0 -1,0.4477 -1,1 0,0.5523 0.44772,1 1,1 z"
fill="#1c274c"
id="path4"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="M 9,10 C 9.55228,10 10,9.55228 10,9 10,8.44772 9.55228,8 9,8 8.44772,8 8,8.44772 8,9 c 0,0.55228 0.44772,1 1,1 z"
fill="#1c274c"
id="path5"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 12,10 c 0.5523,0 1,-0.44772 1,-1 0,-0.55228 -0.4477,-1 -1,-1 -0.5523,0 -1,0.44772 -1,1 0,0.55228 0.4477,1 1,1 z"
fill="#1c274c"
id="path6"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 12,13 c 0.5523,0 1,-0.4477 1,-1 0,-0.5523 -0.4477,-1 -1,-1 -0.5523,0 -1,0.4477 -1,1 0,0.5523 0.4477,1 1,1 z"
fill="#1c274c"
id="path7"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 15,10 c 0.5523,0 1,-0.44772 1,-1 0,-0.55228 -0.4477,-1 -1,-1 -0.5523,0 -1,0.44772 -1,1 0,0.55228 0.4477,1 1,1 z"
fill="#1c274c"
id="path8"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 15,13 c 0.5523,0 1,-0.4477 1,-1 0,-0.5523 -0.4477,-1 -1,-1 -0.5523,0 -1,0.4477 -1,1 0,0.5523 0.4477,1 1,1 z"
fill="#1c274c"
id="path9"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 18,10 c 0.5523,0 1,-0.44772 1,-1 0,-0.55228 -0.4477,-1 -1,-1 -0.5523,0 -1,0.44772 -1,1 0,0.55228 0.4477,1 1,1 z"
fill="#1c274c"
id="path10"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 18,13 c 0.5523,0 1,-0.4477 1,-1 0,-0.5523 -0.4477,-1 -1,-1 -0.5523,0 -1,0.4477 -1,1 0,0.5523 0.4477,1 1,1 z"
fill="#1c274c"
id="path11"
style="fill:#4f5b66;fill-opacity:1" />
<path
d="m 17.75,16 c 0,0.4142 -0.3358,0.75 -0.75,0.75 H 7 C 6.58579,16.75 6.25,16.4142 6.25,16 6.25,15.5858 6.58579,15.25 7,15.25 h 10 c 0.4142,0 0.75,0.3358 0.75,0.75 z"
fill="#1c274c"
id="path12"
style="fill:#4f5b66;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -108,11 +108,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1731556998,
"narHash": "sha256-/x/j+JHTMVFLWDpWClFw3IpzJiVkHTWL5z138Jj2ec4=",
"lastModified": 1731643390,
"narHash": "sha256-ckIrZY5i+b7UrxolO54pSRO9dKW7GnMYQ1uQLeWEBsU=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "47a8f584cbd9f26ca18e905ec37799838babcc29",
"rev": "f0fa120121e9ea5c16c7b2c578fbebe37fbcab55",
"type": "gitlab"
},
"original": {
@ -252,11 +252,11 @@
]
},
"locked": {
"lastModified": 1731535640,
"narHash": "sha256-2EckCJn4wxran/TsRiCOFcmVpep2m9EBKl99NBh2GnM=",
"lastModified": 1731604581,
"narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "35b055009afd0107b69c286fca34d2ad98940d57",
"rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10",
"type": "github"
},
"original": {
@ -329,11 +329,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1731526492,
"narHash": "sha256-tzWLCOcIxvJvxB25kC0Q371pc5wBBzbzwSlSNc4L8gw=",
"lastModified": 1731631654,
"narHash": "sha256-3BrzIc6CzuOVdhbRuKguIdG6IqfLbvNbYXqhmMWkxwY=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "3fb47372b79265ebdabeeefdad10359d5b18377a",
"rev": "098e491a43e8b26f4382b48651a4131464bf6a2f",
"type": "github"
},
"original": {
@ -478,6 +478,22 @@
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1731386116,
"narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "689fed12a013f56d4c4d3f612489634267d86529",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1731319897,
@ -496,11 +512,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1725194671,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
"lastModified": 1731531548,
"narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
"rev": "24f0d4acd634792badd6470134c387a3b039dace",
"type": "github"
},
"original": {
@ -510,22 +526,6 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
@ -556,8 +556,8 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_2",
"stylix": "stylix",
"zen-browser": "zen-browser"
"nixpkgs-stable": "nixpkgs-stable_2",
"stylix": "stylix"
}
},
"stylix": {
@ -577,11 +577,11 @@
"tinted-tmux": "tinted-tmux"
},
"locked": {
"lastModified": 1731577695,
"narHash": "sha256-ohxX2gG7zDWIA3slEbiSyAVSiO98clCoL+CmiEiYwVU=",
"lastModified": 1731657386,
"narHash": "sha256-Mm/JL8tFUS1SOmmZDPcswExUxzw0VpHcEyZI1h58CGA=",
"owner": "danth",
"repo": "stylix",
"rev": "e0a278871b63b1800ccdda568861b5324dd93797",
"rev": "5ab1207b2fdeb5a022f2dd7cccf6be760f1b150f",
"type": "github"
},
"original": {
@ -710,24 +710,6 @@
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1727721329,
"narHash": "sha256-QYlWZwUSwrM7BuO+dXclZIwoPvBIuJr6GpFKv9XKFPI=",
"owner": "MarceColl",
"repo": "zen-browser-flake",
"rev": "e6ab73f405e9a2896cce5956c549a9cc359e5fcc",
"type": "github"
},
"original": {
"owner": "MarceColl",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",

View File

@ -3,7 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
#nix-stable.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
hyprland = {
url = "github:hyprwm/Hyprland";
@ -26,8 +26,6 @@
stylix.url = "github:danth/stylix";
zen-browser.url = "github:MarceColl/zen-browser-flake";
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
@ -37,6 +35,7 @@
outputs = {
self,
nixpkgs,
nixpkgs-stable,
...
} @ inputs: let
system = "x86_64-linux";
@ -47,10 +46,18 @@
allowUnfree = true;
};
};
pkgs-stable = import nixpkgs-stable {
inherit system;
config = {
allowUnfree = true;
};
};
in {
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs system;};
specialArgs = {inherit inputs system pkgs pkgs-stable;};
modules = [
./nixos/configuration.nix

View File

@ -2,16 +2,17 @@
inputs,
config,
pkgs,
pkgs-stable,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./system/nvidia.nix
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
extraSpecialArgs = {inherit inputs;};
extraSpecialArgs = {inherit inputs pkgs pkgs-stable;};
backupFileExtension = "backup";
users = {
foglar = import ./home.nix;
@ -65,6 +66,7 @@
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
services.blueman.enable = true;
# Printing
services.printing.enable = true;
services.printing.drivers = with pkgs; [gutenprint hplip splix];
hardware.printers = {
@ -81,6 +83,12 @@
];
ensureDefaultPrinter = "HP_psc_1200_series";
};
# Scanning
hardware.sane.enable = true;
services.ipp-usb.enable= true;
hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
# Set your time zone.
time.timeZone = "Europe/Prague";
@ -106,7 +114,6 @@
monaspace
];
#services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true;
@ -183,54 +190,11 @@
FLAKE = "/home/foglar/dotfiles";
};
hardware = {
graphics.enable = true;
};
services.xserver.videoDrivers = ["nvidia"];
services.xserver = {
xkb.layout = "us,cz";
xkb.options = "grp:win_space_toggle";
};
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
prime.amdgpuBusId = "pci@000:04:0";
prime.nvidiaBusId = "pci@000:01:0";
prime.offload = {
enable = true;
enableOffloadCmd = true;
};
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
@ -254,7 +218,7 @@
users.users.foglar = {
isNormalUser = true;
description = "foglar";
extraGroups = ["networkmanager" "wheel"];
extraGroups = ["networkmanager" "wheel" "lp" "scanner"];
packages = with pkgs; [
# thunderbird
];
@ -273,11 +237,10 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
environment.systemPackages = (with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
inputs.zen-browser.packages."${system}".default
];
]);
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.

View File

@ -1,44 +1,49 @@
{
lib,
config,
pkgs,
...
}: {
options = {
hyprland.enable =
lib.mkEnableOption "enable Hyprland module";
lib.mkEnableOption "enable Hyprland module";
};
imports = [
./packages.nix
./waybar.nix
./rofi.nix
];
./packages.nix
./waybar.nix
./rofi.nix
./wlogout.nix
];
config = lib.mkIf config.hyprland.enable {
waybar.enable = lib.mkDefault true;
rofi.enable = lib.mkDefault true;
wlogout.enable = lib.mkDefault true;
services.network-manager-applet.enable = true;
services.dunst.enable = true;
stylix.targets = {
home.packages = [
pkgs.toybox
];
stylix.targets = {
dunst.enable = true;
waybar = {
enableCenterBackColors = false;
enableLeftBackColors = false;
enableRightBackColors = false;
};
};
};
wayland.windowManager.hyprland = {
enable = true;
#plugins = [
#inputs.hyprland-plugins.packages.${pkgs.system}.hyprbars
#inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
#inputs.hyprland-plugins.packages.${pkgs.system}.hyprbars
#inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
#];
settings = {
@ -50,7 +55,8 @@
input = {
"kb_layout" = "us, cz, ru";
"follow_mouse" = "1";
"kb_options" = "caps:swapecase";
#"kb_options" = "caps:swapecase";
#"kb_options" = "ctrl:nocaps";
touchpad = {
@ -108,8 +114,8 @@
"vesktop --start-minimized"
"ferdium --minimized"
"kdeconnect-indicator"
"swww-daemon --format xrgb"
"swww ../../aurora_borealis.png"
#"swww-daemon --format xrgb"
#"swww ../../aurora_borealis.png"
"hypridle"
"waybar"
"swayosd-server"
@ -120,18 +126,18 @@
"dunst"
"wl-paste --type text --watch cliphist store # clipboard store text data"
"wl-paste --type image --watch cliphist store # clipboard store image data"
"$scrPath/batterynotify.sh # battery notification"
#"$scrPath/batterynotify.sh # battery notification"
"$scrPath/resetxdgportal.sh # reset XDPH for screenshare"
#"$scrPath/resetxdgportal.sh # reset XDPH for screenshare"
#"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH"
#"dbus-update-activation-environment --systemd --all # for XDPH"
#"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH"
"$scrPath/polkitkdeauth.sh # authentication dialogue for GUI apps"
#"$scrPath/polkitkdeauth.sh # authentication dialogue for GUI apps"
];
"$mod" = "SUPER";
"$term" = "kitty";
"$editor" = "code";
"$term" = "${pkgs.kitty}/bin/kitty";
"$editor" = "${pkgs.vscode}/bin/code";
"$file" = "dolphin";
"$browser" = "librewolf";
@ -156,7 +162,7 @@
};
bindr = [
"ALTSHIFT, Shift_L, exec, keyboardswitch.sh"
"ALTSHIFT, Shift_L, exec, keyboardswitch"
"CAPS,Caps_Lock, exec, swayosd-client --caps-lock"
];
@ -169,7 +175,7 @@
bindl = [
# Audio
",XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
",XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
",XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle"
# Media
@ -179,8 +185,8 @@
];
bindel = [
",XF86AudioLowerVolume, exec, swayosd-client --output-volume -5"
",XF86AudioRaiseVolume, exec, swayosd-client --output-volume 5"
",XF86AudioLowerVolume, exec, swayosd-client --output-volume -1"
",XF86AudioRaiseVolume, exec, swayosd-client --output-volume 1"
# Brightness
",XF86MonBrightnessUp, exec, swayosd-client --brightness raise"
",XF86MonBrightnessDown, exec, swayosd-client --brightness lower"
@ -210,14 +216,14 @@
"Alt, Return, fullscreen"
"$mod, Escape, exec, hyprlock"
#"$mod+Shift,F, exec, windowpin.sh"
#"$mod, Backspace, exec, logoutlaunch.sh"
"$mod, Backspace, exec, wlogout -b 2"
"$Ctrl+Alt, W, exec, killall waybar || waybar" # toggle waybar
"$mod, T, exec, $term"
"$mod, F, exec, $browser"
"$mod, E, exec, $file"
"$mod, C, exec, $editor"
#"Ctrl+Shift, Escape, exec, $sysmonlaunch.sh"
"Ctrl+Shift, Escape, exec, btop"
# Rofi
"$mod, A, exec, pkill -x rofi || rofi -show drun"

View File

@ -1,26 +1,27 @@
{pkgs, lib, ...}: {
home.packages = with pkgs; [
hyprlock
hyprpicker
hypridle
{pkgs, pkgs-stable, ...}: {
home.packages = (with pkgs; [
hyprlock
hyprpicker
hypridle
rofi
waybar
swww
dunst
libnotify
swayosd
kitty
kitty-themes
kitty-img
#swww
playerctl
pavucontrol
hyprshade
swappy
grimblast
dunst
udiskie
wl-clipboard
cliphist
swayosd
kitty
kitty-img
hyprshade
swappy
grimblast
udiskie
wl-clipboard
cliphist
(writeShellScriptBin "dontkillsteam" ''
if [[ $(hyprctl activewindow -j | jq -r ".class") == "Steam" ]]; then
@ -65,10 +66,17 @@
rm "$temp_screenshot"
'')
#(writeShellScriptBin "keyboardswitch")
(writeShellScriptBin "keyboardswitch" ''
hyprctl switchxkblayout all next
layMain=$(hyprctl -j devices | jq '.keyboards' | jq '.[] | select (.main == true)' | awk -F '"' '{if ($2=="active_keymap") print $4}')
${libnotify}/bin/notify-send -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/keyboard.svg
'')
#(writeShellScriptBin "windowpin")
#(writeShellScriptBin "logoutlaunch")
#(writeShellScriptBin "sysmonlaunch")
#(writeShellScriptBin "rofilaunch" '''')
];
]) ++ (with pkgs-stable; [
pavucontrol
]);
}

View File

@ -1,6 +1,7 @@
{
lib,
config,
pkgs,
...
}: {
options = {
@ -8,15 +9,19 @@
};
config = lib.mkIf config.rofi.enable {
home.packages = [
pkgs.rofi
];
programs.rofi = {
enable = true;
cycle = true;
location = "center";
pass = {};
font = lib.mkDefault "JetBrainsMono NF 14";
#theme = let
# inherit (config.lib.formats.rasi) mkLiteral;
#in {
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
# "*" = {
# main-bg = mkLiteral "#11111be6";
# main-fg = mkLiteral "#cdd6f4ff";
@ -28,161 +33,161 @@
# border-color = mkLiteral "transparent";
# };
#
# "configuration" = {
# modi = "drun,filebrowser,window,run";
# show-icons = true;
# display-drun = " ";
# display-run = " ";
# display-filebrowser = " ";
# display-window = " ";
# drun-display-format = "{name}";
# window-format = "{w}{t}";
# font = "JetBrainsMono Nerd Font 10";
# icon-theme = "Tela-circle-dracula";
# };
#
# # Main window settings
# "window" = {
# height = mkLiteral "35em";
# width = mkLiteral "56em";
# transparency = "real";
# fullscreen = false;
# enabled = true;
# cursor = "default";
# spacing = mkLiteral "0em";
# padding = mkLiteral "0em";
# border-color = mkLiteral "@main-br"; # replace with actual color hex if needed
# background-color = mkLiteral "@main-bg";
# };
#
# # Mainbox settings
# "mainbox" = {
# enabled = true;
# spacing = mkLiteral "0em";
# padding = mkLiteral "0em";
# orientation = mkLiteral "vertical";
# children = ["inputbar" "listbox"];
# background-color = mkLiteral "transparent";
# background-image = mkLiteral "url(\"~/.cache/hyde/wall.blur\", height)";
# };
#
# # Input bar settings
# "inputbar" = {
# enabled = true;
# spacing = mkLiteral "0em";
# padding = mkLiteral "5em";
# children = ["entry"];
# background-color = mkLiteral "transparent";
# background-image = mkLiteral "url(\"~/.cache/hyde/wall.thmb\", width)";
# };
#
# # Entry field settings
# "entry" = {
# border-radius = mkLiteral "2em";
# enabled = true;
# spacing = mkLiteral "1em";
# padding = mkLiteral "1em";
# text-color = mkLiteral "@main-fg";
# background-color = mkLiteral "@main-bg";
# };
#
# # Listbox settings
# "listbox" = {
# padding = mkLiteral "0em";
# spacing = mkLiteral "0em";
# orientation = mkLiteral "horizontal";
# children = ["listview" "mode-switcher"];
# background-color = mkLiteral "@main-bg";
# };
#
# # List view settings
# "listview" = {
# padding = mkLiteral "1.5em";
# spacing = mkLiteral "0.5em";
# enabled = true;
# columns = 2;
# lines = 3;
# cycle = true;
# dynamic = true;
# scrollbar = false;
# layout = "vertical";
# reverse = false;
# fixed-height = true;
# fixed-columns = true;
# cursor = "default";
# background-color = mkLiteral "transparent";
# text-color = mkLiteral "@main-fg";
# };
#
# # Mode switcher settings
# "mode-switcher" = {
# orientation = mkLiteral "vertical";
# width = mkLiteral "6.6em";
# enabled = true;
# padding = mkLiteral "1.5em";
# spacing = mkLiteral "1.5em";
# background-color = mkLiteral "transparent";
# };
#
# # Button settings
# "button" = {
# cursor = "pointer";
# border-radius = mkLiteral "2em";
# background-color = mkLiteral "@main-bg";
# text-color = mkLiteral "@main-fg";
# };
# "button selected" = {
# background-color = mkLiteral "@main-fg";
# text-color = mkLiteral "@main-bg";
# };
#
# # Element settings
# "element" = {
# enabled = true;
# spacing = mkLiteral "0em";
# padding = mkLiteral "0.5em";
# cursor = "pointer";
# background-color = mkLiteral "transparent";
# text-color = mkLiteral "@main-fg";
# };
# "element selected.normal" = {
# background-color = mkLiteral "@select-bg";
# text-color = mkLiteral "@select-fg";
# };
#
# # Icon element settings
# "element-icon" = {
# size = mkLiteral "3em";
# cursor = "inherit";
# background-color = mkLiteral "transparent";
# text-color = mkLiteral "inherit";
# };
#
# # Text element settings
# "element-text" = {
# vertical-align = mkLiteral "0.5";
# horizontal-align = mkLiteral "0.0";
# cursor = "inherit";
# background-color = mkLiteral "transparent";
# text-color = mkLiteral "inherit";
# };
#
# # Error message settings
# "error-message" = {
# text-color = mkLiteral "@main-fg";
# background-color = mkLiteral "@main-bg";
# text-transform = mkLiteral "capitalize";
# children = ["textbox"];
# };
#
# # Textbox settings
# "textbox" = {
# text-color = mkLiteral "inherit";
# background-color = mkLiteral "inherit";
# vertical-align = mkLiteral "0.5";
# horizontal-align = mkLiteral "0.5";
# };
#};
"configuration" = {
modi = "drun,filebrowser,window,run";
show-icons = true;
display-drun = "";
display-run = "";
display-filebrowser = "";
display-window = "";
drun-display-format = "{name}";
window-format = "{w}{t}";
font = "JetBrainsMono Nerd Font 10";
icon-theme = "Tela-circle-dracula";
};
# Main window settings
"window" = {
height = mkLiteral "35em";
width = mkLiteral "56em";
transparency = "real";
fullscreen = false;
enabled = true;
cursor = "default";
spacing = mkLiteral "0em";
padding = mkLiteral "0em";
#border-color = mkLiteral "@main-br"; # replace with actual color hex if needed
#background-color = mkLiteral "@main-bg";
};
# Mainbox settings
"mainbox" = {
enabled = true;
spacing = mkLiteral "0em";
padding = mkLiteral "0em";
orientation = mkLiteral "vertical";
children = ["inputbar" "listbox"];
background-color = mkLiteral "transparent";
background-image = mkLiteral "url(\"~/dotfiles/nixos/aurora_borealis.png\", height)";
};
# Input bar settings
"inputbar" = {
enabled = true;
spacing = mkLiteral "0em";
padding = mkLiteral "5em";
children = ["entry"];
background-color = mkLiteral "transparent";
background-image = mkLiteral "url(\"~/dotfiles/nixos/aurora_borealis.png\", width)";
};
# Entry field settings
"entry" = {
border-radius = mkLiteral "2em";
enabled = true;
spacing = mkLiteral "1em";
padding = mkLiteral "1em";
#text-color = mkLiteral "@main-fg";
#background-color = mkLiteral "@main-bg";
};
# Listbox settings
"listbox" = {
padding = mkLiteral "0em";
spacing = mkLiteral "0em";
orientation = mkLiteral "horizontal";
children = ["listview" "mode-switcher"];
#background-color = mkLiteral "@main-bg";
};
# List view settings
"listview" = {
padding = mkLiteral "1.5em";
spacing = mkLiteral "0.5em";
enabled = true;
columns = 2;
lines = 3;
cycle = true;
dynamic = true;
scrollbar = false;
layout = "vertical";
reverse = false;
fixed-height = true;
fixed-columns = true;
cursor = "default";
background-color = mkLiteral "transparent";
#text-color = mkLiteral "@main-fg";
};
# Mode switcher settings
"mode-switcher" = {
orientation = mkLiteral "vertical";
width = mkLiteral "6.6em";
enabled = true;
padding = mkLiteral "1.5em";
spacing = mkLiteral "1.5em";
background-color = mkLiteral "transparent";
};
# Button settings
"button" = {
cursor = "pointer";
border-radius = mkLiteral "2em";
#background-color = mkLiteral "@main-bg";
#text-color = mkLiteral "@main-fg";
};
"button selected" = {
#background-color = mkLiteral "@main-fg";
#text-color = mkLiteral "@main-bg";
};
# Element settings
"element" = {
enabled = true;
spacing = mkLiteral "0em";
padding = mkLiteral "0.5em";
cursor = "pointer";
background-color = mkLiteral "transparent";
#text-color = mkLiteral "@main-fg";
};
"element selected.normal" = {
#background-color = mkLiteral "@select-bg";
#text-color = mkLiteral "@select-fg";
};
# Icon element settings
"element-icon" = {
size = mkLiteral "3em";
cursor = "inherit";
#background-color = mkLiteral "transparent";
#text-color = mkLiteral "inherit";
};
# Text element settings
"element-text" = {
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.0";
cursor = "inherit";
#background-color = mkLiteral "transparent";
#text-color = mkLiteral "inherit";
};
# Error message settings
"error-message" = {
#text-color = mkLiteral "@main-fg";
#background-color = mkLiteral "@main-bg";
text-transform = mkLiteral "capitalize";
children = ["textbox"];
};
# Textbox settings
"textbox" = {
#text-color = mkLiteral "inherit";
#background-color = mkLiteral "inherit";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.5";
};
};
};
};
}

View File

@ -1,6 +1,7 @@
{
lib,
config,
pkgs,
...
}: {
options = {
@ -8,6 +9,10 @@
};
config = lib.mkIf config.waybar.enable {
home.packages = [
pkgs.waybar
];
programs.waybar = {
enable = true;
@ -70,15 +75,15 @@
"m" = 30; # medium
};
interval = 30;
format = "󰾆 {used}GB";
format = "󰾆 {used}GB";
#rotate = ${r_deg};
format-m = "󰾅 {used}GB";
format-h = "󰓅 {used}GB";
format-c = " {used}GB";
format-alt = "󰾆 {percentage}%";
format-m = "󰾅 {used}GB";
format-h = "󰓅 {used}GB";
format-c = " {used}GB";
format-alt = "󰾆 {percentage}%";
max-length = 10;
tooltip = true;
tooltip-format = "󰾆 {percentage}%\n {used:0.1f}GB/{total:0.1f}GB";
tooltip-format = "󰾆 {percentage}%\n {used:0.1f}GB/{total:0.1f}GB";
};
"bluetooth" = {
@ -167,8 +172,8 @@
rotate = 0;
format = "{icon} {percent}%";
format-icons = ["" "" "" "" "" "" "" "" ""];
on-scroll-up = " swayosd-client --brightness raise";
on-scroll-down = " swayosd-client --brightness lower";
on-scroll-up = "${pkgs.swayosd}/bin/swayosd-client --brightness raise";
on-scroll-down = "${pkgs.swayosd}/bin/swayosd-client --brightness lower";
min-length = 6;
};
@ -190,18 +195,18 @@
rotate = 0;
format-muted = "";
on-click = "pavucontrol -t 3";
on-click-middle = "volumecontrol.sh -o m";
on-scroll-up = "volumecontrol.sh -o i";
on-scroll-down = "volumecontrol.sh -o d";
on-click-middle = "swayosd-client --output-volume mute-toggle";
on-scroll-up = "swayosd-client --output-volume 5";
on-scroll-down = "swayosd-client --output-volume -5";
tooltip-format = "{icon} {desc} // {volume}%";
scroll-step = 5;
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
headphone = " ";
hands-free = " ";
headset = " ";
phone = " ";
portable = " ";
car = " ";
default = ["" "" ""];
};
};
@ -212,9 +217,9 @@
format-source = "";
format-source-muted = "";
on-click = "pavucontrol -t 4";
on-click-middle = "volumecontrol.sh -i m";
on-scroll-up = "volumecontrol.sh -i i";
on-scroll-down = "volumecontrol.sh -i d";
on-click-middle = "swayosd-client --input-volume mute-toggle";
on-scroll-up = "swayosd-client --input-volume 5";
on-scroll-down = "swayosd-client --input-volume -5";
tooltip-format = "{format_source} {source_desc} // {source_volume}%";
scroll-step = 5;
};
@ -231,11 +236,11 @@
};
"custom/power" = {
format = "{}";
format = " {}";
rotate = 0;
exec = "echo ; echo logout";
on-click = "logoutlaunch.sh 2";
on-click-right = "logoutlaunch.sh 1";
on-click = "wlogout -b 2";
on-click-right = "wlogout -b 2";
interval = 86400; # once every day
tooltip = true;
};

View File

@ -0,0 +1,147 @@
{
lib,
config,
pkgs,
...
}: {
options = {
wlogout.enable = lib.mkEnableOption "enable wlogout module";
};
config = lib.mkIf config.wlogout.enable {
programs.wlogout = {
enable = true;
layout = [
{
"label" = "lock";
"action" = "swaylock";
"text" = "Lock";
"keybind" = "l";
}
{
"label" = "logout";
"action" = "hyprctl dispatch exit 0";
"text" = "Logout";
"keybind" = "e";
}
{
"label" = "shutdown";
"action" = "systemctl poweroff";
"text" = "Shutdown";
"keybind" = "s";
}
{
"label" = "reboot";
"action" = "systemctl reboot";
"text" = "Reboot";
"keybind" = "r";
}
];
style =
let
fntSize = "40";
BtnCol = config.lib.stylix.colors.base01;
active_rad = "40";
y_hvr = "5";
x_hvr = "5";
button_rad = "20";
y_mgn = "5";
x_mgn = "5";
in ''
@define-color bar-bg rgba(0, 0, 0, 0);
@define-color main-bg #11111b;
@define-color main-fg #cdd6f4;
@define-color wb-act-bg #a6adc8;
@define-color wb-act-fg #313244;
@define-color wb-hvr-bg #f5c2e7;
@define-color wb-hvr-fg #313244;
* {
background-image: none;
font-size: ${fntSize}px;
}
window {
background-color: transparent;
}
button {
color: #${BtnCol};
background-color: @main-bg;
outline-style: none;
border: none;
border-width: 0px;
background-repeat: no-repeat;
background-position: center;
background-size: 10%;
border-radius: 0px;
box-shadow: none;
text-shadow: none;
animation: gradient_f 20s ease-in infinite;
}
button:focus {
background-color: @wb-act-bg;
background-size: 20%;
}
button:hover {
background-color: @wb-hvr-bg;
background-size: 25%;
border-radius: ${active_rad}px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
}
button:hover#lock {
border-radius: ${active_rad}px ${active_rad}px 0px ${active_rad}px;
margin : ${y_hvr}px 0px 0px ${x_hvr}px;
}
button:hover#logout {
border-radius: ${active_rad}px 0px ${active_rad}px ${active_rad}px;
margin : 0px 0px ${y_hvr}px ${x_hvr}px;
}
button:hover#shutdown {
border-radius: ${active_rad}px ${active_rad}px ${active_rad}px 0px;
margin : ${y_hvr}px ${x_hvr}px 0px 0px;
}
button:hover#reboot {
border-radius: 0px ${active_rad}px ${active_rad}px ${active_rad}px;
margin : 0px ${x_hvr}px ${y_hvr}px 0px;
}
#lock {
border-radius: ${button_rad}px 0px 0px 0px;
margin : ${y_mgn}px 0px 0px ${x_mgn}px;
}
#logout {
border-radius: 0px 0px 0px ${button_rad}px;
margin : 0px 0px ${y_mgn}px ${x_mgn}px;
}
#shutdown {
border-radius: 0px ${button_rad}px 0px 0px;
margin : ${y_mgn}px ${x_mgn}px 0px 0px;
}
#reboot {
border-radius: 0px 0px ${button_rad}px 0px;
margin : 0px ${x_mgn}px ${y_mgn}px 0px;
}
'';
};
home.packages = [
pkgs.wlogout
];
};
}

View File

@ -1,6 +1,7 @@
{
lib,
pkgs,
pkgs-stable,
config,
...
}: {
@ -13,24 +14,27 @@
];
config = lib.mkIf config.applications.enable {
home.packages = with pkgs; [
librewolf
vesktop
ferdium
home.packages =
(with pkgs; [
librewolf
ferdium
gnome.simple-scan
stellarium
libreoffice
localsend
plasma5Packages.kdeconnect-kde
qbittorrent
vlc
#tor-browser
openrocket
spotify
spotube
inkscape
];
stellarium
libreoffice
localsend
plasma5Packages.kdeconnect-kde
qbittorrent
vlc
#tor-browser
openrocket
spotify
spotube
inkscape
])
++ (with pkgs-stable; [
loupe
simple-scan
vesktop
]);
};
}

View File

@ -13,6 +13,7 @@
vitetris
steam
heroic
gamescope
wine
(writeShellScriptBin "nvidia-offload" ''

View File

@ -27,7 +27,7 @@
jq
conda
jetbrains.webstorm
jetbrains.pycharm-professional
#jetbrains.pycharm-professional
dotnet-sdk_8
nodejs
pnpm

45
nixos/system/nvidia.nix Normal file
View File

@ -0,0 +1,45 @@
{config, ...}: {
hardware = {
graphics.enable = true;
};
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
prime.amdgpuBusId = "pci@000:04:0";
prime.nvidiaBusId = "pci@000:01:0";
prime.offload = {
enable = true;
enableOffloadCmd = true;
};
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}