Compare commits

..

12 commits

146 changed files with 2626 additions and 2213 deletions

149
flake.nix
View file

@ -44,16 +44,17 @@
};
};
outputs =
inputs @ { self
, nur
, nixpkgs
, home-manager
, sops-nix
, neovim-nightly-overlay
, nix-index-database
, rust-overlay
, nix-flatpak
, ...
inputs@{
self,
nur,
nixpkgs,
home-manager,
sops-nix,
neovim-nightly-overlay,
nix-index-database,
rust-overlay,
nix-flatpak,
...
}:
let
commonModules = [
@ -78,9 +79,7 @@
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
};
}
sops-nix.nixosModules.sops
@ -99,61 +98,79 @@
};
in
{
nixosConfigurations =
{
castle =
let
profile-path = ./profiles/castle.nix;
hardware-configuration = ./hardware-configuration/castle.nix;
specialArgs = { inherit inputs unstable profile-path hardware-configuration; };
in
nixpkgs.lib.nixosSystem
nixosConfigurations = {
castle =
let
profile-path = ./profiles/castle.nix;
hardware-configuration = ./hardware-configuration/castle.nix;
specialArgs = {
inherit
inputs
unstable
profile-path
hardware-configuration
;
};
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./system
{
system = "x86_64-linux";
modules =
[
./system
{
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.tigor = import ./home;
}
] ++ commonModules;
specialArgs = specialArgs;
};
fort =
let
profile-path = ./profiles/fort.nix;
hardware-configuration = ./hardware-configuration/fort.nix;
specialArgs = { inherit inputs unstable profile-path hardware-configuration; };
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./system
{
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.tigor = import ./home;
}
] ++ commonModules;
specialArgs = specialArgs;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.tigor = import ./home;
}
] ++ commonModules;
specialArgs = specialArgs;
};
fort =
let
profile-path = ./profiles/fort.nix;
hardware-configuration = ./hardware-configuration/fort.nix;
specialArgs = {
inherit
inputs
unstable
profile-path
hardware-configuration
;
};
homeserver =
let
profile-path = ./profiles/homeserver.nix;
hardware-configuration = ./hardware-configuration/homeserver.nix;
specialArgs = { inherit inputs unstable profile-path hardware-configuration; };
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./system
{
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.homeserver = import ./home;
}
] ++ commonModules;
specialArgs = specialArgs;
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./system
{
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.tigor = import ./home;
}
] ++ commonModules;
specialArgs = specialArgs;
};
homeserver =
let
profile-path = ./profiles/homeserver.nix;
hardware-configuration = ./hardware-configuration/homeserver.nix;
specialArgs = {
inherit
inputs
unstable
profile-path
hardware-configuration
;
};
};
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./system
{
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.homeserver = import ./home;
}
] ++ commonModules;
specialArgs = specialArgs;
};
};
};
}

View file

@ -1,16 +1,26 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
sops.secrets."smb/secrets" = {
owner = config.profile.user.name;
};
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
@ -26,52 +36,47 @@
systemd.packages = with pkgs; [ lact ];
systemd.services.lactd.wantedBy = [ "multi-user.target" ];
system.fsPackages = [ pkgs.bindfs pkgs.cifs-utils ];
fileSystems."/nas" =
{
device = "//192.168.100.5/nas";
fsType = "cifs";
options = [
"_netdev"
"x-systemd.automount"
"noauto"
"x-systemd.idle-timeout=60"
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
"uid=${toString config.profile.user.uid}"
"gid=${toString config.profile.user.gid}"
"credentials=${config.sops.secrets."smb/secrets".path}"
];
};
fileSystems."/" =
{
device = "/dev/disk/by-uuid/6a987bc7-1f00-4494-bcef-b0f8afc62b7b";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/812C-A3A9";
fsType = "vfat";
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/0add1f95-4cd5-4d44-876e-c1b381b7d133";
fsType = "ext4";
};
fileSystems."/workstation" =
{
device = "/dev/disk/by-uuid/7a3a7a8a-91d5-43fb-a80b-376bacdb54ec";
fsType = "ext4";
};
swapDevices =
[
{ device = "/dev/disk/by-uuid/15139a5f-a695-47a1-bd59-7e530989860c"; }
system.fsPackages = [
pkgs.bindfs
pkgs.cifs-utils
];
fileSystems."/nas" = {
device = "//192.168.100.5/nas";
fsType = "cifs";
options = [
"_netdev"
"x-systemd.automount"
"noauto"
"x-systemd.idle-timeout=60"
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
"uid=${toString config.profile.user.uid}"
"gid=${toString config.profile.user.gid}"
"credentials=${config.sops.secrets."smb/secrets".path}"
];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/6a987bc7-1f00-4494-bcef-b0f8afc62b7b";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/812C-A3A9";
fsType = "vfat";
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/0add1f95-4cd5-4d44-876e-c1b381b7d133";
fsType = "ext4";
};
fileSystems."/workstation" = {
device = "/dev/disk/by-uuid/7a3a7a8a-91d5-43fb-a80b-376bacdb54ec";
fsType = "ext4";
};
swapDevices = [ { device = "/dev/disk/by-uuid/15139a5f-a695-47a1-bd59-7e530989860c"; } ];
# 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

View file

@ -1,32 +1,37 @@
{ config, lib, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
fileSystems."/" =
{
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-label/NIXSWAP"; }];
swapDevices = [ { device = "/dev/disk/by-label/NIXSWAP"; } ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -1,31 +1,45 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
config = {
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "nct6775" ];
boot.kernelModules = [
"kvm-amd"
"nct6775"
];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/439a1beb-1443-495b-9891-012605819803";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/439a1beb-1443-495b-9891-012605819803";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/47A1-0296";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/47A1-0296";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
fileSystems."/nas" = {
device = "/dev/disk/by-label/WD_RED_4T_1";
@ -123,10 +137,11 @@
];
};
services.caddy.virtualHosts."public.tigor.web.id".extraConfig = /*caddy*/ ''
file_server browse
root * /nas/public
'';
services.caddy.virtualHosts."public.tigor.web.id".extraConfig = # caddy
''
file_server browse
root * /nas/public
'';
systemd.tmpfiles.settings = {
"100-nas-public-dir" = {
@ -151,6 +166,8 @@
libvdpau-va-gl
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Force intel-media-driver
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
}; # Force intel-media-driver
};
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
imports = [
./protobuf.nix
];
imports = [ ./protobuf.nix ];
}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.home.environments.protobuf;
inherit (lib) mkIf;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
imports = [
./minecraft.nix
];
imports = [ ./minecraft.nix ];
}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.games.minecraft;
inherit (lib) mkIf;

View file

@ -10,6 +10,8 @@ in
};
programs.zsh.shellAliases = {
vpn-bareksa = "sudo ${pkgs.openvpn}/bin/openvpn --config ${config.sops.secrets."bareksa/openvpn".path}";
vpn-bareksa = "sudo ${pkgs.openvpn}/bin/openvpn --config ${
config.sops.secrets."bareksa/openvpn".path
}";
};
}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.firefox;
in
@ -30,7 +35,7 @@ in
id = 0;
name = "Tigor";
isDefault = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
cookie-autodelete

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.gnome;
in

View file

@ -7,9 +7,7 @@ in
programs.alacritty = {
enable = true;
settings = {
import = [
"${config.home.homeDirectory}/.cache/wallust/alacritty.toml"
];
import = [ "${config.home.homeDirectory}/.cache/wallust/alacritty.toml" ];
live_config_reload = true;
font = {
normal = {

View file

@ -1,4 +1,9 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
let
cfg = config.profile.hyprland;
in
@ -14,7 +19,6 @@ in
# ./hyprpaper.nix
./pyprland.nix
./rofi.nix
./wallust.nix
./waybar.nix
./wlogout.nix
# ./swappy.nix
@ -23,6 +27,8 @@ in
./swaync.nix
./ntfy-sh.nix
./gnome-keyring.nix
./wallust
];
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.hyprland;
inherit (lib) mkIf;

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
cfg = config.profile.hyprland;
inherit (lib) mkIf;
@ -7,21 +12,19 @@ let
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
gnome.gnome-keyring
];
home.packages = with pkgs; [ gnome.gnome-keyring ];
sops.secrets.${secretKey} = { };
wayland.windowManager.hyprland.settings.exec-once =
let
scriptFile = getExe (pkgs.writeShellScriptBin "gnome-keyring.sh" /*sh*/ ''
cat "${config.sops.secrets.${secretKey}.path}" | gnome-keyring-daemon --unlock
gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
'');
scriptFile = getExe (
pkgs.writeShellScriptBin "gnome-keyring.sh" # sh
''
cat "${config.sops.secrets.${secretKey}.path}" | gnome-keyring-daemon --unlock
gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
''
);
in
[
''${scriptFile}''
];
[ ''${scriptFile}'' ];
};
}

View file

@ -1,4 +1,9 @@
{ lib, config, unstable, ... }:
{
lib,
config,
unstable,
...
}:
let
cfg = config.profile.hyprland;
in

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
cfg = config.profile.hyprland;
in
@ -14,12 +19,8 @@ in
enable = true;
systemd.variables = [ "all" ];
settings = {
env = [
"DBUS_SESSION_BUS_ADDRESS,unix:path=/run/user/${toString config.profile.user.uid}/bus"
];
exec-once = lib.mkOrder 5 [
''${pkgs.dbus}/bin/dbus-update-activation-environment --all''
];
env = [ "DBUS_SESSION_BUS_ADDRESS,unix:path=/run/user/${toString config.profile.user.uid}/bus" ];
exec-once = lib.mkOrder 5 [ ''${pkgs.dbus}/bin/dbus-update-activation-environment --all'' ];
# window decors
general = {
gaps_in = 10;
@ -197,14 +198,15 @@ in
''stayfocused,class:^(lazygit)$''
];
};
extraConfig = /*hyprlang*/ ''
exec-once=foot --server
extraConfig = # hyprlang
''
exec-once=foot --server
exec-once=nm-applet
exec-once=pasystray
exec-once=nm-applet
exec-once=pasystray
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
'';
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
'';
};
};
}

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
cfg = config.profile.hyprland;
in

View file

