fixed wallpaper-changer

This commit is contained in:
samual.shop@proton.me 2024-05-16 11:55:24 +01:00
parent 5329b3e4ad
commit 0359491756
7 changed files with 83 additions and 53 deletions

View File

@ -26,7 +26,7 @@
while true; do while true; do
find "$wallpaper_dir" -type f -follow \( -iname \*.jpg -o -iname \*.png -o -iname \*.gif -o -iname \*.bmp \) | shuf | while read -r file; do find "$wallpaper_dir" -type f -follow \( -iname \*.jpg -o -iname \*.png -o -iname \*.gif -o -iname \*.bmp \) | shuf | while read -r file; do
${pkgs.swww}/bin/swww img "$file" --transition-step 10 --transition-fps 60 ${pkgs.swww}/bin/swww img "$file" --transition-step 10 --transition-fps 60
[ $? != 0 ] && echo "swww failed, reloading daemon" && exit 1 [ $? != 0 ] && echo "swww failed, reloading daemon" && ${pkgs.swww}/bin/swww-daemon &
sleep 600 sleep 600
done done
done done

View File

@ -20,7 +20,7 @@
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
enableAutosuggestions = true; programs.zsh.autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
shellAliases = { shellAliases = {
@ -58,7 +58,7 @@
gtk.iconTheme.name = "GruvboxPlus"; gtk.iconTheme.name = "GruvboxPlus";
qt.enable = true; qt.enable = true;
#qt.platformTheme.name = "gtk"; qt.platformTheme.name = "gtk";
qt.style.name = "adwaita-dark"; qt.style.name = "adwaita-dark";
qt.style.package = pkgs.adwaita-qt; qt.style.package = pkgs.adwaita-qt;

View File

@ -1,17 +1,27 @@
{...}: {...}:
{ {
fileSystems."/mnt" = { fileSystems."/exports" = {
device = "/dev/vdb"; device = "/dev/vdb1";
fsType = "ext4"; fsType = "ext4";
options = [ ];
}; };
services.nfs.server = { services.nfs.server = {
enable = true; enable = true;
# fixed rpc.statd port; for firewall
lockdPort = 4001;
mountdPort = 4002;
statdPort = 4000;
extraNfsdConfig = '''';
exports = '' exports = ''
/mnt/ *(ro,insecure,all_squash) /exports *(rw,insecure,all_squash)
''; '';
}; };
# open nfs ports
networking.firewall = {
enable = true;
# for NFSv3; view with `rpcinfo -p`
allowedTCPPorts = [ 111 2049 4000 4001 4002 20048 ];
allowedUDPPorts = [ 111 2049 4000 4001 4002 20048 ];
};
} }

View File

@ -36,7 +36,7 @@
hostName = "fileserver"; hostName = "fileserver";
networkmanager.enable = true; networkmanager.enable = true;
enableIPv6 = false; enableIPv6 = false;
hosts = { "192.168.122.223" = [ "fileserver" ] }; hosts = { "192.168.122.223" = [ "fileserver" ]; };
}; };
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";

View File

@ -0,0 +1,31 @@
# 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 + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9bed98b2-5ee2-4408-a9b1-6d40e9b68135";
fsType = "ext4";
};
swapDevices = [ ];
# 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.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

32
hosts/media/default.nix Normal file
View File

@ -0,0 +1,32 @@
{ inputs, config, lib, pkgs, outputs,... }:
{
imports =
[
# Import core options
./hardware-configuration.nix
../common/core
# Import optional options
../common/optional/pipewire.nix
../common/optional/hyprland.nix
../common/optional/displayManager/sddm.nix
../common/optional/openssh
# Create users for this host
../common/users/sam
];
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];

View File

@ -1,4 +1,4 @@
{ inputs, config, lib, pkgs, outputs, configLib, ... }: { inputs, config, lib, pkgs, outputs,... }:
{ {
imports = imports =
@ -40,8 +40,6 @@
enableIPv6 = false; enableIPv6 = false;
}; };
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
@ -53,54 +51,13 @@
services.printing.enable = true; services.printing.enable = true;
# sound.enable = true;
# hardware.pulseaudio.enable = true;
services.libinput.enable = true; services.libinput.enable = true;
# users.users.sam = {
# isNormalUser = true;
# extraGroups = [ "wheel" ];
# };
# users.users.sam.shell = pkgs.zsh;
environment.systemPackages = with pkgs; [
# curl
# vim
# home-manager
# tmux
# waybar
# git
# mako
# libnotify
# wl-clipboard
# swww
# rofi-wayland
# networkmanagerapplet
# htop
# sddm-theme
# sddm
# sshfs-fuse
# wdisplays
#wallpaper_changer
# #(callPackage ../../nixos_modules/themes/sddm-sugar-candy.nix{}).sddm-sugar-candy-theme
# libsForQt5.qt5.qtgraphicaleffects #required for sugar candy
# #(import ../../nixos_modules/scripts/wallpaper_changer.nix { inherit pkgs; })
];
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
# programs.zsh.enable = true;
hardware = {
opengl.enable = true;
nvidia.modesetting.enable = true;
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }