diff --git a/config/dolphinrc b/config/dolphinrc index b39c774..169fcb8 100644 --- a/config/dolphinrc +++ b/config/dolphinrc @@ -21,7 +21,7 @@ Places Icons Auto-resize=false Places Icons Static Size=16 [KPropertiesDialog] -2560x1080 screen: Window-Maximized=true +1920x1080 screen: Window-Maximized=true [MainWindow] MenuBar=Disabled diff --git a/flake.nix b/flake.nix index 748117e..c9cb605 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,7 @@ hyprland = { url = "github:hyprwm/Hyprland"; }; - + #hyprland-plugins = { # url = "github:hyprwm/hyprland-plugins"; # inputs.hyprland.follows = "hyprland"; @@ -40,10 +40,8 @@ self, nixpkgs, nixpkgs-stable, - nix-ld, ... } @ inputs: let - username = "foglar"; hostname = "laptop"; @@ -74,7 +72,7 @@ modules = [ ./nixos/configuration.nix inputs.stylix.nixosModules.stylix - nix-ld.nixosModules.nix-ld + inputs.nix-ld.nixosModules.nix-ld {programs.nix-ld.dev.enable = true;} ]; }; diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 0184b49..d20e3b3 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -13,7 +13,7 @@ ]; nix.settings.experimental-features = ["nix-command" "flakes"]; - + programs.nix-ld.dev.enable = true; # Bootloader. boot.loader.systemd-boot.enable = true; diff --git a/nixos/desktop/hyprland/hyprland.nix b/nixos/desktop/hyprland/hyprland.nix index 1d91bb3..8d213fb 100644 --- a/nixos/desktop/hyprland/hyprland.nix +++ b/nixos/desktop/hyprland/hyprland.nix @@ -237,9 +237,8 @@ # Rofi "$mod, A, exec, pkill -x rofi || rofi -show drun" - #"$mod, A, exec, pkill -x rofi || rofilaunch.sh d" - #"$mod, Tab, exec, pkill -x rofi || rofilaunch.sh w" - #"$mod+Shift, E, exec, pkill -x rofi || rofilaunch.sh f" + "$mod, Tab, exec, pkill -x rofi || rofi -show window" + "$mod+Shift, E, exec, pkill -x rofi || rofi -show emoji" # Grouped Windows "$mod CTRL, H, changegroupactive, b" diff --git a/nixos/desktop/hyprland/packages.nix b/nixos/desktop/hyprland/packages.nix index 3caca25..3c43c6f 100644 --- a/nixos/desktop/hyprland/packages.nix +++ b/nixos/desktop/hyprland/packages.nix @@ -1,5 +1,10 @@ -{pkgs, pkgs-stable, ...}: { - home.packages = (with pkgs; [ +{ + pkgs, + pkgs-stable, + ... +}: { + home.packages = + (with pkgs; [ hyprlock hyprpicker hypridle @@ -20,62 +25,63 @@ wl-clipboard cliphist - - (writeShellScriptBin "dontkillsteam" '' - if [[ $(hyprctl activewindow -j | jq -r ".class") == "Steam" ]]; then - xdotool windowunmap $(xdotool getactivewindow) - else - hyprctl dispatch killactive "" - fi - '') - (writeShellScriptBin "screenshot" '' - restore_shader() { - if [ -n "$shader" ]; then - hyprshade on "$shader" - fi - } + (writeShellScriptBin "dontkillsteam" '' + if [[ $(hyprctl activewindow -j | jq -r ".class") == "Steam" ]]; then + xdotool windowunmap $(xdotool getactivewindow) + else + hyprctl dispatch killactive "" + fi + '') - # Saves the current shader and turns it off - save_shader() { - shader=$(hyprshade current) - hyprshade off - trap restore_shader EXIT - } + (writeShellScriptBin "screenshot" '' + restore_shader() { + if [ -n "$shader" ]; then + hyprshade on "$shader" + fi + } - save_shader + # Saves the current shader and turns it off + save_shader() { + shader=$(hyprshade current) + hyprshade off + trap restore_shader EXIT + } - save_file=$(date +'%y%m%d_%Hh%Mm%Ss_screenshot.png') - temp_screenshot="/tmp/screenshot.png" + save_shader - case $1 in - p) # print all outputs - grimblast copysave screen $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;; - s) # drag to manually snip an area / click on a window to print it - grimblast copysave area $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;; - sf) # frozen screen, drag to manually snip an area / click on a window to print it - grimblast --freeze copysave area $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;; - m) # print focused monitor - grimblast copysave output $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;; - *) # invalid option - print_error ;; - esac + save_file=$(date +'%y%m%d_%Hh%Mm%Ss_screenshot.png') + temp_screenshot="/tmp/screenshot.png" - rm "$temp_screenshot" - '') + case $1 in + p) # print all outputs + grimblast copysave screen $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;; + s) # drag to manually snip an area / click on a window to print it + grimblast copysave area $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;; + sf) # frozen screen, drag to manually snip an area / click on a window to print it + grimblast --freeze copysave area $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;; + m) # print focused monitor + grimblast copysave output $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;; + *) # invalid option + print_error ;; + esac - (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 - '') + rm "$temp_screenshot" + '') - #(writeShellScriptBin "windowpin") - #(writeShellScriptBin "logoutlaunch") - #(writeShellScriptBin "sysmonlaunch") - #(writeShellScriptBin "rofilaunch" '''') - ]) ++ (with pkgs-stable; [ - pavucontrol - gnome.nautilus - ]); + (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 + gnome.nautilus + ]); } diff --git a/nixos/home.nix b/nixos/home.nix index e337dcb..d7882ea 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -1,6 +1,6 @@ -{...}: { - home.username = "foglar"; - home.homeDirectory = "/home/foglar"; +{username, ...}: { + home.username = "${username}"; + home.homeDirectory = "/home/${username}"; home.stateVersion = "24.05"; # Please read the comment before changing. imports = [ @@ -9,8 +9,8 @@ ]; desktop.hyprland.enable = true; - programming.enable = true; - games.enable = true; + group.programming.enable = true; + group.games.enable = true; gtk.enable = true; diff --git a/nixos/packages/applications.nix b/nixos/packages/applications.nix index 3a00350..22b2290 100644 --- a/nixos/packages/applications.nix +++ b/nixos/packages/applications.nix @@ -26,6 +26,14 @@ inkscape gnome-disk-utility qbittorrent + + (writeShellScriptBin "nvidia-offload" '' + export __NV_PRIME_RENDER_OFFLOAD=1 + export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 + export __GLX_VENDOR_LIBRARY_NAME=nvidia + export __VK_LAYER_NV_optimus=NVIDIA_only + exec "$@" + '') ]) ++ (with pkgs-stable; [ loupe diff --git a/nixos/packages/games.nix b/nixos/packages/games.nix index a05d7ad..2ded95d 100644 --- a/nixos/packages/games.nix +++ b/nixos/packages/games.nix @@ -16,14 +16,6 @@ heroic wine - (writeShellScriptBin "nvidia-offload" '' - export __NV_PRIME_RENDER_OFFLOAD=1 - export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 - export __GLX_VENDOR_LIBRARY_NAME=nvidia - export __VK_LAYER_NV_optimus=NVIDIA_only - exec "$@" - '') - (writeShellScriptBin "gs" '' set -xeuo pipefail diff --git a/nixos/packages/programming/code.nix b/nixos/packages/programming/code.nix index 222f00e..eef5dac 100644 --- a/nixos/packages/programming/code.nix +++ b/nixos/packages/programming/code.nix @@ -1,5 +1,6 @@ { pkgs, + pkgs-stable, lib, config, ... @@ -42,7 +43,7 @@ "workbench.iconTheme" = "material-icon-theme"; "workbench.productIconTheme" = "material-product-icons"; "window.menuBarVisibility" = "toggle"; - "github.copilot.editor.enableAutoCompletions" = true; + "github.copilot.editor.enableAutoCompletions" = false; "[json]" = { "editor.defaultFormatter" = "esbenp.prettier-vscode"; }; @@ -77,7 +78,7 @@ }; }; - extensions = with pkgs.vscode-extensions; [ + extensions = with pkgs-stable.vscode-extensions; [ ms-azuretools.vscode-docker # Mardown diff --git a/nixos/packages/programming/neovim.nix b/nixos/packages/programming/neovim.nix new file mode 100644 index 0000000..e0fff56 --- /dev/null +++ b/nixos/packages/programming/neovim.nix @@ -0,0 +1,6 @@ +{lib}: +{ + options = { + neovim = lib.mkEnableOption "neovim"; + }; +} \ No newline at end of file