diff options
| author | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2025-03-29 22:35:21 +0100 |
|---|---|---|
| committer | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2025-03-29 22:36:50 +0100 |
| commit | 2418424adabca0a1616cca4920221cd67149b65a (patch) | |
| tree | b5b237376601cdfbd386ab96be5015fc486147fc /home | |
| parent | ed0794d5d65c1e15038c308f0a2751a2bcc5cc84 (diff) | |
Initial commit (Pre-flakes)
Diffstat (limited to '')
| -rw-r--r-- | home-manager/electron_overlay.nix | 25 | ||||
| -rw-r--r-- | home-manager/fmod/default.nix | 29 | ||||
| -rw-r--r-- | home-manager/home.nix | 218 | ||||
| -rw-r--r-- | home-manager/hyprland.nix | 236 | ||||
| -rw-r--r-- | home-manager/kitty.nix | 0 | ||||
| -rw-r--r-- | home-manager/neovim.nix | 94 | ||||
| -rw-r--r-- | home-manager/syncthing.nix | 11 | ||||
| -rw-r--r-- | home-manager/theming.nix | 42 | ||||
| -rw-r--r-- | home-manager/xdg.nix | 9 |
9 files changed, 664 insertions, 0 deletions
diff --git a/home-manager/electron_overlay.nix b/home-manager/electron_overlay.nix new file mode 100644 index 0000000..d91eba0 --- /dev/null +++ b/home-manager/electron_overlay.nix @@ -0,0 +1,25 @@ +self: +let + enableWayland = drv: bin: drv.overrideAttrs ( + old: { + nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ self.makeWrapper ]; + postFixup = (old.postFixup or "") + '' + wrapProgram $out/bin/${bin} \ + --add-flags "--enable-features=UseOzonePlatform" \ + --add-flags "--ozone-platform=wayland" + ''; + } + ); +in +super: + { + # slack = enableWayland super.slack "slack"; + discord = enableWayland super.discord "discord"; + vencord = enableWayland super.vesktop "vesktop"; + # vscode = enableWayland super.vscode "code"; + # google-chrome-beta = ( + # super.google-chrome-beta.override { + # commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland"; + # } + # ); + } diff --git a/home-manager/fmod/default.nix b/home-manager/fmod/default.nix new file mode 100644 index 0000000..1c9e942 --- /dev/null +++ b/home-manager/fmod/default.nix @@ -0,0 +1,29 @@ +{stdenv, fetchurl }: + +stdenv.mkDerivation { + name = "fmod-42204"; + src = if (stdenv.system == "i686-linux") then + fetchurl { + url = "http://www.fmod.org/index.php/release/version/fmodapi42204linux.tar.gz"; + sha256 = "64eedc5b37c597eb925de446106d75cab0b5a79697d5ec048d34702812c08563"; + } else if (stdenv.system == "x86_64-linux") then + fetchurl { + url = "http://www.fmod.org/index.php/release/version/fmodapi42204linux64.tar.gz"; + sha256 = "3f2eec8265838a1005febe07c4971660e85010e4622911890642dc438746edf3"; + } else throw "unsupported platform ${stdenv.system} (only i686-linux and x86_64 linux supported yet)"; + + preInstall = '' + sed -e /ldconfig/d -i Makefile + sed -e s@/usr/local@$out@ -i Makefile + sed -e s@/include/fmodex@/include@ -i Makefile + mkdir -p $out/lib + mkdir -p $out/include + ''; + + meta = { + homepage = "http://www.fmod.org/"; + description = "Programming library and toolkit for the creation and playback of interactive audio"; + license = "unfree"; + }; +} + diff --git a/home-manager/home.nix b/home-manager/home.nix new file mode 100644 index 0000000..243c6d1 --- /dev/null +++ b/home-manager/home.nix @@ -0,0 +1,218 @@ +{ config, pkgs, ... }: + +{ + imports = [ ./hyprland.nix ./syncthing.nix ./theming.nix ./neovim.nix ./xdg.nix]; + nixpkgs.config.allowUnfree = true; + nixpkgs.overlays = [ + (import ./electron_overlay.nix) + # (import (builtins.fetchTarball { + # url = "https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz"; + # })) + ]; + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "wilkuu"; + home.homeDirectory = "/home/wilkuu"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "23.11"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = with pkgs; [ + # Environment + hyprpolkitagent + hyprsunset + xdg-desktop-portal-kde + xdg-desktop-portal-hyprland + minecraftia + inconsolata-nerdfont + # Utils + networkmanagerapplet + blueman + htop + pwvucontrol + wl-clipboard + xdg-user-dirs + hyprshot + mako + speedcrunch + unzip + ripgrep + glib + gwenview + + # Connectivity + firefox + floorp + thunderbird + element-desktop + + # File management + pcmanfm + xarchiver + filelight + ranger + libsForQt5.kdeconnect-kde + sshfs + + #Productivity + libreoffice-qt6-fresh + zathura + obsidian + + # Artistic + krita + kdenlive + + # Web + hugo + + # Scripting + python3 + + # php + php83Packages.composer + php + + # java + openjdk17-bootstrap + gradle + + # Shell + zsh + alacritty + + # Entertainment + spotify + prismlauncher + ani-cli + vlc + openttd + fluent-reader + + # Finance + gnucash + # SRS + anki-bin + mpv + + # Electronics + + gst_all_1.gstreamer + # Common plugins like "filesrc" to combine within e.g. gst-launch + gst_all_1.gst-plugins-base + # Specialized plugins separated by quality + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-ugly + # Plugins to reuse ffmpeg to play almost every video format + gst_all_1.gst-libav + # Support the Video Audio (Hardware) Acceleration API + gst_all_1.gst-vaapi + + #Theme + qt6Packages.qt6ct + kdePackages.qtstyleplugin-kvantum + (catppuccin-kvantum.override { + accent = "pink"; + variant = "mocha"; + }) + + + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + }; + + # Home Manager can also manage your environment variables through + # 'home.sessionVariables'. These will be explicitly sourced when using a + # shell provided by Home Manager. If you don't want to manage your shell + # through Home Manager then you have to manually source 'hm-session-vars.sh' + # located at either + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/wilkuu/etc/profile.d/hm-session-vars.sh + # + home.sessionVariables = { + EDITOR = "nvim"; + XDG_SESSION_TYPE = "wayland"; + GDK_BACKEND = "wayland"; + GTK_USE_PORTAL = "1"; + QT_QPA_PLATFORM = "wayland"; + QT_STYLE_OVERRIDE = "kvantum"; + QT_QPA_PLATFORM_THEME = "kvantum"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + MOZ_ENABLE_WAYLAND = "1"; + }; + + + programs.zsh = { + enable = true; + enableCompletion = true; + oh-my-zsh = { + enable = true; + theme = "clean"; + }; + plugins = [ + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.8.0"; + sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; + }; + } + ]; + }; + + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + +} diff --git a/home-manager/hyprland.nix b/home-manager/hyprland.nix new file mode 100644 index 0000000..3b1e4fa --- /dev/null +++ b/home-manager/hyprland.nix @@ -0,0 +1,236 @@ +{config, pkgs, ...}: +{ + # Hyprland + wayland.windowManager.hyprland = { + systemd.enable = false; + enable = true; + xwayland.enable = true; + settings = { + exec-once = map (s: "uwsm app -- " + s) [ + "kitty &" + "lxqt-policykit-agent &" + "waybar &" + "nm-applet &" + "blueman-tray &" + "blueman-applet &" + "hyprctl setcursor Catppuccin-Mocha-Dark-Cursors 24" + "kdeconnect-indicator &" + ] ++ ["uwsm finalize QT_QPA_PLATFORM QT_PLUGIN_PATH"]; + general = { + gaps_in = 3; + gaps_out = 8; + border_size = 1; + + "col.active_border" = "rgba(ed45b8ee) rgba(611449ee) 45deg"; + "col.inactive_border" = "rgba(595959aa)"; + + resize_on_border = true; + allow_tearing = true; + layout = "dwindle"; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + animation = [ + "windows, 1, 7, myBezier" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "borderangle, 1, 8, default" + "fade, 1, 7, default" + "workspaces, 1, 6, default" + ]; + }; + + decoration = { + rounding = 10; + + # Change transparency of focused and unfocused windows + active_opacity = "1.0"; + inactive_opacity = "1.0"; + + # drop_shadow = true; + # shadow_range = 4; + # shadow_render_power = 3; + # "col.shadow" = "rgba(1a1a1aee)"; + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur = { + enabled = true; + size = 3; + passes = 1; + + vibrancy = "0.1696"; + }; + }; + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + #master = { + # new_is_master = true; + #}; + input = { + kb_layout = "pl"; + kb_variant = ""; + kb_model = ""; + kb_options = ""; + kb_rules = ""; + + follow_mouse = 1; + + sensitivity = 0; # -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = true; + }; + }; + gestures = { + workspace_swipe = true; + }; + misc = { + force_default_wallpaper = "-1"; # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :( + }; + monitor= [ ",preferred,auto,1" ]; + + # Mod key + "$mod" = "SUPER"; + + # Programs + "$terminal" = "kitty"; + "$fileManager" = "pcmanfm"; + "$menu" = "wofi --show run"; + "$screenshot" = "hyprshot -m region -f screenshots/screenshot_$(date +'%d-%m-%y_%H-%M-%S').png"; + + + bind = [ + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + "$mod, RETURN, exec, $terminal" + "$mod, Q, killactive," + "$mod SHIFT, M, exec, uwsm stop" + "$mod, E, exec, uwsm app -- $fileManager" + "$mod, V, togglefloating," + "$mod, R, exec, uwsm app -- $menu" + "$mod, P, pseudo" + "$mod, J, togglesplit" + "$mod, L, exec, uwsm app -- hyprlock" + ",Print, exec, uwsm app -- $screenshot " + + # Move focus with mod + arrow keys + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + + # Example special workspace (scratchpad) + "$mod, S, togglespecialworkspace, magic" + "$mod SHIFT, S, movetoworkspace, special:magic" + + # Scroll through existing workspaces with mod + scroll + "$mod, mouse_down, workspace, e+1" + "$mod, mouse_up, workspace, e-1" + ] ++ ( + # workspaces + # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} + builtins.concatLists (builtins.genList ( + x: let + ws = let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in [ + "$mod, ${ws}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + ] + ) + 10) + ); + + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + + + windowrulev2 = [ + "suppressevent maximize, class:.*" # You'll probably like this. + ]; + + source = [ + "~/.config/hypr/hypr_test.conf" + ]; + }; + }; + + services.hyprpaper = { + enable = true; + settings = { + ipc = "on"; + splash = false; + splash_offset = 2.0; + + preload = + [ "/home/wilkuu/Pictures/Wallpapers/peony.png" ]; + wallpaper= [",/home/wilkuu/Pictures/Wallpapers/peony.png"]; + }; + }; + + programs.hyprlock = { + enable=true; + settings = { + general = { + disable_loading_bar = true; + grace = 0; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 16; + } + ]; + + input-field = [ + { + size = "200, 50"; + position = "0, -80"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_color = "rgb(202, 211, 245)"; + inner_color = "rgb(91, 96, 120)"; + outer_color = "rgb(24, 25, 38)"; + outline_thickness = 5; + placeholder_text = "<span foreground=\"##cad3f5\">Password...</span>"; + shadow_passes = 2; + } + ]; + }; + }; + + services.hypridle.enable = true; + services.hypridle.settings = { + general = { + lock_cmd ="pidof hyprlock || hyprlock"; + before_sleep_cmd="loginctl lock-session"; + ignore_dbus_inhibit=false; + after_sleep_cmd="hyprctl_dispatch dpms on"; + }; + listener = [ + { + timeout = 30; + on-timeout = "hyprlock"; + } + { + timeout = 90; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; +} diff --git a/home-manager/kitty.nix b/home-manager/kitty.nix new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/home-manager/kitty.nix diff --git a/home-manager/neovim.nix b/home-manager/neovim.nix new file mode 100644 index 0000000..7b1554e --- /dev/null +++ b/home-manager/neovim.nix @@ -0,0 +1,94 @@ +{ pkgs, config, ...}: +let + unstable = import <nixos-unstable> {}; + treesitterWithGrammars = (unstable.vimPlugins.nvim-treesitter.withPlugins (p : [ + p.bash + p.comment + p.css + p.dockerfile + p.gitattributes + p.gitignore + p.go + p.gomod + p.gowork + p.rust + p.javascript + p.typescript + p.json5 + p.json + p.lua + p.markdown + p.nix + p.python + p.java + p.rust + p.toml + p.vue + p.yaml + p.php + p.latex + ])); + treesitter-parsers = pkgs.symlinkJoin { + name = "treesitter-parsers"; + paths = treesitterWithGrammars.dependencies; + }; + +in +{ + programs.neovim = { + enable = true; + # package = unstable.neovim; + defaultEditor = true; + viAlias = true; + vimAlias = true; + # vimdiffAlias = true; + # # withPython3 = false; + # # withNodeJs = false; + # # withRuby = false; + # + coc.enable = false; + # + plugins = [ + treesitterWithGrammars + ]; + }; + + home.file."./.config/nvim/lua/wilkuu/init.lua".text = '' + require("wilkuu.set") + require("wilkuu.remap") + ''; + #vim.opt.runtimepath:append("${treesitter-parsers}") + + home.file."./.config/nvim/lua/wilkuu/nix.lua".text = '' + return { + vue_ts_plugin = "/home/wilkuu/.npm/@vue/typescript-plugin", + } + ''; + + + # home.file."./.local/share/nvim/nix/nvim-treesitter/" = { + # source = treesitterWithGrammars; + # recursive = true; + # }; + + home.sessionPath = [ + "/home/wilkuu/.npm/bin/" + ]; + + home.packages = with pkgs; [ + lua + lua-language-server + gopls + go + typescript + nodejs_22 + rustup + nixd + nixfmt-rfc-style + pyright + nodePackages.intelephense + texlive.combined.scheme-full + texlab + ]; + +} diff --git a/home-manager/syncthing.nix b/home-manager/syncthing.nix new file mode 100644 index 0000000..f917d86 --- /dev/null +++ b/home-manager/syncthing.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: +{ + services.syncthing = { + enable = true; + tray = { + enable = true; + command = "syncthingtray --wait"; + }; + }; +} + diff --git a/home-manager/theming.nix b/home-manager/theming.nix new file mode 100644 index 0000000..db2c9db --- /dev/null +++ b/home-manager/theming.nix @@ -0,0 +1,42 @@ +{ config, pkgs, ... }: +let + catppuccin_gtk = pkgs.catppuccin-gtk.override { + accents = ["pink"]; + size = "compact"; + tweaks = ["black"]; + variant = "mocha"; + }; +in +{ + #Gtk Theming + gtk = { + enable=true; + theme = { + package= catppuccin_gtk; + name="catppuccin-mocha-pink-compact+black"; + }; + iconTheme = { + package = pkgs.catppuccin-papirus-folders; + name = "Papirus-Dark"; + }; + }; + + + home.pointerCursor = { + gtk.enable = true; + package = pkgs.catppuccin-cursors.mochaDark; + name = "catppuccin-mocha-dark-cursors"; + size = 32; + }; + + qt = { + enable = true; + platformTheme.name = "qtct"; + style.name="kvantum"; + }; + + xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" { + General.theme = "Catppuccin-Mocha-Pink"; + }; + +} diff --git a/home-manager/xdg.nix b/home-manager/xdg.nix new file mode 100644 index 0000000..6b55023 --- /dev/null +++ b/home-manager/xdg.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: +{ + xdg.mimeApps.defaultApplications = { + "application/zip" = [ "xarchiver.desktop" ]; + "application/x-krita" = [ "krita.desktop" ]; + "image/*" = [ "gwenview.desktop" "krita.desktop"]; + "inode/directory" = [ "pcmanfm.desktop" "filelight.desktop" "kitty.desktop"]; + }; +} |
