Compare commits
2 Commits
2e36cc5ea4
...
c1ef7c8ef8
| Author | SHA1 | Date | |
|---|---|---|---|
| c1ef7c8ef8 | |||
| 1cb4b45de1 |
@ -1,6 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Wallpaper_DIR="/home/smayzy/wallpaper"
|
||||
LOCKFILE="/tmp/wallpaper_changer.lock"
|
||||
|
||||
if [ -f "$LOCKFILE" ]; then
|
||||
old_pid=$(cat "$LOCKFILE")
|
||||
if ps -p "$old_pid" > /dev/null 2>&1; then
|
||||
kill "$old_pid"
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $$ > "$LOCKFILE"
|
||||
|
||||
set_wallpaper() {
|
||||
local Wallpaper=$(find $Wallpaper_DIR | shuf -n 1)
|
||||
@ -10,11 +21,12 @@ set_wallpaper() {
|
||||
echo "preload = $Wallpaper" >> /home/smayzy/.config/hypr/hyprpaper.conf
|
||||
echo "wallpaper = ,$Wallpaper" >> /home/smayzy/.config/hypr/hyprpaper.conf
|
||||
|
||||
# Restart hyprpaper
|
||||
pkill hyprpaper 2>/dev/null
|
||||
hyprpaper &
|
||||
}
|
||||
|
||||
trap "rm -f $LOCKFILE" EXIT
|
||||
|
||||
while true; do
|
||||
set_wallpaper
|
||||
sleep 600
|
||||
|
||||
41
hosts/laptop1/hardware-configuration.nix
Normal file
41
hosts/laptop1/hardware-configuration.nix
Normal file
@ -0,0 +1,41 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/fa4f1a61-338b-4f1e-9f6c-2b2f2cd12f38";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/8E15-A6E3";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/b451db56-e0a5-4799-88a1-34a31ffe3b08"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s20f0u1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user