@ -1,18 +1,21 @@
{ lib, unstable, config, ... }:
{
lib,
unstable,
config,
...
}:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf cfg.enable {
home.packages = [
unstable.hyprpaper
];
home.packages = [ unstable.hyprpaper ];
home.file.".config/hypr/hyprpaper.conf".text =
let
recent_wallpaper = "${config.home.homeDirectory}/.cache/wallpaper/current";
in
/*hyprlang*/
# hyprlang
''
preload = ${recent_wallpaper}
wallpaper = ,${recent_wallpaper}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.hyprland;
saveDir = "${config.home.homeDirectory}/Pictures/screenshots";
@ -10,22 +15,25 @@ in
satty
];
home.activation.sattyDirCreate = lib.hm.dag.entryAfter [ "writeBoundary" ] /*sh*/ ''
mkdir -p "${saveDir}"
chown ${config.home.username} "${saveDir}"
'';
home.activation.sattyDirCreate =
lib.hm.dag.entryAfter [ "writeBoundary" ] # sh
''
mkdir -p "${saveDir}"
chown ${config.home.username} "${saveDir}"
'';
wayland.windowManager.hyprland.settings.bind =
let
saveFilename = "${saveDir}/$(date +%Y-%m-%d_%H%M%S).png";
sattySaveCommand = ''satty --save-after-copy --filename - --fullscreen --output-filename ${saveFilename}'';
filename = "$(date +%Y-%m-%d_%H%M%S).png";
sattyFilename = "${saveDir}/${filename}";
sattySaveCommand = ''satty --save-after-copy --filename - --fullscreen --output-filename ${sattyFilename}'';
in
[
"$mod, PRINT, exec, hyprshot -m window --filename ${saveFilename}"
"$mod, PRINT, exec, hyprshot -m window --filename ${filename} --output-folder ${saveDir}"
"$mod SHIFT, PRINT, exec, hyprshot -m window --raw | ${sattySaveCommand}"
", PRINT, exec, hyprshot -m region --filename ${saveFilename}"
", PRINT, exec, hyprshot -m region --filename ${filename} --output-folder ${saveDir}"
"SHIFT, PRINT, exec, hyprshot -m region --raw | ${sattySaveCommand}"
"ALT, PRINT, exec, hyprshot -m output --filename ${saveFilename}"
"ALT, PRINT, exec, hyprshot -m output --filename ${filename} --output-folder ${saveDir}"
"ALT SHIFT, PRINT, exec, hyprshot -m output --raw | ${sattySaveCommand}"
];
};

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
hyprland = config.profile.hyprland;
cfg = config.profile.services.ntfy-sh.client;
@ -6,9 +11,7 @@ let
in
{
config = mkIf (hyprland.enable && cfg.enable) {
home.packages = with pkgs; [
ntfy-sh
];
home.packages = with pkgs; [ ntfy-sh ];
# wayland.windowManager.hyprland.settings.exec-once = [
# "ntfy subscribe --config /etc/ntfy/client.yml --from-config"

View file

@ -1,22 +1,30 @@
{ lib, pkgs, unstable, config, ... }:
{
lib,
pkgs,
unstable,
config,
...
}:
let
cfg = config.profile.hyprland;
inherit (lib.meta) getExe;
wallpaperDir = "${config.home.homeDirectory}/.cache/wallpaper";
draw-wallpaper = pkgs.writeShellScriptBin "draw-wallpaper.sh" /*sh*/ ''
image_file=$1
target="${wallpaperDir}/current"
blur_target="${wallpaperDir}/blurred.png"
square_target="${wallpaperDir}/square.png"
draw-wallpaper =
pkgs.writeShellScriptBin "draw-wallpaper.sh" # sh
''
image_file=$1
target="${wallpaperDir}/current"
blur_target="${wallpaperDir}/blurred.png"
square_target="${wallpaperDir}/square.png"
mkdir -p "${wallpaperDir}"
echo "$image_file" > "${wallpaperDir}/origin.txt"
cp "$image_file" "$target"
swww img "$target"
${unstable.wallust}/bin/wallust run "$target"
${pkgs.graphicsmagick}/bin/gm convert -resize 75% -blur 50x30 "$target" "$blur_target"
${pkgs.imagemagick}/bin/magick "$target" -resize 25% -gravity Center -extent 1:1 "$square_target"
'';
mkdir -p "${wallpaperDir}"
echo "$image_file" > "${wallpaperDir}/origin.txt"
cp "$image_file" "$target"
swww img "$target"
${unstable.wallust}/bin/wallust run "$target"
${pkgs.graphicsmagick}/bin/gm convert -resize 75% -blur 50x30 "$target" "$blur_target"
${pkgs.imagemagick}/bin/magick "$target" -resize 25% -gravity Center -extent 1:1 "$square_target"
'';
in
{
config = lib.mkIf cfg.enable {
@ -29,9 +37,7 @@ in
tomlFormat = pkgs.formats.toml { };
in
tomlFormat.generate "pyprland.toml" {
pyprland.plugins = [
"wallpapers"
];
pyprland.plugins = [ "wallpapers" ];
wallpapers = {
path = cfg.pyprland.wallpaper-dirs;
unique = false;
@ -45,9 +51,7 @@ in
"swww-daemon"
"sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current"
];
bind = [
"$mod, W, exec, pypr wall next"
];
bind = [ "$mod, W, exec, pypr wall next" ];
};
};
}

View file

@ -1,39 +1,46 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.hyprland;
inherit (lib.meta) getExe;
selectWindowScript = pkgs.writeShellScriptBin ''select-window.sh'' /*sh*/ ''
state="$(hyprctl -j clients)"
active_window="$(hyprctl -j activewindow)"
selectWindowScript =
pkgs.writeShellScriptBin ''select-window.sh'' # sh
''
state="$(hyprctl -j clients)"
active_window="$(hyprctl -j activewindow)"
current_addr="$(echo "$active_window" | gojq -r '.address')"
current_addr="$(echo "$active_window" | gojq -r '.address')"
window="$(echo "$state" |
gojq -r '.[] | select(.monitor != -1 ) | "\(.address) \(.workspace.name) \(.title)"' |
grep -v "scratch_term" |
sed "s|$current_addr|focused ->|" |
sort -r |
rofi -dmenu -i -matching fuzzy)"
window="$(echo "$state" |
gojq -r '.[] | select(.monitor != -1 ) | "\(.address) \(.workspace.name) \(.title)"' |
grep -v "scratch_term" |
sed "s|$current_addr|focused ->|" |
sort -r |
rofi -dmenu -i -matching fuzzy)"
addr="$(echo "$window" | awk '{print $1}')"
ws="$(echo "$window" | awk '{print $2}')"
addr="$(echo "$window" | awk '{print $1}')"
ws="$(echo "$window" | awk '{print $2}')"
if [[ "$addr" =~ focused* ]]; then
echo 'already focused, exiting'
exit 0
fi
fullscreen_on_same_ws="$(echo "$state" | gojq -r ".[] | select(.fullscreen == true) | select(.workspace.name == \"$ws\") | .address")"
if [[ "$window" != "" ]]; then
if [[ "$fullscreen_on_same_ws" == "" ]]; then
hyprctl dispatch focuswindow address:''${addr}
else
notify-send 'Complex switch' "$window"
hyprctl --batch "dispatch focuswindow address:''${fullscreen_on_same_ws}; dispatch fullscreen 1;"
if [[ "$addr" =~ focused* ]]; then
echo 'already focused, exiting'
exit 0
fi
fi
'';
fullscreen_on_same_ws="$(echo "$state" | gojq -r ".[] | select(.fullscreen == true) | select(.workspace.name == \"$ws\") | .address")"
if [[ "$window" != "" ]]; then
if [[ "$fullscreen_on_same_ws" == "" ]]; then
hyprctl dispatch focuswindow address:''${addr}
else
notify-send 'Complex switch' "$window"
hyprctl --batch "dispatch focuswindow address:''${fullscreen_on_same_ws}; dispatch fullscreen 1;"
fi
fi
'';
in
{
config = lib.mkIf cfg.enable {

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
cfg = config.profile.hyprland;
in

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.hyprland;
in
@ -36,18 +41,18 @@ in
};
Service =
let
reloadScript = pkgs.writeShellScriptBin "swaync-reload.sh" /*sh*/ ''
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-css
'';
reloadScript =
pkgs.writeShellScriptBin "swaync-reload.sh" # sh
''
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-css
'';
in
{
ExecReload = "${lib.meta.getExe reloadScript}";
};
};
home.packages = with pkgs; [
libnotify
];
home.packages = with pkgs; [ libnotify ];
};
}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.hyprland;
in
@ -8,9 +13,7 @@ in
# enable = true;
# display = config.profile.hyprland.swayosd.display;
# };
home.packages = with pkgs; [
swayosd
];
home.packages = with pkgs; [ swayosd ];
wayland.windowManager.hyprland.settings = {
exec-once = [

View file

@ -1,40 +0,0 @@
{ lib
, fetchFromGitea
, rustPlatform
, nix-update-script
, imagemagick
, makeWrapper
, pkgs
}:
rustPlatform.buildRustPackage rec {
pname = "wallust";
version = "3.0.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "explosion-mental";
repo = "wallust";
rev = version;
hash = "sha256-vZTHlonepK1cyxHhGu3bVBuOmExPtRFrAnYp71Jfs8c=";
};
cargoHash = "sha256-o6VRekazqbKTef6SLjHqs9/z/Q70auvunP+yFDkclpg=";
nativeBuildInputs = [ makeWrapper pkgs.rust-bin.stable."1.79.0".default ];
postFixup = ''
wrapProgram $out/bin/wallust \
--prefix PATH : "${lib.makeBinPath [ imagemagick ]}"
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "A better pywal";
homepage = "https://codeberg.org/explosion-mental/wallust";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ onemoresuza iynaix ];
downloadPage = "https://codeberg.org/explosion-mental/wallust/releases/tag/${version}";
mainProgram = "wallust";
};
}

View file

@ -1,31 +0,0 @@
[window]
opacity = {{alpha/100}}
[colors]
[colors.primary]
background = "{{background}}"
foreground = "{{foreground}}"
[colors.cursor]
text = "CellForeground"
cursor = "{{cursor}}"
[colors.bright]
black = "{{color0}}"
red = "{{color1}}"
green = "{{color2}}"
yellow = "{{color3}}"
blue = "{{color4}}"
magenta = "{{color5}}"
cyan = "{{color6}}"
white = "{{color7}}"
[colors.normal]
black = "{{color8}}"
red = "{{color9}}"
green = "{{color10}}"
yellow = "{{color11}}"
blue = "{{color12}}"
magenta = "{{color13}}"
cyan = "{{color14}}"
white = "{{color15}}"

View file

@ -1,30 +0,0 @@
require("mini.base16").setup({
palette = {
base00 = "{{color0}}", -- Background
base01 = "{{color1 | darken(0.75)}}", -- CursorLine, CMP Background
base02 = "{{color2 | darken(0.50)}}", -- Visual Select
base03 = "{{color3 | blend(color1)}}", -- Comment, MatchParen
base04 = "{{color4}}", -- Keywords, properties, Line Number
base05 = "{{color5}}", -- NormalText, CMP Selection, TSProperty
base06 = "{{color6}}",
base07 = "{{color7}}",
base08 = "{{color8 | complementary}}", -- TSVariable
base09 = "{{color9 | complementary | lighten(0.25)}}", -- TSConstant, @constant (booleans, etc)
base0A = "{{color10 | complementary | lighten(0.25)}}", -- CMP Property (Field), TSType
base0B = "{{color11 | blend(color7) | complementary | lighten(0.25)}}", -- String Texts
base0C = "{{color12}}", -- Types, Regex
base0D = "{{color13}}", -- Functions, String Escape
base0E = "{{color14}}",
base0F = "{{color15}}",
},
use_cterm = vim.fn.has("termguicolors") == 0,
plugins = { default = true },
})
------- Neovide Configuration -------
-- stylua: ignore start
vim.g.neovide_transparency = {{alpha/100}}
-- stylua: ignore end
vim.g.neovide_background_color = "{{color0}}{{ alpha | alpha_hexa }}"

