format: format codebase using nixfmt-rfc-style

This commit is contained in:
Tigor Hutasuhut 2024-10-21 12:31:30 +07:00
parent 9b5b84ed5a
commit ebfaa0e940
128 changed files with 1832 additions and 1336 deletions

149
flake.nix
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,61 +98,79 @@
}; };
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 = {
specialArgs = { inherit inputs unstable profile-path hardware-configuration; }; inherit
in inputs
nixpkgs.lib.nixosSystem unstable
profile-path
hardware-configuration
;
};
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./system
{ {
system = "x86_64-linux"; home-manager.extraSpecialArgs = specialArgs;
modules = home-manager.users.tigor = import ./home;
[ }
./system ] ++ commonModules;
{ specialArgs = specialArgs;
home-manager.extraSpecialArgs = specialArgs; };
home-manager.users.tigor = import ./home; fort =
} let
] ++ commonModules; profile-path = ./profiles/fort.nix;
specialArgs = specialArgs; hardware-configuration = ./hardware-configuration/fort.nix;
}; specialArgs = {
fort = inherit
let inputs
profile-path = ./profiles/fort.nix; unstable
hardware-configuration = ./hardware-configuration/fort.nix; profile-path
specialArgs = { inherit inputs unstable profile-path hardware-configuration; }; 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;
}; };
homeserver = in
let nixpkgs.lib.nixosSystem {
profile-path = ./profiles/homeserver.nix; system = "x86_64-linux";
hardware-configuration = ./hardware-configuration/homeserver.nix; modules = [
specialArgs = { inherit inputs unstable profile-path hardware-configuration; }; ./system
in {
nixpkgs.lib.nixosSystem { home-manager.extraSpecialArgs = specialArgs;
system = "x86_64-linux"; home-manager.users.tigor = import ./home;
modules = [ }
./system ] ++ commonModules;
{ specialArgs = specialArgs;
home-manager.extraSpecialArgs = specialArgs; };
home-manager.users.homeserver = import ./home; homeserver =
} let
] ++ commonModules; profile-path = ./profiles/homeserver.nix;
specialArgs = specialArgs; 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 = 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,52 +36,47 @@
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
device = "//192.168.100.5/nas"; ];
fsType = "cifs"; fileSystems."/nas" = {
options = [ device = "//192.168.100.5/nas";
"_netdev" fsType = "cifs";
"x-systemd.automount" options = [
"noauto" "_netdev"
"x-systemd.idle-timeout=60" "x-systemd.automount"
"x-systemd.device-timeout=5s" "noauto"
"x-systemd.mount-timeout=5s" "x-systemd.idle-timeout=60"
"uid=${toString config.profile.user.uid}" "x-systemd.device-timeout=5s"
"gid=${toString config.profile.user.gid}" "x-systemd.mount-timeout=5s"
"credentials=${config.sops.secrets."smb/secrets".path}" "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"; }
]; ];
};
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 # 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,31 +1,45 @@
# 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 = [
options = [ "fmask=0022" "dmask=0022" ]; "fmask=0022"
}; "dmask=0022"
];
};
fileSystems."/nas" = { fileSystems."/nas" = {
device = "/dev/disk/by-label/WD_RED_4T_1"; device = "/dev/disk/by-label/WD_RED_4T_1";
@ -123,10 +137,11 @@
]; ];
}; };
services.caddy.virtualHosts."public.tigor.web.id".extraConfig = /*caddy*/ '' services.caddy.virtualHosts."public.tigor.web.id".extraConfig = # caddy
file_server browse ''
root * /nas/public file_server browse
''; root * /nas/public
'';
systemd.tmpfiles.settings = { systemd.tmpfiles.settings = {
"100-nas-public-dir" = { "100-nas-public-dir" = {
@ -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
@ -30,7 +35,7 @@ in
id = 0; id = 0;
name = "Tigor"; name = "Tigor";
isDefault = true; isDefault = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin ublock-origin
bitwarden bitwarden
cookie-autodelete cookie-autodelete

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

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 (
cat "${config.sops.secrets.${secretKey}.path}" | gnome-keyring-daemon --unlock pkgs.writeShellScriptBin "gnome-keyring.sh" # sh
gnome-keyring-daemon --start --components=pkcs11,secrets,ssh ''
''); cat "${config.sops.secrets.${secretKey}.path}" | gnome-keyring-daemon --unlock
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,14 +198,15 @@ 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
exec-once=pasystray 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 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,10 +15,12 @@ in
satty satty
]; ];
home.activation.sattyDirCreate = lib.hm.dag.entryAfter [ "writeBoundary" ] /*sh*/ '' home.activation.sattyDirCreate =
mkdir -p "${saveDir}" lib.hm.dag.entryAfter [ "writeBoundary" ] # sh
chown ${config.home.username} "${saveDir}" ''
''; mkdir -p "${saveDir}"
chown ${config.home.username} "${saveDir}"
'';
wayland.windowManager.hyprland.settings.bind = wayland.windowManager.hyprland.settings.bind =
let let

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,22 +1,30 @@
{ 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 =
image_file=$1 pkgs.writeShellScriptBin "draw-wallpaper.sh" # sh
target="${wallpaperDir}/current" ''
blur_target="${wallpaperDir}/blurred.png" image_file=$1
square_target="${wallpaperDir}/square.png" target="${wallpaperDir}/current"
blur_target="${wallpaperDir}/blurred.png"
square_target="${wallpaperDir}/square.png"
mkdir -p "${wallpaperDir}" mkdir -p "${wallpaperDir}"
echo "$image_file" > "${wallpaperDir}/origin.txt" echo "$image_file" > "${wallpaperDir}/origin.txt"
cp "$image_file" "$target" cp "$image_file" "$target"
swww img "$target" swww img "$target"
${unstable.wallust}/bin/wallust run "$target" ${unstable.wallust}/bin/wallust run "$target"
${pkgs.graphicsmagick}/bin/gm convert -resize 75% -blur 50x30 "$target" "$blur_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" ${pkgs.imagemagick}/bin/magick "$target" -resize 25% -gravity Center -extent 1:1 "$square_target"
''; '';
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -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,39 +1,46 @@
{ 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 =
state="$(hyprctl -j clients)" pkgs.writeShellScriptBin ''select-window.sh'' # sh
active_window="$(hyprctl -j activewindow)" ''
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" | window="$(echo "$state" |
gojq -r '.[] | select(.monitor != -1 ) | "\(.address) \(.workspace.name) \(.title)"' | gojq -r '.[] | select(.monitor != -1 ) | "\(.address) \(.workspace.name) \(.title)"' |
grep -v "scratch_term" | grep -v "scratch_term" |
sed "s|$current_addr|focused ->|" | sed "s|$current_addr|focused ->|" |
sort -r | sort -r |
rofi -dmenu -i -matching fuzzy)" rofi -dmenu -i -matching fuzzy)"
addr="$(echo "$window" | awk '{print $1}')" addr="$(echo "$window" | awk '{print $1}')"
ws="$(echo "$window" | awk '{print $2}')" ws="$(echo "$window" | awk '{print $2}')"
if [[ "$addr" =~ focused* ]]; then if [[ "$addr" =~ focused* ]]; then
echo 'already focused, exiting' echo 'already focused, exiting'
exit 0 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;"
fi 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 in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {

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,18 +41,18 @@ in
}; };
Service = Service =
let let
reloadScript = pkgs.writeShellScriptBin "swaync-reload.sh" /*sh*/ '' reloadScript =
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config pkgs.writeShellScriptBin "swaync-reload.sh" # sh
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-css ''
''; ${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config
${pkgs.swaynotificationcenter}/bin/swaync-client --reload-css
'';
in in
{ {
ExecReload = "${lib.meta.getExe reloadScript}"; ExecReload = "${lib.meta.getExe reloadScript}";
}; };
}; };
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,10 +1,11 @@
{ lib {
, fetchFromGitea lib,
, rustPlatform fetchFromGitea,
, nix-update-script rustPlatform,
, imagemagick nix-update-script,
, makeWrapper imagemagick,
, pkgs makeWrapper,
pkgs,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "wallust"; pname = "wallust";
@ -20,7 +21,10 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-o6VRekazqbKTef6SLjHqs9/z/Q70auvunP+yFDkclpg="; cargoHash = "sha256-o6VRekazqbKTef6SLjHqs9/z/Q70auvunP+yFDkclpg=";
nativeBuildInputs = [ makeWrapper pkgs.rust-bin.stable."1.79.0".default ]; nativeBuildInputs = [
makeWrapper
pkgs.rust-bin.stable."1.79.0".default
];
postFixup = '' postFixup = ''
wrapProgram $out/bin/wallust \ wrapProgram $out/bin/wallust \
@ -33,7 +37,10 @@ rustPlatform.buildRustPackage rec {
description = "A better pywal"; description = "A better pywal";
homepage = "https://codeberg.org/explosion-mental/wallust"; homepage = "https://codeberg.org/explosion-mental/wallust";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ onemoresuza iynaix ]; maintainers = with lib.maintainers; [
onemoresuza
iynaix
];
downloadPage = "https://codeberg.org/explosion-mental/wallust/releases/tag/${version}"; downloadPage = "https://codeberg.org/explosion-mental/wallust/releases/tag/${version}";
mainProgram = "wallust"; mainProgram = "wallust";
}; };

View file

@ -1,4 +1,10 @@
{ pkgs, unstable, lib, config, ... }: {
pkgs,
unstable,
lib,
config,
...
}:
let let
cfg = config.profile.hyprland; cfg = config.profile.hyprland;
inherit (lib.meta) getExe; inherit (lib.meta) getExe;
@ -45,83 +51,85 @@ in
recursive = true; recursive = true;
}; };
home.file.".config/wallust/wallust.toml".source = ((pkgs.formats.toml { }).generate "wallust.toml" { home.file.".config/wallust/wallust.toml".source = (
# See https://codeberg.org/explosion-mental/wallust/src/branch/master/wallust.toml (pkgs.formats.toml { }).generate "wallust.toml" {
# for more information about the configuration options. # 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: # How the image is parse, in order to get the colors:
# full - resized - wal - thumb - fastresize - kmeans # full - resized - wal - thumb - fastresize - kmeans
backend = wallust.backend; backend = wallust.backend;
# What color space to use to produce and select the most prominent colors: # What color space to use to produce and select the most prominent colors:
# lab - labmixed - lch - lchmixed # lab - labmixed - lch - lchmixed
color_space = wallust.colorSpace; color_space = wallust.colorSpace;
threshold = wallust.threshold; threshold = wallust.threshold;
# Use the most prominent colors in a way that makes sense, a scheme color palette: # Use the most prominent colors in a way that makes sense, a scheme color palette:
# dark - dark16 - darkcomp - darkcomp16 # dark - dark16 - darkcomp - darkcomp16
# light - light16 - lightcomp - lightcomp16 # light - light16 - lightcomp - lightcomp16
# harddark - harddark16 - harddarkcomp - harddarkcomp16 # harddark - harddark16 - harddarkcomp - harddarkcomp16
# softdark - softdark16 - softdarkcomp - softdarkcomp16 # softdark - softdark16 - softdarkcomp - softdarkcomp16
# softlight - softlight16 - softlightcomp - softlightcomp16 # softlight - softlight16 - softlightcomp - softlightcomp16
palette = wallust.palette; palette = wallust.palette;
# Ensures a "readable contrast" (OPTIONAL, disabled by default) # Ensures a "readable contrast" (OPTIONAL, disabled by default)
# Should only be enabled when you notice an unreadable contrast frequently happening # 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. # with your images. The reference color for the contrast is the background color.
check_contrast = wallust.checkContrast; check_contrast = wallust.checkContrast;
# Color saturation, between [1% and 100%] (OPTIONAL, disabled by default) # Color saturation, between [1% and 100%] (OPTIONAL, disabled by default)
# usually something higher than 50 increases the saturation and below # usually something higher than 50 increases the saturation and below
# decreases it (on a scheme with strong and vivid colors) # decreases it (on a scheme with strong and vivid colors)
# saturation = 50; # saturation = 50;
# Alpha value for templating, by default 100 (no other use whatsoever) # Alpha value for templating, by default 100 (no other use whatsoever)
alpha = wallust.alpha; alpha = wallust.alpha;
templates = templates =
# Templates requires certain syntax # Templates requires certain syntax
# #
# See: https://codeberg.org/explosion-mental/wallust/wiki/wallust.1-Man-Page # See: https://codeberg.org/explosion-mental/wallust/wiki/wallust.1-Man-Page
# Note that the documentation is for 3.x and above. # Note that the documentation is for 3.x and above.
let let
out = config.home.homeDirectory + "/.cache/wallust"; out = config.home.homeDirectory + "/.cache/wallust";
in in
{ {
waybar = { waybar = {
template = "waybar.css"; template = "waybar.css";
# target = out + "/waybar.css"; # target = out + "/waybar.css";
target = "${config.home.homeDirectory}/.config/waybar/style.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";
};
}; };
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

@ -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

@ -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,34 +1,33 @@
{ 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*/ '' autostartScript =
sleep 10; pkgs.writeShellScriptBin "discord.sh" # sh
until ${pkgs.unixtools.ping}/bin/ping -c 1 discord.com; ''
do sleep 1; sleep 10;
done; until ${pkgs.unixtools.ping}/bin/ping -c 1 discord.com;
vesktop do sleep 1;
''; done;
vesktop
'';
autostartScriptFile = getExe autostartScript; 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.".config/discord/settings.json".text = builtins.toJSON { home.file.".config/discord/settings.json".text = builtins.toJSON { SKIP_HOST_UPDATE = true; };
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 ];
autostartScriptFile
];
home.file.".config/autostart/discord.sh" = lib.mkIf cfg.autostart { home.file.".config/autostart/discord.sh" = lib.mkIf cfg.autostart { source = autostartScriptFile; };
source = autostartScriptFile;
};
services.swaync.settings.scripts._10-discord = services.swaync.settings.scripts._10-discord =
let let

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

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,11 +4,12 @@ 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 ''
alias ssh="kitty +kitten ssh" if [[ "$TERM" == "xterm-kitty" ]]; then
fi alias ssh="kitty +kitten ssh"
''; fi
'';
programs.kitty = { programs.kitty = {
enable = true; enable = true;
settings = { settings = {
@ -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,21 +28,23 @@ 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 =
#!${bash} pkgs.writeScriptBin "clone-nvim.sh" # bash
''
#!${bash}
if [ -d "${nvimCloneDir}" ]; then if [ -d "${nvimCloneDir}" ]; then
exit 0; exit 0;
fi fi
until ${ping} -c 1 ${host}; do until ${ping} -c 1 ${host}; do
${sleep} 1; ${sleep} 1;
done done
mkdir -p ${nvimCloneDir} mkdir -p ${nvimCloneDir}
${git} clone ${repository} ${nvimCloneDir} ${git} clone ${repository} ${nvimCloneDir}
''; '';
path = "${script}/bin/clone-nvim.sh"; path = "${script}/bin/clone-nvim.sh";
in in
{ {

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,4 +1,9 @@
{ pkgs, lib, config, ... }: {
pkgs,
lib,
config,
...
}:
let let
cfg = config.profile.slack; cfg = config.profile.slack;
autostartScript = pkgs.writeShellScriptBin "slack.sh" '' autostartScript = pkgs.writeShellScriptBin "slack.sh" ''
@ -11,13 +16,9 @@ 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 ];
autostartScriptFile
];
home.file.".config/autostart/slack.sh" = lib.mkIf cfg.autostart { home.file.".config/autostart/slack.sh" = lib.mkIf cfg.autostart { source = autostartScriptFile; };
source = autostartScriptFile;
};
services.swaync.settings.scripts._10-slack = services.swaync.settings.scripts._10-slack =
let let

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

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,21 +53,23 @@ in
fi fi
'' ''
else else
/*bash*/ '' # bash
if [[ ! -z "$SSH_CLIENT" ]]; then ''
if [[ -z "$ZELLIJ" ]]; then if [[ ! -z "$SSH_CLIENT" ]]; then
zellij attach -c default if [[ -z "$ZELLIJ" ]]; then
exit zellij attach -c default
fi exit
fi fi
'' fi
''
); );
home.file.".config/zellij/config.kdl".text = home.file.".config/zellij/config.kdl".text =
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,13 +16,14 @@ in
]; ];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
envExtra = /*bash*/ '' envExtra = # bash
# Disable loading global RC files in /etc/zsh/* ''
# Mostly because they are unneeded # Disable loading global RC files in /etc/zsh/*
# and global rc files has to be small for security reasons (no plugins) # Mostly because they are unneeded
# thus making them saver for Root account to load them. # and global rc files has to be small for security reasons (no plugins)
unsetopt GLOBAL_RCS # thus making them saver for Root account to load them.
''; unsetopt GLOBAL_RCS
'';
autosuggestion.enable = true; autosuggestion.enable = true;
enableCompletion = true; enableCompletion = true;
defaultKeymap = "emacs"; defaultKeymap = "emacs";
@ -52,38 +58,41 @@ 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 ''
podman completion zsh > $ZSH_CACHE_DIR/completions/_podman if [ ! -f $ZSH_CACHE_DIR/completions/_podman ]; then
fi podman completion zsh > $ZSH_CACHE_DIR/completions/_podman
'') 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
# source $HOME/.config/zsh/.p10k.zsh # source $HOME/.config/zsh/.p10k.zsh
# fi # fi
_ZSH_COLOR_SCHEME_FILE=$HOME/.cache/wallust/sequences _ZSH_COLOR_SCHEME_FILE=$HOME/.cache/wallust/sequences
if [ -f "$_ZSH_COLOR_SCHEME_FILE" ]; then if [ -f "$_ZSH_COLOR_SCHEME_FILE" ]; then
(cat "$_ZSH_COLOR_SCHEME_FILE" &) (cat "$_ZSH_COLOR_SCHEME_FILE" &)
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

@ -21,7 +21,10 @@ in
}; };
displayManager = lib.mkOption { displayManager = lib.mkOption {
type = lib.types.enum [ "sddm" "tuigreet" ]; type = lib.types.enum [
"sddm"
"tuigreet"
];
default = "tuigreet"; default = "tuigreet";
}; };
@ -74,12 +77,24 @@ in
wallust = { wallust = {
backend = lib.mkOption { backend = lib.mkOption {
type = lib.types.enum [ "full" "resized" "wal" "thumb" "fastresize" "kmeans" ]; type = lib.types.enum [
"full"
"resized"
"wal"
"thumb"
"fastresize"
"kmeans"
];
default = "kmeans"; default = "kmeans";
description = "How the image is parse, in order to get the colors"; description = "How the image is parse, in order to get the colors";
}; };
colorSpace = lib.mkOption { colorSpace = lib.mkOption {
type = lib.types.enum [ "lab" "labmixed" "lch" "lchmixed" ]; type = lib.types.enum [
"lab"
"labmixed"
"lch"
"lchmixed"
];
default = "lch"; default = "lch";
description = "What color space to use to produce and select the most prominent colors"; description = "What color space to use to produce and select the most prominent colors";
}; };

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,8 +34,20 @@ 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; wallust.alpha = 80;

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,7 +28,18 @@
]; ];
}; };
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; wallust.alpha = 80;

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,12 +3,13 @@ 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" ''
state="$(${hyprctl} -j clients)" appname="$SWAYNC_APP_NAME"
window="$(echo "$state" | ${gojq} -r --arg APP "$appname" '.[] | select(.class == $APP) | .address')" state="$(${hyprctl} -j clients)"
window="$(echo "$state" | ${gojq} -r --arg APP "$appname" '.[] | select(.class == $APP) | .address')"
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 ];
};
} }

