Compare commits

...

12 commits

146 changed files with 2626 additions and 2213 deletions

View file

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

View file

@ -1,16 +1,26 @@
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[
(modulesPath + "/installer/scan/not-detected.nix")
];
sops.secrets."smb/secrets" = { sops.secrets."smb/secrets" = {
owner = config.profile.user.name; 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.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -26,9 +36,11 @@
systemd.packages = with pkgs; [ lact ]; systemd.packages = with pkgs; [ lact ];
systemd.services.lactd.wantedBy = [ "multi-user.target" ]; systemd.services.lactd.wantedBy = [ "multi-user.target" ];
system.fsPackages = [ pkgs.bindfs pkgs.cifs-utils ]; system.fsPackages = [
fileSystems."/nas" = pkgs.bindfs
{ pkgs.cifs-utils
];
fileSystems."/nas" = {
device = "//192.168.100.5/nas"; device = "//192.168.100.5/nas";
fsType = "cifs"; fsType = "cifs";
options = [ options = [
@ -44,34 +56,27 @@
]; ];
}; };
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/6a987bc7-1f00-4494-bcef-b0f8afc62b7b"; device = "/dev/disk/by-uuid/6a987bc7-1f00-4494-bcef-b0f8afc62b7b";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{
device = "/dev/disk/by-uuid/812C-A3A9"; device = "/dev/disk/by-uuid/812C-A3A9";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/home" = fileSystems."/home" = {
{
device = "/dev/disk/by-uuid/0add1f95-4cd5-4d44-876e-c1b381b7d133"; device = "/dev/disk/by-uuid/0add1f95-4cd5-4d44-876e-c1b381b7d133";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/workstation" = fileSystems."/workstation" = {
{
device = "/dev/disk/by-uuid/7a3a7a8a-91d5-43fb-a80b-376bacdb54ec"; device = "/dev/disk/by-uuid/7a3a7a8a-91d5-43fb-a80b-376bacdb54ec";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-uuid/15139a5f-a695-47a1-bd59-7e530989860c"; } ];
[
{ device = "/dev/disk/by-uuid/15139a5f-a695-47a1-bd59-7e530989860c"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (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 = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[
(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.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
# boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ]; # boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-label/NIXROOT"; device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{
device = "/dev/disk/by-label/NIXBOOT"; device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-label/NIXSWAP"; } ];
[{ device = "/dev/disk/by-label/NIXSWAP"; }];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -1,30 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[
(modulesPath + "/installer/scan/not-detected.nix")
];
config = { 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.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "nct6775" ]; boot.kernelModules = [
"kvm-amd"
"nct6775"
];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{
device = "/dev/disk/by-uuid/439a1beb-1443-495b-9891-012605819803"; device = "/dev/disk/by-uuid/439a1beb-1443-495b-9891-012605819803";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{
device = "/dev/disk/by-uuid/47A1-0296"; device = "/dev/disk/by-uuid/47A1-0296";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [
"fmask=0022"
"dmask=0022"
];
}; };
fileSystems."/nas" = { fileSystems."/nas" = {
@ -123,7 +137,8 @@
]; ];
}; };
services.caddy.virtualHosts."public.tigor.web.id".extraConfig = /*caddy*/ '' services.caddy.virtualHosts."public.tigor.web.id".extraConfig = # caddy
''
file_server browse file_server browse
root * /nas/public root * /nas/public
''; '';
@ -151,6 +166,8 @@
libvdpau-va-gl 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 = [ imports = [ ./protobuf.nix ];
./protobuf.nix
];
} }

View file

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

View file

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

View file

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

View file

@ -10,6 +10,8 @@ in
}; };
programs.zsh.shellAliases = { 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 let
cfg = config.profile.firefox; cfg = config.profile.firefox;
in in

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,9 +1,17 @@
{ lib, pkgs, unstable, config, ... }: {
lib,
pkgs,
unstable,
config,
...
}:
let let
cfg = config.profile.hyprland; cfg = config.profile.hyprland;
inherit (lib.meta) getExe; inherit (lib.meta) getExe;
wallpaperDir = "${config.home.homeDirectory}/.cache/wallpaper"; wallpaperDir = "${config.home.homeDirectory}/.cache/wallpaper";
draw-wallpaper = pkgs.writeShellScriptBin "draw-wallpaper.sh" /*sh*/ '' draw-wallpaper =
pkgs.writeShellScriptBin "draw-wallpaper.sh" # sh
''
image_file=$1 image_file=$1
target="${wallpaperDir}/current" target="${wallpaperDir}/current"
blur_target="${wallpaperDir}/blurred.png" blur_target="${wallpaperDir}/blurred.png"
@ -29,9 +37,7 @@ in
tomlFormat = pkgs.formats.toml { }; tomlFormat = pkgs.formats.toml { };
in in
tomlFormat.generate "pyprland.toml" { tomlFormat.generate "pyprland.toml" {
pyprland.plugins = [ pyprland.plugins = [ "wallpapers" ];
"wallpapers"
];
wallpapers = { wallpapers = {
path = cfg.pyprland.wallpaper-dirs; path = cfg.pyprland.wallpaper-dirs;
unique = false; unique = false;
@ -45,9 +51,7 @@ in
"swww-daemon" "swww-daemon"
"sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current" "sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current"
]; ];
bind = [ bind = [ "$mod, W, exec, pypr wall next" ];
"$mod, W, exec, pypr wall next"
];
}; };
}; };
} }

View file

@ -1,8 +1,15 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.profile.hyprland; cfg = config.profile.hyprland;
inherit (lib.meta) getExe; inherit (lib.meta) getExe;
selectWindowScript = pkgs.writeShellScriptBin ''select-window.sh'' /*sh*/ '' selectWindowScript =
pkgs.writeShellScriptBin ''select-window.sh'' # sh
''
state="$(hyprctl -j clients)" state="$(hyprctl -j clients)"
active_window="$(hyprctl -j activewindow)" active_window="$(hyprctl -j activewindow)"

View file

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

View file

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

View file

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

View file

@ -9,7 +9,9 @@ in
recursive = true; recursive = true;
}; };
programs.wlogout = { programs.wlogout = {
style = '' style =
# css
''
/* ----------------------------------------------------- /* -----------------------------------------------------
* Import Pywal colors * Import Pywal colors
* ----------------------------------------------------- */ * ----------------------------------------------------- */
@ -26,11 +28,6 @@ in
box-shadow: none; box-shadow: none;
} }
window {
background: url("../../.cache/blurred_wallpaper.png");
background-size: cover;
}
button { button {
color: #ffffff; color: #ffffff;
font-size: 20px; font-size: 20px;
@ -102,7 +99,7 @@ in
layout = [ layout = [
{ {
label = "lock"; label = "lock";
action = "hyprlock"; action = "loginctl lock-session";
text = "Lock"; text = "Lock";
keybind = "l"; keybind = "l";
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -21,7 +21,8 @@ in
}; };
}; };
programs.zsh.initExtra = /*bash*/ '' programs.zsh.initExtra = # bash
''
function osc7-pwd() { function osc7-pwd() {
emulate -L zsh # also sets localoptions for us emulate -L zsh # also sets localoptions for us
setopt extendedglob setopt extendedglob

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, unstable, ... }: {
config,
pkgs,
lib,
unstable,
...
}:
let let
cfg = config.profile.neovim; cfg = config.profile.neovim;
inherit (lib) mkIf; inherit (lib) mkIf;
@ -22,7 +28,9 @@ in
ping = "${pkgs.unixtools.ping}/bin/ping"; ping = "${pkgs.unixtools.ping}/bin/ping";
host = "github.com"; host = "github.com";
sleep = "${pkgs.coreutils}/bin/sleep"; sleep = "${pkgs.coreutils}/bin/sleep";
script = pkgs.writeScriptBin "clone-nvim.sh" /*bash*/ '' script =
pkgs.writeScriptBin "clone-nvim.sh" # bash
''
#!${bash} #!${bash}
if [ -d "${nvimCloneDir}" ]; then if [ -d "${nvimCloneDir}" ]; then

View file

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

View file

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

View file

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

View file

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

View file

@ -1,19 +1,33 @@
{ pkgs, lib, config, ... }: {
pkgs,
lib,
config,
...
}:
let let
cfg = config.profile.slack; 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 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 in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ slack ]; home.packages = with pkgs; [ slack ];
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [ wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [ autostartScriptFile ];
scriptFile
];
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 let
cfg = config.profile.spotify; cfg = config.profile.spotify;
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable { home.packages = with pkgs; [ spotify ]; };
home.packages = with pkgs; [
spotify
];
};
} }

View file

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

View file

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

View file

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

View file

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

View file

@ -9,7 +9,8 @@ in
enableZshIntegration = true; enableZshIntegration = true;
enableBashIntegration = true; enableBashIntegration = true;
extraConfig = /*lua*/ '' extraConfig = # lua
''
-- take config from ./base_config.lua -- take config from ./base_config.lua
local config = require('base_config') local config = require('base_config')
@ -20,7 +21,8 @@ in
''; '';
}; };
programs.zsh.initExtra = /*bash*/ '' programs.zsh.initExtra = # bash
''
if [ -n "$WEZTERM_PANE" ]; then if [ -n "$WEZTERM_PANE" ]; then
alias ssh="wezterm ssh" alias ssh="wezterm ssh"
fi fi

View file

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

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.profile.programs.yazi; cfg = config.profile.programs.yazi;
inherit (lib) mkIf; inherit (lib) mkIf;
@ -11,7 +16,11 @@ in
settings = { settings = {
manager = { manager = {
# 1/8 width for parent, 4/8 width for current, 3/8 width for preview # 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_by = "natural";
sort_sensitive = false; sort_sensitive = false;
sort_dir_first = true; sort_dir_first = true;
@ -22,13 +31,24 @@ in
}; };
opener = { opener = {
edit = [ edit = [
{ run = ''nvim "$@"''; block = true; desc = "Edit in Neovim"; } {
run = ''nvim "$@"'';
block = true;
desc = "Edit in Neovim";
}
]; ];
play = [ play = [
{ run = ''mpv "$@"''; orphan = true; desc = "Play in MPV"; } {
run = ''mpv "$@"'';
orphan = true;
desc = "Play in MPV";
}
]; ];
open = [ open = [
{ run = ''xdg-open "$@"''; desc = "Open"; } {
run = ''xdg-open "$@"'';
desc = "Open";
}
]; ];
}; };
open = { open = {
@ -48,17 +68,29 @@ in
# Multiple openers for a single rule # Multiple openers for a single rule
{ {
name = "*.html"; name = "*.html";
use = [ "open" "edit" ]; use = [
"open"
"edit"
];
} }
]; ];
append_rules = [ append_rules = [
{ name = "*"; use = "open"; } {
name = "*";
use = "open";
}
]; ];
}; };
plugin = { plugin = {
prepend_previewers = [ 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 let
cfg = config.profile.home.programs.zellij; cfg = config.profile.home.programs.zellij;
plugins = { plugins = {
@ -26,7 +32,7 @@ in
# autoloaded first after zshenv. # autoloaded first after zshenv.
programs.zsh.initExtraFirst = lib.mkOrder 50 ( programs.zsh.initExtraFirst = lib.mkOrder 50 (
if cfg.autoAttach then if cfg.autoAttach then
/*bash*/ # bash
'' ''
if [[ ! -z "$SSH_CLIENT" ]]; then if [[ ! -z "$SSH_CLIENT" ]]; then
if [[ -z "$ZELLIJ" ]]; then if [[ -z "$ZELLIJ" ]]; then
@ -47,7 +53,8 @@ in
fi fi
'' ''
else else
/*bash*/ '' # bash
''
if [[ ! -z "$SSH_CLIENT" ]]; then if [[ ! -z "$SSH_CLIENT" ]]; then
if [[ -z "$ZELLIJ" ]]; then if [[ -z "$ZELLIJ" ]]; then
zellij attach -c default zellij attach -c default
@ -61,7 +68,8 @@ in
let let
mod = cfg.mod; mod = cfg.mod;
in in
/*kdl*/ '' # kdl
''
theme "catppuccin-mocha"; theme "catppuccin-mocha";
plugins { plugins {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,9 @@
{ lib, config, ... }: {
lib,
pkgs,
config,
...
}:
let let
types = lib.types; types = lib.types;
in in
@ -21,7 +26,10 @@ in
}; };
displayManager = lib.mkOption { displayManager = lib.mkOption {
type = lib.types.enum [ "sddm" "tuigreet" ]; type = lib.types.enum [
"sddm"
"tuigreet"
];
default = "tuigreet"; default = "tuigreet";
}; };
@ -72,55 +80,9 @@ in
default = "0"; default = "0";
}; };
wallust = { wallust.settings = lib.mkOption {
backend = lib.mkOption { type = (pkgs.formats.toml { }).type;
type = lib.types.enum [ "full" "resized" "wal" "thumb" "fastresize" "kmeans" ]; default = { };
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;
};
}; };
}; };
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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