This commit is contained in:
Hadi 2024-06-17 13:47:13 +02:00
parent b22d2f596f
commit d169306a68
4 changed files with 34 additions and 25 deletions

View File

@ -40,6 +40,8 @@
wf-recorder
glow
nwg-displays
wireguard-tools
bitwarden-cli
# Just cool
peaclock

View File

@ -4,17 +4,17 @@
enable = true;
settings = {
general = { ignore_dbus_inhibit = false; };
listener = [
{
listener = [{
timeout = 600;
on-timeout = pkgs.hyprlock + "/bin/hyprlock";
}
{
timeout = 660;
on-timeout = "systemctl suspend";
on-resume = pkgs.libnotify
+ "/bin/notify-send 'Welcome back to your desktop!'";
}
# FIXME
# {
# timeout = 660;
# on-timeout = "systemctl suspend";
# on-resume = pkgs.libnotify
# + "/bin/notify-send 'Welcome back to your desktop!'";
# }
];
};
};

View File

@ -3,7 +3,7 @@
config.var = {
hostname = "nixy";
username = "your username";
username = "your_username";
homeDirectory = "/home/" + config.var.username;
keyboardLayout = "fr";
@ -13,8 +13,8 @@
extraLocale = "fr_FR.UTF-8";
git = {
username = "Github username";
email = "Github email";
username = "your_username";
email = "your_email";
};
stateVersion = "24.05";

View File

@ -1,19 +1,26 @@
#!/usr/bin/env bash
[[ -d "./hosts" ]] || (exit 1; echo "Folder ./hosts not found")
[[ -d "./hosts" ]] || (
exit 1
echo "Folder ./hosts not found"
)
LAPTOP_CONFIG="./hosts/laptop"
GUEST_CONFIG="./hosts/guest"
mv "$LAPTOP_CONFIG/configuration.nix" "$GUEST_CONFIG/configuration.nix"
mv "$LAPTOP_CONFIG/variables.nix" "$GUEST_CONFIG/variables.nix"
cp "$LAPTOP_CONFIG/configuration.nix" "$GUEST_CONFIG/configuration.nix"
cp "$LAPTOP_CONFIG/variables.nix" "$GUEST_CONFIG/variables.nix"
# Remove the NVIDIA driver import
cat "$GUEST_CONFIG/configuration.nix" | sed 's/\.\.\/shared\/nvidia/# ..\/shared\/nvidia/' > "$GUEST_CONFIG/configuration.nix"
cat "$GUEST_CONFIG/configuration.nix" | sed 's/\.\.\/shared\/prime/# ..\/shared\/prime/' > "$GUEST_CONFIG/configuration.nix"
config=$(cat "$LAPTOP_CONFIG/configuration.nix")
config=$(echo "$config" | sed 's/..\/shared\/nvidia/# ..\/shared\/nvidia/')
config=$(echo "$config" | sed 's/..\/shared\/prime/# ..\/shared\/prime/')
echo "$config" >"$GUEST_CONFIG/configuration.nix"
cat "$GUEST_CONFIG/variables.nix" | sed 's/hadi/your username/' > "$GUEST_CONFIG/variables.nix"
cat "$GUEST_CONFIG/variables.nix" | sed 's/Hadi/your username/' > "$GUEST_CONFIG/variables.nix"
cat "$GUEST_CONFIG/variables.nix" | sed 's/112569860+anotherhadi@users.noreply.github.com/your email/' > "$GUEST_CONFIG/variables.nix"
cat "$GUEST_CONFIG/variables.nix" | sed 's/sops = true/sops = false/' > "$GUEST_CONFIG/variables.nix"
cat "$GUEST_CONFIG/variables.nix" | sed 's/nextcloud = true/nextcloud = false/' > "$GUEST_CONFIG/variables.nix"
variables=$(cat "$LAPTOP_CONFIG/variables.nix")
variables=$(echo "$variables" | sed 's/112569860+anotherhadi@users.noreply.github.com/your_email/')
variables=$(echo "$variables" | sed 's/hadi/your_username/')
variables=$(echo "$variables" | sed 's/Hadi/your_username/')
variables=$(echo "$variables" | sed 's/sops = true/sops = false/')
variables=$(echo "$variables" | sed 's/nextcloud = true/nextcloud = false/')
echo "$variables" >"$GUEST_CONFIG/variables.nix"