From 8ff62cb40d981557855066c3ba9ee715900af226 Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Fri, 30 Aug 2024 01:10:41 +0200 Subject: [PATCH] Lots of changes, I guess... --- common/fonts.nix | 4 ++-- common/themes/default.nix | 14 ++++++++------ dns/common.nix | 19 ++++++++++++------- home/calypso.nix | 3 ++- home/features/desktop/firefox/default.nix | 12 ++++++------ home/features/desktop/steam.nix | 11 +++++++++++ home/features/neovim/config/lazy-lock.json | 2 +- home/features/neovim/default.nix | 3 +-- home/features/persistence.nix | 17 +++++------------ home/features/wayland/hyprland/hyprland.conf | 4 ++++ home/global.nix | 5 +++++ hosts/nixos/common/global/default.nix | 1 - hosts/nixos/common/optional/desktop/steam.nix | 4 ++-- hosts/nixos/common/optional/pipewire.nix | 2 +- .../services/tailscale.nix | 3 ++- hosts/nixos/lapetus/default.nix | 1 + hosts/nixos/tethys/default.nix | 1 + 17 files changed, 64 insertions(+), 42 deletions(-) create mode 100644 home/features/desktop/steam.nix rename hosts/nixos/common/{global => optional}/services/tailscale.nix (93%) diff --git a/common/fonts.nix b/common/fonts.nix index c42d5f7..9710acd 100644 --- a/common/fonts.nix +++ b/common/fonts.nix @@ -16,8 +16,8 @@ }; sizes = { - desktop = 13; - applications = 15; + desktop = 15; + applications = 17; terminal = 25; }; }; diff --git a/common/themes/default.nix b/common/themes/default.nix index 7d81875..e7b6c98 100644 --- a/common/themes/default.nix +++ b/common/themes/default.nix @@ -24,7 +24,7 @@ let # {{{ Catppuccin latte catppuccin-latte = { stylix = { - image = ./wallpapers/field_diamond.jpg; + image = ./wallpapers/needygirloverdose.jpg; base16Scheme = base16 "catppuccin-latte"; opacity = transparency 0.7; polarity = "light"; @@ -84,15 +84,17 @@ let }; # Select your current theme here! - currentTheme = themes.gruvbox-light; + currentTheme = themes.catppuccin-latte; in { # We apply the current theme here. # The rest is handled by the respective modules! - imports = [{ - stylix = currentTheme.stylix; - satellite.theming = currentTheme.satellite; - }]; + imports = [ + { + stylix = currentTheme.stylix; + satellite.theming = currentTheme.satellite; + } + ]; # Requires me to manually turn targets on! stylix.autoEnable = false; diff --git a/dns/common.nix b/dns/common.nix index 39e0ebe..3e3d7f1 100644 --- a/dns/common.nix +++ b/dns/common.nix @@ -2,14 +2,19 @@ { lib, ... }: let # {{{ Github pages helper - ghPage = at: [{ - inherit at; type = "CNAME"; - value = "prescientmoon.github.io."; - }]; + ghPage = at: [ + { + inherit at; + type = "CNAME"; + value = "prescientmoon.github.io."; + } + ]; # }}} # {{{ Migadu mail DNS setup - migaduMail = at: verifyKey: - let atPrefix = prefix: if at == "" then prefix else "${prefix}.${at}"; + migaduMail = + at: verifyKey: + let + atPrefix = prefix: if at == "" then prefix else "${prefix}.${at}"; in [ { @@ -61,8 +66,8 @@ let ttl = 600; } ]; - # }}} in +# }}} { satellite.dns.domain = "moonythm.dev"; satellite.dns.records = lib.flatten [ diff --git a/home/calypso.nix b/home/calypso.nix index a17ec27..60af947 100644 --- a/home/calypso.nix +++ b/home/calypso.nix @@ -7,6 +7,7 @@ ./features/desktop/spotify.nix ./features/desktop/obsidian.nix ./features/desktop/foot.nix + ./features/desktop/steam.nix ./features/desktop/firefox ./features/desktop/discord ./features/cli/productivity @@ -33,7 +34,7 @@ # }}} # {{{ Gaming # wine # Windows compat layer or whatever - # lutris # Game launcher + lutris # Game launcher # }}} # {{{ Clis sops # Secret editing diff --git a/home/features/desktop/firefox/default.nix b/home/features/desktop/firefox/default.nix index 9d1c7f6..aae4b6b 100644 --- a/home/features/desktop/firefox/default.nix +++ b/home/features/desktop/firefox/default.nix @@ -286,6 +286,12 @@ in # Do not paste with middle mouse click "middlemouse.paste" = false; + # Do not include "switch to [tab]" in search results + "browser.urlbar.suggest.openpage" = false; + + # Disable shortcut for quitting :) + "browser.quitShortcut.disabled" = true; + # Inspired by https://github.com/TLATER/dotfiles/blob/b39af91fbd13d338559a05d69f56c5a97f8c905d/home-config/config/graphical-applications/firefox.nix # {{{ Performance settings "gfx.webrender.all" = true; # Force enable GPU acceleration @@ -324,15 +330,9 @@ in # with tiling WMs on wayland "privacy.webrtc.legacyGlobalIndicator" = false; - # Do not include "switch to [tab]" in search results - "browser.urlbar.suggest.openpage" = false; - # Hide random popup: https://forums.linuxmint.com/viewtopic.php?t=379164 "browser.protections_panel.infoMessage.seen" = true; - # Disable shortcut for quitting :) - "browser.quitShortcut.disabled" = true; - # Do not show dialog for getting panes in the addons menu (?) # http://kb.mozillazine.org/Extensions.getAddons.showPane "extensions.getAddons.showPane" = false; diff --git a/home/features/desktop/steam.nix b/home/features/desktop/steam.nix new file mode 100644 index 0000000..687db88 --- /dev/null +++ b/home/features/desktop/steam.nix @@ -0,0 +1,11 @@ +{ config, ... }: +{ + # {{{ Persistence + satellite.persistence.at.state.apps.steam = { + directories = [ + ".factorio" + "${config.xdg.dataHome}/Steam" + ]; + }; + # }}} +} diff --git a/home/features/neovim/config/lazy-lock.json b/home/features/neovim/config/lazy-lock.json index d0ec165..439ba1a 100644 --- a/home/features/neovim/config/lazy-lock.json +++ b/home/features/neovim/config/lazy-lock.json @@ -1,4 +1,5 @@ { + "catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" }, "clipboard-image": { "branch": "main", "commit": "4ab6f7f1fa4ea97866c0e0f6160f6a36ef174438" }, "cmp": { "branch": "main", "commit": "7e348da6e5085ac447144a2ef4b637220ba27209" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -16,7 +17,6 @@ "ftft": { "branch": "master", "commit": "f3e43c9584e14b27f04c27a95a9d9f0e58dfec02" }, "github-actions": { "branch": "master", "commit": "728374ef59b11a5f5991ea2560d149a4ae33fd22" }, "gitlinker": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" }, - "gruvbox": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, "haskell-tools": { "branch": "master", "commit": "92e097c6832405fb64e4c44a7ce8bebe7836cae6" }, "hyprland": { "branch": "main", "commit": "71760fe0cad972070657b0528f48456f7e0027b2" }, diff --git a/home/features/neovim/default.nix b/home/features/neovim/default.nix index 7cdaf00..774c825 100644 --- a/home/features/neovim/default.nix +++ b/home/features/neovim/default.nix @@ -1597,10 +1597,9 @@ let completion = { nvim_cmp = true; min_chars = 2; - new_notes_location = "current_dir"; - prepend_note_id = true; }; + new_notes_location = "current_dir"; mappings = { }; disable_frontmatter = true; }; diff --git a/home/features/persistence.nix b/home/features/persistence.nix index 0fb2193..b315a95 100644 --- a/home/features/persistence.nix +++ b/home/features/persistence.nix @@ -110,18 +110,6 @@ "${config.xdg.configHome}/Signal" # Why tf does signal store it's state here 💀 ]; # }}} - # {{{ Steam - satellite.persistence.at.state.apps.steam = { - directories = [ - ".factorio" - # A couple of games don't play well with bindfs - { - directory = "${config.xdg.dataHome}/Steam"; - method = "symlink"; - } - ]; - }; - # }}} # {{{ Lutris # TODO: there might be more to cache in .cache/lutris satellite.persistence.at.state.apps.lutris.directories = [ @@ -142,6 +130,11 @@ # {{{ Element satellite.persistence.at.state.apps.element.directories = [ "${config.xdg.configHome}/Element" ]; # }}} + # {{{ Bitwarden + satellite.persistence.at.state.apps.bitwarden.directories = [ + "${config.xdg.configHome}/Bitwarden" + ]; + # }}} # }}} # {{{ Cli # {{{ Sops diff --git a/home/features/wayland/hyprland/hyprland.conf b/home/features/wayland/hyprland/hyprland.conf index e82cbb0..21c64ec 100644 --- a/home/features/wayland/hyprland/hyprland.conf +++ b/home/features/wayland/hyprland/hyprland.conf @@ -168,4 +168,8 @@ binde=, XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle binde=, XF86MonBrightnessUp, exec, swayosd-client --brightness raise binde=, XF86MonBrightnessDown, exec, swayosd-client --brightness lower # }}} +# {{{ App-specific global keybinds +# OBS +bind = SUPER, F4, pass, ^(com\.obsproject\.Studio)$ # Start / Stop recording +# }}} # }}} diff --git a/home/global.nix b/home/global.nix index a362cb7..867fdae 100644 --- a/home/global.nix +++ b/home/global.nix @@ -96,5 +96,10 @@ in extraConfig.XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/screenshots"; extraConfig.XDG_PROJECTS_DIR = "${config.home.homeDirectory}/projects"; }; + + systemd.user.tmpfiles.rules = [ + # Clean screenshots older than a week + "d ${config.xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR} - - - 7d" + ]; # }}} } diff --git a/hosts/nixos/common/global/default.nix b/hosts/nixos/common/global/default.nix index 3f127e7..7181a9b 100644 --- a/hosts/nixos/common/global/default.nix +++ b/hosts/nixos/common/global/default.nix @@ -18,7 +18,6 @@ let ./cli/fish.nix ./cli/htop.nix ./services/openssh.nix - ./services/tailscale.nix ./nix.nix ./locale.nix ./unicode.nix diff --git a/hosts/nixos/common/optional/desktop/steam.nix b/hosts/nixos/common/optional/desktop/steam.nix index d5964ef..91c272d 100644 --- a/hosts/nixos/common/optional/desktop/steam.nix +++ b/hosts/nixos/common/optional/desktop/steam.nix @@ -1,7 +1,7 @@ -{ lib, ... }: { +{ programs.steam = { enable = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + # gamescopeSession.enable = true; }; } diff --git a/hosts/nixos/common/optional/pipewire.nix b/hosts/nixos/common/optional/pipewire.nix index 4a88338..5b4c471 100644 --- a/hosts/nixos/common/optional/pipewire.nix +++ b/hosts/nixos/common/optional/pipewire.nix @@ -1,5 +1,5 @@ # This handles audio stuff -{ pkgs, ... }: { +{ security.rtkit.enable = true; hardware.pulseaudio.enable = false; diff --git a/hosts/nixos/common/global/services/tailscale.nix b/hosts/nixos/common/optional/services/tailscale.nix similarity index 93% rename from hosts/nixos/common/global/services/tailscale.nix rename to hosts/nixos/common/optional/services/tailscale.nix index bfd9cb1..dc6ae7d 100644 --- a/hosts/nixos/common/global/services/tailscale.nix +++ b/hosts/nixos/common/optional/services/tailscale.nix @@ -1,4 +1,5 @@ -{ lib, ... }: { +{ lib, ... }: +{ # enable the tailscale service services.tailscale = { enable = true; diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index f645b22..ebf33c7 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -8,6 +8,7 @@ ../common/global ../common/users/pilot.nix ../common/optional/oci.nix + ../common/optional/services/tailscale.nix ../common/optional/services/acme.nix ../common/optional/services/kanata.nix ../common/optional/services/nginx.nix diff --git a/hosts/nixos/tethys/default.nix b/hosts/nixos/tethys/default.nix index b8b2466..8ab1681 100644 --- a/hosts/nixos/tethys/default.nix +++ b/hosts/nixos/tethys/default.nix @@ -17,6 +17,7 @@ ../common/optional/desktop/steam.nix ../common/optional/wayland/hyprland.nix + ../common/optional/services/tailscale.nix ../common/optional/services/kanata.nix ../common/optional/services/restic ../common/optional/services/nginx.nix