Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AtaraxiaSjel committed Jan 22, 2024
1 parent b046521 commit d31c49e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 54 deletions.
3 changes: 0 additions & 3 deletions profiles/servers/blocky.nix
Expand Up @@ -3,9 +3,6 @@ let
nodeAddress = "192.168.0.5";
upstream-dns = "100.64.0.1";
in {
systemd.tmpfiles.rules = [
"d /srv/blocky-tailscale 0755 root root -"
];
systemd.services.gen-headscale-key = {
before = [ "container@blocky.service" ];
requiredBy = [ "container@blocky.service" ];
Expand Down
74 changes: 37 additions & 37 deletions profiles/servers/minecraft.nix
Expand Up @@ -55,41 +55,41 @@ in {
};
persist.state.directories = [ "/var/lib/mc-statech" ];

secrets.restic-mc-pass.services = [ "restic-backups-mc-servers.service" ];
secrets.restic-mc-repo.services = [ "restic-backups-mc-servers.service" ];
services.restic.backups.mc-servers = {
initialize = true;
passwordFile = config.secrets.restic-mc-pass.decrypted;
repositoryFile = config.secrets.restic-mc-repo.decrypted;
paths = [ "/var/lib/mc-statech" ];
exclude = [ "/var/lib/mc-statech/backups" ];
environmentFile = "${pkgs.writeText "restic.env" ''
GOMAXPROCS=1
MCRCON_PORT=25566
MCRCON_PASS=whatisloveohbabydonthurtmedonthurtmenomore
''}";
extraBackupArgs = [ "--no-scan" ];
backupPrepareCommand = ''
if ! systemctl is-active --quiet mc-statech.service; then
echo "Minecraft server is not active. Skipping restic backup."
exit 1
fi
${pkgs.mcrcon}/bin/mcrcon "say Restic backup is started!" save-off "save-all"
sleep 3
'';
backupCleanupCommand = ''
systemctl is-active --quiet mc-statech.service && ${pkgs.mcrcon}/bin/mcrcon "say Restic backup is done!" save-on
'';
timerConfig = {
OnCalendar = "*:0/15";
};
pruneOpts = [
"--keep-last 12"
"--keep-hourly 12"
"--keep-daily 5"
"--keep-weekly 2"
"--keep-monthly 0"
"--keep-yearly 0"
];
};
# secrets.restic-mc-pass.services = [ "restic-backups-mc-servers.service" ];
# secrets.restic-mc-repo.services = [ "restic-backups-mc-servers.service" ];
# services.restic.backups.mc-servers = {
# initialize = true;
# passwordFile = config.secrets.restic-mc-pass.decrypted;
# repositoryFile = config.secrets.restic-mc-repo.decrypted;
# paths = [ "/var/lib/mc-statech" ];
# exclude = [ "/var/lib/mc-statech/backups" ];
# environmentFile = "${pkgs.writeText "restic.env" ''
# GOMAXPROCS=1
# MCRCON_PORT=25566
# MCRCON_PASS=whatisloveohbabydonthurtmedonthurtmenomore
# ''}";
# extraBackupArgs = [ "--no-scan" ];
# backupPrepareCommand = ''
# if ! systemctl is-active --quiet mc-statech.service; then
# echo "Minecraft server is not active. Skipping restic backup."
# exit 1
# fi
# ${pkgs.mcrcon}/bin/mcrcon "say Restic backup is started!" save-off "save-all"
# sleep 3
# '';
# backupCleanupCommand = ''
# systemctl is-active --quiet mc-statech.service && ${pkgs.mcrcon}/bin/mcrcon "say Restic backup is done!" save-on
# '';
# timerConfig = {
# OnCalendar = "*:0/15";
# };
# pruneOpts = [
# "--keep-last 12"
# "--keep-hourly 12"
# "--keep-daily 5"
# "--keep-weekly 2"
# "--keep-monthly 0"
# "--keep-yearly 0"
# ];
# };
}
24 changes: 12 additions & 12 deletions profiles/workspace/hyprland/default.nix
Expand Up @@ -26,23 +26,23 @@ in with config.deviceSpecific; with lib; {
imports = [ inputs.hyprland.nixosModules.default ];

programs.ydotool.enable = true;
services.udiskie.enable = !isServer;
services.gammastep = {
enable = !isServer;
latitude = config.location.latitude;
longitude = config.location.longitude;
temperature.day = 6500;
temperature.night = 3000;
};
systemd.user.services.gammastep = {
Install.WantedBy = lib.mkForce [];
};

programs.hyprland.enable = true;
home-manager.users.${config.mainuser} = {
imports = [
inputs.hyprland.homeManagerModules.default
];
services.udiskie.enable = !isServer;
services.gammastep = {
enable = !isServer;
latitude = config.location.latitude;
longitude = config.location.longitude;
temperature.day = 6500;
temperature.night = 3000;
};
systemd.user.services.gammastep = {
Install.WantedBy = lib.mkForce [];
};

home.packages = [ pkgs.wl-clipboard hyprpaper-pkg ];
home.file.".config/hypr/hyprpaper.conf".text = ''
preload = ${/. + ../../../misc/wallpaper.png}
Expand Down
3 changes: 1 addition & 2 deletions roles/desktop.nix
Expand Up @@ -2,7 +2,6 @@
imports = with inputs.self.customProfiles; [
./base.nix
inputs.base16.hmModule
inputs.self.customProfiles.seadrive

applications-setup
hardware
Expand All @@ -19,7 +18,6 @@
kitty
mangohud
mpv
# ncmpcpp
packages
rclone
rofi
Expand All @@ -45,6 +43,7 @@
hyprland
waybar
xdg
vpn

vscode-server
];
Expand Down

0 comments on commit d31c49e

Please sign in to comment.