View file

@ -1,26 +0,0 @@
[colors]
alpha={{ alpha/100 }}
background={{background | strip}}
foreground={{foreground | strip}}
flash={{color2 | strip}}
flash-alpha=0.5
## Normal/regular colors (color palette 0-7)
regular0={{color0 | strip}}
regular1={{color1 | strip}}
regular2={{color2 | strip}}
regular3={{color3 | strip}}
regular4={{color4 | strip}}
regular5={{color5 | strip}}
regular6={{color6 | strip}}
regular7={{color7 | strip}}
## Bright colors (color palette 8-15)
bright0={{color8 | strip}}
bright1={{color9 | strip}}
bright2={{color10 | strip}}
bright3={{color11 | strip}}
bright4={{color12 | strip}}
bright5={{color13 | strip}}
bright6={{color14 | strip}}
bright7={{color15 | strip}}

View file

@ -1,26 +0,0 @@
$background = rgb({{background | strip}})
$foreground = rgb({{foreground | strip}})
$color0 = rgb({{color0 | strip}})
$color1 = rgb({{color1 | strip}})
$color2 = rgb({{color2 | strip}})
$color3 = rgb({{color3 | strip}})
$color4 = rgb({{color4 | strip}})
$color5 = rgb({{color5 | strip}})
$color6 = rgb({{color6 | strip}})
$color7 = rgb({{color7 | strip}})
$color8 = rgb({{color8 | strip}})
$color9 = rgb({{color9 | strip}})
$color10 = rgb({{color10 | strip}})
$color11 = rgb({{color11 | strip}})
$color12 = rgb({{color12 | strip}})
$color13 = rgb({{color13 | strip}})
$color14 = rgb({{color14 | strip}})
$color15 = rgb({{color15 | strip}})
general {
col.inactive_border = $color11
}
decoration {
inactive_opacity = {{alpha / 100}}
}

View file

@ -1,30 +0,0 @@
foreground {{foreground}}
background {{background}}
background_opacity {{ alpha / 100 }}
cursor {{cursor}}
active_tab_foreground {{background}}
active_tab_background {{foreground}}
inactive_tab_foreground {{foreground}}
inactive_tab_background {{background}}
active_border_color {{foreground}}
inactive_border_color {{background}}
bell_border_color {{color1}}
color0 {{color0}}
color1 {{color1}}
color2 {{color2}}
color3 {{color3}}
color4 {{color4}}
color5 {{color5}}
color6 {{color6}}
color7 {{color7}}
color8 {{color8}}
color9 {{color9}}
color10 {{color10}}
color11 {{color11}}
color12 {{color12}}
color13 {{color13}}
color14 {{color14}}
color15 {{color15}}

View file

@ -1,22 +0,0 @@
* {
background: rgba(0,0,1,0.5);
foreground: #FFFFFF;
color0: {{color0}};
color1: {{color1}};
color2: {{color2}};
color3: {{color3}};
color4: {{color4}};
color5: {{color5}};
color6: {{color6}};
color7: {{color7}};
color8: {{color8}};
color9: {{color9}};
color10: {{color10}};
color11: {{color11}};
color12: {{color12}};
color13: {{color13}};
color14: {{color14}};
color15: {{color15}};
border-width: 3px;
current-image: url("~/.cache/wallpaper/blurred.png", height);
}

View file

@ -1,466 +0,0 @@
@define-color foreground {{foreground}};
@define-color background {{background}};
@define-color cursor {{cursor}};
@define-color color0 {{color0}};
@define-color color1 {{color1}};
@define-color color2 {{color2}};
@define-color color3 {{color3 | lighten(0.5)}};
@define-color color4 {{color4}};
@define-color color5 {{color5}};
@define-color color6 {{color6}};
@define-color color7 {{color7}};
@define-color color8 {{color8}};
@define-color color9 {{color9}};
@define-color color10 {{color10}};
@define-color color11 {{color11}};
@define-color color12 {{color12}};
@define-color color13 {{color13}};
@define-color color14 {{color14}};
@define-color color15 {{color15}};
@define-color backgroundlight {{color8}};
@define-color backgrounddark {{foreground}};
@define-color workspacesbackground1 {{foreground | darken(0.4)}};
@define-color workspacesbackground2 {{foreground}};
@define-color bordercolor {{color8}};
@define-color textcolor1 {{color8}};
@define-color textcolor2 {{foreground}};
@define-color textcolor3 {{foreground}};
@define-color iconcolor {{foreground}};
@define-color group-background-color rgba({{color2 | rgb}}, 0.3);
@define-color group-border-color rgba({{foreground | rgb}}, 0.8);
@define-color tooltip-background-color rgba({{color1 | rgb}}, 0.95);
@define-color text-base {{foreground}};
@define-color text-alt {{color8}};
* {
font-family: "Fira Sans Semibold", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
border: none;
border-radius: 0px;
}
window#waybar {
background-color: rgba({{background | rgb}}, 0.3);
border: 0px;
color: {{foreground}};
transition-property: background-color;
transition-duration: 0.5s;
}
/* -----------------------------------------------------
* Workspaces
* ----------------------------------------------------- */
#workspaces {
background: @group-background-color;
margin: 5px 1px 6px 1px;
padding: 0px 0.75rem;
border-radius: 24px;
border: 2px solid @group-border-color;
font-weight: bold;
font-style: normal;
font-size: 16px;
}
#workspaces button {
padding: 0px 5px;
margin: 4px 3px;
border-radius: 15px;
border: 0px;
color: @textcolor1;
background-color: @workspacesbackground2;
transition: all 0.3s ease-in-out;
}
#workspaces button.active {
color: @textcolor1;
background: @workspacesbackground2;
border-radius: 15px;
min-width: 40px;
transition: all 0.3s ease-in-out;
opacity: 1;
}
#workspaces button:hover {
color: @textcolor1;
background: @workspacesbackground2;
border-radius: 15px;
opacity: 0.7;
}
/* -----------------------------------------------------
* Tooltips
* ----------------------------------------------------- */
tooltip {
border-radius: 10px;
background-color: @tooltip-background-color;
padding: 20px;
margin: 0px;
border: 1px solid @textcolor2;
}
tooltip label {
color: @textcolor2;
}
/* -----------------------------------------------------
* Window
* ----------------------------------------------------- */
#window {
background: @group-background-color;
border: 2px solid @group-border-color;
margin: 8px 15px 8px 0px;
padding: 2px 10px 0px 10px;
border-radius: 12px;
color: @textcolor2;
font-size: 16px;
font-weight: normal;
}
window#waybar.empty #window {
background-color: transparent;
border: 0px;
}
/* -----------------------------------------------------
* Taskbar
* ----------------------------------------------------- */
#taskbar {
background: @backgroundlight;
margin: 6px 15px 6px 0px;
padding: 0px;
border-radius: 15px;
font-weight: normal;
font-style: normal;
opacity: 0.8;
border: 3px solid @backgroundlight;
}
#taskbar button {
margin: 0;
border-radius: 15px;
padding: 0px 5px 0px 5px;
}
/* -----------------------------------------------------
* Modules
* ----------------------------------------------------- */
.modules-left {
padding-left: 1rem;
}
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
/* -----------------------------------------------------
* Custom Quicklinks
* ----------------------------------------------------- */
#custom-brave,
#custom-browser,
#custom-keybindings,
#custom-outlook,
#custom-filemanager,
#custom-teams,
#custom-chatgpt,
#custom-calculator,
#custom-windowsvm,
#custom-cliphist,
#custom-wallpaper,
#custom-settings,
#custom-wallpaper,
#custom-system,
#custom-waybarthemes {
margin-right: 23px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: @iconcolor;
}
#custom-system {
margin-right: 15px;
}
#custom-wallpaper {
margin-right: 25px;
}
#custom-waybarthemes,
#custom-settings {
margin-right: 20px;
}
#custom-ml4w-welcome {
margin-right: 12px;
background-image: url("../assets/ml4w-icon.png");
background-repeat: no-repeat;
background-position: center;
padding-right: 24px;
}
#custom-ml4w-hyprland-settings {
margin-right: 12px;
background-image: url("../assets/hyprland-icon.png");
background-repeat: no-repeat;
background-position: center;
padding-right: 16px;
}
#custom-chatgpt {
margin-right: 12px;
background-image: url("../assets/ai-icon-20.png");
background-repeat: no-repeat;
background-position: center;
padding-right: 24px;
}
/* -----------------------------------------------------
* Idle Inhibator
* ----------------------------------------------------- */
#idle_inhibitor {
margin-right: 17px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: @iconcolor;
}
#idle_inhibitor.activated {
margin-right: 15px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: #dc2f2f;
}
/* -----------------------------------------------------
* Custom Modules
* ----------------------------------------------------- */
#custom-appmenu {
background-color: @backgrounddark;
font-size: 16px;
color: @textcolor1;
border-radius: 15px;
padding: 0px 10px 0px 10px;
margin: 8px 14px 8px 14px;
opacity: 0.8;
border: 3px solid @bordercolor;
}
/* -----------------------------------------------------
* Custom Exit
* ----------------------------------------------------- */
#custom-exit {
margin: 0px 20px 0px 0px;
padding: 0px;
font-size: 20px;
color: @iconcolor;
}
/* -----------------------------------------------------
* Custom Updates
* ----------------------------------------------------- */
#custom-updates {
background-color: @backgroundlight;
font-size: 16px;
color: @textcolor2;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
opacity: 0.8;
}
#custom-updates.green {
background-color: @backgroundlight;
}
#custom-updates.yellow {
background-color: #ff9a3c;
color: #ffffff;
}
#custom-updates.red {
background-color: #dc2f2f;
color: #ffffff;
}
/* -----------------------------------------------------
* Custom Youtube
* ----------------------------------------------------- */
#custom-youtube {
background-color: @backgroundlight;
font-size: 16px;
color: @textcolor2;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
opacity: 0.8;
}
/* -----------------------------------------------------
* Hardware Group
* ----------------------------------------------------- */
#disk,
#memory,
#cpu,
#language {
margin: 0px;
padding: 0px;
font-size: 16px;
color: @iconcolor;
}
#language {
margin-right: 10px;
}
/* -----------------------------------------------------
* Clock
* ----------------------------------------------------- */
#clock {
background-color: @group-background-color;
font-size: 16px;
color: @text-base;
border-radius: 15px;
padding: 1px 10px 0px 10px;
margin: 8px 15px 8px 0px;
border: 3px solid @group-border-color;
}
/* -----------------------------------------------------
* Pulseaudio
* ----------------------------------------------------- */
#pulseaudio {
background-color: @group-background-color;
font-size: 16px;
border: 2px solid @group-border-color;
color: @textcolor2;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
}
#pulseaudio.muted {
color: @color3;
border-color: @color3;
}
/* -----------------------------------------------------
* Network
* ----------------------------------------------------- */
#network {
background-color: @group-background-color;
border: 2px solid @group-border-color;
font-size: 16px;
color: @text-base;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
}
/* -----------------------------------------------------
* Bluetooth
* ----------------------------------------------------- */
#bluetooth,
#bluetooth.on,
#bluetooth.connected {
background-color: @group-background-color;
border: 2px solid @group-border-color;
font-size: 16px;
color: @text-base;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
}
#bluetooth.off {
background-color: transparent;
padding: 0px;
margin: 0px;
}
/* -----------------------------------------------------
* Battery
* ----------------------------------------------------- */
#battery {
background-color: @group-background-color;
border: 2px solid @group-border-color;
font-size: 16px;
color: @text-base;
border-radius: 15px;
padding: 2px 15px 0px 10px;
margin: 8px 15px 8px 0px;
opacity: 0.8;
}
#battery.charging,
#battery.plugged {
color: @text-base;
}
@keyframes blink {
to {
background-color: @backgroundlight;
color: @textcolor2;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: @textcolor3;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
/* -----------------------------------------------------
* Tray
* ----------------------------------------------------- */
#tray {
padding: 0px 15px 0px 0px;
color: @textcolor3;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#custom-notification {
font-family: "NotoSansMono Nerd Font";
margin-right: 20px;
margin-left: 20px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: @iconcolor;
}

View file

@ -1,20 +0,0 @@
@define-color foreground {{foreground}};
@define-color background {{background}};
@define-color cursor {{cursor}};
@define-color color0 {{color0}};
@define-color color1 {{color1}};
@define-color color2 {{color2}};
@define-color color3 {{color3}};
@define-color color4 {{color4}};
@define-color color5 {{color5}};
@define-color color6 {{color6}};
@define-color color7 {{color7}};
@define-color color8 {{color8}};
@define-color color9 {{color9}};
@define-color color10 {{color10}};
@define-color color11 {{color11}};
@define-color color12 {{color12}};
@define-color color13 {{color13}};
@define-color color14 {{color14}};
@define-color color15 {{color15}};

View file

@ -1,127 +0,0 @@
{ pkgs, unstable, lib, config, ... }:
let
cfg = config.profile.hyprland;
inherit (lib.meta) getExe;
wallust = cfg.wallust;
wallpaperDir = "${config.home.homeDirectory}/.cache/wallpaper";
initWallPaperScript = pkgs.writeShellScriptBin "init-wallpaper.sh" ''
init_wallpaper="${./wallpaper.jpeg}"
cache_file="${wallpaperDir}/current"
blurred="${wallpaperDir}/blurred.png"
square="${wallpaperDir}/square.png"
mkdir -p "${wallpaperDir}"
if [ ! -f "$cache_file" ]; then
cp "$init_wallpaper" "$cache_file"
fi
if [ ! -f "$blurred" ]; then
${pkgs.graphicsmagick}/bin/gm convert -resize 75% -blur 50x30 "$cache_file" "$blurred"
fi
if [ ! -f "$square" ]; then
${pkgs.imagemagick}/bin/magick "$cache_file" -resize 25% -gravity Center -extent 1:1 "$square"
fi
if [ ! -f "${config.home.homeDirectory}/.cache/wallust/sequences" ]; then
wallust run "$cache_file"
fi
'';
in
{
config = lib.mkIf cfg.enable {
home.packages = [
pkgs.imagemagick
unstable.wallust
];
wayland.windowManager.hyprland.settings.exec-once = lib.mkOrder 10 ([
(getExe initWallPaperScript)
]);
home.file.".config/wallust/templates" = {
source = ./wallust-templates;
recursive = true;
};
home.file.".config/wallust/wallust.toml".source = ((pkgs.formats.toml { }).generate "wallust.toml" {
# See https://codeberg.org/explosion-mental/wallust/src/branch/master/wallust.toml
# for more information about the configuration options.
# How the image is parse, in order to get the colors:
# full - resized - wal - thumb - fastresize - kmeans
backend = wallust.backend;
# What color space to use to produce and select the most prominent colors:
# lab - labmixed - lch - lchmixed
color_space = wallust.colorSpace;
threshold = wallust.threshold;
# Use the most prominent colors in a way that makes sense, a scheme color palette:
# dark - dark16 - darkcomp - darkcomp16
# light - light16 - lightcomp - lightcomp16
# harddark - harddark16 - harddarkcomp - harddarkcomp16
# softdark - softdark16 - softdarkcomp - softdarkcomp16
# softlight - softlight16 - softlightcomp - softlightcomp16
palette = wallust.palette;
# Ensures a "readable contrast" (OPTIONAL, disabled by default)
# Should only be enabled when you notice an unreadable contrast frequently happening
# with your images. The reference color for the contrast is the background color.
check_contrast = wallust.checkContrast;
# Color saturation, between [1% and 100%] (OPTIONAL, disabled by default)
# usually something higher than 50 increases the saturation and below
# decreases it (on a scheme with strong and vivid colors)
# saturation = 50;
# Alpha value for templating, by default 100 (no other use whatsoever)
alpha = wallust.alpha;
templates =
# Templates requires certain syntax
#
# See: https://codeberg.org/explosion-mental/wallust/wiki/wallust.1-Man-Page
# Note that the documentation is for 3.x and above.
let
out = config.home.homeDirectory + "/.cache/wallust";
in
{
waybar = {
template = "waybar.css";
# target = out + "/waybar.css";
target = "${config.home.homeDirectory}/.config/waybar/style.css";
};
wlogout = {
template = "wlogout.css";
target = out + "/wlogout.css";
};
hyprland = {
template = "hyprland.conf";
target = out + "/hyprland.conf";
};
kitty = {
template = "kitty.conf";
target = "${config.home.homeDirectory}/.config/kitty/kitty.d/99-colors.conf";
};
base16-nvim = {
template = "base16-nvim.lua";
target = out + "/base16-nvim.lua";
};
rofi = {
template = "rofi.rasi";
target = out + "/rofi.rasi";
};
alacritty = {
template = "alacritty.toml";
target = out + "/alacritty.toml";
};
foot = {
template = "foot.ini";
target = "${config.home.homeDirectory}/.config/foot/colors.ini";
};
};
});
};
}

View file

@ -0,0 +1,52 @@
{ config, lib, ... }:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf (cfg.enable && config.programs.alacritty.enable) {
home.file.".config/wallust/templates/alacritty.toml".text =
# toml
''
[window]
opacity = {{alpha/100}}
[colors]
[colors.primary]
background = "{{background}}"
foreground = "{{foreground}}"
[colors.cursor]
text = "CellForeground"
cursor = "{{cursor}}"
[colors.bright]
black = "{{color0}}"
red = "{{color1}}"
green = "{{color2}}"
yellow = "{{color3}}"
blue = "{{color4}}"
magenta = "{{color5}}"
cyan = "{{color6}}"
white = "{{color7}}"
[colors.normal]
black = "{{color8}}"
red = "{{color9}}"
green = "{{color10}}"
yellow = "{{color11}}"
blue = "{{color12}}"
magenta = "{{color13}}"
cyan = "{{color14}}"
white = "{{color15}}"
'';
profile.hyprland.wallust.settings.templates.alacritty =
let
out = config.home.homeDirectory + "/.cache/wallust";
in
{
template = "alacritty.toml";
target = "${out}/alacritty.toml";
};
};
}

View file

@ -0,0 +1,73 @@
{ pkgs
, unstable
, lib
, config
, ...
}:
let
cfg = config.profile.hyprland;
inherit (lib.meta) getExe;
wallpaperDir = "${config.home.homeDirectory}/.cache/wallpaper";
initWallPaperScript =
pkgs.writeShellScriptBin "init-wallpaper.sh"
# sh
''
init_wallpaper="${./wallpaper.jpeg}"
cache_file="${wallpaperDir}/current"
blurred="${wallpaperDir}/blurred.png"
square="${wallpaperDir}/square.png"
mkdir -p "${wallpaperDir}"
if [ ! -f "$cache_file" ]; then
cp "$init_wallpaper" "$cache_file"
fi
if [ ! -f "$blurred" ]; then
${pkgs.graphicsmagick}/bin/gm convert -resize 75% -blur 50x30 "$cache_file" "$blurred"
fi
if [ ! -f "$square" ]; then
${pkgs.imagemagick}/bin/magick "$cache_file" -resize 25% -gravity Center -extent 1:1 "$square"
fi
if [ ! -f "${config.home.homeDirectory}/.cache/wallust/sequences" ]; then
wallust run "$cache_file"
fi
'';
in
{
imports = [
./alacritty.nix
./foot.nix
./hyprland.nix
./kitty.nix
./rofi.nix
./waybar.nix
./wlogout.nix
];
config = lib.mkIf cfg.enable {
home.packages = [
pkgs.imagemagick
unstable.wallust
];
wayland.windowManager.hyprland.settings.exec-once = lib.mkOrder 10 ([
(getExe initWallPaperScript)
]);
# See https://codeberg.org/explosion-mental/wallust/src/branch/master/wallust.toml
home.file.".config/wallust/wallust.toml".source = (
(pkgs.formats.toml { }).generate "wallust.toml"
{
backend = "kmeans";
color_space = "lch";
alpha = 100;
threshold = 1;
palette = "dark";
checkContrast = true;
} // cfg.wallust.settings
);
};
}

View file

@ -0,0 +1,43 @@
{ config, lib, ... }:
let
cfg = config.profile.hyprland;
inherit (lib.generators) toINI;
in
{
config = lib.mkIf cfg.enable {
home.file.".config/wallust/templates/foot.ini".text = (toINI { }) {
colors = {
alpha = "{{ alpha/100 }}";
background = "{{ background | strip }}";
foreground = "{{ foreground | strip }}";
flash = "{{ color2 | strip }}";
flash-alpha = "0.5";
regular0 = "{{ color0 | strip }}";
regular1 = "{{ color1 | strip }}";
regular2 = "{{ color2 | strip }}";
regular3 = "{{ color3 | strip }}";
regular4 = "{{ color4 | strip }}";
regular5 = "{{ color5 | strip }}";
regular6 = "{{ color6 | strip }}";
regular7 = "{{ color7 | strip }}";
bright0 = "{{ color8 | strip }}";
bright1 = "{{ color9 | strip }}";
bright2 = "{{ color10 | strip }}";
bright3 = "{{ color11 | strip }}";
bright4 = "{{ color12 | strip }}";
bright5 = "{{ color13 | strip }}";
bright6 = "{{ color14 | strip }}";
bright7 = "{{ color15 | strip }}";
};
};
profile.hyprland.wallust.settings.templates.foot =
let
out = config.home.homeDirectory + "/.cache/wallust";
in
{
template = "foot.ini";
target = out + "/foot.ini";
};
};
}

View file

@ -0,0 +1,47 @@
{ config, lib, ... }:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf cfg.enable {
home.file.".config/wallust/templates/hyprland.conf".text =
# hyprlang
''
$background = rgb({{background | strip}})
$foreground = rgb({{foreground | strip}})
$color0 = rgb({{color0 | strip}})
$color1 = rgb({{color1 | strip}})
$color2 = rgb({{color2 | strip}})
$color3 = rgb({{color3 | strip}})
$color4 = rgb({{color4 | strip}})
$color5 = rgb({{color5 | strip}})
$color6 = rgb({{color6 | strip}})
$color7 = rgb({{color7 | strip}})
$color8 = rgb({{color8 | strip}})
$color9 = rgb({{color9 | strip}})
$color10 = rgb({{color10 | strip}})
$color11 = rgb({{color11 | strip}})
$color12 = rgb({{color12 | strip}})
$color13 = rgb({{color13 | strip}})
$color14 = rgb({{color14 | strip}})
$color15 = rgb({{color15 | strip}})
general {
col.inactive_border = $color11
}
decoration {
inactive_opacity = {{alpha / 100}}
}
'';
profile.hyprland.wallust.settings.templates.hyprland =
let
out = config.home.homeDirectory + "/.cache/wallust";
in
{
template = "hyprland.conf";
target = out + "/hyprland.conf";
};
};
}

View file

@ -0,0 +1,47 @@
{ config, lib, ... }:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf (cfg.enable && config.programs.kitty.enable) {
home.file.".config/wallust/templates/kitty.conf".text =
# css
''
foreground {{foreground}}
background {{background}}
background_opacity {{ alpha / 100 }}
cursor {{cursor}}
active_tab_foreground {{background}}
active_tab_background {{foreground}}
inactive_tab_foreground {{foreground}}
inactive_tab_background {{background}}
active_border_color {{foreground}}
inactive_border_color {{background}}
bell_border_color {{color1}}
color0 {{color0}}
color1 {{color1}}
color2 {{color2}}
color3 {{color3}}
color4 {{color4}}
color5 {{color5}}
color6 {{color6}}
color7 {{color7}}
color8 {{color8}}
color9 {{color9}}
color10 {{color10}}
color11 {{color11}}
color12 {{color12}}
color13 {{color13}}
color14 {{color14}}
color15 {{color15}}
'';
profile.hyprland.wallust.settings.templates.kitty = {
template = "kitty.conf";
target = "${config.home.homeDirectory}/.config/kitty/kitty.d/99-colors.conf";
};
};
}

View file

@ -0,0 +1,43 @@
{ config, lib, ... }:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf (cfg.enable && config.profile.kitty.enable) {
home.file.".config/wallust/templates/rofi.rasi".text =
# css
''
* {
background: rgba(0,0,1,0.5);
foreground: #FFFFFF;
color0: {{color0}};
color1: {{color1}};
color2: {{color2}};
color3: {{color3}};
color4: {{color4}};
color5: {{color5}};
color6: {{color6}};
color7: {{color7}};
color8: {{color8}};
color9: {{color9}};
color10: {{color10}};
color11: {{color11}};
color12: {{color12}};
color13: {{color13}};
color14: {{color14}};
color15: {{color15}};
border-width: 3px;
current-image: url("${config.home.homeDirectory}/.cache/wallpaper/blurred.png", height);
}
'';
profile.hyprland.wallust.settings.templates.rofi =
let
out = config.home.homeDirectory + "/.cache/wallust";
in
{
template = "rofi.rasi";
target = "${out}/rofi.rasi";
};
};
}

View file

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -0,0 +1,426 @@
{ config, lib, ... }:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf cfg.enable {
home.file.".config/wallust/templates/waybar.css".text = # css
''
@define-color foreground {{foreground}};
@define-color background {{background}};
@define-color cursor {{cursor}};
@define-color color0 {{color0}};
@define-color color1 {{color1}};
@define-color color2 {{color2}};
@define-color color3 {{color3 | lighten(0.5)}};
@define-color color4 {{color4}};
@define-color color5 {{color5}};
@define-color color6 {{color6}};
@define-color color7 {{color7}};
@define-color color8 {{color8}};
@define-color color9 {{color9}};
@define-color color10 {{color10}};
@define-color color11 {{color11}};
@define-color color12 {{color12}};
@define-color color13 {{color13}};
@define-color color14 {{color14}};
@define-color color15 {{color15}};
@define-color backgroundlight {{color8}};
@define-color backgrounddark {{foreground}};
@define-color workspacesbackground1 {{foreground | darken(0.4)}};
@define-color workspacesbackground2 {{foreground}};
@define-color bordercolor {{color8}};
@define-color textcolor1 {{color8}};
@define-color textcolor2 {{foreground}};
@define-color textcolor3 {{foreground}};
@define-color iconcolor {{foreground}};
@define-color group-background-color rgba({{color2 | rgb}}, 0.3);
@define-color group-border-color rgba({{foreground | rgb}}, 0.8);
@define-color tooltip-background-color rgba({{color1 | rgb}}, 0.95);
@define-color text-base {{foreground}};
@define-color text-alt {{color8}};
* {
font-family: "Fira Sans Semibold", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
border: none;
border-radius: 0px;
}
window#waybar {
background-color: rgba({{background | rgb}}, 0.3);
border: 0px;
color: {{foreground}};
transition-property: background-color;
transition-duration: 0.5s;
}
/* -----------------------------------------------------
* Workspaces
* ----------------------------------------------------- */
#workspaces {
background: @group-background-color;
margin: 5px 1px 6px 1px;
padding: 0px 0.75rem;
border-radius: 24px;
border: 2px solid @group-border-color;
font-weight: bold;
font-style: normal;
font-size: 16px;
}
#workspaces button {
padding: 0px 5px;
margin: 4px 3px;
border-radius: 15px;
border: 0px;
color: @textcolor1;
background-color: @workspacesbackground2;
transition: all 0.3s ease-in-out;
}
#workspaces button.active {
color: @textcolor1;
background: @workspacesbackground2;
border-radius: 15px;
min-width: 40px;
transition: all 0.3s ease-in-out;
opacity: 1;
}
#workspaces button:hover {
color: @textcolor1;
background: @workspacesbackground2;
border-radius: 15px;
opacity: 0.7;
}
/* -----------------------------------------------------
* Tooltips
* ----------------------------------------------------- */
tooltip {
border-radius: 10px;
background-color: @tooltip-background-color;
padding: 20px;
margin: 0px;
border: 1px solid @textcolor2;
}
tooltip label {
color: @textcolor2;
}
/* -----------------------------------------------------
* Window
* ----------------------------------------------------- */
#window {
background: @group-background-color;
border: 2px solid @group-border-color;
margin: 8px 15px 8px 0px;
padding: 2px 10px 0px 10px;
border-radius: 12px;
color: @textcolor2;
font-size: 16px;
font-weight: normal;
}
window#waybar.empty #window {
background-color: transparent;
border: 0px;
}
/* -----------------------------------------------------
* Taskbar
* ----------------------------------------------------- */
#taskbar {
background: @backgroundlight;
margin: 6px 15px 6px 0px;
padding: 0px;
border-radius: 15px;
font-weight: normal;
font-style: normal;
opacity: 0.8;
border: 3px solid @backgroundlight;
}
#taskbar button {
margin: 0;
border-radius: 15px;
padding: 0px 5px 0px 5px;
}
/* -----------------------------------------------------
* Modules
* ----------------------------------------------------- */
.modules-left {
padding-left: 1rem;
}
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
/* -----------------------------------------------------
* Custom Quicklinks
* ----------------------------------------------------- */
#custom-brave,
#custom-browser,
#custom-keybindings,
#custom-outlook,
#custom-filemanager,
#custom-teams,
#custom-chatgpt,
#custom-calculator,
#custom-windowsvm,
#custom-cliphist,
#custom-wallpaper,
#custom-settings,
#custom-wallpaper,
#custom-system,
#custom-waybarthemes {
margin-right: 23px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: @iconcolor;
}
#custom-system {
margin-right: 15px;
}
#custom-wallpaper {
margin-right: 25px;
}
#custom-waybarthemes,
#custom-settings {
margin-right: 20px;
}
#custom-ml4w-welcome {
margin-right: 12px;
background-image: url("../assets/ml4w-icon.png");
background-repeat: no-repeat;
background-position: center;
padding-right: 24px;
}
#custom-ml4w-hyprland-settings {
margin-right: 12px;
background-image: url("../assets/hyprland-icon.png");
background-repeat: no-repeat;
background-position: center;
padding-right: 16px;
}
#custom-chatgpt {
margin-right: 12px;
background-image: url("../assets/ai-icon-20.png");
background-repeat: no-repeat;
background-position: center;
padding-right: 24px;
}
/* -----------------------------------------------------
* Idle Inhibator
* ----------------------------------------------------- */
#idle_inhibitor {
margin-right: 17px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: @iconcolor;
}
#idle_inhibitor.activated {
margin-right: 15px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: #dc2f2f;
}
/* -----------------------------------------------------
* Custom Modules
* ----------------------------------------------------- */
#custom-appmenu {
background-color: @backgrounddark;
font-size: 16px;
color: @textcolor1;
border-radius: 15px;
padding: 0px 10px 0px 10px;
margin: 8px 14px 8px 14px;
opacity: 0.8;
border: 3px solid @bordercolor;
}
/* -----------------------------------------------------
* Custom Exit
* ----------------------------------------------------- */
#custom-exit {
margin: 0px 20px 0px 0px;
padding: 0px;
font-size: 20px;
color: @iconcolor;
}
/* -----------------------------------------------------
* Clock
* ----------------------------------------------------- */
#clock {
background-color: @group-background-color;
font-size: 16px;
color: @text-base;
border-radius: 15px;
padding: 1px 10px 0px 10px;
margin: 8px 15px 8px 0px;
border: 3px solid @group-border-color;
}
/* -----------------------------------------------------
* Pulseaudio
* ----------------------------------------------------- */
#pulseaudio {
background-color: @group-background-color;
font-size: 16px;
border: 2px solid @group-border-color;
color: @textcolor2;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
}
#pulseaudio.muted {
color: @color3;
border-color: @color3;
}
/* -----------------------------------------------------
* Network
* ----------------------------------------------------- */
#network {
background-color: @group-background-color;
border: 2px solid @group-border-color;
font-size: 16px;
color: @text-base;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
}
/* -----------------------------------------------------
* Bluetooth
* ----------------------------------------------------- */
#bluetooth,
#bluetooth.on,
#bluetooth.connected {
background-color: @group-background-color;
border: 2px solid @group-border-color;
font-size: 16px;
color: @text-base;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
}
#bluetooth.off {
background-color: transparent;
padding: 0px;
margin: 0px;
}
/* -----------------------------------------------------
* Battery
* ----------------------------------------------------- */
#battery {
background-color: @group-background-color;
border: 2px solid @group-border-color;
font-size: 16px;
color: @text-base;
border-radius: 15px;
padding: 2px 15px 0px 10px;
margin: 8px 15px 8px 0px;
opacity: 0.8;
}
#battery.charging,
#battery.plugged {
color: @text-base;
}
@keyframes blink {
to {
background-color: @backgroundlight;
color: @textcolor2;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: @textcolor3;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
/* -----------------------------------------------------
* Tray
* ----------------------------------------------------- */
#tray {
padding: 0px 15px 0px 0px;
color: @textcolor3;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#custom-notification {
font-family: "NotoSansMono Nerd Font";
margin-right: 20px;
margin-left: 20px;
font-size: 20px;
font-weight: bold;
opacity: 0.8;
color: @iconcolor;
}
'';
profile.hyprland.wallust.settings.templates.waybar =
let
out = config.home.homeDirectory + "/.cache/wallust";
in
{
template = "waybar.css";
target = out + "/waybar.css";
};
};
}

View file

@ -0,0 +1,46 @@
{ config, lib, ... }:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf cfg.enable {
home.file.".config/wallust/templates/wlogout.css".text = # css
''
@define-color foreground {{foreground}};
@define-color background {{background}};
@define-color cursor {{cursor}};
@define-color color0 {{color0}};
@define-color color1 {{color1}};
@define-color color2 {{color2}};
@define-color color3 {{color3}};
@define-color color4 {{color4}};
@define-color color5 {{color5}};
@define-color color6 {{color6}};
@define-color color7 {{color7}};
@define-color color8 {{color8}};
@define-color color9 {{color9}};
@define-color color10 {{color10}};
@define-color color11 {{color11}};
@define-color color12 {{color12}};
@define-color color13 {{color13}};
@define-color color14 {{color14}};
@define-color color15 {{color15}};
window {
background: url("${config.home.homeDirectory}/.cache/wallpaper/blurred.png");
background-size: cover;
}
'';
profile.hyprland.wallust.settings.templates.wlogout =
let
out = config.home.homeDirectory + "/.cache/wallust";
in
{
template = "wlogout.css";
target = out + "/wlogout.css";
};
};
}

View file

@ -1,4 +1,10 @@
{ lib, config, unstable, pkgs, ... }:
{
lib,
config,
unstable,
pkgs,
...
}:
let
cfg = config.profile.hyprland;
modules = (pkgs.formats.json { }).generate "modules.json" {
@ -16,7 +22,11 @@ let
phone = " ";
portable = " ";
car = " ";
default = [ " " " " " " ];
default = [
" "
" "
" "
];
};
on-click = "pavucontrol";
};
@ -37,7 +47,13 @@ let
format-charging = " {capacity}%";
format-plugged = " {capacity}%";
format-alt = "{icon} {time}";
format-icons = [ " " " " " " " " " " ];
format-icons = [
" "
" "
" "
" "
" "
];
};
network = {
format = "{ifname}";
@ -58,7 +74,6 @@ let
tooltip = false;
};
"hyprland/workspaces" = {
on-click = "activate";
active-only = false;
@ -164,12 +179,8 @@ in
margin-right = 0;
spacing = 0;
reload_style_on_change = true;
include = [
modules
];
modules-left = [
"hyprland/window"
];
include = [ modules ];
modules-left = [ "hyprland/window" ];
modules-center = [
"hyprland/workspaces"
"custom/notification"
@ -193,5 +204,3 @@ in
};
};
}

View file

@ -9,100 +9,97 @@ in
recursive = true;
};
programs.wlogout = {
style = ''
/* -----------------------------------------------------
* Import Pywal colors
* ----------------------------------------------------- */
@import "${config.home.homeDirectory}/.cache/wallust/wlogout.css";
style =
# css
''
/* -----------------------------------------------------
* Import Pywal colors
* ----------------------------------------------------- */
@import "${config.home.homeDirectory}/.cache/wallust/wlogout.css";
/* -----------------------------------------------------
* General
* ----------------------------------------------------- */
/* -----------------------------------------------------
* General
* ----------------------------------------------------- */
* {
font-family: "Fira Sans Semibold", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
background-image: none;
transition: 20ms;
box-shadow: none;
}
* {
font-family: "Fira Sans Semibold", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
background-image: none;
transition: 20ms;
box-shadow: none;
}
window {
background: url("../../.cache/blurred_wallpaper.png");
background-size: cover;
}
button {
color: #ffffff;
font-size: 20px;
button {
color: #ffffff;
font-size: 20px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
border-style: solid;
background-color: rgba(12, 12, 12, 0.3);
border: 3px solid #ffffff;
border-style: solid;
background-color: rgba(12, 12, 12, 0.3);
border: 3px solid #ffffff;
box-shadow:
0 4px 8px 0 rgba(0, 0, 0, 0.2),
0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
box-shadow:
0 4px 8px 0 rgba(0, 0, 0, 0.2),
0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
button:focus,
button:active,
button:hover {
color: @color11;
background-color: rgba(12, 12, 12, 0.5);
border: 3px solid @color11;
}
button:focus,
button:active,
button:hover {
color: @color11;
background-color: rgba(12, 12, 12, 0.5);
border: 3px solid @color11;
}
/*
-----------------------------------------------------
Buttons
-----------------------------------------------------
*/
/*
-----------------------------------------------------
Buttons
-----------------------------------------------------
*/
#lock {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/lock.png"));
}
#lock {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/lock.png"));
}
#logout {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/logout.png"));
}
#logout {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/logout.png"));
}
#suspend {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/suspend.png"));
}
#suspend {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/suspend.png"));
}
#hibernate {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/hibernate.png"));
}
#hibernate {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/hibernate.png"));
}
#shutdown {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/shutdown.png"));
}
#shutdown {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/shutdown.png"));
}
#reboot {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/reboot.png"));
}
'';
#reboot {
margin: 10px;
border-radius: 20px;
background-image: image(url("icons/reboot.png"));
}
'';
enable = true;
layout = [
{
label = "lock";
action = "hyprlock";
action = "loginctl lock-session";
text = "Lock";
keybind = "l";
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
let
cfg = config.profile.obs;
in

View file

@ -1,14 +1,15 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
let
cfg = config.profile.bitwarden;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
bitwarden
];
home.packages = with pkgs; [ bitwarden ];
home.file = {
".config/autostart/bitwarden.desktop" = lib.mkIf cfg.autostart {

View file

@ -1,12 +1,13 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
let
cfg = config.profile.home.programs.bruno;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
bruno
];
};
config = mkIf cfg.enable { home.packages = with pkgs; [ bruno ]; };
}

View file

@ -1,9 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.dbeaver;
in
{
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.dbeaver-bin ];
};
config = lib.mkIf cfg.enable { home.packages = [ pkgs.dbeaver-bin ]; };
}

View file

@ -1,32 +1,41 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (lib) mkIf;
inherit (lib.meta) getExe;
cfg = config.profile.discord;
autostartScript =
pkgs.writeShellScriptBin "discord.sh" # sh
''
sleep 10;
until ${pkgs.unixtools.ping}/bin/ping -c 1 discord.com;
do sleep 1;
done;
vesktop
'';
autostartScriptFile = getExe autostartScript;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
vesktop
];
home.packages = with pkgs; [ vesktop ];
home.file = {
".config/discord/settings.json".text = builtins.toJSON {
SKIP_HOST_UPDATE = true;
};
};
home.file.".config/discord/settings.json".text = builtins.toJSON { SKIP_HOST_UPDATE = true; };
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [
"sleep 10; until ${pkgs.unixtools.ping}/bin/ping -c 1 discord.com; do sleep 1; done; vesktop"
];
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [ autostartScriptFile ];
home.file.".config/autostart/discord.sh" = lib.mkIf cfg.autostart { source = autostartScriptFile; };
services.swaync.settings.scripts._10-discord =
let
script = pkgs.callPackage ../../scripts/hyprland/focus-window.nix { };
focusWindowScript = pkgs.callPackage ../../scripts/hyprland/focus-window.nix { };
in
{
app-name = "(?=discord|vesktop)";
exec = "${getExe script}";
exec = "${getExe focusWindowScript}";
run-on = "action";
};
};

View file

@ -1,9 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.programs.easyeffects;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ easyeffects ];
};
config = lib.mkIf cfg.enable { home.packages = with pkgs; [ easyeffects ]; };
}

View file

@ -1,12 +1,13 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
let
cfg = config.profile.home.programs.elisa;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
kdePackages.elisa
];
};
config = mkIf cfg.enable { home.packages = with pkgs; [ kdePackages.elisa ]; };
}

View file

@ -21,18 +21,19 @@ in
};
};
programs.zsh.initExtra = /*bash*/ ''
function osc7-pwd() {
emulate -L zsh # also sets localoptions for us
setopt extendedglob
local LC_ALL=C
printf '\e]7;file://%s%s\e\' $HOST ''${PWD//(#m)([^@-Za-z&-;_~])/%''${(l:2::0:)$(([##16]#MATCH))}}
}
programs.zsh.initExtra = # bash
''
function osc7-pwd() {
emulate -L zsh # also sets localoptions for us
setopt extendedglob
local LC_ALL=C
printf '\e]7;file://%s%s\e\' $HOST ''${PWD//(#m)([^@-Za-z&-;_~])/%''${(l:2::0:)$(([##16]#MATCH))}}
}
function chpwd-osc7-pwd() {
(( ZSH_SUBSHELL )) || osc7-pwd
}
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
'';
function chpwd-osc7-pwd() {
(( ZSH_SUBSHELL )) || osc7-pwd
}
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
'';
};
}

View file

@ -85,30 +85,14 @@
"#f4dbd6"
"bold"
];
inactiveBorderColor = [
"#a5adcb"
];
optionsTextColor = [
"#8aadf4"
];
selectedLineBgColor = [
"#363a4f"
];
cherryPickedCommitBgColor = [
"#494d64"
];
cherryPickedCommitFgColor = [
"#f4dbd6"
];
unstagedChangesColor = [
"#ed8796"
];
defaultFgColor = [
"#cad3f5"
];
searchingActiveBorderColor = [
"#eed49f"
];
inactiveBorderColor = [ "#a5adcb" ];
optionsTextColor = [ "#8aadf4" ];
selectedLineBgColor = [ "#363a4f" ];
cherryPickedCommitBgColor = [ "#494d64" ];
cherryPickedCommitFgColor = [ "#f4dbd6" ];
unstagedChangesColor = [ "#ed8796" ];
defaultFgColor = [ "#cad3f5" ];
searchingActiveBorderColor = [ "#eed49f" ];
};
};
};

View file

@ -1,9 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.gh;
in
{
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.gh ];
};
config = lib.mkIf cfg.enable { home.packages = [ pkgs.gh ]; };
}

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, unstable, ... }:
{
config,
lib,
pkgs,
unstable,
...
}:
let
cfg = config.profile.go;
impl = pkgs.buildGoModule rec {
@ -17,9 +23,7 @@ in
config = lib.mkIf cfg.enable {
programs.go = {
enable = true;
goPrivate = [
"gitlab.bareksa.com"
];
goPrivate = [ "gitlab.bareksa.com" ];
package = unstable.go_1_23;
};
home.packages = with pkgs; [

View file

@ -1,11 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.jellyfin;
in
{
config = lib.mkIf cfg.enable {
home.packages = [
pkgs.jellyfin-media-player
];
};
config = lib.mkIf cfg.enable { home.packages = [ pkgs.jellyfin-media-player ]; };
}

View file

@ -4,11 +4,12 @@ let
in
{
config = lib.mkIf cfg.enable {
programs.zsh.initExtra = /*bash*/ ''
if [[ "$TERM" == "xterm-kitty" ]]; then
alias ssh="kitty +kitten ssh"
fi
'';
programs.zsh.initExtra = # bash
''
if [[ "$TERM" == "xterm-kitty" ]]; then
alias ssh="kitty +kitten ssh"
fi
'';
programs.kitty = {
enable = true;
settings = {
@ -24,7 +25,7 @@ in
tab_bar_margin_width = toString 0.2;
tab_bar_style = "slant";
background_blur = 40;
background_opacity = toString 0.90;
background_opacity = toString 0.9;
cursor_blink_interval = toString 0.5;
};
keybindings = {

View file

@ -1,9 +1,12 @@
{ config, lib, unstable, ... }:
{
config,
lib,
unstable,
...
}:
let
cfg = config.profile.microsoft-edge;
in
{
config = lib.mkIf cfg.enable {
home.packages = [ unstable.microsoft-edge ];
};
config = lib.mkIf cfg.enable { home.packages = [ unstable.microsoft-edge ]; };
}

View file

@ -1,11 +1,18 @@
{ config, lib, unstable, ... }:
{
config,
lib,
unstable,
...
}:
let
cfg = config.profile.programs.mongodb-compass;
sopsFile = ../../secrets/bareksa.yaml;
in
{
config = lib.mkIf cfg.enable {
sops.secrets."bareksa/mongodb-compass" = { inherit sopsFile; };
sops.secrets."bareksa/mongodb-compass" = {
inherit sopsFile;
};
home.packages = [ unstable.mongodb-compass ];
};
}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.mpv;
in

View file

@ -1,12 +1,16 @@
{ config, unstable, pkgs, lib, ... }:
{
config,
unstable,
pkgs,
lib,
...
}:
let
cfg = config.profile.neovide;
in
{
config = lib.mkIf cfg.enable {
home.packages = [
unstable.neovide
];
home.packages = [ unstable.neovide ];
home.file.".config/neovide/config.toml".source =
let

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, unstable, ... }:
{
config,
pkgs,
lib,
unstable,
...
}:
let
cfg = config.profile.neovim;
inherit (lib) mkIf;
@ -22,21 +28,23 @@ in
ping = "${pkgs.unixtools.ping}/bin/ping";
host = "github.com";
sleep = "${pkgs.coreutils}/bin/sleep";
script = pkgs.writeScriptBin "clone-nvim.sh" /*bash*/ ''
#!${bash}
script =
pkgs.writeScriptBin "clone-nvim.sh" # bash
''
#!${bash}
if [ -d "${nvimCloneDir}" ]; then
exit 0;
fi
if [ -d "${nvimCloneDir}" ]; then
exit 0;
fi
until ${ping} -c 1 ${host}; do
${sleep} 1;
done
until ${ping} -c 1 ${host}; do
${sleep} 1;
done
mkdir -p ${nvimCloneDir}
mkdir -p ${nvimCloneDir}
${git} clone ${repository} ${nvimCloneDir}
'';
${git} clone ${repository} ${nvimCloneDir}
'';
path = "${script}/bin/clone-nvim.sh";
in
{

View file

@ -1,9 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.nextcloud;
in
{
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.nextcloud-client ];
};
config = lib.mkIf cfg.enable { home.packages = [ pkgs.nextcloud-client ]; };
}

View file

@ -3,7 +3,5 @@ let
cfg = config.profile.nnn;
in
{
config = lib.mkIf cfg.enable {
programs.nnn.enable = true;
};
config = lib.mkIf cfg.enable { programs.nnn.enable = true; };
}

View file

@ -1,12 +1,13 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.home.programs.obsidian;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
obsidian
];
};
config = mkIf cfg.enable { home.packages = with pkgs; [ obsidian ]; };
}

View file

@ -1,12 +1,11 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.services.redis;
inherit (lib) mkIf;
in
lib.mkMerge [
(mkIf cfg.client.cli.enable {
home.packages = [
pkgs.redis
];
})
]
lib.mkMerge [ (mkIf cfg.client.cli.enable { home.packages = [ pkgs.redis ]; }) ]

View file

@ -1,19 +1,33 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
let
cfg = config.profile.slack;
script = pkgs.writeShellScriptBin "slack.sh" ''
autostartScript = pkgs.writeShellScriptBin "slack.sh" ''
sleep 10; until ${pkgs.unixtools.ping}/bin/ping -c 1 1.1.1.1; do sleep 1; done; slack
'';
scriptFile = lib.meta.getExe script;
inherit (lib.meta) getExe;
autostartScriptFile = getExe autostartScript;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ slack ];
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [
scriptFile
];
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [ autostartScriptFile ];
home.file.".config/autostart/slack.sh".source = lib.mkIf cfg.autostart scriptFile;
home.file.".config/autostart/slack.sh" = lib.mkIf cfg.autostart { source = autostartScriptFile; };
services.swaync.settings.scripts._10-slack =
let
focusWindowScript = pkgs.callPackage ../../scripts/hyprland/focus-window.nix { };
in
{
app-name = "[Ss]lack";
exec = "${getExe focusWindowScript}";
run-on = "action";
};
};
}

View file

@ -1,11 +1,12 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
let
cfg = config.profile.spotify;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
spotify
];
};
config = lib.mkIf cfg.enable { home.packages = with pkgs; [ spotify ]; };
}

View file

@ -35,7 +35,6 @@
format = "[$ssh_symbol$hostname]($style)\\] ";
};
palette = "catppuccin_${flavour}";
} // builtins.fromTOML (builtins.readFile
(catppuccin-starship-repo + /palettes/${flavour}.toml));
} // builtins.fromTOML (builtins.readFile (catppuccin-starship-repo + /palettes/${flavour}.toml));
};
}

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
let
cfg = config.profile.tofi;
in

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.variety;
in

View file

@ -1,4 +1,9 @@
{ config, lib, unstable, ... }:
{
config,
lib,
unstable,
...
}:
let
cfg = config.profile.vscode;
in

View file

@ -9,22 +9,24 @@ in
enableZshIntegration = true;
enableBashIntegration = true;
extraConfig = /*lua*/ ''
-- take config from ./base_config.lua
local config = require('base_config')
extraConfig = # lua
''
-- take config from ./base_config.lua
local config = require('base_config')
-- and override settings for nixos specific things here.
config.window_background_opacity = ${toString cfg.config.window_background_opacity};
-- and override settings for nixos specific things here.
config.window_background_opacity = ${toString cfg.config.window_background_opacity};
return config
'';
return config
'';
};
programs.zsh.initExtra = /*bash*/ ''
if [ -n "$WEZTERM_PANE" ]; then
alias ssh="wezterm ssh"
fi
'';
programs.zsh.initExtra = # bash
''
if [ -n "$WEZTERM_PANE" ]; then
alias ssh="wezterm ssh"
fi
'';
home.file.".config/wezterm" = {
source = ./.;

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
let
cfg = config.profile.whatsapp;
in

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.programs.yazi;
inherit (lib) mkIf;
@ -11,7 +16,11 @@ in
settings = {
manager = {
# 1/8 width for parent, 4/8 width for current, 3/8 width for preview
ratio = [ 1 4 3 ];
ratio = [
1
4
3
];
sort_by = "natural";
sort_sensitive = false;
sort_dir_first = true;
@ -22,13 +31,24 @@ in
};
opener = {
edit = [
{ run = ''nvim "$@"''; block = true; desc = "Edit in Neovim"; }
{
run = ''nvim "$@"'';
block = true;
desc = "Edit in Neovim";
}
];
play = [
{ run = ''mpv "$@"''; orphan = true; desc = "Play in MPV"; }
{
run = ''mpv "$@"'';
orphan = true;
desc = "Play in MPV";
}
];
open = [
{ run = ''xdg-open "$@"''; desc = "Open"; }
{
run = ''xdg-open "$@"'';
desc = "Open";
}
];
};
open = {
@ -48,17 +68,29 @@ in
# Multiple openers for a single rule
{
name = "*.html";
use = [ "open" "edit" ];
use = [
"open"
"edit"
];
}
];
append_rules = [
{ name = "*"; use = "open"; }
{
name = "*";
use = "open";
}
];
};
plugin = {
prepend_previewers = [
{ mime = "{image,audio,video}/*"; run = "mediainfo"; }
{ mime = "application/x-subrip"; run = "mediainfo"; }
{
mime = "{image,audio,video}/*";
run = "mediainfo";
}
{
mime = "application/x-subrip";
run = "mediainfo";
}
];
};
};

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, unstable, ... }:
{
config,
lib,
pkgs,
unstable,
...
}:
let
cfg = config.profile.home.programs.zellij;
plugins = {
@ -26,7 +32,7 @@ in
# autoloaded first after zshenv.
programs.zsh.initExtraFirst = lib.mkOrder 50 (
if cfg.autoAttach then
/*bash*/
# bash
''
if [[ ! -z "$SSH_CLIENT" ]]; then
if [[ -z "$ZELLIJ" ]]; then
@ -47,21 +53,23 @@ in
fi
''
else
/*bash*/ ''
if [[ ! -z "$SSH_CLIENT" ]]; then
if [[ -z "$ZELLIJ" ]]; then
zellij attach -c default
exit
fi
fi
''
# bash
''
if [[ ! -z "$SSH_CLIENT" ]]; then
if [[ -z "$ZELLIJ" ]]; then
zellij attach -c default
exit
fi
fi
''
);
home.file.".config/zellij/config.kdl".text =
let
mod = cfg.mod;
in
/*kdl*/ ''
# kdl
''
theme "catppuccin-mocha";
plugins {

View file

@ -1,5 +1,6 @@
{ plugins, timezone, ... }:
/*kdl*/ ''
# kdl
''
layout {
pane split_direction="vertical" {
pane

View file

@ -1,5 +1,6 @@
{ plugins, timezone, ... }:
/*kdl*/ ''
# kdl
''
layout {
pane split_direction="vertical" {
pane

View file

@ -1,5 +1,6 @@
{ plugins, timezone, ... }:
/*kdl*/ ''
# kdl
''
layout {
pane split_direction="vertical" {
pane

View file

@ -1,5 +1,6 @@
{ plugins, timezone, ... }:
/*kdl*/ ''
# kdl
''
layout {
pane split_direction="vertical" {
pane

View file

@ -1,5 +1,6 @@
{ plugins, timezone, ... }:
/*kdl*/ ''
# kdl
''
layout {
pane split_direction="vertical" {
pane

View file

@ -1,5 +1,6 @@
{ plugins, timezone, ... }:
/*kdl*/ ''
# kdl
''
layout {
pane split_direction="vertical" {
pane

View file

@ -1,12 +1,13 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.home.programs.zoom;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
zoom-us
];
};
config = mkIf cfg.enable { home.packages = with pkgs; [ zoom-us ]; };
}

View file

@ -1,4 +1,9 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
let
inherit (lib.strings) optionalString concatStrings;
in
@ -11,13 +16,14 @@ in
];
programs.zsh = {
enable = true;
envExtra = /*bash*/ ''
# Disable loading global RC files in /etc/zsh/*
# Mostly because they are unneeded
# and global rc files has to be small for security reasons (no plugins)
# thus making them saver for Root account to load them.
unsetopt GLOBAL_RCS
'';
envExtra = # bash
''
# Disable loading global RC files in /etc/zsh/*
# Mostly because they are unneeded
# and global rc files has to be small for security reasons (no plugins)
# thus making them saver for Root account to load them.
unsetopt GLOBAL_RCS
'';
autosuggestion.enable = true;
enableCompletion = true;
defaultKeymap = "emacs";
@ -52,38 +58,41 @@ in
size = 40000;
};
completionInit = lib.mkOrder 9999 (concatStrings [
/* bash */
# bash
''
mkdir -p $ZSH_CACHE_DIR/completions
fpath+=$ZSH_CACHE_DIR/completions
fpath+=${pkgs.zsh-completions}/share/zsh/site-functions
''
(optionalString config.profile.podman.enable /*bash*/ ''
if [ ! -f $ZSH_CACHE_DIR/completions/_podman ]; then
podman completion zsh > $ZSH_CACHE_DIR/completions/_podman
fi
'')
(optionalString config.profile.podman.enable # bash
''
if [ ! -f $ZSH_CACHE_DIR/completions/_podman ]; then
podman completion zsh > $ZSH_CACHE_DIR/completions/_podman
fi
''
)
# Value below must be always last in the completionInit
/* bash */
# bash
''
autoload -U compinit && compinit
''
]);
syntaxHighlighting.enable = true;
initExtraFirst = /*bash*/ ''
export ZSH_CACHE_DIR=$HOME/.cache/zsh
initExtraFirst = # bash
''
export ZSH_CACHE_DIR=$HOME/.cache/zsh
# if [ -f $HOME/.config/zsh/.p10k.zsh ]; then
# source $HOME/.config/zsh/.p10k.zsh
# fi
# if [ -f $HOME/.config/zsh/.p10k.zsh ]; then
# source $HOME/.config/zsh/.p10k.zsh
# fi
_ZSH_COLOR_SCHEME_FILE=$HOME/.cache/wallust/sequences
if [ -f "$_ZSH_COLOR_SCHEME_FILE" ]; then
(cat "$_ZSH_COLOR_SCHEME_FILE" &)
fi
'';
_ZSH_COLOR_SCHEME_FILE=$HOME/.cache/wallust/sequences
if [ -f "$_ZSH_COLOR_SCHEME_FILE" ]; then
(cat "$_ZSH_COLOR_SCHEME_FILE" &)
fi
'';
initExtra = concatStrings [
/*bash*/
# bash
''
packfiles() {
find $(NIXPKGS_ALLOW_UNFREE=1 nix build "nixpkgs#$1" --impure --no-link --print-out-paths)

View file

@ -13,9 +13,7 @@
#### Required Options ####
hostname = lib.mkOption {
type = lib.types.str;
};
hostname = lib.mkOption { type = lib.types.str; };
networking.disableWaitOnline = lib.mkEnableOption "disable waiting for network";
networking.externalInterface = lib.mkOption {
type = lib.types.str;
@ -28,12 +26,8 @@
};
user = {
name = lib.mkOption {
type = lib.types.str;
};
fullName = lib.mkOption {
type = lib.types.str;
};
name = lib.mkOption { type = lib.types.str; };
fullName = lib.mkOption { type = lib.types.str; };
uid = lib.mkOption {
type = lib.types.int;
default = 1000;
@ -46,9 +40,7 @@
getty.autoLogin = lib.mkEnableOption "auto-login to getty";
};
system.stateVersion = lib.mkOption {
type = lib.types.str;
};
system.stateVersion = lib.mkOption { type = lib.types.str; };
#### Optionals ####

View file

@ -1,4 +1,9 @@
{ lib, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
types = lib.types;
in
@ -21,7 +26,10 @@ in
};
displayManager = lib.mkOption {
type = lib.types.enum [ "sddm" "tuigreet" ];
type = lib.types.enum [
"sddm"
"tuigreet"
];
default = "tuigreet";
};
@ -72,55 +80,9 @@ in
default = "0";
};
wallust = {
backend = lib.mkOption {
type = lib.types.enum [ "full" "resized" "wal" "thumb" "fastresize" "kmeans" ];
default = "kmeans";
description = "How the image is parse, in order to get the colors";
};
colorSpace = lib.mkOption {
type = lib.types.enum [ "lab" "labmixed" "lch" "lchmixed" ];
default = "lch";
description = "What color space to use to produce and select the most prominent colors";
};
alpha = lib.mkOption {
type = lib.types.int;
default = 100;
};
threshold = lib.mkOption {
type = lib.types.int;
default = 1;
};
palette = lib.mkOption {
type = lib.types.enum [
"dark"
"dark16"
"darkcomp"
"darkcomp16"
"light"
"light16"
"lightcomp"
"lightcomp16"
"harddark"
"harddark16"
"harddarkcomp"
"harddarkcomp16"
"softdark"
"softdark16"
"softdarkcomp"
"softdarkcomp16"
"softlight"
"softlight16"
"softlightcomp"
"softlightcomp16"
];
default = "dark";
description = ''Use the most prominent colors in a way that makes sense. A Scheme color palette.'';
};
checkContrast = lib.mkOption {
type = lib.types.bool;
default = true;
};
wallust.settings = lib.mkOption {
type = (pkgs.formats.toml { }).type;
default = { };
};
};
}

View file

@ -43,7 +43,6 @@
autostart = lib.mkEnableOption "variety autostart";
};
bitwarden = {
enable = lib.mkEnableOption "bitwarden";
autostart = lib.mkEnableOption "bitwarden autostart";

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkOption types;
in

View file

@ -4,9 +4,7 @@ let
secondaryMonitor = "ViewSonic Corporation VX3276-QHD V9W204243765";
in
{
imports = [
../options
];
imports = [ ../options ];
profile = {
hostname = "castle";
@ -36,11 +34,22 @@ in
];
};
waybar.persistent-workspaces = {
DP-1 = [ 1 2 3 4 5 6 7 ];
DP-2 = [ 8 9 10 ];
DP-1 = [
1
2
3
4
5
6
7
];
DP-2 = [
8
9
10
];
};
pyprland.wallpaper-dirs = [ "/nas/redmage/images/windows" ];
wallust.alpha = 80;
swayosd.display = "DP-1";
dunst.monitor = "1";
hypridle = {

View file

@ -1,8 +1,6 @@
{ ... }:
{
imports = [
../options
];
imports = [ ../options ];
profile = {
hostname = "fort";
@ -15,9 +13,7 @@
hyprland = {
enable = true;
settings = {
monitors = [
",preferred,auto,1"
];
monitors = [ ",preferred,auto,1" ];
workspaces = [
"1,default:true"
"2"
@ -32,13 +28,29 @@
];
};
waybar.persistent-workspaces = {
eDP-1 = [ 1 2 3 4 5 6 7 8 9 10 ];
eDP-1 = [
1
2
3
4
5
6
7
8
9
10
];
};
pyprland.wallpaper-dirs = [ "/home/tigor/Syncthing/Redmage/Laptop-Kerja" ];
wallust.alpha = 80;
};
discord.enable = true;
slack.enable = true;
discord = {
enable = true;
autostart = true;
};
slack = {
enable = true;
autostart = true;
};
whatsapp.enable = true;
syncthing.enable = true;
bluetooth.enable = true;

View file

@ -1,8 +1,6 @@
{ ... }:
{
imports = [
../options
];
imports = [ ../options ];
profile = {
hostname = "homeserver";
@ -23,7 +21,10 @@
openssh.enable = true;
go.enable = true;
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedTCPPorts = [
80
443
];
podman = {
enable = true;
pihole.enable = true;

View file

@ -3,12 +3,13 @@ let
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
gojq = "${pkgs.gojq}/bin/gojq";
in
pkgs.writeShellScriptBin "focus-window.sh" /*sh*/ ''
appname="$SWAYNC_APP_NAME"
state="$(${hyprctl} -j clients)"
window="$(echo "$state" | ${gojq} -r --arg APP "$appname" '.[] | select(.class == $APP) | .address')"
pkgs.writeShellScriptBin "focus-window.sh" # sh
''
appname="$SWAYNC_APP_NAME"
state="$(${hyprctl} -j clients)"
window="$(echo "$state" | ${gojq} -r --arg APP "$appname" '.[] | select(.class == $APP) | .address')"
if [[ "$window" != "" ]]; then
${hyprctl} dispatch focuswindow address:"$window"
fi
''
if [[ "$window" != "" ]]; then
${hyprctl} dispatch focuswindow address:"$window"
fi
''

View file

@ -1,4 +1,10 @@
{ hardware-configuration, profile-path, config, pkgs, ... }:
{
hardware-configuration,
profile-path,
config,
pkgs,
...
}:
{
imports = [
profile-path
@ -16,10 +22,12 @@
networking.hostName = config.profile.hostname;
systemd.services.NetworkManager-wait-online.enable = !config.profile.networking.disableWaitOnline;
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.extraOptions = ''
http-connections = 8
connect-timeout = 5
@ -79,6 +87,7 @@
# Tools for nh
nix-output-monitor
nvd
nixfmt-rfc-style
];
services.dbus.implementation = "broker";

View file

@ -12,7 +12,8 @@ in
enable = true;
onCalendar = "weekly"; # Default value
};
packages = [ ]
packages =
[ ]
++ optional cfg.zen-browser.enable "io.github.zen_browser.zen"
++ optional cfg.redisinsight.enable "com.redis.RedisInsight";
};

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.keyboard;
in

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.android;
username = config.profile.user.name;
@ -7,8 +12,6 @@ in
config = lib.mkIf cfg.enable {
users.users.${username}.extraGroups = [ "adbusers" ];
programs.adb.enable = true;
environment.systemPackages = with pkgs; [
androidenv.androidPkgs_9_0.platform-tools
];
environment.systemPackages = with pkgs; [ androidenv.androidPkgs_9_0.platform-tools ];
};
}

View file

@ -1,9 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profile.brightnessctl;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.brightnessctl ];
};
config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.brightnessctl ]; };
}

Some files were not shown because too many files have changed in this diff Show more