diff --git a/home/features/cli/git.nix b/home/features/cli/git.nix index e9f3221..20f593f 100644 --- a/home/features/cli/git.nix +++ b/home/features/cli/git.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: { +{ pkgs, ... }: { programs.git = { enable = true; package = pkgs.gitFull; @@ -8,6 +8,12 @@ userName = "Matei Adriel"; userEmail = "rafaeladriel11@gmail.com"; + ignores = [ + # Syncthing + ".stfolder" + ".stversions" + ]; + extraConfig = { github.user = "Mateiadrielrafael"; hub.protocol = "ssh"; diff --git a/home/features/desktop/firefox/default.nix b/home/features/desktop/firefox/default.nix index 8c4cd21..806b1dc 100644 --- a/home/features/desktop/firefox/default.nix +++ b/home/features/desktop/firefox/default.nix @@ -181,13 +181,15 @@ in apps.extensions = extensions; apps.app = { # {{{ Job stuff + # {{{ Asana asana = { url = "https://app.asana.com/"; icon = ./icons/asana.png; displayName = "Asana"; id = 1; }; - + # }}} + # {{{ Clockodo clockodo = { url = "https://my.clockodo.com/en/"; icon = ./icons/clockodo.png; @@ -195,27 +197,39 @@ in id = 2; }; # }}} - + # }}} + # {{{ Gitlab gitlab = { url = "https://gitlab.com"; icon = ./icons/gitlab.png; displayName = "Gitlab"; id = 3; }; - + # }}} + # {{{ Desmos desmos = { url = "https://www.desmos.com/calculator"; icon = ./icons/desmos.png; displayName = "Desmos"; id = 4; }; - + # }}} + # {{{ Monkey type monkey-type = { url = "https://monkeytype.com/"; icon = ./icons/monkeytype.png; displayName = "Monkeytype"; id = 5; }; + # }}} + # {{{ Syncthing + syncthing = { + url = "http://localhost:8384/"; + icon = ./icons/syncthing.png; + displayName = "Syncthing"; + id = 6; + }; + # }}} }; # }}} }; diff --git a/home/features/desktop/firefox/icons/syncthing.png b/home/features/desktop/firefox/icons/syncthing.png new file mode 100644 index 0000000..5b7b94a Binary files /dev/null and b/home/features/desktop/firefox/icons/syncthing.png differ diff --git a/home/features/persistence.nix b/home/features/persistence.nix index 222885f..7610be7 100644 --- a/home/features/persistence.nix +++ b/home/features/persistence.nix @@ -41,12 +41,12 @@ # }}} # {{{ Neovim satellite.persistence.at.cache.apps.Neovim.directories = [ - # "${config.xdg.dataHome}/nvim" + # "${config.xdg.dataHome}/nvim" ]; # }}} # {{{ SSH satellite.persistence.at.state.apps.Ssh.directories = [ - # ".ssh" + # ".ssh" ]; # }}} # {{{ QBittorrent @@ -95,4 +95,9 @@ # {{{ Wine satellite.persistence.at.state.apps.Wine.directories = [ ".wine" ]; # }}} + # {{{ Syncthing + satellite.persistence.at.state.apps.Syncthing.directories = [ + "${config.xdg.configHome}/syncthing" # Syncthing config data + ]; + # }}} } diff --git a/home/features/wayland/hyprland/hyprland.conf b/home/features/wayland/hyprland/hyprland.conf index 59a4934..2e7c020 100644 --- a/home/features/wayland/hyprland/hyprland.conf +++ b/home/features/wayland/hyprland/hyprland.conf @@ -33,13 +33,14 @@ gestures { } # Execute apps at launch -exec-once = wezterm & firefox & discocss & spotify +exec-once = wezterm & firefox & discocss & spotify & Obsidian # {{{ Window rules # {{{ Automatically move stuff to workspaces windowrulev2 = workspace 2 silent, title:^(.*Firefox.*)$ windowrulev2 = workspace 3 silent, title:^(.*(Disc|WebC)ord.*)$ windowrulev2 = workspace 6 silent, title:^(.*Spotify.*)$ +windowrulev2 = workspace 7 silent, title:^(.*Obsidian.*)$ # }}} # {{{ Idleinhibit rules # - while firefox is fullscreen diff --git a/hosts/nixos/common/optional/syncthing.nix b/hosts/nixos/common/optional/syncthing.nix new file mode 100644 index 0000000..8f801ae --- /dev/null +++ b/hosts/nixos/common/optional/syncthing.nix @@ -0,0 +1,37 @@ +{ + services.syncthing = { + enable = true; + + openDefaultPorts = true; + + configDir = "/home/adrielus/.config/syncthing"; + dataDir = "/persist/data/syncthing"; + + user = "adrielus"; + group = "syncthing"; + # guiAddress = "0.0.0.0:8384"; # TODO: put this behind nginx + + overrideDevices = true; + overrideFolders = true; + + devices = { + "enceladus" = { id = "QWOAERM-V2FNXPI-TB7NFUS-LKW7JTB-IZY4OEZ-FYDPJNP-6IKPW4Y-YREXDQM"; }; + }; + + folders = { + "stellar-sanctum" = { + path = "/home/adrielus/Projects/stellar-sanctum/"; + devices = [ "enceladus" ]; + + # TODO: remove this once I switch to zfs + versioning = { + type = "staggered"; + params = { + cleanInterval = "3600"; # 1 hour in seconds + maxAge = "604800"; # 14 days in seconds. + }; + }; + }; + }; + }; +} diff --git a/hosts/nixos/tethys/default.nix b/hosts/nixos/tethys/default.nix index e77e616..f3bf580 100644 --- a/hosts/nixos/tethys/default.nix +++ b/hosts/nixos/tethys/default.nix @@ -11,6 +11,7 @@ ../common/optional/slambda.nix ../common/optional/xdg-portal.nix ../common/optional/hyprland.nix + ../common/optional/syncthing.nix ../common/optional/xmonad ./hardware-configuration.nix