mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 02:13:55 -05:00
hosts: explicitly declare home manager configs
This commit is contained in:
parent
1ab96b8316
commit
1d36df0519
|
@ -1,13 +1,20 @@
|
||||||
{
|
{self, ...}: {
|
||||||
home-manager.sharedModules = [
|
home-manager = {
|
||||||
{
|
sharedModules = [
|
||||||
services.easyeffects = {
|
{
|
||||||
enable = true;
|
services.easyeffects = {
|
||||||
preset = "fw13-easy-effects";
|
enable = true;
|
||||||
};
|
preset = "fw13-easy-effects";
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway.config.output = {"BOE 0x095F Unknown".scale = "1.5";};
|
wayland.windowManager.sway.config.output = {"BOE 0x095F Unknown".scale = "1.5";};
|
||||||
ar.home.desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
|
ar.home.desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
users = {
|
||||||
|
aly = self.homeManagerModules.aly;
|
||||||
|
dustin = self.homeManagerModules.dustin;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,33 @@
|
||||||
{lib, ...}: {
|
{
|
||||||
home-manager.sharedModules = [
|
lib,
|
||||||
{
|
self,
|
||||||
wayland.windowManager.sway.config.output = {
|
...
|
||||||
"eDP-1" = {
|
}: {
|
||||||
adaptive_sync = "on";
|
home-manager = {
|
||||||
scale = "2.0";
|
sharedModules = [
|
||||||
};
|
{
|
||||||
};
|
wayland.windowManager.sway.config.output = {
|
||||||
|
"eDP-1" = {
|
||||||
ar.home = {
|
adaptive_sync = "on";
|
||||||
desktop.hyprland.laptopMonitors = ["eDP-1,2880x1920@60, 0x0, 2, vrr, 0"];
|
scale = "2.0";
|
||||||
|
|
||||||
services = {
|
|
||||||
easyeffects = {
|
|
||||||
enable = true;
|
|
||||||
preset = "fw13-easy-effects";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gammastep.enable = lib.mkForce false;
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
ar.home = {
|
||||||
];
|
desktop.hyprland.laptopMonitors = ["eDP-1,2880x1920@60, 0x0, 2, vrr, 0"];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
easyeffects = {
|
||||||
|
enable = true;
|
||||||
|
preset = "fw13-easy-effects";
|
||||||
|
};
|
||||||
|
|
||||||
|
gammastep.enable = lib.mkForce false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
users.aly = self.homeManagerModules.aly;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,69 +33,73 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
users.aly = lib.mkForce ({config, ...}: {
|
users = {
|
||||||
imports = [self.homeManagerModules.aly];
|
aly = {config, ...}: {
|
||||||
|
imports = [self.homeManagerModules.aly];
|
||||||
|
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
backblazeKeyId.file = ../../secrets/aly/backblaze/keyId.age;
|
backblazeKeyId.file = ../../secrets/aly/backblaze/keyId.age;
|
||||||
backblazeKey.file = ../../secrets/aly/backblaze/key.age;
|
backblazeKey.file = ../../secrets/aly/backblaze/key.age;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user = {
|
systemd.user = {
|
||||||
services.backblaze-sync = {
|
services.backblaze-sync = {
|
||||||
Unit.Description = "Backup to Backblaze.";
|
Unit.Description = "Backup to Backblaze.";
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Environment = [
|
Environment = [
|
||||||
"PATH=${
|
"PATH=${
|
||||||
lib.makeBinPath (with pkgs; [
|
lib.makeBinPath (with pkgs; [
|
||||||
coreutils
|
coreutils
|
||||||
backblaze-b2
|
backblaze-b2
|
||||||
])
|
])
|
||||||
}"
|
}"
|
||||||
];
|
];
|
||||||
|
|
||||||
ExecStart = "${pkgs.writeShellScript "backblaze-sync" ''
|
ExecStart = "${pkgs.writeShellScript "backblaze-sync" ''
|
||||||
declare -A backups
|
declare -A backups
|
||||||
backups=(
|
backups=(
|
||||||
['/home/aly/pics/camera']="b2://aly-camera"
|
['/home/aly/pics/camera']="b2://aly-camera"
|
||||||
['/home/aly/sync']="b2://aly-sync"
|
['/home/aly/sync']="b2://aly-sync"
|
||||||
['/mnt/Media/Audiobooks']="b2://aly-audiobooks"
|
['/mnt/Media/Audiobooks']="b2://aly-audiobooks"
|
||||||
['/mnt/Media/Music']="b2://aly-music"
|
['/mnt/Media/Music']="b2://aly-music"
|
||||||
['/mnt/Archive/Movies']="b2://aly-movies"
|
['/mnt/Archive/Movies']="b2://aly-movies"
|
||||||
['/mnt/Archive/Shows']="b2://aly-shows"
|
['/mnt/Archive/Shows']="b2://aly-shows"
|
||||||
)
|
)
|
||||||
|
|
||||||
backblaze-b2 authorize_account `cat ${config.age.secrets.backblazeKeyId.path}` `cat ${config.age.secrets.backblazeKey.path}`
|
backblaze-b2 authorize_account `cat ${config.age.secrets.backblazeKeyId.path}` `cat ${config.age.secrets.backblazeKey.path}`
|
||||||
|
|
||||||
# Recursively backup folders to B2 with sanity checks.
|
# Recursively backup folders to B2 with sanity checks.
|
||||||
for folder in "''${!backups[@]}"; do
|
for folder in "''${!backups[@]}"; do
|
||||||
if [ -d "$folder" ] && [ "$(ls -A "$folder")" ]; then
|
if [ -d "$folder" ] && [ "$(ls -A "$folder")" ]; then
|
||||||
backblaze-b2 sync --delete $folder ''${backups[$folder]}
|
backblaze-b2 sync --delete $folder ''${backups[$folder]}
|
||||||
else
|
else
|
||||||
echo "$folder does not exist or is empty."
|
echo "$folder does not exist or is empty."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
''}";
|
''}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
timers.backblaze-sync = {
|
||||||
|
Install.WantedBy = ["timers.target"];
|
||||||
|
Timer.OnCalendar = "*-*-* 03:00:00";
|
||||||
|
Unit.Description = "Daily backups to Backblaze.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
timers.backblaze-sync = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
Install.WantedBy = ["timers.target"];
|
general.layout = lib.mkForce "master";
|
||||||
Timer.OnCalendar = "*-*-* 03:00:00";
|
|
||||||
Unit.Description = "Daily backups to Backblaze.";
|
master = {
|
||||||
|
mfact = 0.40;
|
||||||
|
orientation = "center";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
dustin = self.homeManagerModules.dustin;
|
||||||
general.layout = lib.mkForce "master";
|
};
|
||||||
|
|
||||||
master = {
|
|
||||||
mfact = 0.40;
|
|
||||||
orientation = "center";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,51 +4,55 @@
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home-manager.sharedModules = [
|
home-manager = {
|
||||||
{
|
sharedModules = [
|
||||||
wayland.windowManager = {
|
{
|
||||||
hyprland.settings = {
|
wayland.windowManager = {
|
||||||
bind = [
|
hyprland.settings = {
|
||||||
",xf86launch2,exec,${lib.getExe pkgs.playerctl} play-pause"
|
bind = [
|
||||||
];
|
",xf86launch2,exec,${lib.getExe pkgs.playerctl} play-pause"
|
||||||
|
];
|
||||||
|
|
||||||
exec-once = [''${
|
exec-once = [''${
|
||||||
lib.getExe self.inputs.iio-hyprland.packages.${pkgs.system}.default
|
lib.getExe self.inputs.iio-hyprland.packages.${pkgs.system}.default
|
||||||
} "desc:Samsung Display Corp. 0x4152"''];
|
} "desc:Samsung Display Corp. 0x4152"''];
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
tablet.output = "eDP-1";
|
tablet.output = "eDP-1";
|
||||||
touchdevice.output = "eDP-1";
|
touchdevice.output = "eDP-1";
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sway.config = {
|
|
||||||
input = {
|
|
||||||
"1386:21186:Wacom_HID_52C2_Finger" = {
|
|
||||||
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
|
|
||||||
};
|
|
||||||
|
|
||||||
"1386:21186:Wacom_HID_52C2_Pen" = {
|
|
||||||
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
keybindings = {
|
sway.config = {
|
||||||
"XF86Launch2" = "exec ${lib.getExe pkgs.playerctl} play-pause";
|
input = {
|
||||||
|
"1386:21186:Wacom_HID_52C2_Finger" = {
|
||||||
|
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
|
||||||
|
};
|
||||||
|
|
||||||
|
"1386:21186:Wacom_HID_52C2_Pen" = {
|
||||||
|
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keybindings = {
|
||||||
|
"XF86Launch2" = "exec ${lib.getExe pkgs.playerctl} play-pause";
|
||||||
|
};
|
||||||
|
|
||||||
|
output = {"Samsung Display Corp. 0x4152 Unknown".scale = "2.0";};
|
||||||
};
|
};
|
||||||
|
|
||||||
output = {"Samsung Display Corp. 0x4152 Unknown".scale = "2.0";};
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
ar.home.desktop.hyprland = {
|
ar.home.desktop.hyprland = {
|
||||||
laptopMonitors = ["desc:Samsung Display Corp. 0x4152,preferred,auto,2,transform,0"];
|
laptopMonitors = ["desc:Samsung Display Corp. 0x4152,preferred,auto,2,transform,0"];
|
||||||
|
|
||||||
tabletMode = {
|
tabletMode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
switches = ["Lenovo Yoga Tablet Mode Control switch"];
|
switches = ["Lenovo Yoga Tablet Mode Control switch"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
];
|
||||||
];
|
|
||||||
|
users.aly = self.homeManagerModules.aly;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
{
|
{self, ...}: {
|
||||||
home-manager.sharedModules = [
|
home-manager = {
|
||||||
{
|
sharedModules = [
|
||||||
wayland.windowManager.sway.config.output = {"LG Display 0x0569 Unknown".scale = "1.25";};
|
{
|
||||||
|
wayland.windowManager.sway.config.output = {"LG Display 0x0569 Unknown".scale = "1.25";};
|
||||||
|
|
||||||
ar.home = {
|
ar.home = {
|
||||||
desktop.hyprland.laptopMonitors = ["desc:LG Display 0x0569,preferred,auto,1.25"];
|
desktop.hyprland.laptopMonitors = ["desc:LG Display 0x0569,preferred,auto,1.25"];
|
||||||
|
|
||||||
services.easyeffects = {
|
services.easyeffects = {
|
||||||
enable = true;
|
enable = true;
|
||||||
preset = "LoudnessEqualizer";
|
preset = "LoudnessEqualizer";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
];
|
||||||
];
|
|
||||||
|
users.aly = self.homeManagerModules.aly;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue