background change
This commit is contained in:
parent
c06b47ea56
commit
bdbfb668f5
@ -48,9 +48,14 @@
|
|||||||
nixpkgs-stable,
|
nixpkgs-stable,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
|
userSettings = {
|
||||||
username = "foglar";
|
username = "foglar";
|
||||||
hostname = "laptop";
|
hostname = "laptop";
|
||||||
|
|
||||||
|
theme = "catppuccin-mocha";
|
||||||
|
background = "aurora_borealis.png";
|
||||||
|
};
|
||||||
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
@ -72,7 +77,7 @@
|
|||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
laptop = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs system pkgs pkgs-stable username hostname;
|
inherit inputs system pkgs pkgs-stable userSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
@ -84,7 +89,7 @@
|
|||||||
};
|
};
|
||||||
leanix = nixpkgs.lib.nixosSystem {
|
leanix = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs system pkgs pkgs-stable username hostname;
|
inherit inputs system pkgs pkgs-stable userSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-stable,
|
pkgs-stable,
|
||||||
username,
|
userSettings,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
@ -16,17 +16,17 @@
|
|||||||
|
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {inherit inputs pkgs pkgs-stable username;};
|
extraSpecialArgs = {inherit inputs pkgs pkgs-stable userSettings;};
|
||||||
backupFileExtension = "backup";
|
backupFileExtension = "backup";
|
||||||
users = {
|
users = {
|
||||||
${username} = import ./home.nix;
|
${userSettings.username} = import ./home.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# User configuration
|
# User configuration
|
||||||
users.users.${username} = {
|
users.users.${userSettings.username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "${username}";
|
description = "${userSettings.username}";
|
||||||
extraGroups = ["wheel"];
|
extraGroups = ["wheel"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
FLAKE = "/home/${username}/.dotfiles";
|
FLAKE = "/home/${userSettings.username}/.dotfiles";
|
||||||
|
|
||||||
DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -75,10 +75,22 @@
|
|||||||
${libnotify}/bin/notify-send -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/icons/keyboard.svg
|
${libnotify}/bin/notify-send -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/icons/keyboard.svg
|
||||||
'')
|
'')
|
||||||
|
|
||||||
|
(writeShellScriptBin "background-switch-random" ''
|
||||||
|
directory=$HOME/dotfiles/config/backgrounds/
|
||||||
|
monitor=$(hyprctl monitors | grep Monitor | awk '{print $2}')
|
||||||
|
|
||||||
|
if [ -d "$directory" ]; then
|
||||||
|
# Use find to include .jpg, .png, and .jpeg files
|
||||||
|
random_background=$(find "$directory" -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) | shuf -n 1)
|
||||||
|
|
||||||
|
hyprctl hyprpaper unload all
|
||||||
|
hyprctl hyprpaper preload "$random_background"
|
||||||
|
hyprctl hyprpaper wallpaper "$monitor, $random_background"
|
||||||
|
fi
|
||||||
|
|
||||||
|
'')
|
||||||
|
|
||||||
#(writeShellScriptBin "windowpin")
|
#(writeShellScriptBin "windowpin")
|
||||||
#(writeShellScriptBin "logoutlaunch")
|
|
||||||
#(writeShellScriptBin "sysmonlaunch")
|
|
||||||
#(writeShellScriptBin "rofilaunch" '''')
|
|
||||||
])
|
])
|
||||||
++ (with pkgs-stable; [
|
++ (with pkgs-stable; [
|
||||||
pavucontrol
|
pavucontrol
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
image = ../../../config/backgrounds/${userSettings.background};
|
image = ../../../config/backgrounds/${userSettings.background};
|
||||||
base16Scheme = "${pkgs-stable.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
base16Scheme = "${pkgs-stable.base16-schemes}/share/themes/${userSettings.theme}.yaml"; # List all possible themes: $ nix build nixpkgs#base16-schemes && ls result/share/themes
|
||||||
#base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml";
|
#base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml";
|
||||||
#base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
|
#base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user