View file

@ -1,23 +1,22 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
fonts = { fonts = {
packages = with pkgs; packages = with pkgs; [
[ # icon fonts
# icon fonts material-design-icons
material-design-icons
# normal fonts # normal fonts
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk
noto-fonts-emoji noto-fonts-emoji
noto-fonts-color-emoji noto-fonts-color-emoji
nerdfonts nerdfonts
# (nerdfonts.override { # (nerdfonts.override {
# fonts = [ "FiraCode" "JetBrainsMono" "Iosevka" ]; # fonts = [ "FiraCode" "JetBrainsMono" "Iosevka" ];
# }) # })
]; ];
# use fonts specified by user rather than default ones # use fonts specified by user rather than default ones
enableDefaultPackages = false; enableDefaultPackages = false;
@ -26,9 +25,18 @@
# the reason there's Noto Color Emoji everywhere is to override DejaVu's # the reason there's Noto Color Emoji everywhere is to override DejaVu's
# B&W emojis that would sometimes show instead of some Color emojis # B&W emojis that would sometimes show instead of some Color emojis
fontconfig.defaultFonts = { fontconfig.defaultFonts = {
serif = [ "Noto Serif" "Noto Color Emoji" ]; serif = [
sansSerif = [ "Noto Sans" "Noto Color Emoji" ]; "Noto Serif"
monospace = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ]; "Noto Color Emoji"
];
sansSerif = [
"Noto Sans"
"Noto Color Emoji"
];
monospace = [
"JetBrainsMono Nerd Font"
"Noto Color Emoji"
];
emoji = [ "Noto Color Emoji" ]; emoji = [ "Noto Color Emoji" ];
}; };
}; };

View file

@ -1,4 +1,10 @@
{ inputs, config, lib, pkgs, ... }: {
inputs,
config,
lib,
pkgs,
...
}:
let let
cfg = config.profile.hyprland; cfg = config.profile.hyprland;
hyprlandPkg = inputs.hyprland.packages."${pkgs.system}".hyprland; hyprlandPkg = inputs.hyprland.packages."${pkgs.system}".hyprland;
@ -68,9 +74,7 @@ in
services.dbus.enable = true; services.dbus.enable = true;
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
xdg-desktop-portal-gtk
];
}; };
programs.file-roller.enable = true; programs.file-roller.enable = true;

View file

@ -1,4 +1,9 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
let let
cfg = config.profile.kde; cfg = config.profile.kde;
in in
@ -24,8 +29,7 @@ in
haruna haruna
]; ];
environment.etc."chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json".source = environment.etc."chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json".source = "${pkgs.plasma-browser-integration}/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json";
"${pkgs.plasma-browser-integration}/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json";
# Configure keymap in X11 # Configure keymap in X11
services.xserver = { services.xserver = {

View file

@ -24,11 +24,13 @@
enable = true; enable = true;
}; };
environment.etc."systemd/resolved.conf.d/10-bareksa.conf".source = (pkgs.formats.ini { }).generate "10-bareksa.conf" { environment.etc."systemd/resolved.conf.d/10-bareksa.conf".source =
Resolve = { (pkgs.formats.ini { }).generate "10-bareksa.conf"
# This dns server is only available when VPN is connected. {
DNS = "192.168.3.215"; Resolve = {
Domains = "~bareksa.local"; # This dns server is only available when VPN is connected.
}; DNS = "192.168.3.215";
}; Domains = "~bareksa.local";
};
};
} }

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.profile.openssh; cfg = config.profile.openssh;
inherit (lib.meta) getExe; inherit (lib.meta) getExe;
@ -39,30 +44,33 @@ lib.mkMerge [
}; };
}; };
sops.secrets."ntfy/tokens/homeserver" = { sopsFile = ../../secrets/ntfy.yaml; }; sops.secrets."ntfy/tokens/homeserver" = {
sopsFile = ../../secrets/ntfy.yaml;
};
sops.templates."ntfy-ssh-login.sh" = { sops.templates."ntfy-ssh-login.sh" = {
content = builtins.readFile (lib.meta.getExe (pkgs.writeShellScriptBin "ntfy-ssh-login.sh" /*sh*/ '' content = builtins.readFile (
if [ "$PAM_TYPE" == "open_session" ]; then lib.meta.getExe (
${getExe pkgs.curl} -X POST \ pkgs.writeShellScriptBin "ntfy-ssh-login.sh" # sh
-H "X-Priority: 4" \ ''
-H "X-Tags: warning" \ if [ "$PAM_TYPE" == "open_session" ]; then
-H "Authorization: Bearer ${config.sops.placeholder."ntfy/tokens/homeserver"}" \ ${getExe pkgs.curl} -X POST \
-H "X-Title: SSH login" \ -H "X-Priority: 4" \
-d "$PAM_USER from $PAM_RHOST" \ -H "X-Tags: warning" \
https://ntfy.tigor.web.id/ssh -H "Authorization: Bearer ${config.sops.placeholder."ntfy/tokens/homeserver"}" \
fi -H "X-Title: SSH login" \
'')); -d "$PAM_USER from $PAM_RHOST" \
https://ntfy.tigor.web.id/ssh
fi
''
)
);
}; };
security.pam.services.sshd.text = lib.mkDefault (lib.mkAfter '' security.pam.services.sshd.text = lib.mkDefault (
session optional pam_exec.so ${getExe pkgs.bash} ${config.sops.templates."ntfy-ssh-login.sh".path} lib.mkAfter ''
''); session optional pam_exec.so ${getExe pkgs.bash} ${config.sops.templates."ntfy-ssh-login.sh".path}
''
);
}) })
{ { profile.services.ntfy-sh.client.settings.subscribe = [ { topic = "ssh"; } ]; }
profile.services.ntfy-sh.client.settings.subscribe = [
{
topic = "ssh";
}
];
}
] ]

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.profile.printing; cfg = config.profile.printing;
username = config.profile.user.name; username = config.profile.user.name;
@ -11,4 +16,4 @@ in
drivers = [ pkgs.brlaser ]; # Brother Laser Printer drivers = [ pkgs.brlaser ]; # Brother Laser Printer
}; };
}; };
} }

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.profile.scanner; cfg = config.profile.scanner;
username = config.profile.user.name; username = config.profile.user.name;
@ -6,15 +11,11 @@ in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
users.users.${username}.extraGroups = [ "scanner" ]; users.users.${username}.extraGroups = [ "scanner" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ skanlite ];
skanlite
];
hardware.sane = { hardware.sane = {
enable = true; enable = true;
brscan4.enable = true; # Brother Scanner brscan4.enable = true; # Brother Scanner
extraBackends = with pkgs; [ extraBackends = with pkgs; [ sane-airscan ];
sane-airscan
];
}; };
}; };
} }

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let let
cfg = config.profile.vial; cfg = config.profile.vial;
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;
@ -16,7 +21,11 @@ in
yazi = { yazi = {
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;
@ -27,13 +36,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 = {
@ -53,11 +73,17 @@ 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";
}
]; ];
}; };
}; };

View file

@ -1,4 +1,10 @@
{ lib, stdenv, fetchzip, gettext, ... }: {
lib,
stdenv,
fetchzip,
gettext,
...
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "cockpit-podman"; pname = "cockpit-podman";
@ -9,11 +15,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256-qLt6x9W+M/DztzcFxyWZLHUTM1ZsPCOykO+6o/URa6c="; sha256 = "sha256-qLt6x9W+M/DztzcFxyWZLHUTM1ZsPCOykO+6o/URa6c=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ gettext ];
gettext
];
makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; makeFlags = [
"DESTDIR=$(out)"
"PREFIX="
];
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace Makefile \

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.profile.podman; cfg = config.profile.podman;
username = config.profile.user.name; username = config.profile.user.name;
@ -34,7 +39,6 @@ in
}; };
}; };
# Taken IP-Range Subnets # Taken IP-Range Subnets
# #
# 10.88.0.2 -> Redmage # 10.88.0.2 -> Redmage

View file

@ -31,9 +31,7 @@ in
TZ = "Asia/Jakarta"; TZ = "Asia/Jakarta";
# MEMOS_PUBLIC = "true"; # MEMOS_PUBLIC = "true";
}; };
volumes = [ volumes = [ "${rootVolume}:/var/opt/memos" ];
"${rootVolume}:/var/opt/memos"
];
extraOptions = [ extraOptions = [
"--network=podman" "--network=podman"
"--ip=${ip}" "--ip=${ip}"

View file

@ -5,34 +5,35 @@ let
inherit (lib) mkIf; inherit (lib) mkIf;
in in
{ {
virtualisation.oci-containers.containers."metrics" = mkIf (cfg.enable && config.profile.services.telemetry.enable) { virtualisation.oci-containers.containers."metrics" =
image = "quay.io/navidys/prometheus-podman-exporter"; mkIf (cfg.enable && config.profile.services.telemetry.enable)
hostname = "metrics"; {
autoStart = true; image = "quay.io/navidys/prometheus-podman-exporter";
user = "0:0"; hostname = "metrics";
environment = { autoStart = true;
TZ = "Asia/Jakarta"; user = "0:0";
CONTAINER_HOST = "unix:///run/podman/podman.sock"; environment = {
}; TZ = "Asia/Jakarta";
volumes = [ CONTAINER_HOST = "unix:///run/podman/podman.sock";
"/run/podman/podman.sock:/run/podman/podman.sock" };
]; volumes = [ "/run/podman/podman.sock:/run/podman/podman.sock" ];
extraOptions = [ extraOptions = [
"--network=podman" "--network=podman"
"--ip=${ip}" "--ip=${ip}"
"--security-opt=label=disable" "--security-opt=label=disable"
]; ];
labels = { labels = {
"io.containers.autoupdate" = "registry"; "io.containers.autoupdate" = "registry";
}; };
}; };
environment.etc."alloy/config.alloy".text = /*hcl*/ '' environment.etc."alloy/config.alloy".text = # hcl
prometheus.scrape "podman" { ''
targets = [{__address__ = "${ip}:9882"}] prometheus.scrape "podman" {
targets = [{__address__ = "${ip}:9882"}]
job_name = "podman" job_name = "podman"
forward_to = [prometheus.remote_write.mimir.receiver] forward_to = [prometheus.remote_write.mimir.receiver]
} }
''; '';
} }

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
name = "minecraft"; name = "minecraft";
podman = config.profile.podman; podman = config.profile.podman;
@ -24,33 +29,36 @@ let
in in
{ {
config = mkIf (podman.enable && podman.${name}.enable) { config = mkIf (podman.enable && podman.${name}.enable) {
services.caddy.virtualHosts.${domain}.extraConfig = /*html*/ '' services.caddy.virtualHosts.${domain}.extraConfig = # html
header Content-Type text/html ''
respond <<EOF header Content-Type text/html
<!DOCTYPE html> respond <<EOF
<html> <!DOCTYPE html>
<head> <html>
<title>Minecraft Server</title> <head>
</head> <title>Minecraft Server</title>
<body> </head>
<h1>Congrats! The minecraft server should be up!</h1> <body>
<h2> <h1>Congrats! The minecraft server should be up!</h1>
This server is invitation only. <h2>
Please contact the server owner for more info. This server is invitation only.
</h2> Please contact the server owner for more info.
<p>Server Address: <b>${domain}</b></p> </h2>
<p>Bedrock Server Port: <b>19132</b></p> <p>Server Address: <b>${domain}</b></p>
<p>Java Server Port: <b>25565</b></p> <p>Bedrock Server Port: <b>19132</b></p>
</body> <p>Java Server Port: <b>25565</b></p>
</html> </body>
EOF 200 </html>
''; EOF 200
'';
# Minecraft only autoupdates at startup # Minecraft only autoupdates at startup
# #
# To keep up with the update, restart the server at 4am everyday. # To keep up with the update, restart the server at 4am everyday.
systemd = systemd =
let serviceName = "podman-${name}"; in let
serviceName = "podman-${name}";
in
{ {
tmpfiles.settings."${serviceName}-mount".${rootVolume}.d = { tmpfiles.settings."${serviceName}-mount".${rootVolume}.d = {
group = config.profile.user.name; group = config.profile.user.name;
@ -88,9 +96,7 @@ in
"19132:19132/udp" "19132:19132/udp"
"19132:19132" "19132:19132"
]; ];
volumes = [ volumes = [ "${rootVolume}:/minecraft" ];
"${rootVolume}:/minecraft"
];
extraOptions = [ extraOptions = [
"--network=podman" "--network=podman"
"--ip=${ip}" "--ip=${ip}"

View file

@ -24,9 +24,7 @@ in
environment = { environment = {
TZ = "Asia/Jakarta"; TZ = "Asia/Jakarta";
}; };
volumes = [ volumes = [ "/tmp:/tmp" ];
"/tmp:/tmp"
];
extraOptions = [ extraOptions = [
"--network=podman" "--network=podman"
"--ip=${ip}" "--ip=${ip}"

View file

@ -34,16 +34,12 @@ in
ZO_DATA_DIR = "/data"; ZO_DATA_DIR = "/data";
ZO_WEB_URL = "https://${domain}"; ZO_WEB_URL = "https://${domain}";
}; };
volumes = [ volumes = [ "${rootVolume}/data:/data" ];
"${rootVolume}/data:/data"
];
extraOptions = [ extraOptions = [
"--network=podman" "--network=podman"
"--ip=${ip}" "--ip=${ip}"
]; ];
environmentFiles = [ environmentFiles = [ config.sops.secrets."openobserve/env".path ];
config.sops.secrets."openobserve/env".path
];
labels = { labels = {
"io.containers.autoupdate" = "registry"; "io.containers.autoupdate" = "registry";
}; };

View file

@ -27,7 +27,9 @@ in
# #
# This works by collecting all the virtual hosts defined in caddy # This works by collecting all the virtual hosts defined in caddy
# and check if the length of the list changes, if it does, we restart the pihole container. # and check if the length of the list changes, if it does, we restart the pihole container.
systemd.services."podman-${name}".restartTriggers = attrsets.mapAttrsToList (name: _: name) config.services.caddy.virtualHosts; systemd.services."podman-${name}".restartTriggers = attrsets.mapAttrsToList (
name: _: name
) config.services.caddy.virtualHosts;
environment.etc."pihole/custom.list" = { environment.etc."pihole/custom.list" = {
# Copy file instead of symlink # Copy file instead of symlink
mode = "0444"; mode = "0444";
@ -46,7 +48,9 @@ in
'' ''
192.168.100.5 vpn.tigor.web.id 192.168.100.5 vpn.tigor.web.id
${strings.concatStringsSep "\n" ( ${strings.concatStringsSep "\n" (
attrsets.mapAttrsToList (name: _: "192.168.100.5 ${strings.removePrefix "https://" name}") config.services.caddy.virtualHosts attrsets.mapAttrsToList (
name: _: "192.168.100.5 ${strings.removePrefix "https://" name}"
) config.services.caddy.virtualHosts
)} )}
''; '';
}; };
@ -72,9 +76,7 @@ in
"pihole-dnsmasq:/etc/dnsmasq.d" "pihole-dnsmasq:/etc/dnsmasq.d"
"/etc/pihole/custom.list:/etc/pihole/custom.list" "/etc/pihole/custom.list:/etc/pihole/custom.list"
]; ];
environmentFiles = [ environmentFiles = [ config.sops.secrets."pihole/env".path ];
config.sops.secrets."pihole/env".path
];
extraOptions = [ extraOptions = [
"--ip=${ip}" "--ip=${ip}"
"--network=podman" "--network=podman"

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
name = "qbittorrent"; name = "qbittorrent";
domain = "${name}.tigor.web.id"; domain = "${name}.tigor.web.id";
@ -24,56 +29,64 @@ lib.mkMerge [
chown ${uid}:${gid} ${volume} ${volume}/{config,downloads,progress,watch} chown ${uid}:${gid} ${volume} ${volume}/{config,downloads,progress,watch}
''; '';
sops = { sops = {
secrets = secrets =
let let
opts = { sopsFile = ../../secrets/ntfy.yaml; }; opts = {
sopsFile = ../../secrets/ntfy.yaml;
};
in in
{ {
"ntfy/tokens/homeserver" = opts; "ntfy/tokens/homeserver" = opts;
}; };
templates = { templates = {
"qbittorrent-ntfy-env".content = /*sh*/ '' "qbittorrent-ntfy-env".content = # sh
NTFY_TOKEN=${config.sops.placeholder."ntfy/tokens/homeserver"} ''
''; NTFY_TOKEN=${config.sops.placeholder."ntfy/tokens/homeserver"}
'';
}; };
}; };
virtualisation.oci-containers.containers.${name} = virtualisation.oci-containers.containers.${name} =
let let
finish-notify-script = pkgs.writeScriptBin "notify-finish.sh" (optionalString config.services.ntfy-sh.enable /*sh*/ '' finish-notify-script = pkgs.writeScriptBin "notify-finish.sh" (
#!/bin/bash optionalString config.services.ntfy-sh.enable # sh
# $1 = %N | Torrent Name ''
# $2 = %L | Category #!/bin/bash
# $3 = %G | Tags # $1 = %N | Torrent Name
# $4 = %F | Content Path # $2 = %L | Category
# $5 = %R | Root Path # $3 = %G | Tags
# $6 = %D | Save Path # $4 = %F | Content Path
# $7 = %C | Number of files # $5 = %R | Root Path
# $8 = %Z | Torrent Size # $6 = %D | Save Path
# $9 = %T | Current Tracker # $7 = %C | Number of files
# $10 = %I | Info Hash v1 # $8 = %Z | Torrent Size
# $11 = %J | Info Hash v2 # $9 = %T | Current Tracker
# $12 = %K | Torrent ID # $10 = %I | Info Hash v1
# $11 = %J | Info Hash v2
# $12 = %K | Torrent ID
size=$(echo $8 | numfmt --to=iec) size=$(echo $8 | numfmt --to=iec)
curl -X POST \ curl -X POST \
-H "Authorization: Bearer $NTFY_TOKEN" \ -H "Authorization: Bearer $NTFY_TOKEN" \
-H "X-Title: $1" \ -H "X-Title: $1" \
-H "X-Tags: white_check_mark,$2" \ -H "X-Tags: white_check_mark,$2" \
-d "Number of Files: $7, Size: $size" \ -d "Number of Files: $7, Size: $size" \
https://ntfy.tigor.web.id/qbittorrent?priority=4 https://ntfy.tigor.web.id/qbittorrent?priority=4
''); ''
start-notify-script = pkgs.writeScriptBin "notify-start.sh" (optionalString config.services.ntfy-sh.enable /*sh*/ '' );
#!/bin/bash start-notify-script = pkgs.writeScriptBin "notify-start.sh" (
curl -X POST \ optionalString config.services.ntfy-sh.enable # sh
-H "Authorization: Bearer $NTFY_TOKEN" \ ''
-H "X-Title: $1" \ #!/bin/bash
-H "X-Tags: rocket,$2" \ curl -X POST \
-d "Starts downloading" \ -H "Authorization: Bearer $NTFY_TOKEN" \
https://ntfy.tigor.web.id/qbittorrent -H "X-Title: $1" \
''); -H "X-Tags: rocket,$2" \
-d "Starts downloading" \
https://ntfy.tigor.web.id/qbittorrent
''
);
in in
{ {
inherit image; inherit image;
@ -102,19 +115,11 @@ lib.mkMerge [
"--ip=${ip}" "--ip=${ip}"
"--network=podman" "--network=podman"
]; ];
environmentFiles = [ environmentFiles = [ config.sops.templates."qbittorrent-ntfy-env".path ];
config.sops.templates."qbittorrent-ntfy-env".path
];
labels = { labels = {
"io.containers.autoupdate" = "registry"; "io.containers.autoupdate" = "registry";
}; };
}; };
}) })
{ { profile.services.ntfy-sh.client.settings.subscribe = [ { topic = "qbittorrent"; } ]; }
profile.services.ntfy-sh.client.settings.subscribe = [
{
topic = "qbittorrent";
}
];
}
] ]

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