Compare commits

...

3 Commits

Author SHA1 Message Date
853fec65f3 removed backgrounds 2024-12-15 13:23:45 +01:00
bdbfb668f5 background change 2024-12-15 13:23:45 +01:00
c06b47ea56 userSettings set 2024-12-15 11:53:33 +01:00
14 changed files with 59 additions and 41 deletions

View File

@ -48,9 +48,14 @@
nixpkgs-stable,
...
} @ inputs: let
userSettings = {
username = "foglar";
hostname = "laptop";
theme = "catppuccin-mocha";
background = "aurora_borealis.png";
};
system = "x86_64-linux";
pkgs = import nixpkgs {
@ -72,7 +77,7 @@
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs system pkgs pkgs-stable username hostname;
inherit inputs system pkgs pkgs-stable userSettings;
};
modules = [
@ -84,7 +89,7 @@
};
leanix = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs system pkgs pkgs-stable username hostname;
inherit inputs system pkgs pkgs-stable userSettings;
};
modules = [

View File

@ -2,7 +2,7 @@
inputs,
pkgs,
pkgs-stable,
username,
userSettings,
...
}: {
imports = [
@ -16,17 +16,17 @@
# Home manager
home-manager = {
extraSpecialArgs = {inherit inputs pkgs pkgs-stable username;};
extraSpecialArgs = {inherit inputs pkgs pkgs-stable userSettings;};
backupFileExtension = "backup";
users = {
${username} = import ./home.nix;
${userSettings.username} = import ./home.nix;
};
};
# User configuration
users.users.${username} = {
users.users.${userSettings.username} = {
isNormalUser = true;
description = "${username}";
description = "${userSettings.username}";
extraGroups = ["wheel"];
};
@ -35,7 +35,7 @@
# Environment variables
environment.sessionVariables = {
FLAKE = "/home/${username}/.dotfiles";
FLAKE = "/home/${userSettings.username}/.dotfiles";
DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
};

View File

@ -1,11 +1,11 @@
{
pkgs-stable,
username,
userSettings,
...
}: {
# Home manager configuration
home.username = "${username}";
home.homeDirectory = "/home/${username}";
home.username = "${userSettings.username}";
home.homeDirectory = "/home/${userSettings.username}";
home.stateVersion = "24.11"; # Please read the comment before changing.
imports = [

View File

@ -75,10 +75,22 @@
${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 "logoutlaunch")
#(writeShellScriptBin "sysmonlaunch")
#(writeShellScriptBin "rofilaunch" '''')
])
++ (with pkgs-stable; [
pavucontrol

View File

@ -187,6 +187,7 @@
bindd = [
"$mod SHIFT, P, Color Picker, exec, hyprpicker -a"
"$mod SHIFT, R, Random Background, exec, background-switch-random"
];
bindl = [

View File

@ -2,7 +2,7 @@
pkgs,
lib,
config,
username,
userSettings,
...
}:
{
@ -13,7 +13,7 @@
config = lib.mkIf config.program.git.enable {
programs.git = {
enable = true;
userName = "${username}";
userName = "${userSettings.username}";
userEmail = "kohout.fi.2023@skola.ssps.cz";
};

View File

@ -1,7 +1,7 @@
{
lib,
config,
username,
userSettings,
...
}: {
options = {
@ -17,6 +17,6 @@
};
};
users.users.${username}.extraGroups = [ "docker" ];
users.users.${userSettings.username}.extraGroups = [ "docker" ];
};
}

View File

@ -1,7 +1,7 @@
{
lib,
config,
username,
userSettings,
...
}: {
options = {
@ -18,7 +18,7 @@
};
};
users.users.${username} = {
users.users.${userSettings.username} = {
isNormalUser = true;
extraGroups = ["podman"];
};

View File

@ -2,7 +2,7 @@
lib,
config,
pkgs,
username,
userSettings,
...
}: {
options = {
@ -21,7 +21,7 @@
};
})
(lib.mkIf config.sys.desktop.steamdeck.enable {
services.getty.autologinUser = "${username}";
services.getty.autologinUser = "${userSettings.username}";
environment = {
systemPackages = [pkgs.mangohud];
loginShellInit = ''

View File

@ -1,8 +1,7 @@
{
lib,
config,
hostname,
username,
userSettings,
...
}: {
options = {
@ -13,7 +12,7 @@
config = lib.mkMerge [
(lib.mkIf config.sys.network.enable {
networking.hostName = "${hostname}"; # Define your hostname.
networking.hostName = "${userSettings.hostname}"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
@ -22,7 +21,7 @@
# Enable networking
networking.networkmanager.enable = true;
users.users.${username}.extraGroups = ["networkmanager"];
users.users.${userSettings.username}.extraGroups = ["networkmanager"];
})
(
lib.mkIf config.sys.bluetooth.enable {

View File

@ -2,7 +2,7 @@
lib,
config,
pkgs,
username,
userSettings,
...
}: {
options = {
@ -32,6 +32,6 @@
services.ipp-usb.enable = true;
hardware.sane.extraBackends = [pkgs.hplipWithPlugin];
users.users.${username}.extraGroups = ["lp" "scanner"];
users.users.${userSettings.username}.extraGroups = ["lp" "scanner"];
};
}

View File

@ -2,6 +2,7 @@
lib,
config,
pkgs-stable,
userSettings,
...
}: {
options = {
@ -11,8 +12,8 @@
config = lib.mkIf config.sys.style.enable {
stylix = {
enable = true;
image = ../../../config/backgrounds/aurora_borealis.png;
base16Scheme = "${pkgs-stable.base16-schemes}/share/themes/catppuccin-mocha.yaml";
image = ../../../config/backgrounds/${userSettings.background};
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/tokyo-night-dark.yaml";
polarity = "dark";

View File

@ -2,7 +2,7 @@
inputs,
pkgs,
pkgs-stable,
username,
userSettings,
...
}: {
imports = [
@ -17,18 +17,18 @@
# Home manager
home-manager = {
extraSpecialArgs = {inherit inputs pkgs pkgs-stable username;};
extraSpecialArgs = {inherit inputs pkgs pkgs-stable userSettings;};
backupFileExtension = "backup";
users = {
${username} = import ./home.nix;
${userSettings.username} = import ./home.nix;
};
sharedModules = [inputs.plasma-manager.homeManagerModules.plasma-manager];
};
# User configuration
users.users.${username} = {
users.users.${userSettings.username} = {
isNormalUser = true;
description = "${username}";
description = "${userSettings.username}";
extraGroups = ["wheel"];
};
@ -37,7 +37,7 @@
# Environment variables
environment.sessionVariables = {
FLAKE = "/home/${username}/dotfiles";
FLAKE = "/home/${userSettings.username}/dotfiles";
DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";
};

View File

@ -1,7 +1,7 @@
{username, ...}: {
{userSettings, ...}: {
# Home manager configuration
home.username = "${username}";
home.homeDirectory = "/home/${username}";
home.username = "${userSettings.username}";
home.homeDirectory = "/home/${userSettings.username}";
home.stateVersion = "24.05"; # Please read the comment before changing.
imports = [