backups n stuff

This commit is contained in:
mjallen18
2024-08-01 21:59:05 -05:00
parent c685f3bfdf
commit 26cc1b223f
6 changed files with 190 additions and 52 deletions

View File

@@ -84,6 +84,67 @@ in
desktopManager.plasma6.enable = false;
};
};
hyprland.configuration = {
services = {
displayManager.sddm.enable = true;
displayManager.defaultSession = "hyprland";
# disable plasma
desktopManager.plasma6.enable = false;
};
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
# Hint Electon apps to use wayland
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
environment.systemPackages = with pkgs; [
hyprland
swww # for wallpapers
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
xwayland
meson
wayland-protocols
wayland-utils
wl-clipboard
wlroots
networkmanagerapplet
kitty
rofi-wayland
wofi
dunst
libnotify
waybar
];
services.dbus.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
fonts.fonts = with pkgs; [
nerdfonts
meslo-lgs-nf
];
nixpkgs.overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
})
];
};
};
apps.discover-wrapped.enable = false;
@@ -154,27 +215,38 @@ in
ratbagd.enable = true;
};
systemd.services = {
fix-wifi = {
path = [
pkgs.bash
pkgs.networkmanager
pkgs.kmod
];
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = [ "${resetNetworkScript}/bin/reset-network" ];
systemd = {
services = {
fix-wifi = {
path = [
pkgs.bash
pkgs.networkmanager
pkgs.kmod
];
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = [ "${resetNetworkScript}/bin/reset-network" ];
};
};
};
# rsync-home = {
# path = [ pkgs.bash pkgs.rsync ];
# script = ''
# rsync -rtpogv --progress --ignore-existing --exclude={'/home/matt/Games/*', '/home/matt/1TB/*'} -lHzs /home/matt /media/nas/backup/desktop-nix/home
# '';
# };
user.services = {
rclone-home-proton = {
path = [ pkgs.bash pkgs.rclone ];
script = ''
rclone sync /home/matt proton-drive:backup-nix --exclude '/home/matt/Games/**' --exclude '/home/matt/1TB/**' --exclude '/home/matt/Downloads/**'
'';
};
rsync-home = {
path = [ pkgs.bash pkgs.rsync pkgs.openssh ];
script = ''
rsync -rtpogvPlHzs --ignore-existing --exclude={'/home/matt/Games', '/home/matt/1TB', '/home/matt/Downloads/*', '/home/matt/.cache'} -e ssh /home/matt admin@10.0.1.18:/media/nas/main/backup/desktop-nix/home
'';
};
};
};
# Networking configs
@@ -218,8 +290,11 @@ in
nano
onlyoffice-bin
os-prober
nil
papirus-icon-theme
pciutils
rclone
rclone-browser
rsync
sbctl
vim
@@ -248,6 +323,7 @@ in
"wheel"
"networkmanager"
"ratbagd"
"input"
]; # Enable sudo for the user.
shell = pkgs.zsh;
};