diff --git a/assets/wallpaper/aperture.jpg b/assets/wallpaper/aperture.jpg new file mode 100644 index 0000000..cad7619 Binary files /dev/null and b/assets/wallpaper/aperture.jpg differ diff --git a/assets/wallpaper/asura.jpg b/assets/wallpaper/asura.jpg new file mode 100644 index 0000000..b8da1ed Binary files /dev/null and b/assets/wallpaper/asura.jpg differ diff --git a/assets/wallpaper/dr stone.png b/assets/wallpaper/dr stone.png new file mode 100644 index 0000000..34ac725 Binary files /dev/null and b/assets/wallpaper/dr stone.png differ diff --git a/assets/wallpaper/lights.jpg b/assets/wallpaper/lights.jpg new file mode 100644 index 0000000..3da7f26 Binary files /dev/null and b/assets/wallpaper/lights.jpg differ diff --git a/assets/wallpaper/mountains.jpg b/assets/wallpaper/mountains.jpg new file mode 100644 index 0000000..7ac2492 Binary files /dev/null and b/assets/wallpaper/mountains.jpg differ diff --git a/assets/wallpaper/nix.png b/assets/wallpaper/nix.png new file mode 100644 index 0000000..013e6a3 Binary files /dev/null and b/assets/wallpaper/nix.png differ diff --git a/assets/wallpaper/thunder.jpg b/assets/wallpaper/thunder.jpg new file mode 100644 index 0000000..3004c8f Binary files /dev/null and b/assets/wallpaper/thunder.jpg differ diff --git a/assets/wallpaper/totk.jpg b/assets/wallpaper/totk.jpg new file mode 100644 index 0000000..2c49cb3 Binary files /dev/null and b/assets/wallpaper/totk.jpg differ diff --git a/assets/wallpaper/wave.jpg b/assets/wallpaper/wave.jpg new file mode 100644 index 0000000..d0ec7fa Binary files /dev/null and b/assets/wallpaper/wave.jpg differ diff --git a/hosts/lars/default.nix b/hosts/lars/default.nix index e2c5d9c..39987bb 100644 --- a/hosts/lars/default.nix +++ b/hosts/lars/default.nix @@ -1,5 +1,10 @@ { config, inputs, pkgs, ... }: { + imports = [ + ./hyprland.nix + ./programs.nix + ]; + nixpkgs.config.allowUnfree = true; time.timeZone = "Europe/Zurich"; security.sudo.package = pkgs.sudo.override { withInsults = true; }; @@ -29,7 +34,8 @@ profiling = false; extraAliases = { cls = "clear"; - Hyprland = "dbus-run-session Hyprland"; + Hyprland = "dbus-run-session Hyprland"; + y = "yazi"; }; ohmyzsh = { enable = true; @@ -55,6 +61,14 @@ install_url = "https://addons.mozilla.org/firefox/downloads/file/4231522/new_tab_override-16.0.0.xpi"; installation_mode = "force_installed"; }; + "keepassxc-browser@keepassxc.org" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4257616/keepassxc_browser-1.9.0.3.xpi"; + installation_mode = "force_installed"; + }; + "{7be2ba16-0f1e-4d93-9ebc-5164397477a9}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/3756025/videospeed-0.6.3.3.xpi"; + installation_mode = "force_installed"; + }; }; }; @@ -62,6 +76,10 @@ enable = true; catppuccin = true; }; + + neovim = { + enable = true; + }; }; services = { @@ -99,6 +117,13 @@ console.keyMap = "sg"; # services.flatpak.enable = true; + services = { + twingate.enable = true; + }; + + # SSH AGENT + programs.ssh.startAgent = true; + services.gnome3.gnome-keyring.enable = false; system.stateVersion = "23.11"; nix.settings.experimental-features = ["nix-command" "flakes"]; diff --git a/hosts/lars/dyonisos/configuration.nix b/hosts/lars/dyonisos/configuration.nix index e41888a..cf9ab76 100644 --- a/hosts/lars/dyonisos/configuration.nix +++ b/hosts/lars/dyonisos/configuration.nix @@ -10,6 +10,7 @@ hyprland = { enable = true; monitor = [",preferred,auto,2"]; + wallpaper = "wallpaper/wave.jpg"; }; }; } diff --git a/hosts/lars/dyonisos/default.nix b/hosts/lars/dyonisos/default.nix index 2d68268..22a270e 100644 --- a/hosts/lars/dyonisos/default.nix +++ b/hosts/lars/dyonisos/default.nix @@ -1,8 +1,6 @@ _: { imports = [ ../. - ./../programs.nix - ./../hyprland.nix ./programs.nix ./configuration.nix ./hardware-configuration.nix diff --git a/hosts/lars/dyonisos/profile.nix b/hosts/lars/dyonisos/profile.nix index d4fe1e8..33aae1b 100644 --- a/hosts/lars/dyonisos/profile.nix +++ b/hosts/lars/dyonisos/profile.nix @@ -5,5 +5,6 @@ _: { ../../../options/common/networking.nix ../../../options/common/pin-registry.nix ../../../options/common/preserve-system.nix + ../../../options/common/bluetooth.nix ]; } diff --git a/hosts/lars/hyprland.nix b/hosts/lars/hyprland.nix index 41168ce..cd12319 100644 --- a/hosts/lars/hyprland.nix +++ b/hosts/lars/hyprland.nix @@ -2,6 +2,7 @@ with lib; let username = config.modules.other.system.username; cfg = config.modules.hyprland; + gitPath = config.modules.other.system.gitPath; in { imports = [ ./waybar.nix @@ -20,6 +21,11 @@ in { default = {}; type = types.attrs; }; + wallpaper = mkOption { + description = "wallpaper relative from assets"; + default = ""; + type = types.str; + }; }; config = mkIf cfg.enable { @@ -84,6 +90,10 @@ in { exec-once = [ "waybar" + "swww init & swww img ${gitPath}/${cfg.wallpaper}" + "keepassxc" + "nextcloud" + "element-desktop --ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCpaturer --disable-gpu" ]; bind = [ @@ -100,6 +110,7 @@ in { "$mod, o, exec, obsidian --ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCpaturer --disable-gpu" "$mod SHIFT, D, exec, webcord --ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCpaturer --disable-gpu" "$mod SHIFT, L, exec, element-desktop --ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCpaturer --disable-gpu" + "$mod, v, exec, vivaldi --ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCpaturer --disable-gpu" # Monitor management "$mod SHIFT, k, movecurrentworkspacetomonitor, DP-2" @@ -112,8 +123,13 @@ in { "$mod, down, movefocus, d" "$mod, F, fullscreen" + # Special Workspaces + "$mod SHIFT, F, movetoworkspacesilent, special" + "$mod, s, togglespecialworkspace," + # Screenshot - "$mod SHIFT, s, exec, grim -g '$(slurp -d)' - | wl-copy" + "$mod SHIFT, s, exec, grim -g \"$(slurp -d)\" - | wl-copy" + ] ++ ( builtins.concatLists (builtins.genList ( @@ -129,6 +145,11 @@ in { ) 10) ); + # Mouse movement + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; } cfg.extra]; }; }; diff --git a/hosts/lars/kronos/configuration.nix b/hosts/lars/kronos/configuration.nix index 0d0af04..01cc83c 100644 --- a/hosts/lars/kronos/configuration.nix +++ b/hosts/lars/kronos/configuration.nix @@ -13,6 +13,11 @@ opacity = 0.8; blur = true; }; + + steam = { + enable = true; + gamescope = true; + }; }; hyprland = { @@ -22,11 +27,12 @@ "DP-2,2560x1440@144,0x0,1" "DP-1,1920x1080@60,2560x0,1" ]; - extra = { - exec-once = [ - "hyprctl dispatch moveworkspacetomonitor 1 DP-2" - ]; - }; + extra = { + exec-once = [ + "hyprctl dispatch moveworkspacetomonitor 1 DP-2" + ]; + }; + wallpaper = "wallpaper/wave.jpg"; }; }; diff --git a/hosts/lars/kronos/default.nix b/hosts/lars/kronos/default.nix index 2d68268..22a270e 100644 --- a/hosts/lars/kronos/default.nix +++ b/hosts/lars/kronos/default.nix @@ -1,8 +1,6 @@ _: { imports = [ ../. - ./../programs.nix - ./../hyprland.nix ./programs.nix ./configuration.nix ./hardware-configuration.nix diff --git a/hosts/lars/kronos/profile.nix b/hosts/lars/kronos/profile.nix index 30407f5..e567018 100644 --- a/hosts/lars/kronos/profile.nix +++ b/hosts/lars/kronos/profile.nix @@ -6,5 +6,6 @@ _: { ../../../options/common/gpu/nvidia.nix ../../../options/common/pin-registry.nix ../../../options/common/preserve-system.nix + ../../../options/common/bluetooth.nix ]; } diff --git a/hosts/lars/kronos/programs.nix b/hosts/lars/kronos/programs.nix index 631e805..8877ef2 100644 --- a/hosts/lars/kronos/programs.nix +++ b/hosts/lars/kronos/programs.nix @@ -1,6 +1,30 @@ -{ config, inputs, pkgs, ... }: +{ config, inputs, pkgs, lib, ... }: let username = config.modules.other.system.username; + + # Fetch the GLFW with Wayland patches for Minecraft + customGLFW = let + mcWaylandPatchRepo = pkgs.fetchFromGitHub { + owner = "Admicos"; + repo = "minecraft-wayland"; + rev = "370ce5b95e3ae9bc4618fb45113bc641fbb13867"; + sha256 = "sha256-RPRg6Gd7N8yyb305V607NTC1kUzvyKiWsh6QlfHW+JE="; + }; + mcWaylandPatches = map (name: "${mcWaylandPatchRepo}/${name}") + (lib.naturalSort (builtins.attrNames (lib.filterAttrs + (name: type: + type == "regular" && lib.hasSuffix ".patch" name) + (builtins.readDir mcWaylandPatchRepo)))); + in pkgs.glfw.overrideAttrs (previousAttrs: { + patches = previousAttrs.patches ++ mcWaylandPatches; + buildInputs = previousAttrs.buildInputs ++ [ pkgs.wayland ]; + }); + + # Minecraft launcher with the custom GLFW + minecraftPrismLauncher = pkgs.prismlauncher.override { + glfw = customGLFW; + }; + in { home-manager.users.${username} = { home.packages = let @@ -9,4 +33,9 @@ in { in with pkgs; [ ]; }; + + # System-wide installation of Minecraft PrismLauncher + environment.systemPackages = [ + minecraftPrismLauncher + ]; } diff --git a/hosts/lars/programs.nix b/hosts/lars/programs.nix index ed7673c..7f3b8ff 100644 --- a/hosts/lars/programs.nix +++ b/hosts/lars/programs.nix @@ -43,7 +43,6 @@ in { smartmontools python3 rustdesk - neovim tmux kitty nextcloud-client @@ -57,6 +56,15 @@ in { xdg-utils # xdg-mime script webcord element-desktop + swww + toipe + keepassxc + vivaldi + yubikey-personalization-gui + yubikey-personalization + yubioath-flutter + fzf + nix-index ]; }; } diff --git a/hosts/vali/mars/programs.nix b/hosts/vali/mars/programs.nix index 5c068f8..ce02283 100644 --- a/hosts/vali/mars/programs.nix +++ b/hosts/vali/mars/programs.nix @@ -26,6 +26,7 @@ in { ffmpeg_6-full flameshot foot + img2pdf gcc gdb gnumake @@ -47,6 +48,7 @@ in { pamixer pavucontrol pcmanfm + pdfarranger pfetch playerctl polkit diff --git a/modules/gui/default.nix b/modules/gui/default.nix index a584a6a..72d993f 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -14,5 +14,6 @@ _: { ./WM ./alacritty.nix ./firefox.nix + ./steam.nix ]; } diff --git a/modules/gui/firefox.nix b/modules/gui/firefox.nix index 07704ca..b948b0b 100644 --- a/modules/gui/firefox.nix +++ b/modules/gui/firefox.nix @@ -18,7 +18,7 @@ in { enable = true; policies = { - DisableTelemetry = true; + DisableTelemetry = true; DisableFirefoxStudies = true; EnableTrackingProtection = { Value= true; @@ -36,28 +36,30 @@ in { DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab" DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" SearchBar = "unified"; # alternative: "separate" - FirefoxSuggest = { - WebSuggestions = true; - ImproveSuggest = true; - Locked = true; - }; - SearchSuggestEnabled = true; - theme = { - colors = { - background-darker = "181825"; - background = "1e1e2e"; - foreground = "cdd6f4"; - }; - }; + FirefoxSuggest = { + WebSuggestions = true; + ImproveSuggest = true; + Locked = true; + }; + SearchSuggestEnabled = true; + theme = { + colors = { + background-darker = "181825"; + background = "1e1e2e"; + foreground = "cdd6f4"; + }; + }; - font = "Lexend"; - ExtensionSettings = lib.mkMerge [{ - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "force_installed"; - }; - } cfg.extensions]; - }; + OfferToSaveLogins = false; + + font = "Lexend"; + ExtensionSettings = lib.mkMerge [{ + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + }; + } cfg.extensions]; + }; }; }; }; diff --git a/modules/gui/steam.nix b/modules/gui/steam.nix new file mode 100644 index 0000000..ca600f2 --- /dev/null +++ b/modules/gui/steam.nix @@ -0,0 +1,22 @@ + +{ config, lib, inputs, pkgs, ... }: +with lib; let + username = config.modules.other.system.username; + cfg = config.modules.programs.steam; +in { + options.modules.programs.steam = { + enable = mkEnableOption "steam"; + gamescope = mkEnableOption "gamescope"; + }; + + config = mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + gamescopeSession.enable = mkIf cfg.gamescope true; + }; + home-manager.users.${username} = { + }; + }; +} diff --git a/modules/tui/neovim.nix b/modules/tui/neovim.nix index e87674d..a05a53d 100644 --- a/modules/tui/neovim.nix +++ b/modules/tui/neovim.nix @@ -82,6 +82,7 @@ in { java-language-server.enable = true; #pylyzer.enable = true; rnix-lsp.enable = true; + pyright.enable = true; }; #onAttach = '' # vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') @@ -159,11 +160,36 @@ in { enable = true; settings.theme = "dark"; }; + }; extraPlugins = with pkgs.vimPlugins; [ zen-mode-nvim + lazygit-nvim ]; + + keymaps = [ + { + mode = "n"; + key = "pv"; + action = "Explore"; + } + { + mode = "n"; + key = "w"; + action = "w"; + } + { + mode = "n"; + key = "qw"; + action = "q"; + } + { + mode = "n"; + key = "gg"; + action = "LazyGit"; + } + ]; }; }; }; diff --git a/options/common/bluetooth.nix b/options/common/bluetooth.nix new file mode 100644 index 0000000..3d24814 --- /dev/null +++ b/options/common/bluetooth.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: +let + username = config.modules.other.system.username; +in { + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + + services.blueman.enable = true; + + # Bluetooth headset media control buttons + systemd.user.services.mpris-proxy = { + description = "Mpris proxy"; + after = [ "network.target" "sound.target" ]; + wantedBy = [ "default.target" ]; + serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; + }; +}