update: fixed issues and update flake inputs
This commit is contained in:
parent
4b6183f0ec
commit
b3c5ad2880
80 changed files with 3307 additions and 2059 deletions
779
flake.lock
generated
779
flake.lock
generated
File diff suppressed because it is too large
Load diff
60
flake.nix
60
flake.nix
|
|
@ -2,12 +2,8 @@
|
|||
description = "DACHXY's NixOS with hyprland";
|
||||
|
||||
inputs = {
|
||||
nixpkgs-stable = {
|
||||
url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
|
|
@ -27,7 +23,6 @@
|
|||
|
||||
ghostty = {
|
||||
url = "github:ghostty-org/ghostty";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
yazi = {
|
||||
|
|
@ -69,32 +64,22 @@
|
|||
url = "github:Mic92/sops-nix";
|
||||
};
|
||||
|
||||
hyprlock = {
|
||||
url = "github:hyprwm/hyprlock";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
awww = {
|
||||
url = "git+https://codeberg.org/LGFae/awww";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
zen-browser = {
|
||||
url = "github:dachxy/zen-browser-flake";
|
||||
url = "github:0xc000022070/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
|
||||
actual-budget-api = {
|
||||
url = "github:DACHXY/actual-budget-api";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
caelestia-shell = {
|
||||
url = "github:caelestia-dots/shell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
microvm = {
|
||||
url = "github:microvm-nix/microvm.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -106,7 +91,7 @@
|
|||
};
|
||||
|
||||
nvf = {
|
||||
url = "github:NotAShelf/nvf";
|
||||
url = "github:notashelf/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
@ -124,11 +109,12 @@
|
|||
|
||||
attic = {
|
||||
url = "github:zhaofengli/attic";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
};
|
||||
|
||||
actual-budget-server = {
|
||||
url = "github:dachxy/actual-budget-flake";
|
||||
url = "git+file:///home/danny/projects/actual-budget-flake";
|
||||
# url = "github:dachxy/actual-budget-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
@ -143,13 +129,34 @@
|
|||
};
|
||||
|
||||
nix-search-tv.url = "github:3timeslazy/nix-search-tv";
|
||||
|
||||
niri = {
|
||||
url = "github:sodiboo/niri-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
niri-nfsm = {
|
||||
url = "github:dachxy/nfsm/feat/hm-module";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# ==== Shell ==== #
|
||||
caelestia-shell = {
|
||||
url = "github:caelestia-dots/shell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
noctalia = {
|
||||
url = "github:noctalia-dev/noctalia-shell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-stable,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
|
|
@ -184,9 +191,6 @@
|
|||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
};
|
||||
helper = import ./helper {
|
||||
inherit
|
||||
pkgs
|
||||
|
|
@ -200,7 +204,6 @@
|
|||
helper
|
||||
inputs
|
||||
self
|
||||
pkgs-stable
|
||||
;
|
||||
};
|
||||
modules = [
|
||||
|
|
@ -209,6 +212,7 @@
|
|||
nixpkgs.hostPlatform = system;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [
|
||||
inputs.niri.overlays.niri
|
||||
inputs.mail-server.overlay
|
||||
inputs.nix-minecraft.overlay
|
||||
inputs.nix-tmodloader.overlay
|
||||
|
|
@ -225,11 +229,11 @@
|
|||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||
inputs.nix-tmodloader.nixosModules.tmodloader
|
||||
inputs.chaotic.nixosModules.default
|
||||
inputs.actual-budget-api.nixosModules.default
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.attic.nixosModules.atticd
|
||||
inputs.mail-server.nixosModules.default
|
||||
inputs.niri.nixosModules.niri
|
||||
./options
|
||||
|
||||
# ==== Private Configuration ==== #
|
||||
|
|
|
|||
|
|
@ -105,4 +105,20 @@ in
|
|||
elements:
|
||||
optionalString (builtins.length elements > 0) "elements = { ${concatStringsSep "," elements} }";
|
||||
};
|
||||
|
||||
getMonitors =
|
||||
profileName: config:
|
||||
let
|
||||
inherit (lib)
|
||||
pipe
|
||||
filter
|
||||
elemAt
|
||||
length
|
||||
;
|
||||
in
|
||||
(pipe config.services.kanshi.settings [
|
||||
(x: filter (p: p.profile.name == profileName) x)
|
||||
(x: if (length x > 0) then elemAt x 0 else { profile.outputs = [ ]; })
|
||||
(x: x.profile.outputs)
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,125 +0,0 @@
|
|||
<!--
|
||||
This is a windows 11 kvm installation template
|
||||
Note the os section, the loader (secure firmware) is defined in system/modules/virtualization.nix
|
||||
You may want to change the address in the network section
|
||||
(May Fail in Virt Manager, but work with virsh. You can define the vm by virsh and use it in VirtManager later)
|
||||
|
||||
Step to run in kvm:
|
||||
> virsh define win11_kvm.xml
|
||||
> virsh start win11
|
||||
|
||||
Delete vm:
|
||||
> virsh destroy win11
|
||||
> virsh undefine win11
|
||||
-->
|
||||
<domain type="kvm">
|
||||
<name>win11</name>
|
||||
<uuid>ca98654b-f29d-46be-8dfd-49e0b0a4e598</uuid>
|
||||
<metadata>
|
||||
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
||||
<libosinfo:os id="http://microsoft.com/win/11"/>
|
||||
</libosinfo:libosinfo>
|
||||
</metadata>
|
||||
<memory>8388608</memory>
|
||||
<currentMemory>8388608</currentMemory>
|
||||
<vcpu current="4">4</vcpu>
|
||||
<os>
|
||||
<type arch="x86_64" machine="q35">hvm</type>
|
||||
<loader readonly="yes" secure="yes" type="pflash">/etc/ovmf/edk2-x86_64-secure-code.fd</loader>
|
||||
<nvram template="/etc/ovmf/edk2-i386-vars.fd"/>
|
||||
</os>
|
||||
<features>
|
||||
<smm state="on"/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<hyperv>
|
||||
<relaxed state="on"/>
|
||||
<vapic state="on"/>
|
||||
<spinlocks state="on" retries="8191"/>
|
||||
<vpindex state="on"/>
|
||||
<runtime state="on"/>
|
||||
<synic state="on"/>
|
||||
<stimer state="on"/>
|
||||
<frequencies state="on"/>
|
||||
<tlbflush state="on"/>
|
||||
<ipi state="on"/>
|
||||
<evmcs state="on"/>
|
||||
<avic state="on"/>
|
||||
</hyperv>
|
||||
<vmport state="off"/>
|
||||
</features>
|
||||
<cpu mode="host-passthrough">
|
||||
<topology sockets="1" cores="4" threads="1"/>
|
||||
</cpu>
|
||||
<clock offset="localtime">
|
||||
<timer name="rtc" tickpolicy="catchup"/>
|
||||
<timer name="pit" tickpolicy="delay"/>
|
||||
<timer name="hpet" present="no"/>
|
||||
<timer name="hypervclock" present="yes"/>
|
||||
</clock>
|
||||
<pm>
|
||||
<suspend-to-mem enabled="no"/>
|
||||
<suspend-to-disk enabled="no"/>
|
||||
</pm>
|
||||
<devices>
|
||||
<emulator>/run/libvirt/nix-emulators/qemu-system-x86_64</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2"/>
|
||||
<source file="/run/media/danny/DN-SSD/VM/win11.qcow2"/>
|
||||
<target dev="vda" bus="virtio"/>
|
||||
<boot order="2"/>
|
||||
</disk>
|
||||
<controller type="usb" model="qemu-xhci" ports="15"/>
|
||||
<controller type="pci" model="pcie-root"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<interface type="network">
|
||||
<source network="default"/>
|
||||
<mac address="52:54:00:9d:b9:3b"/>
|
||||
<model type="e1000e"/>
|
||||
</interface>
|
||||
<console type="pty"/>
|
||||
<channel type="spicevmc">
|
||||
<target type="virtio" name="com.redhat.spice.0"/>
|
||||
</channel>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<tpm model="tpm-tis">
|
||||
<backend type="emulator" version="2.0"/>
|
||||
</tpm>
|
||||
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
|
||||
<image compression="off"/>
|
||||
</graphics>
|
||||
<sound model="ich9"/>
|
||||
<video>
|
||||
<model type="qxl"/>
|
||||
</video>
|
||||
<redirdev bus="usb" type="spicevmc"/>
|
||||
<redirdev bus="usb" type="spicevmc"/>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/run/media/danny/DN-SSD/ISO/Win11_24H2_English_x64.iso"/>
|
||||
<target dev="sda" bus="sata"/>
|
||||
<readonly/>
|
||||
<boot order="1"/>
|
||||
</disk>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu" type="raw"/>
|
||||
<source file="/run/media/danny/DN-SSD/ISO/virtio-win-0.1.266.iso"/>
|
||||
<target dev="sdb" bus="sata"/>
|
||||
<readonly/>
|
||||
<boot order="3"/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
1
home/config/zen/zen-keyboard-shortcuts.json
Normal file
1
home/config/zen/zen-keyboard-shortcuts.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./ntfy-client.nix
|
||||
./hyprlock.nix
|
||||
./sunsetr.nix
|
||||
./noctalia.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
59
home/options/hyprlock.nix
Normal file
59
home/options/hyprlock.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
isList
|
||||
elemAt
|
||||
mapAttrs
|
||||
hasAttr
|
||||
any
|
||||
length
|
||||
;
|
||||
cfg = config.programs.hyprlock;
|
||||
in
|
||||
{
|
||||
options.programs.hyprlock = {
|
||||
monitors = mkOption {
|
||||
default = [ ];
|
||||
type = with types; listOf str;
|
||||
};
|
||||
excludeMonitor = mkOption {
|
||||
default = [
|
||||
"general"
|
||||
"background"
|
||||
"animations"
|
||||
];
|
||||
type = with types; listOf str;
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
apply =
|
||||
v:
|
||||
if length cfg.monitors == 0 then
|
||||
v
|
||||
else
|
||||
mapAttrs (
|
||||
name: value:
|
||||
let
|
||||
mainMonitor = elemAt cfg.monitors 0;
|
||||
applyMonitor =
|
||||
attrs:
|
||||
if hasAttr "monitor" attrs then
|
||||
attrs
|
||||
else
|
||||
(
|
||||
attrs
|
||||
// {
|
||||
monitor = mainMonitor;
|
||||
}
|
||||
);
|
||||
in
|
||||
if any (m: name == m) cfg.excludeMonitor then
|
||||
value
|
||||
else
|
||||
(if (isList value) then (map applyMonitor value) else applyMonitor value)
|
||||
) v;
|
||||
};
|
||||
};
|
||||
}
|
||||
57
home/options/noctalia.nix
Normal file
57
home/options/noctalia.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
elem
|
||||
isList
|
||||
filter
|
||||
listToAttrs
|
||||
concatMap
|
||||
nameValuePair
|
||||
attrNames
|
||||
isAttrs
|
||||
;
|
||||
|
||||
filterAttrsRecursive' =
|
||||
pred: set:
|
||||
# Attrs
|
||||
if isAttrs set then
|
||||
listToAttrs (
|
||||
concatMap (
|
||||
name:
|
||||
let
|
||||
v = set.${name};
|
||||
in
|
||||
if pred name v then
|
||||
[
|
||||
(nameValuePair name (filterAttrsRecursive' pred v))
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
) (attrNames set)
|
||||
)
|
||||
# List
|
||||
else if isList set then
|
||||
filter (x: pred "" x) (map (x: filterAttrsRecursive' pred x) set)
|
||||
else
|
||||
set;
|
||||
|
||||
cfg = config.programs.noctalia-shell;
|
||||
in
|
||||
{
|
||||
options.programs.noctalia-shell = {
|
||||
filteredIds = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
apply =
|
||||
v:
|
||||
filterAttrsRecursive' (
|
||||
name: value: if value ? id then !(elem value.id cfg.filteredIds) else true
|
||||
) v;
|
||||
};
|
||||
};
|
||||
}
|
||||
32
home/options/sunsetr.nix
Normal file
32
home/options/sunsetr.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
getExe'
|
||||
;
|
||||
cfg = config.services.sunsetr;
|
||||
in
|
||||
{
|
||||
options.services.sunsetr = {
|
||||
enable = mkEnableOption "Enable sunsetr.";
|
||||
package = mkPackageOption "sunsetr";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.sunsetr = {
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
Unit = {
|
||||
Description = "Blue light filter";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${getExe' cfg.package "sunsetr"}";
|
||||
Restart = "always";
|
||||
RestartSec = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -16,5 +16,8 @@
|
|||
../user/vscode.nix
|
||||
../user/yazi.nix
|
||||
../user/nvf
|
||||
../user/wm-service.nix
|
||||
../user/ghostty.nix
|
||||
../user/podman.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,209 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
caelestiaDot = pkgs.fetchFromGitHub {
|
||||
owner = "caelestia-dots";
|
||||
repo = "caelestia";
|
||||
rev = "main";
|
||||
sha256 = "sha256-pRLcbh81iBp9fH3Zq7HrNtAfDD46ErGZ3wID8Q65Wlg=";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
cliphist
|
||||
inotify-tools
|
||||
app2unit
|
||||
wireplumber
|
||||
trash-cli
|
||||
foot
|
||||
fastfetch
|
||||
jq
|
||||
socat
|
||||
imagemagick
|
||||
papirus-icon-theme
|
||||
nerd-fonts.jetbrains-mono
|
||||
fuzzel
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
"hypr/hyprland".source = "${caelestiaDot}/hypr/hyprland";
|
||||
"hypr/scheme" = {
|
||||
source = "${caelestiaDot}/hypr/scheme";
|
||||
recursive = true;
|
||||
};
|
||||
"hypr/scripts" = {
|
||||
source = "${caelestiaDot}/hypr/scripts";
|
||||
executable = true;
|
||||
};
|
||||
"hypr/variables.conf".source = "${caelestiaDot}/hypr/variables.conf";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
"$hypr" = "~/.config/hypr";
|
||||
"$hl" = "$hypr/hyprland";
|
||||
"$cConf" = "~/.config/caelestia";
|
||||
# ### Hyprland ###
|
||||
# Apps
|
||||
"$terminal" = "ghostty";
|
||||
"$browser" = "nvidia-offload zen";
|
||||
"$editor" = "nvim";
|
||||
"$fileExplorer" = "yazi";
|
||||
|
||||
# Touchpad
|
||||
"$touchpadDisableTyping" = "true";
|
||||
"$touchpadScrollFactor" = "0.3";
|
||||
"$workSpaceSwipeFingers" = "4";
|
||||
|
||||
# Blur
|
||||
"$blurEnabled" = "true";
|
||||
"$blurSpecialWs" = "false";
|
||||
"$blurPopups" = "true";
|
||||
"$blurInputMethods" = "true";
|
||||
"$blurSize" = "8";
|
||||
"$blurPasses" = "2";
|
||||
"$blurXray" = "false";
|
||||
|
||||
# Shadow
|
||||
"$shadowEnabled" = "true";
|
||||
"$shadowRange" = "20";
|
||||
"$shadowRenderPower" = "3";
|
||||
"$shadowColour" = "rgba($surfaced4)";
|
||||
|
||||
# Gaps
|
||||
"$workspaceGaps" = "20";
|
||||
"$windowGapsIn" = "10";
|
||||
"$windowGapsOut" = "10";
|
||||
"$singleWindowGapsOut" = "10";
|
||||
|
||||
# Window styling
|
||||
"$windowOpacity" = "0.95";
|
||||
"$windowRounding" = "10";
|
||||
|
||||
"$windowBorderSize" = "3";
|
||||
"$activeWindowBorderColour" = "rgba($primarye6)";
|
||||
"$inactiveWindowBorderColour" = "rgba($onSurfaceVariant11)";
|
||||
|
||||
# Misc
|
||||
"$volumeStep" = "5 # In percent";
|
||||
|
||||
"$kbGoToWs" = "SUPER";
|
||||
"$wsaction" = "~/.config/hypr/scripts/wsaction.fish";
|
||||
|
||||
source = [
|
||||
"$hypr/scheme/current.conf"
|
||||
"$hl/env.conf"
|
||||
"$hl/input.conf"
|
||||
"$hl/misc.conf"
|
||||
"$hl/animations.conf"
|
||||
"$hl/decoration.conf"
|
||||
"$hl/group.conf"
|
||||
"$hl/rules.conf"
|
||||
"${pkgs.writeText "keybinds.conf" ''
|
||||
exec = hyprctl dispatch submap global
|
||||
submap = global
|
||||
|
||||
# ## Shell keybinds
|
||||
# Launcher
|
||||
bind = Super+CTRL, K, global, caelestia:showall
|
||||
bindi = Super, Super_L, global, caelestia:launcher
|
||||
bindin = Super, catchall, global, caelestia:launcherInterrupt
|
||||
bindin = Super, mouse:272, global, caelestia:launcherInterrupt
|
||||
bindin = Super, mouse:273, global, caelestia:launcherInterrupt
|
||||
bindin = Super, mouse:274, global, caelestia:launcherInterrupt
|
||||
bindin = Super, mouse:275, global, caelestia:launcherInterrupt
|
||||
bindin = Super, mouse:276, global, caelestia:launcherInterrupt
|
||||
bindin = Super, mouse:277, global, caelestia:launcherInterrupt
|
||||
bindin = Super, mouse_up, global, caelestia:launcherInterrupt
|
||||
bindin = Super, mouse_down, global, caelestia:launcherInterrupt
|
||||
bind = Super, DELETE, global, caelestia:lock
|
||||
bind = Super, Q, killactive,
|
||||
bind = Super , RETURN, exec, app2unit -- $terminal
|
||||
bind = Super, F, exec, app2unit -- $browser
|
||||
bind = Super, V, togglefloating,
|
||||
bind = Super, P, pseudo
|
||||
bind = Super, S, togglesplit
|
||||
bindl = , XF86AudioPlay, global, caelestia:mediaToggle
|
||||
bindl = , XF86AudioPause, global, caelestia:mediaToggle
|
||||
bindl = , XF86AudioNext, global, caelestia:mediaNext
|
||||
bindl = , XF86AudioPrev, global, caelestia:mediaPrev
|
||||
bindl = , XF86AudioStop, global, caelestia:mediaStop
|
||||
|
||||
bind = Super+SHIFT, s, global, caelestia:screenshot
|
||||
bind = CTRL SHIFT, s, exec, hyprshot -m window
|
||||
bind = CTRL SHIFT Super, s, exec, hyprshot -m output
|
||||
bind = CTRL ALT, s, exec, hyprshot -m active -m window
|
||||
|
||||
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindle = , XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ $volumeStep%+
|
||||
bindle = , XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ $volumeStep%-
|
||||
|
||||
bind = Super, Period, exec, pkill fuzzel || caelestia emoji -p
|
||||
bind = Super+Shift, V, exec, pkill fuzzel || caelestia clipboard
|
||||
''}"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
''SUPER, mouse:272, movewindow''
|
||||
''SUPER, mouse:273, resizewindow''
|
||||
];
|
||||
|
||||
exec = [
|
||||
"cp -L --no-preserve=mode --update=none $hypr/scheme/default.conf $hypr/scheme/current.conf"
|
||||
];
|
||||
|
||||
misc = {
|
||||
vrr = 0;
|
||||
vfr = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.activation.writeConfigFile =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ]
|
||||
# bash
|
||||
''
|
||||
configList=("btop" "fastfetch" "thunar")
|
||||
|
||||
for config in "''\${configList[@]}"; do
|
||||
if [ ! -d "$XDG_CONFIG_HOME/$config" ]; then
|
||||
install -Dm666 "${caelestiaDot}/$config" "$XDG_CONFIG_HOME/$config"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
programs.caelestia = {
|
||||
enable = true;
|
||||
settings = { };
|
||||
cli = {
|
||||
enable = true;
|
||||
settings = { };
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = lib.mkDefault true;
|
||||
iconTheme = {
|
||||
name = lib.mkDefault "Papirus-Dark";
|
||||
package = lib.mkDefault pkgs.papirus-icon-theme;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.caelestia = {
|
||||
Service = {
|
||||
Environment = [
|
||||
"QT_QPA_PLATFORMTHEME=gtk3"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.swww.enable = lib.mkForce false;
|
||||
programs.waybar.enable = lib.mkForce false;
|
||||
services.swaync.enable = lib.mkForce false;
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
}:
|
||||
let
|
||||
configDir = ../config;
|
||||
browser = "zen.desktop";
|
||||
in
|
||||
{
|
||||
home.file."${config.home.homeDirectory}/.config/starship.toml".source =
|
||||
|
|
@ -21,20 +20,5 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
associations.added = {
|
||||
"application/pdf" = [ browser ];
|
||||
"image/jpeg" = [ browser ];
|
||||
"image/png" = [ browser ];
|
||||
};
|
||||
defaultApplications = {
|
||||
"text/html" = browser;
|
||||
"application/pdf" = [ browser ];
|
||||
"image/jpeg" = [ browser ];
|
||||
"image/png" = [ browser ];
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
};
|
||||
};
|
||||
xdg.mimeApps.enable = true;
|
||||
}
|
||||
|
|
|
|||
55
home/user/ghostty.nix
Normal file
55
home/user/ghostty.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (lib) mkDefault;
|
||||
|
||||
ghosttyShaders = pkgs.fetchFromGitHub {
|
||||
owner = "sahaj-b";
|
||||
repo = "ghostty-cursor-shaders";
|
||||
rev = "main";
|
||||
hash = "sha256-ruhEqXnWRCYdX5mRczpY3rj1DTdxyY3BoN9pdlDOKrE=";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
installBatSyntax = true;
|
||||
enableFishIntegration = true;
|
||||
package = inputs.ghostty.packages.${system}.default;
|
||||
clearDefaultKeybinds = false;
|
||||
settings = {
|
||||
custom-shader = [
|
||||
"${ghosttyShaders}/cursor_sweep.glsl"
|
||||
"${ghosttyShaders}/ripple_cursor.glsl"
|
||||
];
|
||||
|
||||
unfocused-split-opacity = 0.85;
|
||||
desktop-notifications = true;
|
||||
background-opacity = mkDefault 0.6;
|
||||
background-blur = 20;
|
||||
|
||||
wait-after-command = false;
|
||||
shell-integration = "detect";
|
||||
window-theme = "dark";
|
||||
|
||||
confirm-close-surface = false;
|
||||
window-decoration = false;
|
||||
|
||||
mouse-hide-while-typing = true;
|
||||
|
||||
keybind = [
|
||||
"ctrl+shift+zero=toggle_tab_overview"
|
||||
"ctrl+shift+9=reload_config"
|
||||
"ctrl+shift+o=unbind"
|
||||
];
|
||||
|
||||
clipboard-read = "allow";
|
||||
clipboard-write = "allow";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -3,11 +3,15 @@
|
|||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
helper,
|
||||
...
|
||||
}:
|
||||
with builtins;
|
||||
let
|
||||
inherit (osConfig.systemConf.hyprland) monitors;
|
||||
inherit (helper) getMonitors;
|
||||
inherit (osConfig.networking) hostName;
|
||||
monitors = getMonitors hostName config;
|
||||
|
||||
nvidia-offload-enabled = osConfig.hardware.nvidia.prime.offload.enableOffloadCmd;
|
||||
|
||||
notransTag = "notrans";
|
||||
|
|
|
|||
|
|
@ -67,13 +67,11 @@ let
|
|||
"match:class ^(it.mijorus.smile)"
|
||||
"match:class ^(xdg-desktop-portal-gtk)$"
|
||||
"match:class ^(vesktop)$, match:title ^(Discord Popout)$"
|
||||
"match:class ^(steam)$, match:title ^(Friends List)$"
|
||||
"match:title (Open File)"
|
||||
"match:title branchdialog"
|
||||
"match:title wlogout"
|
||||
"match:title ^(Media viewer)$"
|
||||
"match:title ^(File Operation Progress)$"
|
||||
"match:title ^(Steam Settings)$"
|
||||
"match:title ^(Picture-in-Picture)$"
|
||||
];
|
||||
|
||||
|
|
@ -91,8 +89,11 @@ let
|
|||
|
||||
# Steam
|
||||
"match:class ^(steam)$" = [
|
||||
"workspace 7 silent"
|
||||
"workspace unset, match:float true"
|
||||
"workspace 7 silent"
|
||||
"float true, match:title ^(Friends List)$"
|
||||
"float true, match:title ^(Steam Settings)$"
|
||||
"center true, match:float true"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -113,6 +114,7 @@ in
|
|||
"pin true, match:class ^(vesktop)$, match:title ^(Discord Popout)$"
|
||||
# steam game
|
||||
"workspace 7 silent, match:class ^(steam_app_)(.*)"
|
||||
"fullscreen true, match:class ^(steam_app_)(.*)"
|
||||
# VLC
|
||||
"workspace 3, match:initial_class ^(vlc), match:float false"
|
||||
# discord
|
||||
|
|
|
|||
|
|
@ -1,12 +1,21 @@
|
|||
{ osConfig, ... }:
|
||||
{
|
||||
osConfig,
|
||||
helper,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (osConfig.systemConf.hyprland) monitors;
|
||||
inherit (helper) getMonitors;
|
||||
inherit (osConfig.networking) hostName;
|
||||
monitors = getMonitors hostName config;
|
||||
|
||||
inherit (builtins)
|
||||
length
|
||||
genList
|
||||
toString
|
||||
elemAt
|
||||
;
|
||||
|
||||
monitorNum = length monitors;
|
||||
workspaceNum = 10;
|
||||
workspaceList = genList (
|
||||
|
|
@ -15,7 +24,7 @@ let
|
|||
currentNum = index - (monitorNum * (index / monitorNum));
|
||||
default = if index < monitorNum then "true" else "false";
|
||||
in
|
||||
"${toString (index + 1)}, monitor:desc:${(elemAt monitors currentNum).desc}, default:${default}"
|
||||
"${toString (index + 1)}, monitor:desc:${(elemAt monitors currentNum).criteria}, default:${default}"
|
||||
) workspaceNum;
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkForce escapeShellArgs getExe';
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (osConfig.systemConf) username;
|
||||
inherit (osConfig.systemConf.hyprland) monitors;
|
||||
|
||||
terminal = "ghostty";
|
||||
|
||||
execOnceScript = pkgs.writeShellScript "hyprlandExecOnce" ''
|
||||
|
|
@ -26,22 +21,10 @@ let
|
|||
'';
|
||||
|
||||
mainMod = "SUPER";
|
||||
|
||||
getCurrentSong = pkgs.writeShellScript "getSong" ''
|
||||
song_info=$(playerctl metadata --format '{{title}} {{artist}}')
|
||||
echo "$song_info"
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
mpvpaper # Video Wallpaper
|
||||
hyprcursor
|
||||
libnotify
|
||||
sunsetr
|
||||
];
|
||||
|
||||
systemd.user.tmpfiles.rules = [
|
||||
"d ${config.home.homeDirectory}/Pictures/Wallpapers 0744 ${username} users -"
|
||||
];
|
||||
|
||||
imports = [
|
||||
|
|
@ -101,11 +84,6 @@ in
|
|||
''${mainMod} CTRL, j, resizeactive, 0 ${resizeStep}''
|
||||
];
|
||||
|
||||
monitor = [
|
||||
", prefered, 0x0, 1"
|
||||
]
|
||||
++ (map (x: "desc:${x.desc},${x.props}") osConfig.systemConf.hyprland.monitors);
|
||||
|
||||
plugin = {
|
||||
hyprwinrap = {
|
||||
class = "kitty-bg";
|
||||
|
|
@ -137,441 +115,4 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
# === Awww === #
|
||||
services.swww = {
|
||||
enable = true;
|
||||
package = inputs.awww.packages.${system}.awww;
|
||||
};
|
||||
|
||||
systemd.user.services.swww.Service.ExecStart =
|
||||
mkForce "${getExe' config.services.swww.package "awww-daemon"} ${escapeShellArgs config.services.swww.extraArgs}";
|
||||
|
||||
# === hyprlock === #
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
package = inputs.hyprlock.packages.${system}.default;
|
||||
importantPrefixes = [
|
||||
"$"
|
||||
"monitor"
|
||||
"size"
|
||||
"source"
|
||||
];
|
||||
|
||||
settings =
|
||||
let
|
||||
font = "CaskaydiaCove Nerd Font";
|
||||
font2 = "SF Pro Display Bold";
|
||||
mainMonitor =
|
||||
if ((builtins.length monitors) > 0) then "desc:${(builtins.elemAt monitors 0).desc}" else "";
|
||||
in
|
||||
{
|
||||
background = {
|
||||
monitor = "";
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
|
||||
# GENERAL
|
||||
general = {
|
||||
no_fade_in = false;
|
||||
grace = 0;
|
||||
disable_loading_bar = false;
|
||||
ignore_empty_input = true;
|
||||
fail_timeout = 1000;
|
||||
};
|
||||
|
||||
# TIME
|
||||
label = [
|
||||
{
|
||||
monitor = "${mainMonitor}";
|
||||
text = ''cmd[update:1000] echo "$(date +"%-I:%M%p")"'';
|
||||
color = "rgba(250, 189, 47, .75)";
|
||||
font_size = 120;
|
||||
font_family = "${font2}";
|
||||
position = "0, -140";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
|
||||
# DAY-DATE-MONTH
|
||||
{
|
||||
monitor = "${mainMonitor}";
|
||||
text = ''cmd[update:1000] echo "<span>$(date '+%A, %d %B')</span>"'';
|
||||
color = "rgba(225, 225, 225, 0.75)";
|
||||
font_size = 30;
|
||||
font_family = "${font2}";
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
# USER
|
||||
{
|
||||
monitor = "${mainMonitor}";
|
||||
text = "Hello, $USER";
|
||||
color = "rgba(255, 255, 255, .65)";
|
||||
font_size = 25;
|
||||
font_family = "${font2}";
|
||||
position = "0, -70";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
# Current Song
|
||||
{
|
||||
monitor = "${mainMonitor}";
|
||||
text = ''cmd[update:1000] echo "$(${getCurrentSong})"'';
|
||||
color = "rgba(235, 219, 178, .75)";
|
||||
font_size = 16;
|
||||
font_family = "${font}, ${font2}";
|
||||
position = "0, 80";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
];
|
||||
|
||||
# LOGO
|
||||
image = {
|
||||
monitor = "${mainMonitor}";
|
||||
path = "$HOME/.face";
|
||||
border_size = 2;
|
||||
border_color = "rgba(255, 255, 255, .75)";
|
||||
size = 95;
|
||||
rounding = -1;
|
||||
rotate = 0;
|
||||
reload_time = -1;
|
||||
reload_cmd = "";
|
||||
position = "0, 60";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
# INPUT FIELD
|
||||
input-field = lib.mkForce [
|
||||
{
|
||||
monitor = "${mainMonitor}";
|
||||
size = "290, 60";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true;
|
||||
outer_color = "rgba(0, 0, 0, 0)";
|
||||
inner_color = "rgba(60, 56, 54, 0.35)";
|
||||
font_color = "rgb(200, 200, 200)";
|
||||
fail_color = "rgba(218, 53, 50, 0.56)";
|
||||
fade_on_empty = false;
|
||||
font_family = "${font2}";
|
||||
placeholder_text = ''<i><span foreground="##ffffff99">Bruh, come back!</span></i>'';
|
||||
hide_input = false;
|
||||
position = "0, -140";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# === hypridle === #
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
ignore_systemd_inhibit = false;
|
||||
};
|
||||
|
||||
listener = [
|
||||
# 2.5min -> set monitor backlight to minimum
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -s set 10";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
# 2.5min -> turn off keyboard backlight
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
|
||||
on-resume = "brightnessctl -rd rgb:kbd_backlight";
|
||||
}
|
||||
# 5min -> Lock screen
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# 5.5min -> Screen off
|
||||
{
|
||||
timeout = 330;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
# 30min -> Suspend pc
|
||||
# {
|
||||
# timeout = 1800;
|
||||
# on-timeout = "systemctl suspend";
|
||||
# }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# === sunsetr === #
|
||||
systemd.user.services.sunsetr = {
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
Unit = {
|
||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||
Description = "Blue light filter";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.sunsetr}/bin/sunsetr";
|
||||
Restart = "always";
|
||||
RestartSec = 2;
|
||||
};
|
||||
};
|
||||
|
||||
# === swaync === #
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
package = (
|
||||
pkgs.swaynotificationcenter.overrideAttrs (prev: rec {
|
||||
version = "0.12.1";
|
||||
|
||||
buildInputs =
|
||||
prev.buildInputs
|
||||
++ (with pkgs; [
|
||||
libhandy
|
||||
pantheon.granite
|
||||
gtk-layer-shell
|
||||
]);
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ErikReider";
|
||||
repo = "SwayNotificationCenter";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-kRawYbBLVx0ie4t7tChkA8QJShS83fUcGrJSKkxBy8Q=";
|
||||
};
|
||||
})
|
||||
);
|
||||
settings = {
|
||||
control-center-height = 900;
|
||||
control-center-margin-bottom = 20;
|
||||
control-center-margin-left = 20;
|
||||
control-center-margin-right = 20;
|
||||
control-center-margin-top = 20;
|
||||
control-center-width = 500;
|
||||
fit-to-screen = true;
|
||||
hide-on-action = true;
|
||||
hide-on-clear = true;
|
||||
image-visibility = "when-available";
|
||||
keyboard-shortcuts = true;
|
||||
layer = "overlay";
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
notification-icon-size = 64;
|
||||
notification-window-width = 490;
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
script-fail-notify = true;
|
||||
timeout = 3;
|
||||
timeout-critical = 0;
|
||||
timeout-low = 2;
|
||||
transition-time = 200;
|
||||
widgets = lib.mkForce [
|
||||
"title"
|
||||
"notifications"
|
||||
"mpris"
|
||||
];
|
||||
};
|
||||
style = # css
|
||||
''
|
||||
@define-color bgc rgba(0, 0, 0, 0.1);
|
||||
@define-color borderc #ebdbb2;
|
||||
@define-color textc #212121;
|
||||
|
||||
* {
|
||||
font-family: ${osConfig.stylix.fonts.sansSerif.name};
|
||||
font-size: ${toString osConfig.stylix.fonts.sizes.desktop}px;
|
||||
font-weight: bold;
|
||||
border-width: 3px;
|
||||
border-color: #ebdbb2;
|
||||
}
|
||||
|
||||
.control-center .notification-row:focus,
|
||||
.control-center .notification-row:hover {
|
||||
opacity: 1;
|
||||
background: @bgc;
|
||||
}
|
||||
|
||||
.notification-row {
|
||||
outline: none;
|
||||
margin: 5px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background: @bgc;
|
||||
margin: 0px;
|
||||
border-radius: 6px;
|
||||
border-width: 3px;
|
||||
border-color: @borderc;
|
||||
}
|
||||
|
||||
.notification-content {
|
||||
background: @bgc;
|
||||
padding: 7px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
background: @bgc;
|
||||
color: @borderc;
|
||||
text-shadow: none;
|
||||
padding: 0;
|
||||
border-radius: 20px;
|
||||
margin-top: 9px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.close-button:hover {
|
||||
box-shadow: none;
|
||||
background: @borderc;
|
||||
color: @textc;
|
||||
transition: all .15s ease-in-out;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.notification-action {
|
||||
color: @borderc;
|
||||
background: @bgc;
|
||||
}
|
||||
|
||||
.notification-action:hover {
|
||||
color: @textc;
|
||||
background: @borderc;
|
||||
}
|
||||
|
||||
.summary {
|
||||
padding-top: 7px;
|
||||
font-size: 13px;
|
||||
color: @borderc;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 11px;
|
||||
color: @borderc;
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.body {
|
||||
font-size: 12px;
|
||||
color: @borderc;
|
||||
}
|
||||
|
||||
.control-center {
|
||||
background-color: @bgc;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.control-center-list {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.control-center-list-placeholder {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.floating-notifications {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.blank-window {
|
||||
background: alpha(black, 0.1);
|
||||
}
|
||||
|
||||
.widget-title {
|
||||
color: @borderc;
|
||||
padding: 10px 10px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.widget-title>button {
|
||||
font-size: 1rem;
|
||||
color: @borderc;
|
||||
padding: 10px;
|
||||
text-shadow: none;
|
||||
background: @bgc;
|
||||
box-shadow: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.widget-title>button:hover {
|
||||
background: @borderc;
|
||||
color: @textc;
|
||||
}
|
||||
|
||||
.widget-label {
|
||||
margin: 10px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.widget-label>label {
|
||||
font-size: 1rem;
|
||||
color: @borderc;
|
||||
}
|
||||
|
||||
.widget-mpris {
|
||||
color: @borderc;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.widget-mpris>box>button {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.widget-mpris-player {
|
||||
padding: 5px 5px;
|
||||
margin: 10px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# === rofi === #
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
rofi-calc
|
||||
];
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
NIXOS_XDG_OPEN_USE_PORTAL = "1";
|
||||
|
||||
GDK_BACKEND = "wayland";
|
||||
QT_SCALE_FACTOR = "1";
|
||||
QT_QPA_PLATFORM = "wayland-egl";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_IM_MODULES = "wayland;fcitx;ibus";
|
||||
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
EGL_PLATFORM = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -342,6 +342,15 @@ in
|
|||
documentDiagnostics = "<Leader>xx";
|
||||
};
|
||||
};
|
||||
|
||||
servers.nix.init_options = {
|
||||
nixos.expr =
|
||||
# nix
|
||||
''(builtins.getFlake "/etc/nixos").nixosConfigurations.${osConfig.networking.hostName}.options'';
|
||||
home_manager.expr =
|
||||
# nix
|
||||
''(builtins.getFlake "/etc/nixos").nixosConfigurations.${osConfig.networking.hostName}.options.home-manager.users.type.getSubOptions []'';
|
||||
};
|
||||
};
|
||||
|
||||
debugger = {
|
||||
|
|
@ -354,8 +363,10 @@ in
|
|||
formatter = {
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
setupOpts.formatters_by_ft = {
|
||||
nix = [ "nixfmt" ];
|
||||
setupOpts = {
|
||||
formatters_by_ft = {
|
||||
nix = [ "nixfmt" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -404,23 +415,13 @@ in
|
|||
enable = true;
|
||||
extraDiagnostics.enable = false;
|
||||
format.enable = false; # Manually configured in conform-nvim
|
||||
lsp = {
|
||||
server = "nixd";
|
||||
options = {
|
||||
nixos.expr =
|
||||
# nix
|
||||
''(builtins.getFlake "/etc/nixos").nixosConfigurations.${osConfig.networking.hostName}.options'';
|
||||
home_manager.expr =
|
||||
# nix
|
||||
''(builtins.getFlake "/etc/nixos").nixosConfigurations.${osConfig.networking.hostName}.options.home-manager.users.type.getSubOptions []'';
|
||||
};
|
||||
};
|
||||
lsp.servers = [ "nixd" ];
|
||||
};
|
||||
sql.enable = true;
|
||||
clang.enable = true;
|
||||
ts = {
|
||||
enable = true;
|
||||
format.type = "prettierd";
|
||||
format.type = [ "prettierd" ];
|
||||
extensions = {
|
||||
ts-error-translator.enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,17 +1,9 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
md2html = pkgs.callPackage ../scripts/md2html.nix { };
|
||||
ghosttyShaders = pkgs.fetchFromGitHub {
|
||||
owner = "sahaj-b";
|
||||
repo = "ghostty-cursor-shaders";
|
||||
rev = "main";
|
||||
hash = "sha256-ruhEqXnWRCYdX5mRczpY3rj1DTdxyY3BoN9pdlDOKrE=";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.btop = {
|
||||
|
|
@ -22,61 +14,12 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
installBatSyntax = true;
|
||||
enableFishIntegration = true;
|
||||
package = inputs.ghostty.packages.${system}.default;
|
||||
settings = {
|
||||
custom-shader = [
|
||||
"${ghosttyShaders}/cursor_sweep.glsl"
|
||||
"${ghosttyShaders}/ripple_cursor.glsl"
|
||||
];
|
||||
|
||||
unfocused-split-opacity = 0.85;
|
||||
desktop-notifications = false;
|
||||
background-opacity = 0.4;
|
||||
background-blur = false;
|
||||
|
||||
wait-after-command = false;
|
||||
shell-integration = "detect";
|
||||
window-theme = "dark";
|
||||
|
||||
confirm-close-surface = false;
|
||||
window-decoration = false;
|
||||
|
||||
mouse-hide-while-typing = true;
|
||||
|
||||
keybind = [
|
||||
"ctrl+shift+zero=toggle_tab_overview"
|
||||
"ctrl+shift+e=unbind"
|
||||
"ctrl+shift+o=unbind"
|
||||
];
|
||||
|
||||
clipboard-read = "allow";
|
||||
clipboard-write = "allow";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
obsidian
|
||||
|
||||
# Discord
|
||||
# vesktop
|
||||
discord
|
||||
|
||||
# Dev stuff
|
||||
(python3.withPackages (python-pkgs: [
|
||||
python-pkgs.pip
|
||||
python-pkgs.requests
|
||||
]))
|
||||
|
||||
# Work stuff
|
||||
libreoffice-qt
|
||||
pandoc
|
||||
|
||||
# Bluetooth
|
||||
blueberry
|
||||
|
||||
# Downloads
|
||||
qbittorrent
|
||||
|
|
@ -85,9 +28,6 @@ in
|
|||
cava
|
||||
papirus-folders
|
||||
inkscape
|
||||
|
||||
# PDF Preview
|
||||
poppler
|
||||
trash-cli
|
||||
|
||||
# File Manager
|
||||
|
|
|
|||
6
home/user/podman.nix
Normal file
6
home/user/podman.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.podman = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
quickshell
|
||||
];
|
||||
|
||||
systemd.user.services.quickshell = {
|
||||
Unit = {
|
||||
Description = "Quickshell";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
type = "exec";
|
||||
ExecStart = "${pkgs.quickshell}/bin/quickshell";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
TimeoutStopSec = "5s";
|
||||
Environment = [
|
||||
"QT_QPA_PLATFORM=wayland"
|
||||
];
|
||||
|
||||
Slice = "session.slice";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -23,6 +23,12 @@ in
|
|||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting # Disable greeting
|
||||
|
||||
# ==== Prevent Running Everything on GPU ==== #
|
||||
set -e __NV_PRIME_RENDER_OFFLOAD
|
||||
set -e __NV_PRIME_RENDER_OFFLOAD_PROVIDER
|
||||
set -e __GLX_VENDOR_LIBRARY_NAME
|
||||
set -e __VK_LAYER_NV_optimus
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ let
|
|||
--sudo --ask-sudo-password $@'';
|
||||
|
||||
rebuild = pkgs.writeShellScriptBin "rebuild" ''
|
||||
${rebuildCommand}
|
||||
'';
|
||||
|
||||
# Notification
|
||||
nrebuild = pkgs.writeShellScriptBin "nrebuild" ''
|
||||
${
|
||||
if shouldNotify then
|
||||
''
|
||||
|
|
@ -36,6 +41,7 @@ let
|
|||
in
|
||||
{
|
||||
home.packages = [
|
||||
nrebuild
|
||||
rebuild
|
||||
];
|
||||
|
||||
|
|
|
|||
71
home/user/shells/caelestia.nix
Normal file
71
home/user/shells/caelestia.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkForce hasAttr;
|
||||
prefix = if osConfig.hardware.nvidia.prime.offload.enableOffloadCmd then "nvidia-offload " else "";
|
||||
terminal = "${prefix}ghostty";
|
||||
explorer = "nautilus";
|
||||
in
|
||||
{
|
||||
# ==== Disabled Services ==== #
|
||||
services.swww.enable = mkForce false;
|
||||
programs.waybar.enable = mkForce false;
|
||||
services.swaync.enable = mkForce false;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# programs.niri.settings = with config.lib.niri.actions; {
|
||||
# binds = {
|
||||
# "Alt+Space".action = mkForce (spawn "caelestia" "shell" "drawers" "toggle" "launcher");
|
||||
# };
|
||||
# };
|
||||
|
||||
programs.caelestia = {
|
||||
enable = true;
|
||||
systemd.environment = [
|
||||
"QT_QPA_PLATFORMTHEME=gtk3"
|
||||
];
|
||||
settings = {
|
||||
paths.wallpaperDir = "~/Pictures/Wallpapers";
|
||||
general.apps = {
|
||||
terminal = [ terminal ];
|
||||
explorer = [ explorer ];
|
||||
};
|
||||
visualiser.enabled = true;
|
||||
osd.hideDelay = 1500;
|
||||
utilities.vpn = {
|
||||
enabled = hasAttr "wg-quick-wg0" osConfig.systemd.services;
|
||||
provider = [
|
||||
{
|
||||
name = "wireguard";
|
||||
interface = "wg0";
|
||||
displayName = "Wireguard (DN)";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
cli = {
|
||||
enable = true;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = mkForce {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = [ "qemu:///system" ];
|
||||
uris = [ "qemu:///system" ];
|
||||
};
|
||||
dconf.settings."org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = [ "qemu:///system" ];
|
||||
uris = [ "qemu:///system" ];
|
||||
};
|
||||
|
||||
# default network can be start with:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
settings ? [ ],
|
||||
matchByDesc ? false,
|
||||
}:
|
||||
{
|
||||
osConfig,
|
||||
|
|
@ -11,7 +12,15 @@
|
|||
}:
|
||||
let
|
||||
inherit (helper) mkToggleScript;
|
||||
inherit (lib) optionalString;
|
||||
inherit (lib)
|
||||
optionalString
|
||||
imap0
|
||||
getExe
|
||||
concatStringsSep
|
||||
map
|
||||
;
|
||||
|
||||
wmName = if osConfig.programs.hyprland.enable then "hyprland" else "niri";
|
||||
|
||||
gamemodeToggle = mkToggleScript {
|
||||
service = "gamemodedr";
|
||||
|
|
@ -77,6 +86,35 @@ let
|
|||
rbwSelector = import ../scripts/rbwSelector.nix { inherit pkgs; };
|
||||
|
||||
toggleRecord = pkgs.callPackage ../scripts/record.nix { };
|
||||
|
||||
includePath = "${config.home.homeDirectory}/.config/waybar";
|
||||
|
||||
mkMatchByDesc =
|
||||
settings:
|
||||
let
|
||||
# Config will generated by systemd
|
||||
descs = map (v: "${v.output}") settings;
|
||||
descString = concatStringsSep ";" descs;
|
||||
in
|
||||
(pkgs.writeShellScript "config-match-by-desc" ''
|
||||
FILE_PATH="${includePath}"
|
||||
IFS=";" read -r -a DESCS <<< "${descString}"
|
||||
monitors_json=$(${getExe pkgs.wlr-randr} --json)
|
||||
|
||||
i=0
|
||||
|
||||
for desc in "''\${DESCS[@]}"; do
|
||||
name=$(${getExe pkgs.jq} -r --arg d "$desc" '
|
||||
.[] | select((.make + " " + .model + " " + .serial) == $d) | .name
|
||||
' <<< "$monitors_json")
|
||||
|
||||
file="monitor-$i.json"
|
||||
printf '{ "output": "%s" }\n' "$name" > "$FILE_PATH/$file"
|
||||
echo "$file Generated."
|
||||
|
||||
i=$((i+1))
|
||||
done
|
||||
'');
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
|
|
@ -97,6 +135,14 @@ in
|
|||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service.ExecStartPre =
|
||||
let
|
||||
matchScript = mkMatchByDesc settings;
|
||||
in
|
||||
[
|
||||
"${matchScript}"
|
||||
];
|
||||
};
|
||||
|
||||
programs.waybar =
|
||||
|
|
@ -264,63 +310,27 @@ in
|
|||
margin-bottom = 0;
|
||||
|
||||
modules-center = [
|
||||
"hyprland/window"
|
||||
"${wmName}/window"
|
||||
];
|
||||
};
|
||||
|
||||
modulesConfig =
|
||||
let
|
||||
terminalRun = "${config.programs.ghostty.package}/bin/ghostty -e";
|
||||
in
|
||||
{
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
commonWorkspace = {
|
||||
all-outputs = true;
|
||||
format = "{icon}";
|
||||
show-special = false;
|
||||
on-click = "activate";
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
persistent-workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
};
|
||||
format-icons = {
|
||||
active = "";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
clock = {
|
||||
format = "<b> {:%H:%M %d/%m}</b>";
|
||||
tooltip-format = "{:%A %d %B %Y}";
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
"custom/os" = {
|
||||
format = "";
|
||||
on-click = "wlogout --protocol layer-shell";
|
||||
};
|
||||
cpu = {
|
||||
format = " {usage}%";
|
||||
max-length = 20;
|
||||
interval = 5;
|
||||
on-click-right = "${terminalRun} btop";
|
||||
};
|
||||
"hyprland/window" = {
|
||||
commonWindow = {
|
||||
format = "{}";
|
||||
max-length = 40;
|
||||
separate-outputs = true;
|
||||
offscreen-css = true;
|
||||
offscreen-css-text = "(inactive)";
|
||||
rewrite = {
|
||||
"nvim . (.*)" = " $1";
|
||||
"(.*) \\| nvim (.*)" = " $1";
|
||||
"(.*) \\| vi (.*)" = " $1";
|
||||
"(.*) - Visual Studio Code" = " $1";
|
||||
"\\(\\d+\\) Discord (.*)" = " $1";
|
||||
|
||||
|
|
@ -344,6 +354,60 @@ in
|
|||
"(.*) - VLC media player" = " $1";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
# ==== Niri ==== #
|
||||
"niri/workspaces" = commonWorkspace // {
|
||||
format-icons = {
|
||||
focused = "";
|
||||
game = "";
|
||||
browser = "";
|
||||
};
|
||||
};
|
||||
"niri/window" = commonWindow // {
|
||||
};
|
||||
|
||||
# ==== Hyprland ==== #
|
||||
"hyprland/workspaces" = commonWorkspace // {
|
||||
active-only = false;
|
||||
show-special = false;
|
||||
on-click = "activate";
|
||||
on-scroll-up = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
persistent-workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
};
|
||||
};
|
||||
"hyprland/window" = commonWindow // {
|
||||
max-length = 40;
|
||||
offscreen-css = true;
|
||||
offscreen-css-text = "(inactive)";
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "<b> {:%H:%M %d/%m}</b>";
|
||||
tooltip-format = "{:%A %d %B %Y}";
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
"custom/os" = {
|
||||
format = "";
|
||||
on-click = "wlogout --protocol layer-shell";
|
||||
};
|
||||
cpu = {
|
||||
format = " {usage}%";
|
||||
max-length = 20;
|
||||
interval = 5;
|
||||
on-click-right = "${terminalRun} btop";
|
||||
};
|
||||
memory = {
|
||||
interval = 30;
|
||||
format = " {used:0.1f}GB/{total:0.1f}G";
|
||||
|
|
@ -383,7 +447,7 @@ in
|
|||
];
|
||||
};
|
||||
scroll-step = 5.0;
|
||||
on-click = "pavucontrol -t 3";
|
||||
on-click = "pwvucontrol -t 4";
|
||||
tooltip-format = "{icon} {desc} | {volume}%";
|
||||
smooth-scrolling-threshold = 1;
|
||||
};
|
||||
|
|
@ -455,6 +519,7 @@ in
|
|||
"custom/cava" = {
|
||||
exec = "${pkgs.writeShellScript "cava-wave" ''
|
||||
#Taken from JaKoolit's dotfiles
|
||||
PATH="$PATH:${pkgs.cava}/bin"
|
||||
|
||||
bar="▁▂▃▄▅▆▇█"
|
||||
dict="s/;//g"
|
||||
|
|
@ -487,7 +552,7 @@ in
|
|||
cava -p "$config_file" | sed -u "$dict"
|
||||
''}";
|
||||
format = "{}";
|
||||
on-click = "${terminalRun} cava";
|
||||
on-click = "${terminalRun} ${getExe pkgs.cava}";
|
||||
};
|
||||
battery =
|
||||
let
|
||||
|
|
@ -602,7 +667,7 @@ in
|
|||
otherConfig = {
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"hyprland/workspaces"
|
||||
"${wmName}/workspaces"
|
||||
"clock"
|
||||
"mpris"
|
||||
"custom/cava"
|
||||
|
|
@ -622,7 +687,27 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
finalList = if ((builtins.length settings) == 0) then [ otherConfig ] else settings;
|
||||
finalList =
|
||||
if ((builtins.length settings) == 0) then
|
||||
# Use default configuration
|
||||
[ otherConfig ]
|
||||
else
|
||||
(
|
||||
if matchByDesc then
|
||||
# Config will generated by systemd
|
||||
(imap0 (
|
||||
i: v:
|
||||
let
|
||||
outputRemoved = removeAttrs v [ "output" ];
|
||||
includeAdded = outputRemoved // {
|
||||
include = [ "${includePath}/monitor-${toString i}.json" ];
|
||||
};
|
||||
in
|
||||
includeAdded
|
||||
) settings)
|
||||
else
|
||||
settings
|
||||
);
|
||||
in
|
||||
map (dev: dev // modulesConfig // commonConfig) finalList;
|
||||
|
||||
|
|
|
|||
464
home/user/wm-service.nix
Normal file
464
home/user/wm-service.nix
Normal file
|
|
@ -0,0 +1,464 @@
|
|||
{
|
||||
osConfig,
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) escapeShellArgs mkForce getExe';
|
||||
inherit (osConfig.systemConf) username;
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
|
||||
getCurrentSong = pkgs.writeShellScript "getSong" ''
|
||||
song_info=$(playerctl metadata --format '{{title}} {{artist}}')
|
||||
echo "$song_info"
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GDK_BACKEND = "wayland";
|
||||
|
||||
QT_SCALE_FACTOR = "1";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_IM_MODULES = "wayland;fcitx;ibus";
|
||||
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
EGL_PLATFORM = "wayland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
mpvpaper # Video Wallpaper
|
||||
libnotify
|
||||
sunsetr
|
||||
|
||||
wlogout
|
||||
wl-clipboard
|
||||
|
||||
# Util
|
||||
grim
|
||||
slurp
|
||||
];
|
||||
|
||||
systemd.user.tmpfiles.rules = [
|
||||
"d ${config.home.homeDirectory}/Pictures/Wallpapers 0744 ${username} users -"
|
||||
];
|
||||
|
||||
# === kanshi (Monitor Manager) === #
|
||||
services.kanshi.enable = true;
|
||||
|
||||
# === Awww === #
|
||||
services.swww = {
|
||||
enable = true;
|
||||
package = inputs.awww.packages.${system}.awww;
|
||||
};
|
||||
|
||||
systemd.user.services.swww.Service.ExecStart =
|
||||
mkForce "${getExe' config.services.swww.package "awww-daemon"} ${escapeShellArgs config.services.swww.extraArgs}";
|
||||
|
||||
# === sunsetr === #
|
||||
services.sunsetr.enable = true;
|
||||
|
||||
# === swaync === #
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
package = (
|
||||
pkgs.swaynotificationcenter.overrideAttrs (prev: rec {
|
||||
version = "0.12.1";
|
||||
|
||||
buildInputs =
|
||||
prev.buildInputs
|
||||
++ (with pkgs; [
|
||||
libhandy
|
||||
pantheon.granite
|
||||
gtk-layer-shell
|
||||
]);
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ErikReider";
|
||||
repo = "SwayNotificationCenter";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-kRawYbBLVx0ie4t7tChkA8QJShS83fUcGrJSKkxBy8Q=";
|
||||
};
|
||||
})
|
||||
);
|
||||
settings = {
|
||||
control-center-height = 900;
|
||||
control-center-margin-bottom = 20;
|
||||
control-center-margin-left = 20;
|
||||
control-center-margin-right = 20;
|
||||
control-center-margin-top = 20;
|
||||
control-center-width = 500;
|
||||
fit-to-screen = true;
|
||||
hide-on-action = true;
|
||||
hide-on-clear = true;
|
||||
image-visibility = "when-available";
|
||||
keyboard-shortcuts = true;
|
||||
layer = "overlay";
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
notification-icon-size = 64;
|
||||
notification-window-width = 490;
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
script-fail-notify = true;
|
||||
timeout = 3;
|
||||
timeout-critical = 0;
|
||||
timeout-low = 2;
|
||||
transition-time = 200;
|
||||
widgets = lib.mkForce [
|
||||
"title"
|
||||
"notifications"
|
||||
"mpris"
|
||||
];
|
||||
};
|
||||
style = # css
|
||||
''
|
||||
@define-color bgc rgba(0, 0, 0, 0.1);
|
||||
@define-color borderc #ebdbb2;
|
||||
@define-color textc #212121;
|
||||
|
||||
* {
|
||||
font-family: ${osConfig.stylix.fonts.sansSerif.name};
|
||||
font-size: ${toString osConfig.stylix.fonts.sizes.desktop}px;
|
||||
font-weight: bold;
|
||||
border-width: 3px;
|
||||
border-color: #ebdbb2;
|
||||
}
|
||||
|
||||
.control-center .notification-row:focus,
|
||||
.control-center .notification-row:hover {
|
||||
opacity: 1;
|
||||
background: @bgc;
|
||||
}
|
||||
|
||||
.notification-row {
|
||||
outline: none;
|
||||
margin: 5px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background: @bgc;
|
||||
margin: 0px;
|
||||
border-radius: 6px;
|
||||
border-width: 3px;
|
||||
border-color: @borderc;
|
||||
}
|
||||
|
||||
.notification-content {
|
||||
background: @bgc;
|
||||
padding: 7px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
background: @bgc;
|
||||
color: @borderc;
|
||||
text-shadow: none;
|
||||
padding: 0;
|
||||
border-radius: 20px;
|
||||
margin-top: 9px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.close-button:hover {
|
||||
box-shadow: none;
|
||||
background: @borderc;
|
||||
color: @textc;
|
||||
transition: all .15s ease-in-out;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.notification-action {
|
||||
color: @borderc;
|
||||
background: @bgc;
|
||||
}
|
||||
|
||||
.notification-action:hover {
|
||||
color: @textc;
|
||||
background: @borderc;
|
||||
}
|
||||
|
||||
.summary {
|
||||
padding-top: 7px;
|
||||
font-size: 13px;
|
||||
color: @borderc;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 11px;
|
||||
color: @borderc;
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.body {
|
||||
font-size: 12px;
|
||||
color: @borderc;
|
||||
}
|
||||
|
||||
.control-center {
|
||||
background-color: @bgc;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.control-center-list {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.control-center-list-placeholder {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.floating-notifications {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.blank-window {
|
||||
background: alpha(black, 0.1);
|
||||
}
|
||||
|
||||
.widget-title {
|
||||
color: @borderc;
|
||||
padding: 10px 10px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.widget-title>button {
|
||||
font-size: 1rem;
|
||||
color: @borderc;
|
||||
padding: 10px;
|
||||
text-shadow: none;
|
||||
background: @bgc;
|
||||
box-shadow: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.widget-title>button:hover {
|
||||
background: @borderc;
|
||||
color: @textc;
|
||||
}
|
||||
|
||||
.widget-label {
|
||||
margin: 10px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.widget-label>label {
|
||||
font-size: 1rem;
|
||||
color: @borderc;
|
||||
}
|
||||
|
||||
.widget-mpris {
|
||||
color: @borderc;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.widget-mpris>box>button {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.widget-mpris-player {
|
||||
padding: 5px 5px;
|
||||
margin: 10px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# === rofi === #
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
rofi-calc
|
||||
];
|
||||
};
|
||||
|
||||
# === hyprlock === #
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
importantPrefixes = [
|
||||
"$"
|
||||
"monitor"
|
||||
"size"
|
||||
"source"
|
||||
];
|
||||
|
||||
settings =
|
||||
let
|
||||
font = "CaskaydiaCove Nerd Font";
|
||||
font2 = "SF Pro Display Bold";
|
||||
in
|
||||
{
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
}
|
||||
];
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
fade_in = {
|
||||
duration = 300;
|
||||
bezier = "easeeOutQuint";
|
||||
};
|
||||
fade_out = {
|
||||
duration = 300;
|
||||
bezier = "easeeOutQuint";
|
||||
};
|
||||
};
|
||||
|
||||
# GENERAL
|
||||
general = {
|
||||
no_fade_in = false;
|
||||
grace = 0;
|
||||
disable_loading_bar = false;
|
||||
ignore_empty_input = true;
|
||||
fail_timeout = 1000;
|
||||
};
|
||||
|
||||
# TIME
|
||||
label = [
|
||||
{
|
||||
text = ''cmd[update:1000] echo "$(date +"%-I:%M%p")"'';
|
||||
color = "rgba(250, 189, 47, .75)";
|
||||
font_size = 120;
|
||||
font_family = "${font2}";
|
||||
position = "0, -140";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
|
||||
# DAY-DATE-MONTH
|
||||
{
|
||||
text = ''cmd[update:1000] echo "<span>$(date '+%A, %d %B')</span>"'';
|
||||
color = "rgba(225, 225, 225, 0.75)";
|
||||
font_size = 30;
|
||||
font_family = "${font2}";
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
# USER
|
||||
{
|
||||
text = "Hello, $USER";
|
||||
color = "rgba(255, 255, 255, .65)";
|
||||
font_size = 25;
|
||||
font_family = "${font2}";
|
||||
position = "0, -70";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
# Current Song
|
||||
{
|
||||
text = ''cmd[update:1000] echo "$(${getCurrentSong})"'';
|
||||
color = "rgba(235, 219, 178, .75)";
|
||||
font_size = 16;
|
||||
font_family = "${font}, ${font2}";
|
||||
position = "0, 80";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
];
|
||||
|
||||
# LOGO
|
||||
image = {
|
||||
path = "$HOME/.face";
|
||||
border_size = 2;
|
||||
border_color = "rgba(255, 255, 255, .75)";
|
||||
size = 95;
|
||||
rounding = -1;
|
||||
rotate = 0;
|
||||
reload_time = -1;
|
||||
reload_cmd = "";
|
||||
position = "0, 60";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
# INPUT FIELD
|
||||
input-field = [
|
||||
{
|
||||
size = "290, 60";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true;
|
||||
outer_color = "rgba(0, 0, 0, 0)";
|
||||
inner_color = "rgba(60, 56, 54, 0.35)";
|
||||
font_color = "rgb(200, 200, 200)";
|
||||
fail_color = "rgba(218, 53, 50, 0.56)";
|
||||
fade_on_empty = false;
|
||||
font_family = "${font2}";
|
||||
placeholder_text = ''<i><span foreground="##ffffff99">Bruh, come back!</span></i>'';
|
||||
hide_input = false;
|
||||
position = "0, -140";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# === hypridle === #
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "niri msg power-off-monitors";
|
||||
ignore_dbus_inhibit = false;
|
||||
ignore_systemd_inhibit = false;
|
||||
};
|
||||
|
||||
listener = [
|
||||
# 2.5min -> set monitor backlight to minimum
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -s set 10";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
# 2.5min -> turn off keyboard backlight
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
|
||||
on-resume = "brightnessctl -rd rgb:kbd_backlight";
|
||||
}
|
||||
# 5min -> Lock screen
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# 5.5min -> Screen off
|
||||
{
|
||||
timeout = 330;
|
||||
on-timeout = "niri msg power-off-monitors";
|
||||
on-resume = "niri msg power-on-monitors";
|
||||
}
|
||||
# 30min -> Suspend pc
|
||||
# {
|
||||
# timeout = 1800;
|
||||
# on-timeout = "systemctl suspend";
|
||||
# }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (lib) getExe';
|
||||
yaziPlugins = pkgs.fetchFromGitHub {
|
||||
owner = "yazi-rs";
|
||||
repo = "plugins";
|
||||
|
|
@ -19,10 +20,7 @@ let
|
|||
for path in "$@"; do
|
||||
output_path="normalized_$(basename "$path")"
|
||||
${pkgs.ghostscript}/bin/gs \
|
||||
-o "$output_path" \
|
||||
-sDEVICE=pdfwrite \
|
||||
-sPAPERSIZE=a4 \
|
||||
-dFIXEDMEDIA \
|
||||
-o "$output_path" \ -sDEVICE=pdfwrite \ -sPAPERSIZE=a4 \ -dFIXEDMEDIA \
|
||||
-dPDFFitPage "$path"
|
||||
done
|
||||
'';
|
||||
|
|
@ -30,210 +28,214 @@ let
|
|||
pdfCombine = pkgs.writeShellScriptBin "combine-pdf" ''
|
||||
${lib.getExe pkgs.pdftk} "$@" cat output combined_$(date +%Y%m%d_%H%M%S).pdf
|
||||
'';
|
||||
|
||||
setWallpaper =
|
||||
if config.services.swww.enable then
|
||||
''shell -- ${getExe' config.services.swww.package "awww"} img "$0" --transition-fps 45 --transition-duration 1 --transition-type random''
|
||||
else
|
||||
''shell '${getExe' config.programs.caelestia.cli.package "caelestia"} wallpaper -f "$0" 2>&1 >/dev/null' '';
|
||||
in
|
||||
{
|
||||
programs = {
|
||||
yazi = {
|
||||
enable = true;
|
||||
package = inputs.yazi.packages.${system}.default;
|
||||
shellWrapperName = "y";
|
||||
enableFishIntegration = true;
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
package = inputs.yazi.packages.${system}.default;
|
||||
shellWrapperName = "y";
|
||||
enableFishIntegration = true;
|
||||
|
||||
plugins = {
|
||||
toggle-pane = ''${yaziPlugins}/toggle-pane.yazi'';
|
||||
mount = ''${yaziPlugins}/mount.yazi'';
|
||||
zoom = ''${yaziPlugins}/zoom'';
|
||||
vcs-files = ''${yaziPlugins}/vcs-files'';
|
||||
git = ''${yaziPlugins}/git'';
|
||||
};
|
||||
|
||||
settings = {
|
||||
plugin.prepend_fetchers = [
|
||||
{
|
||||
id = "git";
|
||||
name = "*";
|
||||
run = "git";
|
||||
}
|
||||
];
|
||||
|
||||
input = {
|
||||
cursor_blink = true;
|
||||
};
|
||||
|
||||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = ''''\${EDITOR:=nvim} "$0"'';
|
||||
desc = "$EDITOR";
|
||||
block = true;
|
||||
}
|
||||
{
|
||||
run = ''code "$0"'';
|
||||
orphan = true;
|
||||
}
|
||||
];
|
||||
|
||||
player = [
|
||||
{ run = ''mpv --force-window "$0"''; }
|
||||
];
|
||||
|
||||
open = [
|
||||
{
|
||||
run = ''xdg-open "$0"'';
|
||||
desc = "Open";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
open = {
|
||||
prepend_rules = [
|
||||
{
|
||||
mime = "application/pdf";
|
||||
use = "open";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
keymap = {
|
||||
mgr.prepend_keymap = [
|
||||
# Set Wallpaper
|
||||
{
|
||||
on = [
|
||||
"g"
|
||||
"w"
|
||||
];
|
||||
run = ''shell -- ${config.services.swww.package}/bin/awww img "$0" --transition-fps 45 --transition-duration 1 --transition-type random'';
|
||||
desc = "Set as wallpaper";
|
||||
}
|
||||
# Git Changes
|
||||
{
|
||||
on = [
|
||||
"g"
|
||||
"c"
|
||||
];
|
||||
run = "plugin vcs-files";
|
||||
desc = "Show Git file changes";
|
||||
}
|
||||
# Image zoom
|
||||
{
|
||||
on = "+";
|
||||
run = "plugin zoom 1";
|
||||
desc = "Zoom in hovered file";
|
||||
}
|
||||
{
|
||||
on = "-";
|
||||
run = "plugin zoom -1";
|
||||
desc = "Zoom out hovered file";
|
||||
}
|
||||
# Mount Manager
|
||||
{
|
||||
on = "M";
|
||||
run = "plugin mount";
|
||||
desc = "Launch mount manager";
|
||||
# Usage
|
||||
# Key binding Alternate key Action
|
||||
# q - Quit the plugin
|
||||
# k ↑ Move up
|
||||
# j ↓ Move down
|
||||
# l → Enter the mount point
|
||||
# m - Mount the partition
|
||||
# u - Unmount the partition
|
||||
# e - Eject the disk
|
||||
}
|
||||
# Toggle Maximize Preview
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin toggle-pane max-preview";
|
||||
desc = "Show or hide the preview panel";
|
||||
}
|
||||
# Copy selected files to the system clipboard while yanking
|
||||
{
|
||||
on = "y";
|
||||
run = [
|
||||
''shell -- for path in "$0" "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list''
|
||||
"yank"
|
||||
];
|
||||
}
|
||||
# cd back to the root of the current Git repository
|
||||
{
|
||||
on = [
|
||||
"g"
|
||||
"r"
|
||||
];
|
||||
run = ''shell -- ya emit cd "$(git rev-parse --show-toplevel)"'';
|
||||
desc = "Go to git root";
|
||||
}
|
||||
# Drag and Drop
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"D"
|
||||
];
|
||||
run = ''shell 'ripdrag "$0" "$@" -x 2>/dev/null &' --confirm'';
|
||||
desc = "Drag the file";
|
||||
}
|
||||
# Start terminal
|
||||
{
|
||||
on = [ "!" ];
|
||||
for = "unix";
|
||||
run = ''shell "$SHELL" --block'';
|
||||
desc = "Open $SHELL here";
|
||||
}
|
||||
# Combine PDF
|
||||
{
|
||||
on = [
|
||||
"F" # file
|
||||
"p" # pdf
|
||||
"c" # combine
|
||||
];
|
||||
for = "unix";
|
||||
run = ''shell -- ${lib.getExe pdfCombine} "$0" "$@"'';
|
||||
desc = "Combine selected pdf";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"F" # file
|
||||
"p" # pdf
|
||||
"n" # normalize
|
||||
];
|
||||
for = "unix";
|
||||
run = ''shell -- ${lib.getExe pdfNormalize} "$0" "$@" 2>/dev/null'';
|
||||
desc = "Normalize PDF to A4 size";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"F" # file
|
||||
"H" # html
|
||||
];
|
||||
for = "unix";
|
||||
run = [
|
||||
''shell -- for path in "$0" "$@"; do ${lib.getExe md2html} "$path"; done''
|
||||
];
|
||||
desc = "Convert Markdown to HTML";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
initLua =
|
||||
# lua
|
||||
''
|
||||
-- Show user/group of files in status bar
|
||||
Status:children_add(function()
|
||||
local h = cx.active.current.hovered
|
||||
if not h or ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
|
||||
return ui.Line {
|
||||
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
||||
":",
|
||||
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
||||
" ",
|
||||
}
|
||||
end, 500, Status.RIGHT)
|
||||
'';
|
||||
plugins = {
|
||||
toggle-pane = ''${yaziPlugins}/toggle-pane.yazi'';
|
||||
mount = ''${yaziPlugins}/mount.yazi'';
|
||||
zoom = ''${yaziPlugins}/zoom'';
|
||||
vcs-files = ''${yaziPlugins}/vcs-files'';
|
||||
git = ''${yaziPlugins}/git'';
|
||||
};
|
||||
|
||||
settings = {
|
||||
plugin.prepend_fetchers = [
|
||||
{
|
||||
id = "git";
|
||||
name = "*";
|
||||
run = "git";
|
||||
}
|
||||
];
|
||||
|
||||
input = {
|
||||
cursor_blink = true;
|
||||
};
|
||||
|
||||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = ''''\${EDITOR:=nvim} "$0"'';
|
||||
desc = "$EDITOR";
|
||||
block = true;
|
||||
}
|
||||
{
|
||||
run = ''code "$0"'';
|
||||
orphan = true;
|
||||
}
|
||||
];
|
||||
|
||||
player = [
|
||||
{ run = ''mpv --force-window "$0"''; }
|
||||
];
|
||||
|
||||
open = [
|
||||
{
|
||||
run = ''xdg-open "$0"'';
|
||||
desc = "Open";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
open = {
|
||||
prepend_rules = [
|
||||
{
|
||||
mime = "application/pdf";
|
||||
use = "open";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
keymap = {
|
||||
mgr.prepend_keymap = [
|
||||
# Set Wallpaper
|
||||
{
|
||||
on = [
|
||||
"g"
|
||||
"w"
|
||||
];
|
||||
run = setWallpaper;
|
||||
desc = "Set as wallpaper";
|
||||
}
|
||||
# Git Changes
|
||||
{
|
||||
on = [
|
||||
"g"
|
||||
"c"
|
||||
];
|
||||
run = "plugin vcs-files";
|
||||
desc = "Show Git file changes";
|
||||
}
|
||||
# Image zoom
|
||||
{
|
||||
on = "+";
|
||||
run = "plugin zoom 1";
|
||||
desc = "Zoom in hovered file";
|
||||
}
|
||||
{
|
||||
on = "-";
|
||||
run = "plugin zoom -1";
|
||||
desc = "Zoom out hovered file";
|
||||
}
|
||||
# Mount Manager
|
||||
{
|
||||
on = "M";
|
||||
run = "plugin mount";
|
||||
desc = "Launch mount manager";
|
||||
# Usage
|
||||
# Key binding Alternate key Action
|
||||
# q - Quit the plugin
|
||||
# k ↑ Move up
|
||||
# j ↓ Move down
|
||||
# l → Enter the mount point
|
||||
# m - Mount the partition
|
||||
# u - Unmount the partition
|
||||
# e - Eject the disk
|
||||
}
|
||||
# Toggle Maximize Preview
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin toggle-pane max-preview";
|
||||
desc = "Show or hide the preview panel";
|
||||
}
|
||||
# Copy selected files to the system clipboard while yanking
|
||||
{
|
||||
on = "y";
|
||||
run = [
|
||||
''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list''
|
||||
"yank"
|
||||
];
|
||||
}
|
||||
# cd back to the root of the current Git repository
|
||||
{
|
||||
on = [
|
||||
"g"
|
||||
"r"
|
||||
];
|
||||
run = ''shell -- ya emit cd "$(git rev-parse --show-toplevel)"'';
|
||||
desc = "Go to git root";
|
||||
}
|
||||
# Drag and Drop
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"D"
|
||||
];
|
||||
run = ''shell 'ripdrag "$@" -x 2>/dev/null &' --confirm'';
|
||||
desc = "Drag the file";
|
||||
}
|
||||
# Start terminal
|
||||
{
|
||||
on = [ "!" ];
|
||||
for = "unix";
|
||||
run = ''shell "$SHELL" --block'';
|
||||
desc = "Open $SHELL here";
|
||||
}
|
||||
# Combine PDF
|
||||
{
|
||||
on = [
|
||||
"F" # file
|
||||
"p" # pdf
|
||||
"c" # combine
|
||||
];
|
||||
for = "unix";
|
||||
run = ''shell -- ${lib.getExe pdfCombine} "$@"'';
|
||||
desc = "Combine selected pdf";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"F" # file
|
||||
"p" # pdf
|
||||
"n" # normalize
|
||||
];
|
||||
for = "unix";
|
||||
run = ''shell -- ${lib.getExe pdfNormalize} "$@" 2>/dev/null'';
|
||||
desc = "Normalize PDF to A4 size";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"F" # file
|
||||
"H" # html
|
||||
];
|
||||
for = "unix";
|
||||
run = [
|
||||
''shell -- for path in "$@"; do ${lib.getExe md2html} "$path"; done''
|
||||
];
|
||||
desc = "Convert Markdown to HTML";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
initLua =
|
||||
# lua
|
||||
''
|
||||
-- Show user/group of files in status bar
|
||||
Status:children_add(function()
|
||||
local h = cx.active.current.hovered
|
||||
if not h or ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
|
||||
return ui.Line {
|
||||
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
||||
":",
|
||||
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
||||
" ",
|
||||
}
|
||||
end, 500, Status.RIGHT)
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ let
|
|||
|
||||
zellij-sessionizer-src = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/dachxy/zellij-sessionizer/refs/heads/main/zellij-sessionizer";
|
||||
sha256 = "sha256:01az9blb86mc3lxaxnrfcj23jaxhagsbs31qjn6pj5wm1wgb2mrf";
|
||||
sha256 = "sha256:12kbni75x9g424bymky8cy84i354j654rfmz9bffnabbblccfbpn";
|
||||
};
|
||||
|
||||
zellij-sessionizer = pkgs.writeShellScriptBin "zellij-sessionizer" ''
|
||||
|
|
@ -29,6 +29,7 @@ let
|
|||
export ZELLIJ_SESSIONIZER_SEARCH_PATHS="$HOME/projects $HOME/notes $HOME/expr"
|
||||
export ZELLIJ_SESSIONIZER_SPECIFIC_PATHS="/etc/nixos"
|
||||
export ZELLIJ_SESSIONIZER_SWITCH_PLUGIN="file:${zellij-switch}"
|
||||
export ZELLIJ_SESSIONIZER_SWITCH_PLUGIN_EXTRA_COMMAND="--layout ${config.programs.zellij.settings.default_layout}"
|
||||
|
||||
bash ${zellij-sessionizer-src}
|
||||
'';
|
||||
|
|
@ -40,15 +41,15 @@ in
|
|||
|
||||
programs.fish.shellAliases = {
|
||||
al = "zellij";
|
||||
aa = "zellij a --index 0";
|
||||
aa = "zellij a --index 0 || cd /etc/nixos && zellij -s nixos";
|
||||
zs = "zellij-sessionizer";
|
||||
};
|
||||
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
attachExistingSession = true;
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
attachExistingSession = false;
|
||||
enableFishIntegration = false;
|
||||
enableBashIntegration = false;
|
||||
|
||||
settings = {
|
||||
pane_frames = false;
|
||||
|
|
@ -208,7 +209,7 @@ in
|
|||
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
|
||||
}
|
||||
session {
|
||||
bind "Ctrl o" "Ctrl c" { SwitchToMode "Normal"; }
|
||||
bind "Ctrl shift o" "Ctrl c" { SwitchToMode "Normal"; }
|
||||
bind "Ctrl s" { SwitchToMode "Scroll"; }
|
||||
bind "d" { Detach; }
|
||||
bind "w" {
|
||||
|
|
|
|||
|
|
@ -1,59 +1,183 @@
|
|||
{
|
||||
pkgs,
|
||||
osConfig,
|
||||
config,
|
||||
helper,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (osConfig.systemConf) username;
|
||||
inherit (helper) capitalize;
|
||||
inherit (pkgs) runCommand;
|
||||
|
||||
zenNebula = pkgs.fetchFromGitHub {
|
||||
owner = "justadumbprsn";
|
||||
owner = "JustAdumbPrsn";
|
||||
repo = "zen-nebula";
|
||||
rev = "main";
|
||||
sha256 = "sha256-f4J5ob/apKhxERUSvXE8QHMMsKJCQFRoMSo/Pw4LgTg=";
|
||||
sha256 = "sha256-wtntRAkOGm6fr396kqzqk+GyPk+ytifXTqqOp0YIvlw=";
|
||||
};
|
||||
profileName = capitalize username;
|
||||
|
||||
patchedNebula =
|
||||
runCommand "patched-nebula"
|
||||
{
|
||||
src = zenNebula;
|
||||
buildInputs = with pkgs; [
|
||||
rsync
|
||||
coreutils
|
||||
];
|
||||
}
|
||||
# Fix for nebula without `sine`
|
||||
''
|
||||
mkdir -p $out/Nebula
|
||||
tail -n +28 $src/Nebula/Nebula-config.css > $out/Nebula/Nebula-config.css
|
||||
rsync -av --exclude "Nebula-config.css" $src/ $out/
|
||||
'';
|
||||
|
||||
profileName = "${capitalize username} Profile";
|
||||
in
|
||||
{
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
languagePacks = [
|
||||
"en-US"
|
||||
"zh-Tw"
|
||||
];
|
||||
|
||||
policies = {
|
||||
AutofillAddressEnabled = true;
|
||||
AutofillCreditCardEnabled = false;
|
||||
DisableAppUpdate = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
DontCheckDefaultBrowser = true;
|
||||
NoDefaultBookmarks = true;
|
||||
OfferToSaveLogins = false;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
Certificates.Install = [
|
||||
../../system/extra/ca.crt
|
||||
];
|
||||
|
||||
Preferences = {
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true;
|
||||
"browser.tabs.allow_transparent_browser" = true;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"font.language.group" = "zh-TW";
|
||||
"font.name.sans-serif.ja" = "Noto Sans CJK JP";
|
||||
"font.name.sans-serif.zh-TW" = "Noto Sans CJK TC";
|
||||
"font.name.serif.ja" = "Noto Serif CJK JP";
|
||||
"font.name.serif.zh-TW" = "Noto Serif CJK TC";
|
||||
"font.name.monospace.ja" = "Noto Sans Mono CJK JP";
|
||||
"font.name.monospace.x-western" = "CaskaydiaCove Nerd Font Mono";
|
||||
"font.name.monospace.zh-TW" = "Noto Sans Mono CJK TC";
|
||||
};
|
||||
|
||||
ExtensionSettings =
|
||||
let
|
||||
mkExtensionSettings = builtins.mapAttrs (
|
||||
_: pluginId: {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${pluginId}/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
}
|
||||
);
|
||||
in
|
||||
(mkExtensionSettings {
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = "bitwarden-password-manager";
|
||||
"{4f391a9e-8717-4ba6-a5b1-488a34931fcb}" = "bonjourr-startpage";
|
||||
"addon@darkreader.org" = "darkreader";
|
||||
"firefox@ghostery.com" = "ghostery";
|
||||
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" = "styl-us";
|
||||
"firefox@tampermonkey.net" = "tampermonkey";
|
||||
"user-agent-switcher@ninetailed.ninja" = "uaswitcher";
|
||||
"{d7742d87-e61d-4b78-b8a1-b469842139fa}" = "vimium-ff";
|
||||
"{91aa3897-2634-4a8a-9092-279db23a7689}" = "zen-internet";
|
||||
})
|
||||
// {
|
||||
"moz-addon-prod@7tv.app" = {
|
||||
install_url = "https://extension.7tv.gg/v3.1.13/ext.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
profiles = {
|
||||
"${profileName} Profile" = {
|
||||
default = true;
|
||||
"${profileName}" = {
|
||||
isDefault = true;
|
||||
name = username;
|
||||
search.default = "google";
|
||||
search.privateDefault = "ddg";
|
||||
settings = {
|
||||
"zen.view.compact.should-enable-at-startup" = true;
|
||||
"zen.widget.linux.transparency" = true;
|
||||
"zen.view.compact.show-sidebar-and-toolbar-on-hover" = false;
|
||||
"zen.tabs.vertical.right-side" = true;
|
||||
"zen.urlbar.behavior" = "float";
|
||||
|
||||
# Nebula
|
||||
"nebula-tab-loading-animation" = 0;
|
||||
"nebula-essentials-gray-icons" = false;
|
||||
"nebula-compact-mode-no-sidebar-bg" = true;
|
||||
"nebula-disable-container-styling" = true;
|
||||
|
||||
"app.update.auto" = false;
|
||||
"app.normandy.first_run" = false;
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true;
|
||||
"browser.tabs.allow_transparent_browser" = true;
|
||||
"browser.urlbar.placeholderName" = "Google";
|
||||
"browser.urlbar.placeholderName.private" = "DuckDuckGo";
|
||||
"middlemouse.paste" = false;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"font.language.group" = "zh-TW";
|
||||
"font.name.sans-serif.ja" = "Noto Sans CJK JP";
|
||||
"font.name.sans-serif.zh-TW" = "Noto Sans CJK TC";
|
||||
"font.name.serif.ja" = "Noto Serif CJK JP";
|
||||
"font.name.serif.zh-TW" = "Noto Serif CJK TC";
|
||||
"font.name.monospace.ja" = "Noto Sans Mono CJK JP";
|
||||
"font.name.monospace.x-western" = "CaskaydiaCove Nerd Font Mono";
|
||||
"font.name.monospace.zh-TW" = "Noto Sans Mono CJK TC";
|
||||
};
|
||||
ensureCACertifications = [
|
||||
../../system/extra/ca.crt
|
||||
];
|
||||
chrome = zenNebula;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".zen/${profileName}/zen-keyboard-shortcuts.json".source =
|
||||
../config/zen/zen-keyboard-shortcuts.json;
|
||||
|
||||
home.file.".zen/${profileName}/chrome" = {
|
||||
source = patchedNebula;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
xdg.mimeApps =
|
||||
let
|
||||
value =
|
||||
let
|
||||
zen-browser = config.programs.zen-browser.package;
|
||||
in
|
||||
zen-browser.meta.desktopFileName;
|
||||
|
||||
associations = builtins.listToAttrs (
|
||||
map
|
||||
(name: {
|
||||
inherit name value;
|
||||
})
|
||||
[
|
||||
"application/x-extension-shtml"
|
||||
"application/x-extension-xhtml"
|
||||
"application/x-extension-html"
|
||||
"application/x-extension-xht"
|
||||
"application/x-extension-htm"
|
||||
"x-scheme-handler/unknown"
|
||||
"x-scheme-handler/mailto"
|
||||
"x-scheme-handler/chrome"
|
||||
"x-scheme-handler/about"
|
||||
"x-scheme-handler/https"
|
||||
"x-scheme-handler/http"
|
||||
"application/xhtml+xml"
|
||||
"application/json"
|
||||
"application/pdf"
|
||||
"text/plain"
|
||||
"text/html"
|
||||
]
|
||||
);
|
||||
in
|
||||
{
|
||||
associations.added = associations;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,37 +13,13 @@ let
|
|||
mkEnableOption
|
||||
types
|
||||
mkIf
|
||||
optionals
|
||||
;
|
||||
|
||||
inherit (helper) capitalize;
|
||||
|
||||
stateVersion = "25.05";
|
||||
stateVersion = "25.11";
|
||||
|
||||
cfg = config.systemConf;
|
||||
monitorType =
|
||||
with types;
|
||||
submodule {
|
||||
options = {
|
||||
desc = mkOption {
|
||||
type = str;
|
||||
description = "Hyprland monitor description";
|
||||
example = "ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271";
|
||||
};
|
||||
output = mkOption {
|
||||
type = str;
|
||||
description = "Hyprland monitor output";
|
||||
example = "DP-6";
|
||||
};
|
||||
props = mkOption {
|
||||
type = str;
|
||||
description = "Hyprland monitor properties";
|
||||
default = "prefered, 0x0, 1";
|
||||
example = "2560x1440@180, -1440x-600, 1, transform, 1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
defaultSddmTheme = (
|
||||
pkgs.sddm-astronaut.override {
|
||||
embeddedTheme = "purple_leaves";
|
||||
|
|
@ -67,6 +43,21 @@ in
|
|||
type = with types; nullOr path;
|
||||
description = "User avatar";
|
||||
default = null;
|
||||
apply =
|
||||
img:
|
||||
(
|
||||
if img != null then
|
||||
pkgs.runCommand "user-face"
|
||||
{
|
||||
buildInputs = with pkgs; [ imagemagick ];
|
||||
}
|
||||
''
|
||||
size=$(identify -format "%[fx:min(w,h)]" ${img})
|
||||
magick ${img} -gravity center -crop "''\${size}x''\${size}+0+0" -resize 512x512 $out
|
||||
''
|
||||
else
|
||||
null
|
||||
);
|
||||
};
|
||||
|
||||
domain = mkOption {
|
||||
|
|
@ -97,17 +88,11 @@ in
|
|||
enable = (mkEnableOption "Enable hyprland") // {
|
||||
default = false;
|
||||
};
|
||||
monitors = mkOption {
|
||||
type = with types; listOf monitorType;
|
||||
default = [ ];
|
||||
example = [
|
||||
{
|
||||
desc = "ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271";
|
||||
output = "DP-6";
|
||||
props = "2560x1440@165, 0x0, 1";
|
||||
}
|
||||
];
|
||||
description = "Monitors used for hyprland and waybar";
|
||||
};
|
||||
|
||||
niri = {
|
||||
enable = (mkEnableOption "Enable niri") // {
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -128,11 +113,11 @@ in
|
|||
inherit (cfg) domain;
|
||||
hostName = cfg.hostname;
|
||||
};
|
||||
environment.systemPackages = [
|
||||
inputs.attic.packages.${system}.attic
|
||||
];
|
||||
|
||||
system.stateVersion = stateVersion;
|
||||
|
||||
programs.hyprland.enable = if (cfg.hyprland.enable && (!cfg.niri.enable)) then true else false;
|
||||
|
||||
# ==== Home Manager ==== #
|
||||
home-manager = mkIf cfg.enableHomeManager {
|
||||
backupFileExtension = "backup-hm";
|
||||
|
|
@ -140,30 +125,27 @@ in
|
|||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = {
|
||||
inherit helper inputs system;
|
||||
inherit (cfg) username;
|
||||
inherit (cfg) username hostname;
|
||||
};
|
||||
users."${cfg.username}" = {
|
||||
imports = [
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
inputs.caelestia-shell.homeManagerModules.default
|
||||
inputs.sops-nix.homeManagerModules.default
|
||||
inputs.zen-browser.homeManagerModules.${system}.default
|
||||
inputs.nvf.homeManagerModules.default
|
||||
{
|
||||
home = {
|
||||
homeDirectory = "/home/${cfg.username}";
|
||||
stateVersion = stateVersion;
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
sharedModules = [
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
inputs.caelestia-shell.homeManagerModules.default
|
||||
inputs.sops-nix.homeManagerModules.default
|
||||
inputs.zen-browser.homeModules.twilight
|
||||
inputs.nvf.homeManagerModules.default
|
||||
inputs.noctalia.homeModules.default
|
||||
inputs.niri-nfsm.homeModules.default
|
||||
];
|
||||
users.${cfg.username} = {
|
||||
home = {
|
||||
homeDirectory = "/home/${cfg.username}";
|
||||
stateVersion = stateVersion;
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.file.".face" = mkIf (cfg.face != null) {
|
||||
source = cfg.face;
|
||||
};
|
||||
}
|
||||
]
|
||||
++ (optionals cfg.hyprland.enable [
|
||||
../home/user/hyprland.nix
|
||||
]);
|
||||
home.file.".face" = mkIf (cfg.face != null) {
|
||||
source = cfg.face;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,18 +8,7 @@ in
|
|||
{
|
||||
systemConf = {
|
||||
inherit hostname username;
|
||||
face = ../../../home/config/.face;
|
||||
domain = "net.dn";
|
||||
hyprland = {
|
||||
enable = true;
|
||||
monitors = [
|
||||
{
|
||||
desc = "LG Display 0x0665";
|
||||
output = "eDP-1";
|
||||
props = "preferred, 0x0, 1.25";
|
||||
}
|
||||
];
|
||||
};
|
||||
niri.enable = true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
|
|
|||
|
|
@ -5,78 +5,88 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) mkForce;
|
||||
inherit (config.networking) hostName;
|
||||
inherit (config.systemConf) username;
|
||||
in
|
||||
{
|
||||
home-manager = {
|
||||
users."${username}" = {
|
||||
home.sessionVariables = {
|
||||
BROWSER = mkForce "chromium";
|
||||
};
|
||||
home-manager.users."${username}" = {
|
||||
home.sessionVariables = {
|
||||
BROWSER = mkForce "chromium";
|
||||
};
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
# Bitwarden
|
||||
services.kanshi.settings = [
|
||||
{
|
||||
profile.name = hostName;
|
||||
profile.outputs = [
|
||||
{
|
||||
id = "nngceckbapebfimnlniiiahkandclblb";
|
||||
}
|
||||
# Vimium
|
||||
{
|
||||
id = "dbepggeogbaibhgnhhndojpepiihcmeb";
|
||||
}
|
||||
# Dark Reader
|
||||
{
|
||||
id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";
|
||||
}
|
||||
# Vertical Tabs
|
||||
{
|
||||
id = "efobhjmgoddhfdhaflheioeagkcknoji";
|
||||
criteria = "LG Display 0x0665";
|
||||
position = "0,0";
|
||||
scale = 1.25;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
imports = [
|
||||
../../../../home/presets/basic.nix
|
||||
(import ../../../../home/user/bitwarden.nix {
|
||||
email = "danny@net.dn";
|
||||
baseUrl = "https://bitwarden.net.dn";
|
||||
})
|
||||
programs.hyprlock.monitors = [
|
||||
"LG Display"
|
||||
];
|
||||
|
||||
# waybar
|
||||
(import ../../../../home/user/waybar.nix {
|
||||
settings = [
|
||||
{
|
||||
output = "eDP-1";
|
||||
height = 46;
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"hyprland/workspaces"
|
||||
"clock"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
"temperature"
|
||||
"custom/wallRand"
|
||||
"custom/wireguard"
|
||||
"custom/recording"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"custom/swaync"
|
||||
];
|
||||
}
|
||||
];
|
||||
})
|
||||
|
||||
# Git
|
||||
(import ../../../../home/user/git.nix {
|
||||
inherit username;
|
||||
email = "danny10132024@gmail.com";
|
||||
})
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
# Bitwarden
|
||||
{
|
||||
id = "nngceckbapebfimnlniiiahkandclblb";
|
||||
}
|
||||
# Vimium
|
||||
{
|
||||
id = "dbepggeogbaibhgnhhndojpepiihcmeb";
|
||||
}
|
||||
# Dark Reader
|
||||
{
|
||||
id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";
|
||||
}
|
||||
# Vertical Tabs
|
||||
{
|
||||
id = "efobhjmgoddhfdhaflheioeagkcknoji";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
imports = [
|
||||
../../../../home/presets/basic.nix
|
||||
(import ../../../../home/user/bitwarden.nix {
|
||||
email = "danny@net.dn";
|
||||
baseUrl = "https://bitwarden.net.dn";
|
||||
})
|
||||
|
||||
# waybar
|
||||
(import ../../../../home/user/waybar.nix {
|
||||
settings = [
|
||||
{
|
||||
output = "eDP-1";
|
||||
height = 46;
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"hyprland/workspaces"
|
||||
"clock"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
"temperature"
|
||||
"custom/wallRand"
|
||||
"custom/wireguard"
|
||||
"custom/recording"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"custom/swaync"
|
||||
];
|
||||
}
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
wireguard:
|
||||
wg0.conf: ENC[AES256_GCM,data:drqs+CkZVZH4K87jWZLy33NuqPeqLkyTp6mDoxcOsEYGaIR38pommv4TSynAOvrUC3dCw9O+qLHEiSwlJGoZOQKFzHxUefKrCtkRMCE3ytDKFmJbLoKT/GPxnOOenIm8JxKX6nsLaqCk36ODXzTA8iU8ICN2zqoCiodjx72Ge2KckQzSak04v28B6viuzfl8zipD1Fetm72sOBTX0I0WwoziDBBL77x1hX/8POob3ISrTejhik18dxAPLB9H3iVl1aOHhszsrAYB26IfujY/FxRqIrn8v+H2aFen3oowRjd/wTPtc/rLZj/7n6/Sl3NDzOE+jIYYG7yym7lkUM9Z,iv:oS01iUSG0ufUzIsfPD/jF3/TPEDDBp+CnnLQnyze8dM=,tag:mtmY3OVz3k7eu5Lxe14KLg==,type:str]
|
||||
wg0.conf: ENC[AES256_GCM,data:9wegrw4ZbY+T/gNYi0gt4n6Db1/rRpsiqVbQr8QoYTwOiWBjKO2PGTTM5aK3khk5t2pYOTSqEBn5+5J/JYZpQ6nvJMcqn0+31KMuMT9/0akxOm112Tj31vOdBwRvSQVLBzmQtPABgMlV36lRtpVU71lwiNO4M33ygzL/tm7EMt0e75Nr9CZkGI7BGtnATBzbj3ysftsbFPF2iIgZ9fej4I78rJ1HavAsAgcrxksWAJjFZyFGWinkW4eiwDKlqBvRUW0tE8TF897ZmX90UnwXwjtyJcyJH6nzwrRDJgxR7uyRL/HIusmVZHCNSlo8dSaxAROXOw5ULjmQpXzzPAVUxw==,iv:FCv2ADYZXflBYuI9B9xvUSAYX8+v2Qf9EJjZ/TX27sA=,tag:caR4HS3yYrjNP1IzxgoOXA==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1uvsvf5ljaezh5wze32p685kfentyle0l2mvysc67yvgct2h4850qqph9lv
|
||||
|
|
@ -20,7 +20,7 @@ sops:
|
|||
V09NYXpBYXBtYWdBajJubmVFL2loY0EKJdYKQHPriOT0eouvRUiCyqLSTzugUZxl
|
||||
BFTwfCez1/K2ERKQkKsMfIARbHaI2SRyDxM2O1IJ+DOIJ2383K6Gvw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-11-21T12:34:30Z"
|
||||
mac: ENC[AES256_GCM,data:LUqoXWMhmQQgqq1AX7I2v7z58ywstjWzsVTav9iu0RrkCxeB1u5V90E4tcnfjtquLwjiabpLSRpkUXE33DhqcgxLIklX0Cpld5TK1Bsdn8DXyKk1Lhfdf3OL7cn14kb4CqXTNlDyqwM+BBsYmdFQzPjb8IPiD9y+mTO5yHuAta0=,iv:mbHhZdv+0lDI9cNUsI3oatwbItQ6Xfvgm0UMQdu9FKA=,tag:aPFWPwahvMjBojzthZZ6vQ==,type:str]
|
||||
lastmodified: "2025-12-19T12:39:58Z"
|
||||
mac: ENC[AES256_GCM,data:tTvNyD6Lekc0RUIr9CpCjhWl2Gb9pHRubeoTrwceUCkm074EjYIzvqwiX5fzt6Cc5/H/k8NWJZBAoI3tOeCrXpo1Lbb0fCjGqxTldGN44pLR/5q9bdAxLom3EEqKiBBryVxqAkkm1a98UXPtnh+oDyaFsqTbS65LolEtFEbV/3U=,iv:J0gMlpWc9TVSCRxcdUnlXtNnmahvbc12EsLeFB4BJlY=,tag:h0EaNQ/sl+3sU9+g4ohjtw==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.11.0
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelPackages = pkgs.linuxPackages_6_17;
|
||||
|
||||
fileSystems."/mnt/ssd" = {
|
||||
device = "/dev/disk/by-label/DN-SSD";
|
||||
|
|
|
|||
|
|
@ -1,28 +1,46 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"vmd"
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib) mkForce;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import ../../../modules/nvidia.nix {
|
||||
|
|
@ -6,4 +10,6 @@
|
|||
nvidia-bus-id = "PCI:1:0:0";
|
||||
})
|
||||
];
|
||||
|
||||
hardware.nvidia.package = mkForce config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,24 +11,10 @@ in
|
|||
{
|
||||
systemConf = {
|
||||
inherit hostname username;
|
||||
domain = "net.dn";
|
||||
enableHomeManager = true;
|
||||
nvidia.enable = true;
|
||||
hyprland = {
|
||||
enable = true;
|
||||
monitors = [
|
||||
{
|
||||
desc = "ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271";
|
||||
output = "DP-2";
|
||||
props = "2560x1440@165, 0x0, 1";
|
||||
}
|
||||
{
|
||||
desc = "Acer Technologies XV272U V3 1322131231233";
|
||||
output = "DP-3";
|
||||
props = "2560x1440@180, -1440x-600, 1, transform, 1";
|
||||
}
|
||||
];
|
||||
};
|
||||
hyprland.enable = false;
|
||||
niri.enable = true;
|
||||
sddm.package = (
|
||||
pkgs.sddm-astronaut.override {
|
||||
embeddedTheme = "purple_leaves";
|
||||
|
|
@ -65,6 +51,8 @@ in
|
|||
./sops
|
||||
./utility
|
||||
./virtualisation
|
||||
../../modules/shells/noctalia
|
||||
../../modules/sunshine.nix
|
||||
];
|
||||
|
||||
# Live Sync D
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
# ./netbird.nix
|
||||
./osx-kvm.nix
|
||||
# ./osx-kvm.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
|
@ -18,8 +17,8 @@ let
|
|||
});
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs-stable.shadps4
|
||||
environment.systemPackages = with pkgs; [
|
||||
shadps4
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
|
|
|
|||
|
|
@ -1,81 +1,187 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
helper,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) optionalString;
|
||||
inherit (helper) getMonitors;
|
||||
inherit (builtins) elemAt;
|
||||
inherit (config.networking) hostName;
|
||||
inherit (config.systemConf) username;
|
||||
inherit (config.systemConf.hyprland) monitors;
|
||||
inherit (lib) optionalString mkForce;
|
||||
|
||||
wmName = if config.programs.hyprland.enable then "hyprland" else "niri";
|
||||
in
|
||||
{
|
||||
home-manager.users."${username}" = {
|
||||
imports = [
|
||||
../../../../home/presets/basic.nix
|
||||
../../../../home/user/zellij.nix
|
||||
./expr
|
||||
./wm
|
||||
home-manager.users."${username}" =
|
||||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
monitors = getMonitors hostName config;
|
||||
mainMonitor = (elemAt monitors 0).criteria;
|
||||
secondMonitor = (elemAt monitors 1).criteria;
|
||||
mainMonitorSwayFormat = "desc:ASUSTek COMPUTER INC - ASUS VG32VQ1B";
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
mattermost-desktop
|
||||
];
|
||||
|
||||
# Bitwarden client
|
||||
(import ../../../../home/user/bitwarden.nix {
|
||||
email = "danny@net.dn";
|
||||
baseUrl = "https://bitwarden.net.dn";
|
||||
})
|
||||
# NOTE: Disable idle
|
||||
services.hypridle.enable = mkForce false;
|
||||
|
||||
# waybar
|
||||
(import ../../../../home/user/waybar.nix {
|
||||
settings = [
|
||||
# monitor 1
|
||||
# hyprlock shows on main monitor
|
||||
programs.hyprlock.monitors = [
|
||||
mainMonitorSwayFormat
|
||||
];
|
||||
|
||||
services.kanshi.settings = [
|
||||
{
|
||||
profile.name = "${hostName}";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271";
|
||||
mode = "2560x1440@164.554001Hz";
|
||||
position = "0,0";
|
||||
scale = 1.0;
|
||||
}
|
||||
{
|
||||
criteria = "Acer Technologies XV272U V3 1322131231233";
|
||||
mode = "2560x1440@179.876999Hz";
|
||||
position = "-1440,-600";
|
||||
transform = "90";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
programs.ghostty.settings = {
|
||||
background-opacity = 0.9;
|
||||
};
|
||||
|
||||
# ==== Shells ==== #
|
||||
# Caelestia
|
||||
programs.caelestia.settings = {
|
||||
osd = {
|
||||
enableBrightness = false;
|
||||
enableMicrophone = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Noctalia
|
||||
programs.noctalia-shell.filteredIds = [
|
||||
"Brightness"
|
||||
];
|
||||
|
||||
# ==== WM ==== #
|
||||
programs.niri.settings = {
|
||||
binds = with config.lib.niri.actions; {
|
||||
"Mod+G".action = focus-workspace "game";
|
||||
"Mod+Shift+G".action.move-column-to-workspace = [ "game" ];
|
||||
|
||||
# Overrides
|
||||
"Mod+B".action = mkForce (focus-workspace "browser");
|
||||
"Mod+Shift+B".action.move-column-to-workspace = [ "browser" ];
|
||||
};
|
||||
|
||||
hotkey-overlay = {
|
||||
hide-not-bound = true;
|
||||
skip-at-startup = true;
|
||||
};
|
||||
|
||||
workspaces."browser" = {
|
||||
open-on-output = secondMonitor;
|
||||
};
|
||||
|
||||
# Other settings are located in `public/dn/common.nix`
|
||||
workspaces."game" = {
|
||||
open-on-output = mainMonitor;
|
||||
};
|
||||
|
||||
window-rules = [
|
||||
# Second Monitor App
|
||||
{
|
||||
output = "${(builtins.elemAt monitors 0).output}";
|
||||
height = 48;
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"hyprland/workspaces"
|
||||
"clock"
|
||||
"custom/cava"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
(optionalString config.programs.gamemode.enable "custom/gamemode")
|
||||
"custom/bitwarden"
|
||||
"custom/airplay"
|
||||
"custom/wallRand"
|
||||
"custom/wireguard"
|
||||
"custom/recording"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
"custom/swaync"
|
||||
];
|
||||
}
|
||||
# monitor 2
|
||||
{
|
||||
output = "${(builtins.elemAt monitors 1).output}";
|
||||
height = 54;
|
||||
modules-left = [
|
||||
"clock"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
"temperature"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
matches = [
|
||||
{
|
||||
app-id = "^discord$";
|
||||
}
|
||||
{
|
||||
app-id = "^thunderbird$";
|
||||
}
|
||||
];
|
||||
|
||||
open-on-output = secondMonitor;
|
||||
}
|
||||
];
|
||||
})
|
||||
};
|
||||
|
||||
# Git
|
||||
(import ../../../../home/user/git.nix {
|
||||
inherit username;
|
||||
email = "danny10132024@gmail.com";
|
||||
})
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
../../../../home/presets/basic.nix
|
||||
../../../../home/user/zellij.nix
|
||||
./expr
|
||||
./wm
|
||||
|
||||
# Bitwarden client
|
||||
(import ../../../../home/user/bitwarden.nix {
|
||||
email = "danny@net.dn";
|
||||
baseUrl = "https://bitwarden.net.dn";
|
||||
})
|
||||
|
||||
# waybar
|
||||
(import ../../../../home/user/waybar.nix {
|
||||
matchByDesc = true;
|
||||
settings = [
|
||||
# monitor 1
|
||||
{
|
||||
output = "${(builtins.elemAt monitors 0).criteria}";
|
||||
height = 48;
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"${wmName}/workspaces"
|
||||
"clock"
|
||||
"custom/cava"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
(optionalString osConfig.programs.gamemode.enable "custom/gamemode")
|
||||
"custom/bitwarden"
|
||||
"custom/airplay"
|
||||
"custom/wallRand"
|
||||
"custom/wireguard"
|
||||
"custom/recording"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
"custom/swaync"
|
||||
];
|
||||
}
|
||||
# monitor 2
|
||||
{
|
||||
output = "${(builtins.elemAt monitors 1).criteria}";
|
||||
height = 54;
|
||||
modules-left = [
|
||||
"clock"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
"temperature"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
];
|
||||
}
|
||||
];
|
||||
})
|
||||
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
./mail.nix
|
||||
./nginx.nix
|
||||
./wireguard.nix
|
||||
./nextcloud.nix
|
||||
# ./nextcloud.nix
|
||||
# ./netbird.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,26 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkForce;
|
||||
hostname = "drive.dnywe.com";
|
||||
port = 31007;
|
||||
in
|
||||
{
|
||||
sops.secrets = {
|
||||
"nextcloud/adminPassword" = mkIf config.services.nextcloud.enable {
|
||||
owner = "nextcloud";
|
||||
group = "nextcloud";
|
||||
};
|
||||
"nextcloud/signaling.conf" = mkIf config.services.nextcloud.enable {
|
||||
owner = "signaling";
|
||||
group = "signaling";
|
||||
mode = "0640";
|
||||
};
|
||||
"nextcloud/whiteboard" = mkIf config.services.nextcloud.enable {
|
||||
owner = "nextcloud";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(import ../../../modules/nextcloud.nix {
|
||||
configureACME = false;
|
||||
|
|
@ -25,10 +41,10 @@ in
|
|||
];
|
||||
|
||||
services.nextcloud = {
|
||||
https = lib.mkForce false;
|
||||
# enable = mkForce false;
|
||||
https = mkForce false;
|
||||
extraApps = {
|
||||
inherit (config.services.nextcloud.package.packages.apps) spreed;
|
||||
|
||||
twofactor_totp = pkgs.fetchNextcloudApp {
|
||||
url = "https://github.com/nextcloud-releases/twofactor_totp/releases/download/v6.4.1/twofactor_totp-v6.4.1.tar.gz";
|
||||
sha256 = "sha256-Wa2P6tpp75IxCsTG4B5DQ8+iTzR7yjKBi4ZDBcv+AOI=";
|
||||
|
|
@ -49,15 +65,15 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
users.groups.signaling = {
|
||||
users.groups.signaling = mkIf config.services.nextcloud.enable {
|
||||
};
|
||||
|
||||
users.users.signaling = {
|
||||
users.users.signaling = mkIf config.services.nextcloud.enable {
|
||||
isSystemUser = true;
|
||||
group = "signaling";
|
||||
};
|
||||
|
||||
systemd.services.nextcloud-spreed-signaling = {
|
||||
systemd.services.nextcloud-spreed-signaling = mkIf config.services.nextcloud.enable {
|
||||
requiredBy = [
|
||||
"multi-users.target"
|
||||
"phpfpm-nextcloud.service"
|
||||
|
|
@ -71,7 +87,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.nats = {
|
||||
services.nats = mkIf config.services.nextcloud.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
host = "127.0.0.1";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
wireguard:
|
||||
wg0.conf: ENC[AES256_GCM,data:AL5GVljm3Ta9Deb2SiUNEvtTSL1L9E5lcMhE6szjXCCfBnOpK8RiVe/b6JGC9RzE6DFiiQdZoKBWLy7rcrIjrDA09bCaQO5Gjjl2YtEkI0FULcMI8PuIQ8j2sYgjk0FAXRsmNy5U/v6afIum5wN2iTsYL1y3DObeRoNrsQNhBYDQBE0ZmcJxgtQYihUuGuEYcDLhzhFXfYKZrG1Grwqpcn0KK8K5A3qPgtq8fn86KuMZ6i4MHAiG7OJgXMpgTHjmWpJ819qsswjkpF1RgjgpET28IiNza9FIbxiflIXXagSZeigtLIJ6dOZwBgt0f5dgfr41dN/hT5SEHFADdXIa,iv:OsB8mf+WB9C/kvGzTs/LxqjimPISDGhU2P2GjbkYEbc=,tag:lCxtFVViYejQhZUfmdkGrg==,type:str]
|
||||
wg0.conf: ENC[AES256_GCM,data:ozySeNEvkiLt9TGrZCrlJWKT5gcSlZ9T8AeXGO97SPgxI394eCQ/LOkVFl7AykhZvs7YkxMpZzAZxc0oNdTYuDlqfrNr0pqTUJmpX+5PVRmDb5z2MJvERktVkJ4LSvVodoYznDwT/y9q199AFKf3t4EoWuRyR/il6P8HuGVHXrKRYUrwuB4nuq1SIByY+8D2gzohFB/s6pSOPYy6/xCt0Nm+x0wmcdrlyOb0S+4WXlcou2ll98o9q2YDdVBKeW4jyUjFqXM2XzD0JXpAi9ZFlyzxyYNwa4oMYATyCBCH4BNHqe850QHEoCaOovioEdDH/tluB2X/891ixqzURypzbg==,iv:3Q5xOgGcg8/DIwHt4fHsQGtN8f2hGpVDtf47PcwW62I=,tag:SbJqhWi3+h1O5ZIOayDrUw==,type:str]
|
||||
dovecot:
|
||||
openldap: ENC[AES256_GCM,data:U3YYreEqoh+F0Mrli52jgQowrUqIUPmdQps=,iv:vTjHBFsue+89GOCDigVIktgGSZNZv8A2e3GM80o6TXc=,tag:GGh+hsT+yV/I12meXxflbQ==,type:str]
|
||||
nextcloud:
|
||||
|
|
@ -38,7 +38,7 @@ sops:
|
|||
MEdmWkFwNXZoR1ZVRnQ0aWlkYzZwSmsK0EFecUIdqlDKX08oRCoDQQ3QCX1wzb8w
|
||||
lghDJhWlfuKr+X24GoE4UK04aJVLqVMRRI4BJW+LQXeHS+dWKu3mQA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-11-22T10:29:33Z"
|
||||
mac: ENC[AES256_GCM,data:hcqqPP7EEDrFWwKU3Yl0XM6h17pLXBsmISMd94qYzaxmT/nKnF5bn8dq6M1C9t0Q0vvLjrPm94Gv2HPPJOX960whYMfwuXv/RkORJGb4qXdkXsGJaCrR9M51HArrd7Ba3pjoEyp3Jz9xTNrqg8kCDphBs0oZRV6dQDJUTdLbR50=,iv:eH5T27fthAad/dM5NxXyQawiVmTGgwJbeRXAiut9kL4=,tag:3lGkJMZKo8O1Zm1fB3DJ9Q==,type:str]
|
||||
lastmodified: "2025-12-19T12:39:37Z"
|
||||
mac: ENC[AES256_GCM,data:JSwphdjAfZcLSuctzruwVjBQXhbQKnEda93KlrH8eoSJcFXBRCMz0v+HY2nBlrC9lwp9vgT3HnGmR6hIPi48UtyxYcGOJy33OY4M1it0WGE2r8Ikg++5cBUtacK4QdwuMCADhNT5ZHs5T7UUX0GMLeqAtrcJ3FKt+4+catsOvnE=,iv:7ZTi86IkbScizZlOCk+uXDyWzrFDsLRuLuzjUFsMFR0=,tag:3/i7BZ8XYALj7RYj4dIUgA==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.11.0
|
||||
|
|
|
|||
|
|
@ -6,18 +6,6 @@ in
|
|||
sops = {
|
||||
secrets = {
|
||||
"wireguard/wg0.conf" = { };
|
||||
"nextcloud/adminPassword" = mkIf config.services.nextcloud.enable {
|
||||
owner = "nextcloud";
|
||||
group = "nextcloud";
|
||||
};
|
||||
"nextcloud/signaling.conf" = mkIf config.services.nextcloud.enable {
|
||||
owner = "signaling";
|
||||
group = "signaling";
|
||||
mode = "0640";
|
||||
};
|
||||
"nextcloud/whiteboard" = mkIf config.services.nextcloud.enable {
|
||||
owner = "nextcloud";
|
||||
};
|
||||
|
||||
"lam/env" = { };
|
||||
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
imports = [
|
||||
../../../modules/virtualization.nix
|
||||
../../../modules/wine.nix
|
||||
./kvm.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
24
system/dev/dn-pre7780/virtualisation/kvm.nix
Normal file
24
system/dev/dn-pre7780/virtualisation/kvm.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (config.systemConf) username;
|
||||
in
|
||||
{
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
users.groups.libvirtd.members = [ username ];
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.swtpm.enable = true;
|
||||
qemu.vhostUserPackages = with pkgs; [ virtiofsd ];
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# dnsmasq
|
||||
qemu
|
||||
quickemu
|
||||
];
|
||||
}
|
||||
|
|
@ -61,6 +61,12 @@ in
|
|||
"nextcloud"
|
||||
"vaultwarden"
|
||||
"paperless"
|
||||
"keycloak"
|
||||
"pdns"
|
||||
"powerdnsadmin"
|
||||
"roundcube"
|
||||
"grafana"
|
||||
"crowdsec"
|
||||
];
|
||||
location = "${backupPath}/postgresql";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ in
|
|||
{
|
||||
systemConf = {
|
||||
inherit hostname username;
|
||||
domain = "net.dn";
|
||||
hyprland.enable = false;
|
||||
security = {
|
||||
allowedDomains = [
|
||||
"github.com"
|
||||
|
|
@ -25,6 +23,9 @@ in
|
|||
allowedIPs = [
|
||||
"10.0.0.0/24"
|
||||
"127.0.0.1"
|
||||
# CrowdSec
|
||||
"52.51.161.146"
|
||||
"34.250.8.127"
|
||||
];
|
||||
allowedIPv6 = [
|
||||
"ff02::/16"
|
||||
|
|
@ -45,7 +46,7 @@ in
|
|||
'';
|
||||
|
||||
imports = [
|
||||
../public/dn/default.nix
|
||||
../public/dn
|
||||
./common
|
||||
./home
|
||||
./network
|
||||
|
|
|
|||
|
|
@ -1,34 +1,20 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.systemConf) username;
|
||||
in
|
||||
{
|
||||
home-manager = {
|
||||
users."${username}" = {
|
||||
imports = [
|
||||
../../../../home/user/config.nix
|
||||
../../../../home/user/direnv.nix
|
||||
../../../../home/user/environment.nix
|
||||
../../../../home/user/nvf
|
||||
../../../../home/user/shell.nix
|
||||
../../../../home/user/yazi.nix
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
inputs.ghostty.packages.${system}.default
|
||||
];
|
||||
}
|
||||
|
||||
# Git
|
||||
(import ../../../../home/user/git.nix {
|
||||
inherit username;
|
||||
email = "danny10132024@gmail.com";
|
||||
})
|
||||
];
|
||||
};
|
||||
home-manager.users."${username}" = {
|
||||
imports = [
|
||||
../../../../home/user/config.nix
|
||||
../../../../home/user/direnv.nix
|
||||
../../../../home/user/environment.nix
|
||||
../../../../home/user/nvf
|
||||
../../../../home/user/shell.nix
|
||||
../../../../home/user/yazi.nix
|
||||
../../../../home/user/ghostty.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,6 +159,12 @@ let
|
|||
publicKey = "5th0G9c7vHrhcByvPJAbrn2LXjLPqDEMsHzda0FGUTQ=";
|
||||
allowedIPs = [ "10.0.0.148/32" ];
|
||||
}
|
||||
# DN Win
|
||||
{
|
||||
dns = "win";
|
||||
publicKey = "LuKw1w879a3kRaBK+faToVmb9uLhbj6tf/DstgMMJzQ=";
|
||||
allowedIPs = [ "10.0.0.149/32" ];
|
||||
}
|
||||
];
|
||||
in
|
||||
{
|
||||
|
|
@ -424,7 +430,8 @@ in
|
|||
# python
|
||||
''
|
||||
import cachelib
|
||||
|
||||
BIND_ADDRESS = "127.0.0.1"
|
||||
PORT = 8081
|
||||
SESSION_TYPE = 'cachelib'
|
||||
SESSION_CACHELIB = cachelib.simple.SimpleCache()
|
||||
SQLALCHEMY_DATABASE_URI = 'postgresql://powerdnsadmin@/powerdnsadmin?host=localhost'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./atticd.nix
|
||||
# ./atticd.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./fail2ban.nix
|
||||
./crowdsec.nix
|
||||
# ./crowdsec.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (helper.grafana) mkDashboard;
|
||||
inherit (lib) optionalAttrs;
|
||||
inherit (lib) optionalAttrs optional;
|
||||
inherit (config.networking) hostName;
|
||||
|
||||
datasourceTemplate = [
|
||||
|
|
@ -78,28 +78,33 @@ in
|
|||
}
|
||||
];
|
||||
})
|
||||
(optionalAttrs config.services.crowdsec.settings.general.prometheus.enabled {
|
||||
job_name = "crowdsec";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"localhost:${toString config.services.crowdsec.settings.general.prometheus.listen_port}"
|
||||
];
|
||||
labels = {
|
||||
machine = "${hostName}";
|
||||
};
|
||||
}
|
||||
];
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = [ "__address__" ];
|
||||
target_label = "instance";
|
||||
regex = "(.*):[0-9]+";
|
||||
replacement = "CrowdSec - \${1}";
|
||||
}
|
||||
];
|
||||
})
|
||||
];
|
||||
]
|
||||
++ (optional
|
||||
(config.services.crowdsec.enable && config.services.crowdsec.settings.general.prometheus.enabled)
|
||||
[
|
||||
{
|
||||
job_name = "crowdsec";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"localhost:${toString config.services.crowdsec.settings.general.prometheus.listen_port}"
|
||||
];
|
||||
labels = {
|
||||
machine = "${hostName}";
|
||||
};
|
||||
}
|
||||
];
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = [ "__address__" ];
|
||||
target_label = "instance";
|
||||
regex = "(.*):[0-9]+";
|
||||
replacement = "CrowdSec - \${1}";
|
||||
}
|
||||
];
|
||||
}
|
||||
]
|
||||
);
|
||||
})
|
||||
|
||||
(import ../../../modules/grafana.nix {
|
||||
|
|
|
|||
|
|
@ -11,15 +11,15 @@ ldap:
|
|||
env: ENC[AES256_GCM,data:XmIz9JEswvK1jVmTsTgdDZJXeK7j8E/b6nF+uuZpvpoe5/IogjMrzcWi3EB1i44z1Dxgoim8QM8ZtczY,iv:1jK/J2qfKODrbrNpSHl110jPvbNLl0zI//laowerJOc=,tag:tkBVxDC8Ebn3Aac+LATQFA==,type:str]
|
||||
oauth:
|
||||
password: ENC[AES256_GCM,data:lzS/OtqHb/24IJnOKxMBQA==,iv:BI1n7Jjklye6WM2ss7jpaGgokrJpAG2Ipil7VrY30XM=,tag:i3OByJ6LDwvAsS5CTrEQig==,type:str]
|
||||
adminEnv: ENC[AES256_GCM,data:LECZ1/KtaEB7kUN6zNDUr08g2SVtGhWEvy2QA9jzU3vJ1U8NDnPXjfDkkH1bIw==,iv:pPz7J+DdF7zkqzFlevoeYQGZnA2PQDoRYcpOaOeHN3A=,tag:e0iVPSZQ1V3aWYtKpGnBGg==,type:str]
|
||||
adminEnv: ENC[AES256_GCM,data:tF7ECUxG5QeNIvx3IFpTtY7NnSXROGHi48jGXZNgJVX5cABNIYBUqYW9/p2KbA==,iv:7oNmOBEs0b9mB6Ay7IULH2AumQOdIyQ+hDHm5kV6lTY=,tag:jkfA6D8CKg1jC21dS7Sumw==,type:str]
|
||||
powerdns-admin:
|
||||
secret: ENC[AES256_GCM,data:M5hD8B7kikseQJZCWUIlc7OJcQn0nwnx0QOSQe+Mf8TaztvyFfSfxv0vowNsx0MyGef4teuK+DW9/UTbRFEHeg==,iv:xaSgzhqMU9+ud1xfXLVkg3v2xcmIo35BOhml5VfHKBI=,tag:L1v95+HsIqNjVA1LGNbEJQ==,type:str]
|
||||
salt: ENC[AES256_GCM,data:Vtn3/gJlElrFkPwoa05wlxVL/Sk4lNLghp1gi6o4V5A=,iv:/lRVfNOpERS963+9JNf8wATIY9FcicT8xQ9Cbw2by/s=,tag:x5WiNa56l7y3CKwbaamLLA==,type:str]
|
||||
salt: ENC[AES256_GCM,data:rs4tZrVF4kb6/97wjQA2Npb2QeS6vjN3L1zRgmM=,iv:c0VTEtnahMSfs/PqeFQxYpDstLxPKaW1RyXMc6SQJu8=,tag:dXHUO2KJvP5Sz22Gv6ws/w==,type:str]
|
||||
powerdns: ENC[AES256_GCM,data:d4qzUAjyHUxLynvP6vSxCzrihfb/X3KYHeRA/w+CButld7ulxL9W6PerhvNcJytgfJDQINvcgnMKjijJ/vC7VeO9p7ZyArh4/PWZwgiJ,iv:orfh5F4uCYq2IplG0Y7Q/RcSqIm5Xyzn3ejzPsm+/0k=,tag:YqfvBlJRpkmMy29z3wyJ1g==,type:str]
|
||||
rspamd-trainer: ENC[AES256_GCM,data:EqWVADi7zr6AUZL5mlN1/xbpjuRIS3Zn,iv:M/xk7LywcRiKQM9LrnTnCKu3OS/YBf23CRkxh4ll1+c=,tag:4lH3hhMxWIzEUExJOt/41Q==,type:str]
|
||||
rspamd: ENC[AES256_GCM,data:qEXHXdcvk24pAHEl6MI=,iv:L5tmoTu5Qk5sxDj3EmWfc39AHwRTT4T4gB1O2EsTQkY=,tag:vIhAOnEpWxtP0eU4stkQww==,type:str]
|
||||
acme:
|
||||
env: ENC[AES256_GCM,data:gHoAyc6+LK7jrTfrIlPJx+RNe90xTpVVykDEfor3+ifRDRCPfxLmfj1nWylRp7r3N/Ha8AlElvNPmn4mVMsM2OsXmZoYoO+YOVq1zShXHI3A2dHgzJGxaCu/zuf2AWefEsBDWhjbGxWUpjjcEh6mOgvuh0HHGdW0uq6EL5LqDZiPMGdYNdJLEuy6s9pdQt69mVWAwGVA9eTvbnG0W91/35SUeOSs+la+YRCSPQ==,iv:QebJyJ1+6dYQulVkDdkFx34KkiH9xzsX+C3TYDdIMkw=,tag:h7Oxt04PqkFDdb7ZuyVnlQ==,type:str]
|
||||
env: ENC[AES256_GCM,data:DQaHr13K3faeyQk/05sVmmZRNvEbjmMP8y3nES1vyFO+oNX9nyyWcy5YEAO5tjRTxi/yM1ISlhbXWct4iRwAkvnhtoFRK/jpAfDv+W3J1LotaRxiPWSXUs5lS7uS0DpveRwQVv6qEl3Cs8vitHAJfRCKJoYv5HTJyvOnoWqHbnk=,iv:co3V0vu2c26NKHuoNoRv7td8qu6m0NTlvkr3EJBQGvM=,tag:leTY/DGg85Pm8gsAHah29Q==,type:str]
|
||||
postsrsd:
|
||||
secret: ENC[AES256_GCM,data:JZNwSymEjIFb8h3gnvFajxSaNYRxjA/NUruA4WX+uSqX0ufVcbVWgxQTr7U=,iv:ydGnCESCLbwyGKc+5witXDkT3OgW27LKen7PkqUL6mU=,tag:M3RGI6LgU5n2e6ZiXxTFfQ==,type:str]
|
||||
grafana:
|
||||
|
|
@ -70,7 +70,7 @@ sops:
|
|||
OFloWEFuTC9GTXJsMG5NNktmdmIrY1kK0yN0ae0xNaydujV5lt2FiwXdyursG0DK
|
||||
9i/B3TTAm9csDMMSTSFbiAUJDzG7kIqn++JU/cxvsGScSnhMqjEK/g==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-11-24T10:30:46Z"
|
||||
mac: ENC[AES256_GCM,data:yBegCnXXKimHlZ5UcPL6O9VbhdpASMd09t7m2fxLFGYgHXYFsuRda8puVpe9EiukNRJzhkWZRjJUHI+nE2cdibx5Ewaom8lbe8pKB1A7qrVSXjU+f5HTMjUdB+ACAcGlErc0wniekwSQj2LfIYknYm2nVz2M5VeDbYxz7F5PAO0=,iv:vMdsGEe1ZPQdNtSXhtwC0StiuhBVViCuBGTURep37UM=,tag:mB2kZZcrGnmChQQRc4wvTA==,type:str]
|
||||
lastmodified: "2025-12-29T05:31:41Z"
|
||||
mac: ENC[AES256_GCM,data:7vRB92qX6NPYafjpTY0wS23bq5Jn57xkWamJZ2ZgD4/2rW+qRilmO6sqaZEktWr7q2jQzgSvdgZsgbuhkxoqQXrTVP7osjr8qQ20jL9OXLxSgPQry2QqNBqlSdjEUov/bygJA0oI46K8pdk6OrT07Few/nXMrvUixFAGGUsKmJc=,iv:Gd5X70COnDL4Ntps/bedF92uUH6hCosDj2dsbF0KQHw=,tag:O3vq/kFnay5le7F1Q2heJQ==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.11.0
|
||||
|
|
|
|||
72
system/dev/public/dn/common.nix
Normal file
72
system/dev/public/dn/common.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
inherit (config.systemConf) username;
|
||||
in
|
||||
{
|
||||
systemConf = {
|
||||
face = ../../../../home/config/.face;
|
||||
domain = "net.dn";
|
||||
};
|
||||
|
||||
home-manager.users."${username}" =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
# Git
|
||||
(import ../../../../home/user/git.nix {
|
||||
inherit username;
|
||||
email = "Danny01161013@gmail.com";
|
||||
})
|
||||
];
|
||||
|
||||
# ==== Niri ==== #
|
||||
programs.niri.settings = {
|
||||
input.keyboard.xkb = {
|
||||
layout = "us";
|
||||
options = "caps:escape";
|
||||
};
|
||||
workspaces."game" = { };
|
||||
window-rules = [
|
||||
# Steam Game Fullscreen
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
app-id = "^steam_app_(.*)$";
|
||||
is-floating = false;
|
||||
}
|
||||
];
|
||||
open-fullscreen = true;
|
||||
}
|
||||
# Steam & Steam Game
|
||||
{
|
||||
matches = [
|
||||
{ app-id = "^steam_app_*"; }
|
||||
{ app-id = "^pioneergame.exe$"; }
|
||||
{
|
||||
app-id = "^steam$";
|
||||
title = "^Steam$";
|
||||
}
|
||||
];
|
||||
open-on-workspace = "game";
|
||||
}
|
||||
# Steam Dialog float
|
||||
{
|
||||
matches = [
|
||||
{ app-id = "^steam$"; }
|
||||
{ title = "(.*)(EasyAntiCheat_EOS_Setup)(.*)"; }
|
||||
{
|
||||
app-id = "^pioneergame.exe$";
|
||||
title = "^$";
|
||||
}
|
||||
];
|
||||
excludes = [
|
||||
{
|
||||
title = "^Steam$";
|
||||
}
|
||||
];
|
||||
open-floating = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./yubikey.nix
|
||||
./common.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
ntfy: ENC[AES256_GCM,data:7m7hwmDWu6qP/mX7QujXPiDAmRC542CKyWzFaOL5sHza,iv:nn1F44LSFmrV2USRDD0z8CNfUhi40LZnvoU3j0nklcU=,tag:WhqQpThDaG10kNTk1tZxOQ==,type:str]
|
||||
u2f_keys: ENC[AES256_GCM,data:boiKENOBo4hBWx9d+KVweCQrmFasDVUejuWrw60oPybPEW0pqTWz5GhQjfG6J0PWNFr/ObABT5eofKiSoy/pZ9uBQQGFO1nAA41axhI1Y9nuyBkkrNPYRnZsojdOcahNGMz1hplXTMzSdKgwutzA4/dsGG1ki/EOiuYRUgzQ/IzjEfqWGeBDlHoq9ohhTFFpsdNgZqgu23m3+Z0hcpquJdY3bhBi0L1nU3B88wJ7MiLyp2mVM3GA7i8jeIUmwqJCEuA3OkG3r3oUHO/l61N+0qtss8bmghf6bsJYtvkhCjXOiEE9R8dpCzjwXEhgAGcYiqiPWzLCl3WyYaytNlVJF/MHC+R0S1ruBV0RLrzCnvxaav8iqa4l3y2ErRB0qUgvO386suGNh2cEYTEEKF4GcQM6mzXbLzUqK4H+nGBC3SdArdphTIgWXP7C+romXzwgGVBLWW/4atRkj0ZF,iv:Rxke3HDAvcLv9sks5jDhNsfxXwSD4TgfGoN7v9HDntk=,tag:IkCsaFVPdgobd9+EX3CwIw==,type:str]
|
||||
u2f_keys: ENC[AES256_GCM,data:0EofFtgar18YzbzXiT6NdC9nwMTQoYkeU8snRTwhUX2Hz+k4B46839xZet4Df5a8xpaB2CuoPvRkEMSxknBWGKkK+gZr2m+zogbpMTGQVTYqmqlnunywrhe9u9FQ5D1hwU4PYcOgDqox5dw4QMg/AUontu5BYTG3WKCCTDVIL+i6PejwXKcfoKHd9G1K2QHV33S40EM4/jjijgxW+NoO6vkEWIwxih/DxQ4YZYTHHBZXhKRD7Hwhikd6G3Vs3/xD/UOVVJKtkyn1wKNQf+O30Q2LNOhDQ8/weNfN9IAMpVtRqvEtFXA2rfp9zI7TY1iuSN9nN9hYuZJeCktvK1WiRvspU5wYn2jDtM83zCA8Udnq1XJbsGEv2aA3SYyxoldtkjFcjlupGa1lJiaANxhmpOfJp0IIkeXqnIkLE/FzRFiced58H1UV6InlH5S/Lz42854ec/jDlgvzCnDoWIsgfgQf+KmwRHznzeepPW7S3tyB/jbJETEfCJfZ3E6YmeAMWd85drTKsySjBGiM7mueb4thGstfgnAEO/Y3PuVc/qGS1j95lUc0w0zbr3VzwibxCsS02PgMIUE5gZPEllknbhh6QiqbS2AtTAb9pIwrpYfEmcZU2blofQ8WzkLEjqNnRGaDXzgIEw4OirM0tSaFGmT9Vy1XN4yvSVssjsW/wXg19U4S/6FS+zOvyg+lIkT3NOfu5dKQecz8cH0czEN5MoVj3fm5LBhFmDOawP5AAA8dLafMEepxbBIGr/9nzDP17trMfzFf78hymHTgQk/qFb6oWl9Ai1dFZRwHO7HcXpBveTpPMCaeNOjcvRrvKsm2HSzsWPCVsfX6nrmNjqyFJXpPuuNaPezclL/ApPdEXpi9Q+aVHAgjllBLAH/R8UJu71cJAo+x7TCWykG31xLO0xodtJ5Lwk3O1lMnznnQXT/fCVaFYV24OT/nS7hQOtDvlJOCfmSpZTmZxX31xF4Gt0Auok+0uPJzDfbFQH9WwifXn6F8ixdsLK/VJMEk8EZbHpkNSV6hzWJkiOeJCDl7SBKEcQ+FizYSfZuOcVEt83ScJuVa7IScVLdatnTTTpR4c5GASYLr3lahqYwhuZGcQEUIwjDXu8Oymo0Sbvnmev60wY5Q3BEMSX1iwt3QWdCe5Kzq2vEUQHP9s6lg7DgOeIA2xQRK5siqwOhw9i1qaHbPG+1yTFOx7gRu0+yBy2Qzkwsc9naD8Ce0hpwQmu4Nvpd5TjMnS51ljDMWBok5evdOtGeWL9mDz6VdxtuHbcBShmEOk+lfKKjpDeK5319veBX5ugCm8WXeDmIIhG12gI07xRVzPaeYEhnRG2pHy/+JdjlyGeh0oHCJOYPhxtwVbqXwmH83BGn3H05bdIWEjXs=,iv:pAdO+Uja/Zyf5uLMa9zbKvEMoOOjQgkqHYnEH+Bxd5k=,tag:mYngzcv0bGwVJBHOR6D4uw==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1uvsvf5ljaezh5wze32p685kfentyle0l2mvysc67yvgct2h4850qqph9lv
|
||||
|
|
@ -29,7 +29,7 @@ sops:
|
|||
QWV3VjRjNC9RaXNwbDdLWmVQNS94UzAKeLZSqcXRwkVoUUKd4PuRusbJwFlubdJy
|
||||
kcxGMzvfT0BMYDp61vV+F5Vh4TkgddCzp6Lphbb/6orkWWpjmE9I4g==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-11-21T12:34:46Z"
|
||||
mac: ENC[AES256_GCM,data:jec/S+h3feoez+1OaWkZHAlSNhsLv8R4yXPIFjVUaYionJKMUAAizLtVsmpVHNRn8OCBhb7zi+Yk4GClZQqg/I8iTY3tzDTIJJsHoj+KsxuQohRASDikaYLTfdad44vin8ayxSKjSScK3JpwX5B12Rffx8DCPqUtXY0TGa0ULoQ=,iv:R1YiVCx3WDZO4b2d9TbdTnWmVmG4MQye4TUWWdIa4Yk=,tag:ACZoECWIqDRITghc8KwUsA==,type:str]
|
||||
lastmodified: "2025-12-09T08:03:16Z"
|
||||
mac: ENC[AES256_GCM,data:6njhvipu8iUze0mmgFIWT6Neqy2xvNPB/4fW7OObHknXAh3VGAveBnigxAJmULua6HdQx4hZ2UkUrVBG8oStjCihFYJA0eBA9j9mM3rF7Piq2U98oGtw4A9Qj2PVC7Y8pOOuX25VRmDn78cw1PpwSEZL3zZ+8cqS5btHywJackY=,iv:AeRcrhhxl5v5YLNWUPx9qvGcMKHFQD/m87PJAGWa9iE=,tag:TN1KCUNa7lVWgxQ16WRijg==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.11.0
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{ hostname }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
|
@ -12,20 +10,11 @@ in
|
|||
systemConf = {
|
||||
inherit hostname username;
|
||||
domain = "net.dn";
|
||||
hyprland = {
|
||||
enable = true;
|
||||
monitors = [
|
||||
{
|
||||
desc = "AU Optronics 0x82ED";
|
||||
props = "prefered, 0x0, 1";
|
||||
output = "eDP-1";
|
||||
}
|
||||
{
|
||||
desc = "AOC 24B30HM2 27ZQ4HA00101";
|
||||
props = "prefered, 1920x540, 1";
|
||||
output = "HDMI-A-2";
|
||||
}
|
||||
];
|
||||
hyprland.enable = true;
|
||||
face = pkgs.fetchurl {
|
||||
url = "https://files.net.dn/skydrive.jpg";
|
||||
hash = "sha256-aMjl6VL1Zy+r3ElfFyhFOlJKWn42JOnAFfBXF+GPB/Q=";
|
||||
curlOpts = "-k";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,96 +5,96 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.networking) hostName;
|
||||
inherit (config.systemConf) username;
|
||||
inherit (lib) mkForce optionalString;
|
||||
inherit (lib) optionalString;
|
||||
|
||||
memeSelector = pkgs.callPackage ../../../../home/scripts/memeSelector.nix {
|
||||
url = "https://nextcloud.net.dn/public.php/dav/files/pygHoPB5LxDZbeY/";
|
||||
};
|
||||
|
||||
faceIcon = pkgs.fetchurl {
|
||||
url = "https://files.net.dn/skydrive.jpg";
|
||||
hash = "sha256-aMjl6VL1Zy+r3ElfFyhFOlJKWn42JOnAFfBXF+GPB/Q=";
|
||||
curlOpts = "-k";
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
environment.systemPackages = map lib.lowPrio [
|
||||
pkgs.curl
|
||||
pkgs.gitMinimal
|
||||
memeSelector
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
users."${username}" = {
|
||||
imports = [
|
||||
../../../../home/presets/basic.nix
|
||||
home-manager.users."${username}" = {
|
||||
services.kanshi.settings = [
|
||||
{
|
||||
profile.name = hostName;
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "AU Optronics 0x82ED";
|
||||
}
|
||||
{
|
||||
criteria = "AOC 24B30HM2 27ZQ4HA00101";
|
||||
position = "1920,540";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
{
|
||||
home.file.".face" = {
|
||||
source = mkForce faceIcon;
|
||||
};
|
||||
}
|
||||
programs.hyprlock.monitors = [
|
||||
"desc:AU Optronics"
|
||||
"desc:AOC 24B30HM2"
|
||||
];
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
input = {
|
||||
kb_options = lib.mkForce [ ];
|
||||
};
|
||||
|
||||
bind = [
|
||||
"$mainMod ctrl, M, exec, ${memeSelector}/bin/memeSelector"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
(import ../../../../home/user/waybar.nix {
|
||||
settings = [
|
||||
# monitor 1
|
||||
{
|
||||
output = "eDP-1";
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"hyprland/workspaces"
|
||||
"clock"
|
||||
"custom/cava"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
(optionalString config.programs.gamemode.enable "custom/gamemode")
|
||||
"custom/airplay"
|
||||
"custom/wallRand"
|
||||
"custom/wireguard"
|
||||
"custom/recording"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
"custom/swaync"
|
||||
];
|
||||
}
|
||||
{
|
||||
output = "HDMI-A-2";
|
||||
modules-left = [
|
||||
"clock"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
"temperature"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
];
|
||||
}
|
||||
];
|
||||
})
|
||||
];
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
input.kb_options = lib.mkForce [ ];
|
||||
bind = [
|
||||
"$mainMod ctrl, M, exec, ${memeSelector}/bin/memeSelector"
|
||||
];
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
../../../../home/presets/basic.nix
|
||||
|
||||
(import ../../../../home/user/waybar.nix {
|
||||
settings = [
|
||||
# monitor 1
|
||||
{
|
||||
output = "eDP-1";
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"hyprland/workspaces"
|
||||
"clock"
|
||||
"custom/cava"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
(optionalString config.programs.gamemode.enable "custom/gamemode")
|
||||
"custom/airplay"
|
||||
"custom/wallRand"
|
||||
"custom/wireguard"
|
||||
"custom/recording"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
"custom/swaync"
|
||||
];
|
||||
}
|
||||
{
|
||||
output = "HDMI-A-2";
|
||||
modules-left = [
|
||||
"clock"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
"temperature"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
];
|
||||
}
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
wireguard:
|
||||
wg0.conf: ENC[AES256_GCM,data:6+FDJQiL+h0lOk74oBmE4yhav9fYMHxetTGkl8B9guqt1qe0l+K2xPzO4QETVCQl/AVs7Y8lnM1ucGCP6JScaiQONq0+cl5Am4+HJr6VhxEooPkt33qYtm6yzPqj/skyAMTsBE8NSmQ0W0nC6JSfl4IWiyksEkybotfClnFA7M5HCVm7pJ+/OXXM/UdiHHD2SanEfU1klA1pQrbxTOUHV/OUpt+d/upP21SGKBgvvm7P67qDeI+3bj9b+Og+Oz2P9YF1K1lcsC+xcdT50NOQ83p9UpUMYMaUGoPh6DcCVrDD2yr5CG01CbnP0SYqiY3vY5YfRDCEIeHFEk3clog3,iv:xQLcrm7Bj2Yoij8PkLIaWH7n81lF2IUGvhKmG3PGCAQ=,tag:YGCasXRmkv8QRgMGgfteiA==,type:str]
|
||||
wg0.conf: ENC[AES256_GCM,data:AAxGzCQIk+fq97R48lmeNwjx6z5MGc01F+vAg8MAyFSoc2x7txXT2d6CVD8/IHH/OWqHqEXRZq/T6Gd7WakSW0QxnV/+TJiezBfQwEXjHn7JZWeL9FAQ/ki+81ORkEyxi+Qy7vSVYaZ/LwzsHk9SdPDyDcTOHKzvL83p9RifgEqQEm4a6Bcvf3s7g1VtH3eDOTC2biHY3LCck08OsagMdrndRK2FjWdsPo+MuimqvIQb+eUhJ63p7/XrVcudypJWVhWU4EmY00VBN+stURJMFAuvUcEhwhmJBBRufiadzfjqXQtCCS04MXgpQyv1eufo89d1LzvQiseTQCejlsyF4Q==,iv:A1iJ1C7oCQqRhaDZxEPr8N9cyViTMZRttwLZ4PWhqiU=,tag:A6Or7u2A3HgDcv6e3SXpEg==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1ar5h06qv72pduau043r04kschwcq0x0lm33wqvxzdh9grmp3cq3sy0ngnz
|
||||
|
|
@ -20,7 +20,7 @@ sops:
|
|||
SFlTZ1BoanoyRTB2ZkJWSHRpcnZwZDQKZ+KF6Jh3zRPr+bDmpeVqdo0qW7vnyFtv
|
||||
V5K8QYFEq9ZEz2u2DEZtyzBYBtTvF3TZz+DL63NHGH7vUVU4cpzxYg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-10-01T05:33:09Z"
|
||||
mac: ENC[AES256_GCM,data:DJzfOk3BSHFdhVbW1WUOfHVw0qt1VlLKAkavtwcerd4Mb6HmY3IE9XSAapmcgDjeAdonDlOOTZCArcymkjT8q1lvqkhNsCbR2BYyZTzOcbI52pqoKGfaYE9kUtg2i1bNnQAuNF6oTqJEoJv3zVUUP0NgdUMtOa9QJio+mJyJ3F0=,iv:KaBis+WF8AuQV7wThQ3OrhFZUl+CF4OZ8D5otSIJRrg=,tag:EjjGdYisgWztKK8yfdXBcg==,type:str]
|
||||
lastmodified: "2025-12-19T12:40:34Z"
|
||||
mac: ENC[AES256_GCM,data:pm8Fx9jFzk4ybdUEzA5IKA6iZdEswq6w1eNGWT9bir/YVK5rQz2x6ZLbmj3gY6C2QiEgWZGzA9XtHajDWNi+8tpefBfEwEuVztqjXTFM+toKTQcGKIJ5F3uOboE3zsbd9qe2n6zpECzUAeQulwlq2qQqPVSBGOZFUhI9hT23oVY=,iv:hi1sqP6PHz2J6f7lnMnhJd5Sk82aDIeyHqF9R81ofFw=,tag:0SLvYRjbAQ4iIoPNcyqfsg==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
version: 3.11.0
|
||||
|
|
|
|||
|
|
@ -3,14 +3,11 @@
|
|||
proxy ? true,
|
||||
}:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (builtins) toString;
|
||||
inherit (lib) mkIf;
|
||||
|
||||
|
|
@ -20,7 +17,6 @@ in
|
|||
services = {
|
||||
actual = {
|
||||
enable = true;
|
||||
package = inputs.actual-budget-server.packages.${system}.default;
|
||||
settings = {
|
||||
port = 31000;
|
||||
hostname = "127.0.0.1";
|
||||
|
|
|
|||
|
|
@ -1,19 +1,15 @@
|
|||
{
|
||||
services = {
|
||||
blueman.enable = true;
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings.General = {
|
||||
experimental = true;
|
||||
Privacy = "device";
|
||||
JustWorksRepairing = "always";
|
||||
Class = "0x000100";
|
||||
FastConnectable = true;
|
||||
};
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings.General = {
|
||||
experimental = true;
|
||||
Privacy = "device";
|
||||
JustWorksRepairing = "always";
|
||||
Class = "0x000100";
|
||||
FastConnectable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -27,9 +27,27 @@ in
|
|||
protontricks.enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
extest.enable = true;
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
];
|
||||
extraCompatPackages =
|
||||
with pkgs;
|
||||
let
|
||||
proton-ge-10-25 =
|
||||
(proton-ge-bin.overrideAttrs (
|
||||
_: finalAttrs: {
|
||||
pname = "proton-ge-bin";
|
||||
version = "GE-Proton10-25";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${finalAttrs.version}/${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-RKko4QMxtnuC1SAHTSEQGBzVyl3ywnirFSYJ1WKSY0k=";
|
||||
};
|
||||
}
|
||||
)).override
|
||||
{ steamDisplayName = "GE-Proton10-25"; };
|
||||
in
|
||||
[
|
||||
proton-ge-bin
|
||||
proton-ge-10-25
|
||||
];
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
optimise.automatic = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
dates = [ "03:15" ];
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,20 +1,29 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
pkgs-hyprland = inputs.hyprland.inputs.nixpkgs.legacyPackages.${system};
|
||||
wm =
|
||||
if config.programs.hyprland.enable then
|
||||
"hyprland"
|
||||
else if config.programs.niri.enable then
|
||||
"niri"
|
||||
else
|
||||
null;
|
||||
|
||||
pkgs-wm = if wm != null then inputs.${wm}.inputs.nixpkgs.legacyPackages.${system} else pkgs;
|
||||
in
|
||||
{
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
package32 = pkgs-hyprland.pkgsi686Linux.mesa;
|
||||
package = pkgs-hyprland.mesa;
|
||||
package32 = pkgs-wm.pkgsi686Linux.mesa;
|
||||
package = pkgs-wm.mesa;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
libva-vdpau-driver
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.systemConf) username;
|
||||
|
||||
hyprlandEnabled = config.programs.hyprland.enable;
|
||||
in
|
||||
|
|
@ -18,14 +19,6 @@ in
|
|||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
xdg.portal = mkIf hyprlandEnabled {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
environment.sessionVariables = mkIf hyprlandEnabled {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
|
|
@ -39,15 +32,6 @@ in
|
|||
hyprpicker
|
||||
hyprshot
|
||||
kitty
|
||||
|
||||
# qt5.qtwayland
|
||||
# qt6.qtwayland
|
||||
wlogout
|
||||
wl-clipboard
|
||||
|
||||
# Util
|
||||
grim
|
||||
slurp
|
||||
]
|
||||
);
|
||||
|
||||
|
|
@ -59,4 +43,8 @@ in
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users."${username}" = mkIf hyprlandEnabled {
|
||||
imports = [ ../../home/user/hyprland.nix ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
|
||||
supportedLocales = [
|
||||
"en_US.UTF-8/UTF-8"
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
systemd.services."phpfpm-nextcloud".postStart = ''
|
||||
systemd.services."phpfpm-nextcloud".postStart = mkIf config.services.nextcloud.enable ''
|
||||
${config.services.nextcloud.occ}/bin/nextcloud-occ config:app:set recognize node_binary --value '${lib.getExe pkgs.nodejs_22}'
|
||||
${config.services.nextcloud.occ}/bin/nextcloud-occ config:app:set recognize tensorflow.purejs --value 'true'
|
||||
'';
|
||||
|
|
@ -112,7 +112,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.nextcloud-whiteboard-server = {
|
||||
services.nextcloud-whiteboard-server = mkIf config.services.nextcloud.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
NEXTCLOUD_URL = "http${optionalString https "s"}://${hostname}";
|
||||
|
|
|
|||
313
system/modules/niri.nix
Normal file
313
system/modules/niri.nix
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
getExe
|
||||
pipe
|
||||
map
|
||||
listToAttrs
|
||||
genList
|
||||
;
|
||||
inherit (builtins) fetchurl;
|
||||
inherit (config.systemConf) username;
|
||||
|
||||
# nvidia-offload-enabled = config.hardware.nvidia.prime.offload.enableOffloadCmd;
|
||||
prefix = "nvidia-offload";
|
||||
terminal = "ghostty";
|
||||
browser = "zen-twilight";
|
||||
|
||||
brightnessStep = builtins.toString 10;
|
||||
volumeStep = builtins.toString 4;
|
||||
|
||||
execOnceScript = pkgs.writeShellScript "startupExec" ''
|
||||
# Fix nemo open in terminal
|
||||
dconf write /org/cinnamon/desktop/applications/terminal/exec "''\'${terminal}''\'" &
|
||||
dconf write /org/cinnamon/desktop/applications/terminal/exec-arg "''\'''\'" &
|
||||
|
||||
# Hint dark theme
|
||||
dconf write /org/gnome/desktop/interface/color-scheme '"prefer-dark"' &
|
||||
|
||||
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME &
|
||||
'';
|
||||
|
||||
niri_peekaboo = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/heyoeyo/niri_tweaks/refs/heads/main/niri_peekaboo.py";
|
||||
sha256 = "sha256:0l1x0bsa9vr089jhzgcz3xbh1hg15sw6njb91q0j9pdbrp2ym3dc";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri-unstable;
|
||||
};
|
||||
|
||||
home-manager.users."${username}" =
|
||||
{
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
rofiWall = import ../../home/scripts/rofiwall.nix { inherit config pkgs; };
|
||||
rbwSelector = import ../../home/scripts/rbwSelector.nix { inherit pkgs; };
|
||||
rNiri = pkgs.writeShellScriptBin "rNiri" ''
|
||||
NIRI_SOCKET="/run/user/1000/$(ls /run/user/1000 | grep niri | head -n 1)" niri $@
|
||||
'';
|
||||
toggleWlogout = pkgs.writeShellScript "toggleWlogout" ''
|
||||
if ${pkgs.busybox}/bin/pgrep wlogout > /dev/null; then
|
||||
${pkgs.busybox}/bin/pkill wlogout
|
||||
else
|
||||
${config.programs.wlogout.package}/bin/wlogout --protocol layer-shell
|
||||
fi
|
||||
'';
|
||||
in
|
||||
with config.lib.niri.actions;
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nautilus # xdg-desktop-portal-gnome file picker
|
||||
rNiri
|
||||
];
|
||||
|
||||
xdg.portal = {
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
services.nfsm.enable = false;
|
||||
|
||||
programs.niri.package = osConfig.programs.niri.package;
|
||||
programs.niri.settings = {
|
||||
spawn-at-startup = [
|
||||
{ argv = [ "${execOnceScript}" ]; }
|
||||
];
|
||||
screenshot-path = "~/Pictures/Screenshots/%Y-%m-%d_%H-%M-%S.png";
|
||||
|
||||
prefer-no-csd = true;
|
||||
|
||||
xwayland-satellite = {
|
||||
enable = true;
|
||||
path = getExe pkgs.xwayland-satellite-unstable;
|
||||
};
|
||||
|
||||
animations = {
|
||||
workspace-switch.kind.spring = {
|
||||
damping-ratio = 1.0;
|
||||
stiffness = 1000;
|
||||
epsilon = 0.0001;
|
||||
};
|
||||
|
||||
window-open.kind.easing = {
|
||||
duration-ms = 150;
|
||||
curve = "ease-out-expo";
|
||||
};
|
||||
|
||||
window-close.kind.easing = {
|
||||
duration-ms = 150;
|
||||
curve = "ease-out-quad";
|
||||
};
|
||||
|
||||
window-resize.kind.spring = {
|
||||
damping-ratio = 1.0;
|
||||
stiffness = 800;
|
||||
epsilon = 0.0001;
|
||||
};
|
||||
};
|
||||
|
||||
layout.border = {
|
||||
enable = true;
|
||||
width = 4;
|
||||
active.gradient = {
|
||||
from = "#24273A";
|
||||
to = "#EBDBB2";
|
||||
angle = 45;
|
||||
in' = "oklab";
|
||||
relative-to = "window";
|
||||
};
|
||||
inactive.gradient = {
|
||||
from = "#24273A";
|
||||
to = "#24273A";
|
||||
angle = 45;
|
||||
in' = "oklab";
|
||||
relative-to = "window";
|
||||
};
|
||||
};
|
||||
|
||||
window-rules = [
|
||||
# Global
|
||||
{
|
||||
geometry-corner-radius =
|
||||
let
|
||||
round = 12.0;
|
||||
in
|
||||
{
|
||||
bottom-left = round;
|
||||
bottom-right = round;
|
||||
top-left = round;
|
||||
top-right = round;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
opacity = 1.0;
|
||||
draw-border-with-background = false;
|
||||
}
|
||||
# Float
|
||||
{
|
||||
matches = [
|
||||
{ app-id = "^xdg-desktop-portal-gtk$"; }
|
||||
{ app-id = "^(org.gnome.Nautilus)$"; }
|
||||
];
|
||||
open-floating = true;
|
||||
}
|
||||
];
|
||||
|
||||
input = {
|
||||
focus-follows-mouse.enable = true;
|
||||
mouse.accel-speed = -0.1;
|
||||
keyboard = {
|
||||
repeat-delay = 250;
|
||||
repeat-rate = 35;
|
||||
};
|
||||
};
|
||||
|
||||
binds =
|
||||
let
|
||||
sh = spawn "sh" "-c";
|
||||
in
|
||||
{
|
||||
# ==== Launch ==== #
|
||||
"Mod+Return".action = sh ''${prefix} ${terminal}'';
|
||||
"Mod+F".action = sh ''${browser}'';
|
||||
"Mod+E".action = sh ''${prefix} ${terminal} -e yazi'';
|
||||
"Mod+Ctrl+P".action = spawn "${rbwSelector}";
|
||||
"Mod+Ctrl+M".action = spawn "${toggleWlogout}";
|
||||
|
||||
# Rofi
|
||||
"Mod+Ctrl+W".action = spawn "${rofiWall}";
|
||||
"Alt+Space".action = spawn "rofi" "-config" "~/.config/rofi/apps.rasi" "-show" "drun";
|
||||
"Mod+Period".action = spawn "rofi" "-modi" "emoji" "-show" "emoji";
|
||||
"Mod+Ctrl+C".action = spawn "rofi" "-modi" "calc" "-show" "calc" "-no-show-match" "-no-sort";
|
||||
|
||||
# ==== Media ==== #
|
||||
"XF86AudioPrev".action = spawn "playerctl" "previous";
|
||||
"XF86AudioNext".action = spawn "playerctl" "next";
|
||||
"Mod+Ctrl+Comma".action = spawn "playerctl" "previous";
|
||||
"Mod+Ctrl+Period".action = spawn "playerctl" "next";
|
||||
"XF86AudioPlay".action = spawn "playerctl" "play-pause";
|
||||
"XF86AudioStop".action = spawn "playerctl" "stop";
|
||||
"XF86AudioMute".action = spawn "wpctl" "set-mute" "@DEFAULT_SINK@" "toggle";
|
||||
"XF86AudioRaiseVolume".action =
|
||||
sh ''wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%+'';
|
||||
"XF86AudioLowerVolume".action =
|
||||
sh ''wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%-'';
|
||||
"XF86MonBrightnessDown".action = spawn "brightnessctl set ${brightnessStep}%-";
|
||||
"XF86MonBrightnessUp".action = spawn "brightnessctl set ${brightnessStep}%+";
|
||||
|
||||
# ==== Movement ==== #
|
||||
# Mouse Scroll
|
||||
"Mod+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-workspace-down;
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-workspace-up;
|
||||
};
|
||||
"Mod+Shift+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-column-or-monitor-right;
|
||||
};
|
||||
"Mod+Shift+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-column-or-monitor-left;
|
||||
};
|
||||
"Mod+WheelScrollRight".action = focus-column-right;
|
||||
"Mod+WheelScrollLeft".action = focus-column-left;
|
||||
|
||||
# Touchpad
|
||||
"TouchpadScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-window-or-workspace-down;
|
||||
};
|
||||
"TouchpadScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action = focus-window-or-workspace-up;
|
||||
};
|
||||
|
||||
# Monitor Focus
|
||||
"Mod+Ctrl+H".action = focus-monitor-left;
|
||||
"Mod+Ctrl+L".action = focus-monitor-right;
|
||||
|
||||
# Workspace Focus
|
||||
"Mod+Ctrl+J".action = focus-workspace-down;
|
||||
"Mod+Ctrl+K".action = focus-workspace-up;
|
||||
|
||||
# General Focus
|
||||
"Mod+J".action = focus-window-or-workspace-down;
|
||||
"Mod+K".action = focus-window-or-workspace-up;
|
||||
"Mod+H".action = focus-column-or-monitor-left;
|
||||
"Mod+L".action = focus-column-or-monitor-right;
|
||||
|
||||
# Workspace Move
|
||||
"Mod+Ctrl+Shift+J".action = move-workspace-down;
|
||||
"Mod+Ctrl+Shift+K".action = move-workspace-up;
|
||||
|
||||
# Window & Column Move
|
||||
"Mod+Shift+J".action = move-window-down-or-to-workspace-down;
|
||||
"Mod+Shift+K".action = move-window-up-or-to-workspace-up;
|
||||
"Mod+Shift+L".action = move-column-right-or-to-monitor-right;
|
||||
"Mod+Shift+H".action = move-column-left-or-to-monitor-left;
|
||||
|
||||
# Window Comsume
|
||||
"Mod+Ctrl+Shift+L".action = consume-or-expel-window-right;
|
||||
"Mod+Ctrl+Shift+H".action = consume-or-expel-window-left;
|
||||
|
||||
# ==== Action ==== #
|
||||
# General
|
||||
"Mod+C".action = center-window;
|
||||
"Mod+O".action = toggle-overview;
|
||||
"Mod+Q".action = close-window;
|
||||
"F11".action = if config.services.nfsm.enable then (spawn "nfsm-cli") else fullscreen-window;
|
||||
"Mod+Shift+slash".action = show-hotkey-overlay;
|
||||
"Mod+Ctrl+Shift+P".action = spawn "${getExe pkgs.python312}" "${niri_peekaboo}";
|
||||
|
||||
# Column Scale
|
||||
"Mod+W".action = switch-preset-column-width;
|
||||
"Mod+S".action = switch-preset-window-height;
|
||||
"Mod+P".action = expand-column-to-available-width;
|
||||
"Mod+M".action = maximize-column;
|
||||
"Mod+Ctrl+S".action = reset-window-height;
|
||||
|
||||
# Float
|
||||
"Mod+V".action = toggle-window-floating;
|
||||
"Mod+Ctrl+V".action = switch-focus-between-floating-and-tiling;
|
||||
|
||||
# Screenshot
|
||||
"Mod+Shift+S".action.screenshot = [ { show-pointer = false; } ];
|
||||
"Ctrl+Shift+S".action.screenshot-window = [
|
||||
{
|
||||
write-to-disk = false;
|
||||
}
|
||||
];
|
||||
"Mod+Ctrl+Shift+S".action.screenshot-screen = [
|
||||
{
|
||||
write-to-disk = false;
|
||||
}
|
||||
];
|
||||
}
|
||||
# Map Mod+{1 ~ 9} to workspace{1 ~ 9}
|
||||
// (pipe 9 [
|
||||
(x: genList (i: i + 1) x)
|
||||
(
|
||||
x:
|
||||
map (i: {
|
||||
name = "Mod+${toString i}";
|
||||
value.action = focus-workspace i;
|
||||
}) x
|
||||
)
|
||||
(x: listToAttrs x)
|
||||
]);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -5,11 +5,11 @@
|
|||
settings = {
|
||||
substituters = [
|
||||
"https://yazi.cachix.org"
|
||||
"https://cache.net.dn/dn-main"
|
||||
# "https://cache.net.dn/dn-main"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
|
||||
"dn-main:ZjQmZEOWpe0TjZgHGwkgtPdOUXpN82RL9wy30EW1V7k="
|
||||
# "dn-main:ZjQmZEOWpe0TjZgHGwkgtPdOUXpN82RL9wy30EW1V7k="
|
||||
];
|
||||
warn-dirty = false;
|
||||
trusted-users = [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
../plymouth.nix
|
||||
../polkit.nix
|
||||
../hyprland.nix
|
||||
../niri.nix
|
||||
];
|
||||
|
||||
programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
||||
|
|
|
|||
140
system/modules/shells/noctalia/bar.nix
Normal file
140
system/modules/shells/noctalia/bar.nix
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
{
|
||||
backgroundOpacity = 1;
|
||||
capsuleOpacity = 1;
|
||||
density = "comfortable";
|
||||
exclusive = true;
|
||||
floating = true;
|
||||
marginHorizontal = 0.25;
|
||||
marginVertical = 0.25;
|
||||
outerCorners = false;
|
||||
postition = "top";
|
||||
showCapsule = true;
|
||||
widgets = {
|
||||
center = [
|
||||
{
|
||||
colorizeIcons = false;
|
||||
hideMode = "hidden";
|
||||
id = "ActiveWindow";
|
||||
maxWidth = 145;
|
||||
scrollingMode = "hover";
|
||||
showIcon = true;
|
||||
useFixedWidth = false;
|
||||
}
|
||||
];
|
||||
left = [
|
||||
{
|
||||
icon = "rocket";
|
||||
id = "CustomButton";
|
||||
leftClickExec = "noctalia-shell ipc call launcher toggle";
|
||||
leftClickUpdateText = false;
|
||||
maxTextLength = {
|
||||
horizontal = 10;
|
||||
vertical = 10;
|
||||
};
|
||||
middleClickExec = "";
|
||||
middleClickUpdateText = false;
|
||||
parseJson = false;
|
||||
rightClickExec = "";
|
||||
rightClickUpdateText = false;
|
||||
textCollapse = "";
|
||||
textCommand = "";
|
||||
textIntervalMs = 3000;
|
||||
textStream = false;
|
||||
wheelDownExec = "";
|
||||
wheelDownUpdateText = false;
|
||||
wheelExec = "";
|
||||
wheelMode = "unified";
|
||||
wheelUpExec = "";
|
||||
wheelUpUpdateText = false;
|
||||
wheelUpdateText = false;
|
||||
}
|
||||
{
|
||||
customFont = "";
|
||||
formatHorizontal = "HH:mm ddd, MMM dd";
|
||||
formatVertical = "HH mm - dd MM";
|
||||
id = "Clock";
|
||||
useCustomFont = false;
|
||||
usePrimaryColor = true;
|
||||
}
|
||||
{
|
||||
characterCount = 4;
|
||||
followFocusedScreen = false;
|
||||
hideUnoccupied = false;
|
||||
id = "Workspace";
|
||||
labelMode = "index";
|
||||
}
|
||||
{
|
||||
hideMode = "hidden";
|
||||
hideWhenIdle = false;
|
||||
id = "MediaMini";
|
||||
maxWidth = 250;
|
||||
scrollingMode = "hover";
|
||||
showAlbumArt = true;
|
||||
showArtistFirst = false;
|
||||
showProgressRing = true;
|
||||
showVisualizer = true;
|
||||
useFixedWidth = false;
|
||||
visualizerType = "linear";
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
blacklist = [
|
||||
"Bluetooth*"
|
||||
];
|
||||
colorizeIcons = false;
|
||||
drawerEnabled = false;
|
||||
id = "Tray";
|
||||
pinned = [
|
||||
];
|
||||
}
|
||||
{
|
||||
diskPath = "/";
|
||||
id = "SystemMonitor";
|
||||
showCpuTemp = true;
|
||||
showCpuUsage = true;
|
||||
showDiskUsage = false;
|
||||
showMemoryAsPercent = false;
|
||||
showMemoryUsage = true;
|
||||
showNetworkStats = false;
|
||||
usePrimaryColor = false;
|
||||
}
|
||||
{
|
||||
id = "ScreenRecorder";
|
||||
}
|
||||
{
|
||||
id = "KeepAwake";
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
id = "Volume";
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
id = "Brightness";
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
id = "VPN";
|
||||
}
|
||||
{
|
||||
displayMode = "onhover";
|
||||
id = "Bluetooth";
|
||||
}
|
||||
{
|
||||
hideWhenZero = true;
|
||||
id = "NotificationHistory";
|
||||
showUnreadBadge = true;
|
||||
}
|
||||
{
|
||||
colorizeDistroLogo = false;
|
||||
colorizeSystemIcon = "primary";
|
||||
customIconPath = "";
|
||||
enableColorization = true;
|
||||
icon = "noctalia";
|
||||
id = "ControlCenter";
|
||||
useDistroLogo = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
55
system/modules/shells/noctalia/controlCenter.nix
Normal file
55
system/modules/shells/noctalia/controlCenter.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
cards = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "profile-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "shortcuts-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "audio-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "weather-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "media-sysmon-card";
|
||||
}
|
||||
];
|
||||
position = "bottom_center";
|
||||
shortcuts = {
|
||||
left = [
|
||||
{
|
||||
id = "WiFi";
|
||||
}
|
||||
{
|
||||
id = "Bluetooth";
|
||||
}
|
||||
{
|
||||
id = "ScreenRecorder";
|
||||
}
|
||||
{
|
||||
id = "WallpaperSelector";
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
id = "Notifications";
|
||||
}
|
||||
{
|
||||
id = "PowerProfile";
|
||||
}
|
||||
{
|
||||
id = "KeepAwake";
|
||||
}
|
||||
{
|
||||
id = "NightLight";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
282
system/modules/shells/noctalia/default.nix
Normal file
282
system/modules/shells/noctalia/default.nix
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
|
||||
inherit (config.systemConf) username;
|
||||
inherit (lib) mkForce mapAttrs;
|
||||
in
|
||||
{
|
||||
|
||||
# ==== Extra Services Settings ==== #
|
||||
services.power-profiles-daemon.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
services.upower.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
# ================================= #
|
||||
|
||||
home-manager.users.${username} =
|
||||
{ config, ... }:
|
||||
{
|
||||
# ==== Disabled Services ==== #
|
||||
services.swww.enable = mkForce false; # Wallpaper
|
||||
programs.waybar.enable = mkForce false; # Bar
|
||||
services.swayidle.enable = mkForce false; # Idle
|
||||
services.sunsetr.enable = mkForce false; # Bluelight filter
|
||||
programs.hyprlock.enable = mkForce false; # Lock
|
||||
services.swaync.enable = mkForce false; # Notification daemon
|
||||
|
||||
systemd.user.services.noctalia-shell.Service.Environment = [
|
||||
"QT_QPA_PLATFORMTHEME=gtk3"
|
||||
];
|
||||
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
settingsVersion = 25;
|
||||
appLauncher = {
|
||||
customLaunchPrefix = "";
|
||||
customLaunchPrefixEnabled = false;
|
||||
enableClipPreview = true;
|
||||
enableClipboardHistory = true;
|
||||
pinnedExecs = [
|
||||
];
|
||||
position = "top_center";
|
||||
sortByMostUsed = true;
|
||||
terminalCommand = "ghostty -e";
|
||||
useApp2Unit = false;
|
||||
viewMode = "list";
|
||||
};
|
||||
audio = {
|
||||
cavaFrameRate = 30;
|
||||
externalMixer = "pwvucontrol";
|
||||
mprisBlacklist = [
|
||||
];
|
||||
preferredPlayer = "mpv";
|
||||
visualizerQuality = "high";
|
||||
visualizerType = "linear";
|
||||
volumeOverdrive = false;
|
||||
volumeStep = 5;
|
||||
};
|
||||
bar = import ./bar.nix;
|
||||
brightness = {
|
||||
brightnessStep = 5;
|
||||
enableDdcSupport = false;
|
||||
enforceMinium = true;
|
||||
};
|
||||
calendar = {
|
||||
cards = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "banner-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "calendar-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "timer-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "weather-card";
|
||||
}
|
||||
];
|
||||
};
|
||||
changelog = {
|
||||
lastSeenVersion = "";
|
||||
};
|
||||
colorSchemes = {
|
||||
darkMode = true;
|
||||
generateTemplatesForPredefined = true;
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "18:30";
|
||||
matugenSchemeType = "scheme-neutral";
|
||||
predefinedScheme = "Noctalia (default)";
|
||||
schedulingMode = "off";
|
||||
useWallpaperColors = true;
|
||||
};
|
||||
controlCenter = import ./controlCenter.nix;
|
||||
dock = {
|
||||
backgroundOpacity = 1;
|
||||
colorizeIcons = false;
|
||||
displayMode = "auto_hide";
|
||||
enabled = true;
|
||||
floatingRatio = 1;
|
||||
monitors = [
|
||||
];
|
||||
onlySameOutput = true;
|
||||
pinnedApps = [
|
||||
];
|
||||
radiusRatio = 0.68;
|
||||
size = 1;
|
||||
};
|
||||
general = {
|
||||
allowPanelsOnScreenWithoutBar = true;
|
||||
animationDisabled = false;
|
||||
animationSpeed = 1.5;
|
||||
avatarImage = "${config.home.homeDirectory}/.face";
|
||||
compactLockScreen = false;
|
||||
dimmerOpacity = 0.4;
|
||||
enableShadows = true;
|
||||
forceBlackScreenCorners = true;
|
||||
language = "";
|
||||
lockOnSuspend = true;
|
||||
radiusRatio = 1;
|
||||
scaleRatio = 1;
|
||||
screenRadiusRatio = 1.09;
|
||||
shadowDirection = "bottom_right";
|
||||
shadowOffsetX = 2;
|
||||
shadowOffsetY = 3;
|
||||
showHibernateOnLockScreen = false;
|
||||
showScreenCorners = true;
|
||||
};
|
||||
hooks = {
|
||||
enabled = false;
|
||||
darkModeChange = "";
|
||||
wallpaperChange = "";
|
||||
};
|
||||
location = {
|
||||
analogClockInCalendar = false;
|
||||
firstDayOfWeek = -1;
|
||||
name = "Taipei, TW";
|
||||
showCalendarEvents = true;
|
||||
showCalendarWeather = true;
|
||||
showWeekNumberInCalendar = false;
|
||||
use12hourFormat = false;
|
||||
useFahrenheit = false;
|
||||
weatherEnabled = true;
|
||||
weatherShowEffects = true;
|
||||
};
|
||||
network = {
|
||||
wifiEnabled = true;
|
||||
};
|
||||
nightLight = {
|
||||
enabled = true;
|
||||
autoSchedule = true;
|
||||
dayTemp = "6000";
|
||||
nightTemp = "5500";
|
||||
forced = false;
|
||||
manualSunrise = "06:30";
|
||||
manualSunset = "18:30";
|
||||
};
|
||||
notifications = {
|
||||
backgroundOpacity = 1;
|
||||
criticalUrgencyDuration = 15;
|
||||
enableKeyboardLayoutToast = true;
|
||||
enabled = true;
|
||||
location = "bottom_right";
|
||||
lowUrgencyDuration = 3;
|
||||
monitors = [
|
||||
];
|
||||
normalUrgencyDuration = 8;
|
||||
overlayLayer = true;
|
||||
respectExpireTimeout = false;
|
||||
};
|
||||
osd = {
|
||||
autoHideMs = 1500;
|
||||
backgroundOpacity = 1;
|
||||
enabled = true;
|
||||
enabledTypes = [
|
||||
0
|
||||
1
|
||||
2
|
||||
];
|
||||
location = "right";
|
||||
monitors = [
|
||||
];
|
||||
overlayLayer = true;
|
||||
};
|
||||
screenRecorder = {
|
||||
audioCodec = "opus";
|
||||
audioSource = "default_output";
|
||||
colorRange = "limited";
|
||||
directory = "${config.home.homeDirectory}/Videos";
|
||||
frameRate = 60;
|
||||
quality = "very_high";
|
||||
showCursor = true;
|
||||
videoCodec = "h264";
|
||||
videoSource = "portal";
|
||||
};
|
||||
sessionMenu = import ./sessionMenu.nix;
|
||||
systemMonitor = import ./systemMonitor.nix;
|
||||
templates = import ./templates.nix;
|
||||
ui = {
|
||||
fontDefault = config.stylix.fonts.sansSerif.name;
|
||||
fontDefaultScale = 1;
|
||||
fontFixed = config.stylix.fonts.monospace.name;
|
||||
fontFixedScale = 1;
|
||||
panelBackgroundOpacity = 1;
|
||||
panelsAttachedToBar = true;
|
||||
settingsPanelAttachToBar = true;
|
||||
tooltipsEnabled = true;
|
||||
};
|
||||
wallpaper = {
|
||||
directory = "${config.home.homeDirectory}/Pictures/Wallpapers";
|
||||
enableMultiMonitorDirectories = false;
|
||||
enabled = true;
|
||||
fillColor = "#000000";
|
||||
fillMode = "crop";
|
||||
hideWallpaperFilenames = true;
|
||||
monitorDirectories = [
|
||||
];
|
||||
overviewEnabled = false;
|
||||
panelPosition = "follow_bar";
|
||||
randomEnabled = false;
|
||||
randomIntervalSec = 300;
|
||||
recursiveSearch = false;
|
||||
setWallpaperOnAllMonitors = true;
|
||||
transitionDuration = 1500;
|
||||
transitionEdgeSmoothness = 0.05;
|
||||
transitionType = "random";
|
||||
useWallhaven = false;
|
||||
wallhavenCategories = "111";
|
||||
wallhavenOrder = "desc";
|
||||
wallhavenPurity = "100";
|
||||
wallhavenQuery = "";
|
||||
wallhavenResolutionHeight = "";
|
||||
wallhavenResolutionMode = "atleast";
|
||||
wallhavenResolutionWidth = "";
|
||||
wallhavenSorting = "relevance";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.niri.settings =
|
||||
with config.lib.niri.actions;
|
||||
let
|
||||
noctalia = spawn "noctalia-shell" "ipc" "call";
|
||||
in
|
||||
{
|
||||
binds = mapAttrs (name: value: mkForce value) {
|
||||
# Core
|
||||
"Mod+Slash".action = noctalia "controlCenter" "toggle";
|
||||
"Alt+Space".action = noctalia "launcher" "toggle";
|
||||
"Mod+Ctrl+M".action = noctalia "lockScreen" "lock";
|
||||
|
||||
# Utilities
|
||||
"Mod+Comma".action = noctalia "launcher" "clipboard";
|
||||
"Mod+Period".action = noctalia "launcher" "emoji";
|
||||
"Mod+F12".action = noctalia "screenRecorder" "toggle";
|
||||
"Mod+N".action = noctalia "notifications" "toggleHistory";
|
||||
"Mod+Ctrl+N".action = noctalia "notifications" "toggleDND";
|
||||
"Mod+Ctrl+W".action = noctalia "wallpaper" "toggle";
|
||||
"Mod+Ctrl+C".action = noctalia "launcher" "calculator";
|
||||
"Mod+Ctrl+Slash".action = noctalia "wallpaper" "random";
|
||||
|
||||
# Media
|
||||
"XF86AudioPlay".action = noctalia "media" "playPause";
|
||||
"XF86AudioStop".action = noctalia "media" "pause";
|
||||
"XF86AudioPrev".action = noctalia "media" "previous";
|
||||
"XF86AudioNext".action = noctalia "media" "next";
|
||||
"Mod+Ctrl+Comma".action = noctalia "media" "previous";
|
||||
"Mod+Ctrl+Period".action = noctalia "media" "next";
|
||||
"XF86AudioMute".action = noctalia "volume" "muteOutput";
|
||||
"XF86AudioRaiseVolume".action = noctalia "volume" "increase";
|
||||
"XF86AudioLowerVolume".action = noctalia "volume" "decrease";
|
||||
"XF86MonBrightnessDown".action = noctalia "brightness" "decrease";
|
||||
"XF86MonBrightnessUp".action = noctalia "brightness" "increase";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
38
system/modules/shells/noctalia/sessionMenu.nix
Normal file
38
system/modules/shells/noctalia/sessionMenu.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
countdownDuration = 10000;
|
||||
enableCountdown = true;
|
||||
position = "bottom_center";
|
||||
powerOptions = [
|
||||
{
|
||||
action = "lock";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
action = "suspend";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
action = "hibernate";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
action = "reboot";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
action = "logout";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
action = "shutdown";
|
||||
countdownEnabled = true;
|
||||
enabled = true;
|
||||
}
|
||||
];
|
||||
showHeader = false;
|
||||
}
|
||||
18
system/modules/shells/noctalia/systemMonitor.nix
Normal file
18
system/modules/shells/noctalia/systemMonitor.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
cpuCriticalThreshold = 90;
|
||||
cpuPollingInterval = 3000;
|
||||
cpuWarningThreshold = 80;
|
||||
criticalColor = "";
|
||||
diskCriticalThreshold = 90;
|
||||
diskPollingInterval = 3000;
|
||||
diskWarningThreshold = 80;
|
||||
memCriticalThreshold = 90;
|
||||
memPollingInterval = 3000;
|
||||
memWarningThreshold = 80;
|
||||
networkPollingInterval = 3000;
|
||||
tempCriticalThreshold = 90;
|
||||
tempPollingInterval = 3000;
|
||||
tempWarningThreshold = 80;
|
||||
useCustomColors = false;
|
||||
warningColor = "";
|
||||
}
|
||||
22
system/modules/shells/noctalia/templates.nix
Normal file
22
system/modules/shells/noctalia/templates.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
alacritty = false;
|
||||
cava = false;
|
||||
code = false;
|
||||
discord = false;
|
||||
emacs = false;
|
||||
enableUserTemplates = false;
|
||||
foot = false;
|
||||
fuzzel = false;
|
||||
ghostty = false;
|
||||
gtk = false;
|
||||
kcolorscheme = false;
|
||||
kitty = false;
|
||||
niri = false;
|
||||
pywalfox = false;
|
||||
qt = false;
|
||||
spicetify = false;
|
||||
telegram = false;
|
||||
vicinae = false;
|
||||
walker = false;
|
||||
wezterm = false;
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
pwvucontrol
|
||||
playerctl
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ in
|
|||
enable = true;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml";
|
||||
polarity = "dark";
|
||||
enableReleaseChecks = false;
|
||||
|
||||
fonts = {
|
||||
serif = config.stylix.fonts.monospace;
|
||||
|
|
@ -49,7 +50,6 @@ in
|
|||
noto-fonts-cjk-serif
|
||||
noto-fonts-color-emoji
|
||||
liberation_ttf
|
||||
# dfkai-sb
|
||||
sf-pro-display-bold
|
||||
];
|
||||
|
||||
|
|
@ -57,6 +57,8 @@ in
|
|||
};
|
||||
|
||||
home-manager.users."${username}" = {
|
||||
stylix.enableReleaseChecks = false;
|
||||
|
||||
stylix.targets.neovim.transparentBackground = {
|
||||
main = true;
|
||||
numberLine = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue