1
Fork 0

Too many changes

- edopro
- fix resstic & rsync setup
- prepare lapetus redeploy
- ...more I forgot about

(should've commited more times...)
This commit is contained in:
prescientmoon 2024-10-11 12:16:46 +02:00
parent 5926fbaf5f
commit 1e511f9e04
Signed by: prescientmoon
SSH key fingerprint: SHA256:WFp/cO76nbarETAoQcQXuV+0h7XJsEsOCI0UsyPIy6U
15 changed files with 85 additions and 28 deletions

View file

@ -13,7 +13,7 @@ let
# {{{ Catppuccin mocha # {{{ Catppuccin mocha
catppuccin-mocha = { catppuccin-mocha = {
stylix = { stylix = {
image = ./wallpapers/breaking_phos.jpg; image = ./wallpapers/purplecliffs.jpg;
base16Scheme = base16 "catppuccin-mocha"; base16Scheme = base16 "catppuccin-mocha";
opacity = transparency 0.7; opacity = transparency 0.7;
polarity = "dark"; polarity = "dark";
@ -84,7 +84,7 @@ let
}; };
# Select your current theme here! # Select your current theme here!
currentTheme = themes.catppuccin-macchiato; currentTheme = themes.catppuccin-mocha;
in in
{ {
# We apply the current theme here. # We apply the current theme here.

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

View file

@ -8,6 +8,7 @@
./features/desktop/obsidian.nix ./features/desktop/obsidian.nix
./features/desktop/foot.nix ./features/desktop/foot.nix
./features/desktop/steam.nix ./features/desktop/steam.nix
./features/desktop/edopro.nix
./features/desktop/firefox ./features/desktop/firefox
./features/desktop/discord ./features/desktop/discord
./features/cli/productivity ./features/cli/productivity

View file

@ -55,7 +55,7 @@
# {{{ URL rewriting # {{{ URL rewriting
url."git@github.com:".insteadOf = [ url."git@github.com:".insteadOf = [
# Normalize GitHub URLs to SSH to avoid authentication issues with HTTPS. # Normalize GitHub URLs to SSH to avoid authentication issues with HTTPS.
"https://github.com/" # "https://github.com/"
# Allows typing `git clone github:owner/repo`. # Allows typing `git clone github:owner/repo`.
"github:" "github:"

View file

@ -1,36 +1,35 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
themeMap = pkgs.callPackage (import ./themes.nix) { };
# REASON: newer discord versions don't work with the one in nixpkgs
discocss = pkgs.discocss.overrideAttrs (old: rec {
version = "unstable-2023-09-02";
src = pkgs.fetchFromGitHub {
owner = "bddvlpr";
repo = "discocss";
rev = "37f1520bc90822b35e60baa9036df7a05f43fab8";
sha256 = "1559mxmc0ppl4jxvdzszphysp1j31k2hm93qv7yz87xn9j0z2m04";
};
});
in in
# themeMap = pkgs.callPackage (import ./themes.nix) { };
# REASON: newer discord versions don't work with the one in nixpkgs
# discocss = pkgs.discocss.overrideAttrs (old: rec {
# version = "unstable-2023-09-02";
# src = pkgs.fetchFromGitHub {
# owner = "bddvlpr";
# repo = "discocss";
# rev = "37f1520bc90822b35e60baa9036df7a05f43fab8";
# sha256 = "1559mxmc0ppl4jxvdzszphysp1j31k2hm93qv7yz87xn9j0z2m04";
# };
# });
# vencord = pkgs.discord.override { withVencord = true; };
{ {
programs.discord = { programs.discord = {
enable = true; enable = true;
disableUpdateCheck = true; disableUpdateCheck = true;
enableDevtools = true; enableDevtools = true;
package = pkgs.vesktop;
}; };
home.packages = [ discocss ]; # xdg.configFile."discocss/custom.css".source = config.satellite.theming.get themeMap;
xdg.configFile."discocss/custom.css".source = config.satellite.theming.get themeMap;
# {{{ Storage # {{{ Storage
# Clean cache older than 10 days # Clean cache older than 10 days
systemd.user.tmpfiles.rules = [ systemd.user.tmpfiles.rules = [ "d ${config.xdg.configHome}/discord/Cache/Cache_Data - - - 10d" ];
"d ${config.xdg.configHome}/discord/Cache/Cache_Data - - - 10d"
];
satellite.persistence.at.state.apps.discord.directories = [ satellite.persistence.at.state.apps.discord.directories = [
"${config.xdg.configHome}/discord" # Why tf does discord store it's state here 💀 "${config.xdg.configHome}/discord" # Why tf does discord store it's state here 💀
"${config.xdg.configHome}/vesktop"
]; ];
# }}} # }}}
} }

View file

@ -0,0 +1,32 @@
# EDOPro is a fanmade Yu-Gi-Oh! simulator.
# I am installing the game the traditional way, and
# adding a desktop entry which runs it via `steam-run`.
{
config,
lib,
pkgs,
...
}:
let
persistState = config.satellite.persistence.at.state.home;
installPath = "${persistState}/yugioh/.local/share/edopro";
launchScript = pkgs.writeShellScript "start-edopro" ''
${lib.getExe pkgs.steam-run} ${installPath}/EDOPro
'';
in
{
# This is a nix-ified version of the .desktop file EDOPro comes with.
xdg.desktopEntries.edopro = {
name = "EDOPro";
type = "Application";
comment = "The bleeding-edge automatic duel simulator";
icon = "${installPath}/textures/AppIcon.png";
categories = [ "Game" ];
settings.StartupWMClass = "EDOPro";
settings.Path = installPath;
terminal = false;
exec = builtins.toString launchScript;
};
}

View file

@ -177,6 +177,12 @@ in
]; ];
}; };
"NPM" = mkBasicSearchEngine {
url = "https://www.npmjs.com/search";
param = "q";
aliases = [ "@npm" ];
};
"Wikipedia" = mkBasicSearchEngine { "Wikipedia" = mkBasicSearchEngine {
url = "https://en.wikipedia.org/wiki/Special:Search"; url = "https://en.wikipedia.org/wiki/Special:Search";
param = "search"; param = "search";

View file

@ -1526,6 +1526,7 @@ let
# }}} # }}}
# {{{ discord rich presence # {{{ discord rich presence
discord-rich-presence = { discord-rich-presence = {
enabled = false;
package = "andweeb/presence.nvim"; package = "andweeb/presence.nvim";
main = "presence"; main = "presence";

View file

@ -55,7 +55,7 @@ block text
pattern ([Ll]et) pattern ([Ll]et)
name definition name definition
snip @0 \$$1 = $2\$ @0 snip @1 \$$1 = $2\$ @0
block auto block auto
string $ string $

View file

@ -93,7 +93,7 @@ bind = $mod, L, exec, loginctl lock-session # Lock screen
bind = $mod, P, exec, anyrun bind = $mod, P, exec, anyrun
bind = $mod, B, exec, wlsunset-toggle # Toggle blue light filter thingy bind = $mod, B, exec, wlsunset-toggle # Toggle blue light filter thingy
bind = $mod, V, exec, foot vimclip # Vim anywhere! bind = $mod, V, exec, foot vimclip # Vim anywhere!
bind = $mod, W, exec, ~/projects/form-filler/type.sh # bind = $mod, W, exec, ~/projects/form-filler/type.sh
# Work with the special workspace # Work with the special workspace
bind = $mod, x, togglespecialworkspace, bind = $mod, x, togglespecialworkspace,

View file

@ -52,11 +52,15 @@
# {{{ A few ad-hoc programs # {{{ A few ad-hoc programs
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
programs.firejail.enable = true; programs.firejail.enable = true;
programs.nix-ld.enable = true; # Useful for running non-nix executables
# }}} # }}}
# {{{ SSH keys # {{{ SSH keys
users.users.pilot.openssh.authorizedKeys.keyFiles = [ ../tethys/keys/id_ed25519.pub ]; users.users.pilot.openssh.authorizedKeys.keyFiles = [ ../tethys/keys/id_ed25519.pub ];
# }}} # }}}
programs.adb.enable = true;
users.users.pilot.extraGroups = [ "adbusers" ];
satellite.pilot.name = "moon"; satellite.pilot.name = "moon";
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
} }

View file

@ -16,7 +16,7 @@ let
initialize = true; initialize = true;
repository = "sftp:${backupUrl}:backups/${name}"; repository = "sftp:${backupUrl}:backups/${name}";
passwordFile = config.sops.secrets.backup_password.path; passwordFile = config.sops.secrets.backup_password.path;
extraOptions = [ "sftp.args='-i ${config.users.users.pilot.home}/.ssh/id_ed25519'" ]; extraOptions = [ "sftp.args='-i /persist/state/etc/ssh/ssh_host_ed25519_key'" ];
exclude = [ exclude = [
".direnv" # Direnv ".direnv" # Direnv
@ -35,6 +35,8 @@ in
# {{{ Data # {{{ Data
data = createBackup { data = createBackup {
name = "data"; name = "data";
# Kept for at most 1 year
pruneOpts = [ pruneOpts = [
"--keep-daily 7" "--keep-daily 7"
"--keep-weekly 4" "--keep-weekly 4"
@ -55,6 +57,8 @@ in
# {{{ State # {{{ State
state = createBackup { state = createBackup {
name = "state"; name = "state";
# Kept for at most 1 month
pruneOpts = [ pruneOpts = [
"--keep-daily 3" "--keep-daily 3"
"--keep-weekly 1" "--keep-weekly 1"
@ -65,11 +69,20 @@ in
paths = [ "/persist/state" ]; paths = [ "/persist/state" ];
exclude = exclude =
let let
home = "/persist/state/${config.users.users.pilot.home}"; home = "/persist/state${config.users.users.pilot.home}";
in in
[ [
"${home}/discord" # There's lots of cache stored in here "/persist/state/var/log"
"${home}/steam" # Games can be quite big "${home}/discord"
"${home}/element"
"${home}/firefox"
"${home}/lutris"
"${home}/qmk"
"${home}/signal"
"${home}/spotify"
"${home}/steam"
"${home}/whatsapp"
"${home}/wine"
]; ];
}; };
# }}} # }}}

View file

@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINmdOiG0elKHvJ5yoUMd8I5qQdygvjdq45bxv65K230G tethys ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINmdOiG0elKHvJ5yoUMd8I5qQdygvjdq45bxv65K230G adrielus@tethys

View file

@ -86,6 +86,7 @@ let
); );
nix = k.listOf types.derivation; nix = k.listOf types.derivation;
} [ ]; } [ ];
enabled = k.bool;
cond = types.oneOrMany types.luaLiteral; cond = types.oneOrMany types.luaLiteral;
init = types.luaEagerOrLazy ( init = types.luaEagerOrLazy (
k.union [ k.union [

View file

@ -3,7 +3,7 @@
tmpfile=$(mktemp) tmpfile=$(mktemp)
# Concat files # Concat files
cat hosts/nixos/*/keys/id_*.pub > $tmpfile cat hosts/nixos/*/keys/*.pub > $tmpfile
# Copy concat result # Copy concat result
scp $tmpfile $(cat hosts/nixos/common/optional/services/restic/url.txt):.ssh/authorized_keys scp $tmpfile $(cat hosts/nixos/common/optional/services/restic/url.txt):.ssh/authorized_keys