Compare commits

..

No commits in common. "98b4f598f83ab5e2755c53c27f2405395f3cb396" and "b3c5ad28807d0cef47ae6455d6ef84eab3e58c59" have entirely different histories.

292 changed files with 2251 additions and 4730 deletions

1
.envrc
View file

@ -1 +0,0 @@
use flake

3
.gitignore vendored Executable file → Normal file
View file

@ -1,4 +1 @@
**/result **/result
.direnv
.pre-commit-config.yaml

0
.sops.yaml Executable file → Normal file
View file

0
README.md Executable file → Normal file
View file

0
docs/fcitx.md Executable file → Normal file
View file

0
docs/hyprland.md Executable file → Normal file
View file

0
docs/yazi.md Executable file → Normal file
View file

1083
flake.lock generated Executable file → Normal file

File diff suppressed because it is too large Load diff

83
flake.nix Executable file → Normal file
View file

@ -41,7 +41,7 @@
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
lanzaboote = { lanzaboote = {
url = "github:nix-community/lanzaboote/v1.0.0"; url = "github:nix-community/lanzaboote/v0.4.2";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -112,6 +112,12 @@
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
}; };
actual-budget-server = {
url = "git+file:///home/danny/projects/actual-budget-flake";
# url = "github:dachxy/actual-budget-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
mail-server = { mail-server = {
url = "github:dachxy/nix-mail-server"; url = "github:dachxy/nix-mail-server";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -125,8 +131,7 @@
nix-search-tv.url = "github:3timeslazy/nix-search-tv"; nix-search-tv.url = "github:3timeslazy/nix-search-tv";
niri = { niri = {
# url = "github:sodiboo/niri-flake"; url = "github:sodiboo/niri-flake";
url = "github:dachxy/niri-flake"; # Wait for blur configurations
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -135,8 +140,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
git-hooks.url = "github:cachix/git-hooks.nix";
# ==== Shell ==== # # ==== Shell ==== #
caelestia-shell = { caelestia-shell = {
url = "github:caelestia-dots/shell"; url = "github:caelestia-dots/shell";
@ -148,39 +151,33 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
mango = {
url = "github:DreamMaoMao/mango";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
{ {
self, self,
nixpkgs, nixpkgs,
systems,
... ...
}@inputs: }@inputs:
let let
inherit (builtins) mapAttrs; inherit (builtins) mapAttrs;
forEachSystem = nixpkgs.lib.genAttrs (import systems);
hosts = { hosts = {
dn-pre7780 = { dn-pre7780 = {
system = "x86_64-linux"; system = "x86_64-linux";
confPath = ./system/dev/dn-pre7780; path = ./system/dev/dn-pre7780;
}; };
dn-server = { dn-server = {
system = "x86_64-linux"; system = "x86_64-linux";
confPath = ./system/dev/dn-server; path = ./system/dev/dn-server;
}; };
dn-lap = { dn-lap = {
system = "x86_64-linux"; system = "x86_64-linux";
confPath = ./system/dev/dn-lap; path = ./system/dev/dn-lap;
}; };
skydrive-lap = { skydrive-lap = {
system = "x86_64-linux"; system = "x86_64-linux";
confPath = ./system/dev/skydrive-lap; path = ./system/dev/skydrive-lap;
}; };
}; };
in in
@ -190,7 +187,7 @@
mapAttrs ( mapAttrs (
hostname: conf: hostname: conf:
let let
inherit (conf) confPath system; inherit (conf) path system;
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
}; };
@ -237,67 +234,15 @@
inputs.attic.nixosModules.atticd inputs.attic.nixosModules.atticd
inputs.mail-server.nixosModules.default inputs.mail-server.nixosModules.default
inputs.niri.nixosModules.niri inputs.niri.nixosModules.niri
inputs.mango.nixosModules.mango
inputs.lanzaboote.nixosModules.lanzaboote
./options ./options
# ==== Private Configuration ==== # # ==== Private Configuration ==== #
(import confPath { inherit hostname; }) (import path { inherit hostname; })
]; ];
} }
) hosts ) hosts
); );
formatter = forEachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
in
pkgs.writeShellScriptBin "pre-commit-run" script
);
checks = forEachSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt.enable = true;
check-comment = {
enable = true;
name = "check comment";
entry = "${pkgs.callPackage ./githooks/check-comment.nix { }}";
files = "\\.nix$";
pass_filenames = false;
stages = [ "pre-commit" ];
};
};
};
}
);
devShells = forEachSystem (system: {
default =
let
pkgs = import nixpkgs { inherit system; };
inherit (self.checks.${system}.pre-commit-check) shellHook enabledPackages;
in
pkgs.mkShell {
inherit shellHook;
name = "nixos";
buildInputs = enabledPackages;
};
});
# ==== MicroVM Packages ==== # # ==== MicroVM Packages ==== #
# packages."${system}" = { # packages."${system}" = {
# vm-1 = self.nixosConfigurations.vm-1.config.microvm.declaredRunner; # vm-1 = self.nixosConfigurations.vm-1.config.microvm.declaredRunner;

View file

@ -1,19 +0,0 @@
{ pkgs, lib }:
pkgs.writeShellScript "check-comment" ''
FILES=$("${lib.getExe pkgs.git}" diff --cached --name-only --diff-filter=ACM | grep '\.nix$' | grep -v '^githooks/check-comment.nix$')
TODO_FOUND=0
for file in $FILES; do
if grep -nHE '#\s*(TODO|FIXME|FIX):' "$file"; then
TODO_FOUND=1
fi
done
if [ $TODO_FOUND -eq 1 ]; then
echo "Remove all the '#TODO|FIXME|FIX' before committing"
exit 1
fi
exit 0
''

0
helper/default.nix Executable file → Normal file
View file

0
home/config/.face Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before After
Before After

0
home/config/firefox/autohide_toolbox.css Executable file → Normal file
View file

0
home/config/firefox/nightTab.json Executable file → Normal file
View file

0
home/config/fish/functions/fish_prompt.fish Executable file → Normal file
View file

0
home/config/gh/config.yaml Executable file → Normal file
View file

0
home/config/ghostty/shader/mnoise.glsl Executable file → Normal file
View file

0
home/config/rofi/apps.rasi Executable file → Normal file
View file

0
home/config/rofi/config.rasi Executable file → Normal file
View file

0
home/config/rofi/gruvbox-material.rasi Executable file → Normal file
View file

0
home/config/tmux.yaml Executable file → Normal file
View file

0
home/config/wlogout/icons/hibernate.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 307 B

Before After
Before After

0
home/config/wlogout/icons/lock.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 319 B

Before After
Before After

0
home/config/wlogout/icons/logout.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

Before After
Before After

0
home/config/wlogout/icons/reboot.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 398 B

Before After
Before After

0
home/config/wlogout/icons/shutdown.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 306 B

Before After
Before After

0
home/config/wlogout/icons/suspend.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 350 B

Before After
Before After

0
home/config/zen/zen-keyboard-shortcuts.json Executable file → Normal file
View file

1
home/options/default.nix Executable file → Normal file
View file

@ -4,6 +4,5 @@
./hyprlock.nix ./hyprlock.nix
./sunsetr.nix ./sunsetr.nix
./noctalia.nix ./noctalia.nix
./wm.nix
]; ];
} }

0
home/options/hyprlock.nix Executable file → Normal file
View file

10
home/options/noctalia.nix Executable file → Normal file
View file

@ -1,19 +1,17 @@
{ config, lib, ... }: { config, lib, ... }:
let let
inherit (builtins) inherit (lib)
mkOption
types
elem elem
isList isList
filter filter
listToAttrs listToAttrs
concatMap concatMap
nameValuePair
attrNames attrNames
isAttrs isAttrs
; ;
inherit (lib)
mkOption
types
nameValuePair
;
filterAttrsRecursive' = filterAttrsRecursive' =
pred: set: pred: set:

0
home/options/ntfy-client.nix Executable file → Normal file
View file

9
home/options/sunsetr.nix Executable file → Normal file
View file

@ -1,9 +1,4 @@
{ { config, lib, ... }:
config,
lib,
pkgs,
...
}:
let let
inherit (lib) inherit (lib)
mkIf mkIf
@ -16,7 +11,7 @@ in
{ {
options.services.sunsetr = { options.services.sunsetr = {
enable = mkEnableOption "Enable sunsetr."; enable = mkEnableOption "Enable sunsetr.";
package = mkPackageOption pkgs "sunsetr" { }; package = mkPackageOption "sunsetr";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -1,455 +0,0 @@
{
lib,
config,
pkgs,
...
}:
let
inherit (lib)
mkOption
types
concatStringsSep
getExe
dropEnd
last
mkEnableOption
mapAttrs'
nameValuePair
splitString
;
inherit (builtins) length;
cfg = config.wm;
bindCfg = cfg.keybinds;
sep = bindCfg.separator;
mod = bindCfg.mod;
main-color = "#EBDBB2";
secondary-color = "#24273A";
mkHyprBind =
keys:
let
len = length keys;
prefix = if len > 1 then [ ] else [ "None" ];
finalKeys = prefix ++ keys;
in
(concatStringsSep "+" (dropEnd 1 finalKeys)) + ",${last finalKeys}";
mkBindOption =
keys:
let
hypr-key = mkHyprBind keys;
in
mkOption {
type = types.str;
default = if bindCfg.hypr-type then hypr-key else (concatStringsSep sep keys);
};
mkGradientColorOption =
{
from ? main-color,
to ? secondary-color,
angle ? 45,
}:
{
from = mkOption {
type = types.str;
default = from;
};
to = mkOption {
type = types.str;
default = to;
};
angle = mkOption {
type = types.int;
default = angle;
};
};
in
{
options.wm = {
exec-once = mkOption {
type = with types; nullOr lines;
default = null;
apply = v: if v != null then pkgs.writeShellScript "exec-once" v else null;
};
app = {
browser = {
package = mkOption {
type = with types; nullOr package;
default = null;
};
name = mkOption {
type = with types; nullOr package;
default = null;
};
};
terminal = {
package = mkOption {
type = with types; nullOr package;
default = null;
};
name = mkOption {
type = with types; nullOr str;
default = null;
};
run = mkOption {
type = with types; nullOr str;
default = "${getExe cfg.terminal.package} -e ";
};
};
file-browser = {
package = mkOption {
type = with types; nullOr package;
default = null;
};
name = mkOption {
type = with types; nullOr str;
default = null;
};
};
};
window = {
opacity = mkOption {
type = types.float;
default = 0.85;
};
};
input = {
keyboard = {
repeat-delay = mkOption {
type = types.int;
default = 250;
};
repeat-rate = mkOption {
type = types.int;
default = 35;
};
};
};
border = {
active = mkGradientColorOption { };
inactive = mkGradientColorOption {
from = secondary-color;
to = secondary-color;
};
radius = mkOption {
type = types.int;
default = 12;
};
};
keybinds = {
mod = mkOption {
type = types.str;
default = "Mod";
};
separator = mkOption {
type = types.str;
default = "+";
};
hypr-type = mkEnableOption "hyprland-like bind syntax" // {
default = false;
};
spawn = mkOption {
type = types.attrs;
default = {
"${mod}${sep}ENTER" = "${getExe cfg.app.terminal.package}";
"${mod}${sep}F" = "${getExe cfg.app.browser.package}";
};
apply =
binds:
let
hypr-binds = mapAttrs' (n: v: nameValuePair (mkHyprBind (splitString sep n)) v) binds;
in
if bindCfg.hypr-type then hypr-binds else binds;
};
spawn-repeat = mkOption {
type = types.attrs;
default = { };
apply =
binds:
let
hypr-binds = mapAttrs' (n: v: nameValuePair (mkHyprBind (splitString sep n)) v) binds;
in
if bindCfg.hypr-type then hypr-binds else binds;
};
# ==== Movement ==== #
switch-window-focus = mkBindOption [
mod
"TAB"
];
move-window-focus = {
left = mkBindOption [
mod
"H"
];
right = mkBindOption [
mod
"L"
];
up = mkBindOption [
mod
"K"
];
down = mkBindOption [
mod
"J"
];
};
move-monitor-focus = {
left = mkBindOption [
mod
"CTRL"
"H"
];
right = mkBindOption [
mod
"CTRL"
"L"
];
};
move-workspace-focus = {
# Workspace Focus
next = mkBindOption [
mod
"CTRL"
"J"
];
prev = mkBindOption [
mod
"CTRL"
"k"
];
};
move-window = {
left = mkBindOption [
mod
"SHIFT"
"H"
];
right = mkBindOption [
mod
"SHIFT"
"L"
];
up = mkBindOption [
mod
"SHIFT"
"K"
];
down = mkBindOption [
mod
"SHIFT"
"J"
];
};
consume-window = {
left = mkBindOption [
mod
"CTRL"
"SHIFT"
"H"
];
right = mkBindOption [
mod
"CTRL"
"SHIFT"
"L"
];
};
switch-layout = mkBindOption [
mod
"CTRL"
"ALT"
"SPACE"
];
# ==== Actions ==== #
center-window = mkBindOption [
mod
"C"
];
toggle-overview = mkBindOption [
mod
"O"
];
close-window = mkBindOption [
mod
"Q"
];
toggle-fullscreen = mkBindOption [
"F11"
];
# ==== Scrolling ==== #
move-workspace = {
down = mkBindOption [
mod
"CTRL"
"SHIFT"
"J"
];
up = mkBindOption [
mod
"CTRL"
"SHIFT"
"K"
];
};
switch-preset-column-width = mkBindOption [
mod
"W"
];
switch-preset-window-height = mkBindOption [
mod
"S"
];
expand-column-to-available-width = mkBindOption [
mod
"P"
];
maximize-column = mkBindOption [
mod
"M"
];
reset-window-height = mkBindOption [
mod
"CTRL"
"S"
];
# ==== Float ==== #
toggle-float = mkBindOption [
mod
"V"
];
switch-focus-between-floating-and-tiling = mkBindOption [
mod
"CTRL"
"V"
];
minimize = mkBindOption [
mod
"I"
];
restore-minimize = mkBindOption [
mod
"SHIFT"
"I"
];
toggle-scratchpad = mkBindOption [
mod
"Z"
];
# ==== Screenshot ==== #
screenshot = {
area = mkBindOption [
mod
"SHIFT"
"S"
];
window = mkBindOption [
"CTRL"
"SHIFT"
"S"
];
screen = mkBindOption [
mod
"CTRL"
"SHIFT"
"S"
];
};
toggle-control-center = mkBindOption [
mod
"SLASH"
];
toggle-launcher = mkBindOption [
"ALT"
"SPACE"
];
lock-screen = mkBindOption [
mod
"CTRL"
"M"
];
clipboard-history = mkBindOption [
mod
"COMMA"
];
emoji = mkBindOption [
mod
"PERIOD"
];
screen-recorder = mkBindOption [
mod
"F12"
];
notification-center = mkBindOption [
mod
"N"
];
toggle-dont-disturb = mkBindOption [
mod
"CTRL"
"N"
];
wallpaper-selector = mkBindOption [
mod
"CTRL"
"W"
];
wallpaper-random = mkBindOption [
mod
"CTRL"
"SLASH"
];
calculator = mkBindOption [
mod
"CTRL"
"C"
];
media = {
prev = mkBindOption [
mod
"CTRL"
"COMMA"
];
next = mkBindOption [
mod
"CTRL"
"PERIOD"
];
};
focus-workspace-prefix = mkBindOption [ mod ];
};
};
}

2
home/presets/basic.nix Executable file → Normal file
View file

@ -19,7 +19,5 @@
../user/wm-service.nix ../user/wm-service.nix
../user/ghostty.nix ../user/ghostty.nix
../user/podman.nix ../user/podman.nix
../user/image-viewer.nix
../user/wm.nix
]; ];
} }

0
home/scripts/md2html.nix Executable file → Normal file
View file

106
home/scripts/memeSelector.nix Executable file → Normal file
View file

@ -3,68 +3,68 @@
url, url,
... ...
}: }:
pkgs.writers.writePython3Bin "memeSelector" { libraries = with pkgs.python3Packages; [ requests ]; } pkgs.writers.writePython3Bin "memeSelector" {libraries = with pkgs.python3Packages; [requests];}
'' ''
import requests import requests
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
import urllib.parse import urllib.parse
import sys import sys
import os import os
import tempfile import tempfile
import subprocess import subprocess
BASE_URL = "${url}" BASE_URL = "${url}"
headers = {"Depth": "1"} headers = {"Depth": "1"}
resp = requests.request( resp = requests.request(
"PROPFIND", "PROPFIND",
BASE_URL, BASE_URL,
headers=headers, headers=headers,
verify="${"" + ../../system/extra/ca.crt}" verify="${"" + ../../system/extra/ca.crt}"
) )
if resp.status_code not in (200, 207): if resp.status_code not in (200, 207):
print(f"Error: Http {resp.status_code}") print(f"Error: Http {resp.status_code}")
sys.exit(1) sys.exit(1)
root = ET.fromstring(resp.text) root = ET.fromstring(resp.text)
ns = {"d": "DAV:"} ns = {"d": "DAV:"}
files = [] files = []
for href in root.findall(".//d:href", ns): for href in root.findall(".//d:href", ns):
path = href.text path = href.text
if not path: if not path:
continue continue
filename = urllib.parse.unquote(path.split("/")[-1]) filename = urllib.parse.unquote(path.split("/")[-1])
if filename and not filename.endswith("/"): if filename and not filename.endswith("/"):
files.append(filename) files.append(filename)
if not files: if not files:
print("No files found") print("No files found")
sys.exit(0) sys.exit(0)
rofi = subprocess.run( rofi = subprocess.run(
["rofi", "-i", "-dmenu", "-p", "Meme"], ["rofi", "-i", "-dmenu", "-p", "Meme"],
input="\n".join(files).encode(), input="\n".join(files).encode(),
stdout=subprocess.PIPE stdout=subprocess.PIPE
) )
selected = rofi.stdout.decode().strip() selected = rofi.stdout.decode().strip()
if not selected: if not selected:
sys.exit(0) sys.exit(0)
url = BASE_URL + urllib.parse.quote(selected) url = BASE_URL + urllib.parse.quote(selected)
tmpfile = os.path.join(tempfile.gettempdir(), selected) tmpfile = os.path.join(tempfile.gettempdir(), selected)
subprocess.run(["wget", "-q", "-O", tmpfile, url], check=True) subprocess.run(["wget", "-q", "-O", tmpfile, url], check=True)
with open(tmpfile, "rb") as f: with open(tmpfile, "rb") as f:
subprocess.run("wl-copy", stdin=f) subprocess.run("wl-copy", stdin=f)
subprocess.run([ subprocess.run([
"notify-send", "notify-send",
"-i", tmpfile, "-i", tmpfile,
"Meme Copied: ", "Meme Copied: ",
f"{selected}" f"{selected}"
]) ])
'' ''

0
home/scripts/mkWall.nix Executable file → Normal file
View file

0
home/scripts/ntfy.nix Executable file → Normal file
View file

0
home/scripts/rbwSelector.nix Executable file → Normal file
View file

0
home/scripts/record.nix Executable file → Normal file
View file

11
home/scripts/remoteRebuild.nix Executable file → Normal file
View file

@ -13,13 +13,11 @@ let
--sudo --ask-sudo-password $@''; --sudo --ask-sudo-password $@'';
in in
pkgs.writeShellScriptBin "rRebuild" '' pkgs.writeShellScriptBin "rRebuild" ''
NOTIFY="''\${NOTIFY:-0}"
TARGET=$1 TARGET=$1
BUILD=$2 BUILD=$2
set -euo pipefail shift
shift
shift 2
${ ${
if shouldNotify then if shouldNotify then
@ -27,11 +25,6 @@ pkgs.writeShellScriptBin "rRebuild" ''
export NTFY_TITLE="🎯 $TARGET built by 🏗 ''\${BUILD:-${hostName}}" export NTFY_TITLE="🎯 $TARGET built by 🏗 ''\${BUILD:-${hostName}}"
export NTFY_TAGS="gear" export NTFY_TAGS="gear"
if [ "$NOTIFY" -eq 0 ] ; then
${rebuildCommand}
exit 0
fi
if ${rebuildCommand} if ${rebuildCommand}
then then
ntfy pub system-build " Build success" > /dev/null 2>&1 ntfy pub system-build " Build success" > /dev/null 2>&1

0
home/scripts/rofiwall.nix Executable file → Normal file
View file

0
home/user/bitwarden.nix Executable file → Normal file
View file

0
home/user/config.nix Executable file → Normal file
View file

0
home/user/direnv.nix Executable file → Normal file
View file

0
home/user/environment.nix Executable file → Normal file
View file

0
home/user/firefox.nix Executable file → Normal file
View file

6
home/user/ghostty.nix Executable file → Normal file
View file

@ -1,10 +1,12 @@
{ {
inputs, inputs,
pkgs, pkgs,
lib,
... ...
}: }:
let let
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
inherit (lib) mkDefault;
ghosttyShaders = pkgs.fetchFromGitHub { ghosttyShaders = pkgs.fetchFromGitHub {
owner = "sahaj-b"; owner = "sahaj-b";
@ -26,9 +28,9 @@ in
"${ghosttyShaders}/ripple_cursor.glsl" "${ghosttyShaders}/ripple_cursor.glsl"
]; ];
unfocused-split-opacity = 0.65; unfocused-split-opacity = 0.85;
desktop-notifications = true; desktop-notifications = true;
background-opacity = 0.5; background-opacity = mkDefault 0.6;
background-blur = 20; background-blur = 20;
wait-after-command = false; wait-after-command = false;

0
home/user/git.nix Executable file → Normal file
View file

0
home/user/gtk.nix Executable file → Normal file
View file

0
home/user/hypr/bind.nix Executable file → Normal file
View file

0
home/user/hypr/input.nix Executable file → Normal file
View file

0
home/user/hypr/window.nix Executable file → Normal file
View file

0
home/user/hypr/windowrule.nix Executable file → Normal file
View file

0
home/user/hypr/workspace.nix Executable file → Normal file
View file

191
home/user/hyprland.nix Executable file → Normal file
View file

@ -1,123 +1,118 @@
{ {
osConfig,
config,
lib,
pkgs, pkgs,
inputs, inputs,
... ...
}: }:
let let
inherit (lib) mkIf;
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
wmCfg = config.wm; terminal = "ghostty";
bindCfg = wmCfg.keybinds;
mainMod = bindCfg.mod; execOnceScript = pkgs.writeShellScript "hyprlandExecOnce" ''
# Fix nemo open in terminal
dconf write /org/cinnamon/desktop/applications/terminal/exec "''\'${terminal}''\'" &
dconf write /org/cinnamon/desktop/applications/terminal/exec-arg "''\'''\'" &
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME &
dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE
# Hint dark theme
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
'';
mainMod = "SUPER";
in in
{ {
config = mkIf osConfig.programs.hyprland.enable { home.packages = with pkgs; [
wm = { hyprcursor
exec-once = /* bash */ '' ];
dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE
'';
keybinds = {
mod = "SUPER";
separator = ",";
hypr-type = true;
};
};
home.packages = with pkgs; [ imports = [
hyprcursor (import ./hypr/bind.nix { inherit mainMod; })
]; ./hypr/workspace.nix
./hypr/window.nix
./hypr/windowrule.nix
./hypr/input.nix
];
imports = [ wayland.windowManager.hyprland = {
(import ./hypr/bind.nix { inherit mainMod; }) enable = true;
./hypr/workspace.nix xwayland.enable = true;
./hypr/window.nix systemd = {
./hypr/windowrule.nix
./hypr/input.nix
];
wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland.enable = true; variables = [ "--all" ];
systemd = { };
enable = true; package = null;
variables = [ "--all" ]; portalPackage = null;
plugins = (
with inputs.hyprland-plugins.packages.${system};
[
hyprwinwrap
]
);
settings = {
"$mainMod" = mainMod;
debug = {
disable_logs = true;
}; };
package = null;
portalPackage = null;
plugins = ( ecosystem.no_update_news = true;
with inputs.hyprland-plugins.packages.${system};
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
''${mainMod}, mouse:272, movewindow''
''${mainMod}, mouse:273, resizewindow''
];
binde =
let
resizeStep = builtins.toString 20;
brightnessStep = builtins.toString 10;
volumeStep = builtins.toString 4;
in
[ [
hyprwinwrap '',XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%+''
] '',XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%-''
); '',XF86MonBrightnessDown, exec, brightnessctl set ${brightnessStep}%-''
'',XF86MonBrightnessUp, exec, brightnessctl set ${brightnessStep}%+''
settings = { ''${mainMod} CTRL, l, resizeactive, ${resizeStep} 0''
"$mainMod" = mainMod; ''${mainMod} CTRL, h, resizeactive, -${resizeStep} 0''
''${mainMod} CTRL, k, resizeactive, 0 -${resizeStep}''
debug = { ''${mainMod} CTRL, j, resizeactive, 0 ${resizeStep}''
disable_logs = true;
};
ecosystem.no_update_news = true;
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"${mainMod}, mouse:272, movewindow"
"${mainMod}, mouse:273, resizewindow"
]; ];
binde = plugin = {
let hyprwinrap = {
resizeStep = toString 20; class = "kitty-bg";
brightnessStep = toString 10;
volumeStep = toString 4;
in
[
",XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%+"
",XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%-"
",XF86MonBrightnessDown, exec, brightnessctl set ${brightnessStep}%-"
",XF86MonBrightnessUp, exec, brightnessctl set ${brightnessStep}%+"
"${mainMod} CTRL, l, resizeactive, ${resizeStep} 0"
"${mainMod} CTRL, h, resizeactive, -${resizeStep} 0"
"${mainMod} CTRL, k, resizeactive, 0 -${resizeStep}"
"${mainMod} CTRL, j, resizeactive, 0 ${resizeStep}"
];
plugin = {
hyprwinrap = {
class = "kitty-bg";
};
touch_gestures = {
sensitivity = 4.0;
workspace_swipe_fingers = 3;
workspace_swipe_edge = "d";
long_press_delay = 400;
resize_on_border_long_press = true;
edge_margin = 10;
emulate_touchpad_swipe = false;
};
}; };
exec-once = [ "${wmCfg.exec-once}" ]; touch_gestures = {
sensitivity = 4.0;
env = [ workspace_swipe_fingers = 3;
"XDG_CURRENT_DESKTOP, Hyprland" workspace_swipe_edge = "d";
"XDG_SESSION_DESKTOP, Hyprland" long_press_delay = 400;
"GDK_PIXBUF_MODULE_FILE, ${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" resize_on_border_long_press = true;
]; edge_margin = 10;
emulate_touchpad_swipe = false;
misc = {
disable_hyprland_logo = true;
force_default_wallpaper = 0;
disable_splash_rendering = true;
}; };
}; };
exec-once = [ "${execOnceScript}" ];
env = [
''XDG_CURRENT_DESKTOP, Hyprland''
''XDG_SESSION_DESKTOP, Hyprland''
''GDK_PIXBUF_MODULE_FILE, ${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache''
];
misc = {
disable_hyprland_logo = true;
force_default_wallpaper = 0;
disable_splash_rendering = true;
};
}; };
}; };
} }

View file

@ -1,43 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ loupe ];
xdg.mimeApps =
let
value = "org.gnome.Loupe.desktop";
associations = builtins.listToAttrs (
map
(name: {
inherit name value;
})
[
"image/png"
"image/jpeg"
"image/gif"
"image/bmp"
"image/webp"
"image/tiff"
"image/svg+xml"
"image/x-icon"
"image/avif"
"image/heif"
"image/heic"
"image/jxl"
"image/apng"
"image/x-raw"
"image/x-xbitmap"
"image/x-xpixmap"
"image/x-portable-bitmap"
"image/x-portable-graymap"
"image/x-portable-pixmap"
"image/x-tga"
"image/x-pcx"
]
);
in
{
associations.added = associations;
defaultApplications = associations;
};
}

0
home/user/internationalisation.nix Executable file → Normal file
View file

0
home/user/music-production.nix Executable file → Normal file
View file

30
home/user/nvf/default.nix Executable file → Normal file
View file

@ -1,15 +1,13 @@
{ {
osConfig, osConfig,
config,
pkgs, pkgs,
lib, lib,
inputs, inputs,
... ...
}: }:
let let
inherit (builtins) concatStringsSep;
inherit (lib.generators) mkLuaInline; inherit (lib.generators) mkLuaInline;
inherit (lib) optionalString; inherit (lib) concatStringsSep;
suda-nvim = pkgs.vimUtils.buildVimPlugin { suda-nvim = pkgs.vimUtils.buildVimPlugin {
name = "vim-suda"; name = "vim-suda";
@ -25,8 +23,6 @@ let
name = "marks-nvim"; name = "marks-nvim";
src = inputs.marks-nvim; src = inputs.marks-nvim;
}; };
yaziOpenDir = config.programs.nvf.settings.vim.utility.yazi-nvim.setupOpts.open_for_directories;
in in
{ {
imports = [ imports = [
@ -48,9 +44,6 @@ in
vim = { vim = {
enableLuaLoader = true; enableLuaLoader = true;
vimAlias = true; vimAlias = true;
luaConfigPre = ''
${optionalString yaziOpenDir "vim.g.loaded_netrwPlugin = 1"}
'';
extraPackages = with pkgs; [ extraPackages = with pkgs; [
nixfmt nixfmt
]; ];
@ -370,11 +363,11 @@ in
formatter = { formatter = {
conform-nvim = { conform-nvim = {
enable = true; enable = true;
# setupOpts = { setupOpts = {
# formatters_by_ft = { formatters_by_ft = {
# nix = [ "nixfmt" ]; nix = [ "nixfmt" ];
# }; };
# }; };
}; };
}; };
@ -421,10 +414,7 @@ in
nix = { nix = {
enable = true; enable = true;
extraDiagnostics.enable = false; extraDiagnostics.enable = false;
format = { format.enable = false; # Manually configured in conform-nvim
type = [ "nixfmt" ];
enable = true;
};
lsp.servers = [ "nixd" ]; lsp.servers = [ "nixd" ];
}; };
sql.enable = true; sql.enable = true;
@ -436,10 +426,7 @@ in
ts-error-translator.enable = true; ts-error-translator.enable = true;
}; };
}; };
python = { python.enable = true;
enable = true;
format.type = [ "ruff" ];
};
markdown = { markdown = {
enable = true; enable = true;
extensions = { extensions = {
@ -548,7 +535,6 @@ in
yazi-nvim = { yazi-nvim = {
enable = true; enable = true;
setupOpts.open_for_directories = true;
mappings.openYaziDir = "<leader>-"; mappings.openYaziDir = "<leader>-";
mappings.openYazi = "<leader>e"; mappings.openYazi = "<leader>e";
}; };

0
home/user/nvf/extra-lsp.nix Executable file → Normal file
View file

81
home/user/nvf/plugins/leetcode/default.nix Executable file → Normal file
View file

@ -1,6 +1,5 @@
{ {
lib, lib,
pkgs,
config, config,
osConfig, osConfig,
... ...
@ -12,17 +11,6 @@ let
dataDir = "${config.home.homeDirectory}/${relativeDir}"; dataDir = "${config.home.homeDirectory}/${relativeDir}";
in in
{ {
programs.nvf.settings.vim.extraPackages = with pkgs; [
imagemagick # for image.nvim
];
programs.nvf.settings.vim.utility.images.image-nvim = {
enable = true;
setupOpts = {
backend = "kitty";
};
};
programs.nvf.settings.vim.utility.leetcode-nvim = { programs.nvf.settings.vim.utility.leetcode-nvim = {
enable = true; enable = true;
setupOpts = { setupOpts = {
@ -30,7 +18,7 @@ in
lang = "rust"; lang = "rust";
plugins.non_standalone = true; plugins.non_standalone = true;
storage.home = mkLuaInline ''"${dataDir}"''; storage.home = mkLuaInline ''"${dataDir}"'';
injector = mkLuaInline /* lua */ '' injector = mkLuaInline ''
{ {
['rust'] = { ['rust'] = {
before = { '#[allow(dead_code)]', 'fn main() {}', '#[allow(dead_code)]', 'struct Solution;' }, before = { '#[allow(dead_code)]', 'fn main() {}', '#[allow(dead_code)]', 'struct Solution;' },
@ -38,39 +26,42 @@ in
} }
''; '';
hooks."question_enter" = [ hooks."question_enter" = [
(mkLuaInline /* lua */ '' (mkLuaInline
function (question) # lua
if question.lang ~= 'rust' then ''
return function (question)
if question.lang ~= 'rust' then
return
end
local config = require("leetcode.config")
local problem_dir = config.user.storage.home .. "/Cargo.toml"
local content = [[
[package]
name = "leetcode"
edition = "2024"
[lib]
name = "%s"
path = "%s"
[dependencies]
rand = "0.8"
regex = "1"
itertools = "0.14.0"
]]
local file = io.open(problem_dir, "w")
if file then
local formatted = (content:gsub(" +", "")):format(question.q.frontend_id, question:path())
file:write(formatted)
file:close()
else
print("Failed to open file " .. problem_dir)
end
end end
''
local config = require("leetcode.config") )
local problem_dir = config.user.storage.home .. "/Cargo.toml"
local content = [[
[package]
name = "leetcode"
edition = "2024"
[lib]
name = "%s"
path = "%s"
[dependencies]
rand = "0.8"
regex = "1"
itertools = "0.14.0"
]]
local file = io.open(problem_dir, "w")
if file then
local formatted = (content:gsub(" +", "")):format(question.q.frontend_id, question:path())
file:write(formatted)
file:close()
else
print("Failed to open file " .. problem_dir)
end
end
'')
]; ];
}; };
}; };

0
home/user/nvf/plugins/lualine/default.nix Executable file → Normal file
View file

0
home/user/nvf/plugins/snacks-nvim/default.nix Executable file → Normal file
View file

0
home/user/nvf/plugins/snacks-nvim/keymaps.nix Executable file → Normal file
View file

0
home/user/packages.nix Executable file → Normal file
View file

0
home/user/podman.nix Executable file → Normal file
View file

2
home/user/shell.nix Executable file → Normal file
View file

@ -1,12 +1,10 @@
{ {
lib,
osConfig, osConfig,
config, config,
pkgs, pkgs,
... ...
}: }:
let let
inherit (lib) mkForce;
remoteRebuld = import ../scripts/remoteRebuild.nix { inherit osConfig config pkgs; }; remoteRebuld = import ../scripts/remoteRebuild.nix { inherit osConfig config pkgs; };
in in
{ {

0
home/user/shellAlias.nix Executable file → Normal file
View file

0
home/user/shells/caelestia.nix Executable file → Normal file
View file

0
home/user/tmux.nix Executable file → Normal file
View file

0
home/user/virtualization.nix Executable file → Normal file
View file

0
home/user/vscode.nix Executable file → Normal file
View file

0
home/user/wallpaper-engine.nix Executable file → Normal file
View file

0
home/user/waybar.nix Executable file → Normal file
View file

0
home/user/wlogout.nix Executable file → Normal file
View file

0
home/user/wm-service.nix Executable file → Normal file
View file

View file

@ -1,93 +0,0 @@
{
pkgs,
lib,
config,
...
}:
let
inherit (lib) getExe getExe';
# ==== binary ==== #
rofi = getExe pkgs.rofi;
playerctl = getExe pkgs.playerctl;
wpctl = getExe' pkgs.wireplumber "wpctl";
brightnessctl = getExe pkgs.brightnessctl;
brightnessStep = toString 10;
volumeStep = toString 4;
rofiWall = import ../../home/scripts/rofiwall.nix { inherit config pkgs; };
rbwSelector = import ../../home/scripts/rbwSelector.nix { inherit pkgs; };
toggleWlogout = pkgs.writeShellScript "toggleWlogout" ''
if ${pkgs.busybox}/bin/pgrep wlogout > /dev/null; then
${pkgs.busybox}/bin/pkill wlogout
else
${getExe config.programs.wlogout.package} --protocol layer-shell
fi
'';
cfg = config.wm;
mod = cfg.keybinds.mod;
sep = cfg.keybinds.separator;
in
{
wm = {
exec-once = /* bash */ ''
# Fix nemo open in terminal
dconf write /org/cinnamon/desktop/applications/terminal/exec "''\'${cfg.app.terminal.name}''\'" &
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 &
'';
app = {
terminal = {
package = config.programs.ghostty.package;
name = "ghostty";
run = "ghostty -e";
};
browser = {
package = config.programs.zen-browser.package;
name = "zen-twilight";
};
file-browser = {
package = config.programs.yazi.pacakge;
name = "yazi";
};
};
keybinds = {
spawn-repeat = {
# ==== Media ==== #
"XF86AudioPrev" = "${playerctl} previous";
"XF86AudioNext" = "${playerctl} next";
"${mod}${sep}CTRL${sep}COMMA" = "${playerctl} previous";
"${mod}${sep}CTRL${sep}PERIOD" = "${playerctl} next";
"XF86AudioPlay" = "${playerctl} play-pause";
"XF86AudioStop" = "${playerctl} stop";
"XF86AudioMute" = "${wpctl} set-mute @DEFAULT_SINK@ toggle";
"XF86AudioRaiseVolume" =
"${wpctl} set-mute @DEFAULT_SINK@ 0 && ${wpctl} set-volume @DEFAULT_SINK@ ${volumeStep}%+";
"XF86AudioLowerVolume" =
"${wpctl} set-mute @DEFAULT_SINK@ 0 && ${wpctl} set-volume @DEFAULT_SINK@ ${volumeStep}%-";
"XF86MonBrightnessDown" = "${brightnessctl} set ${brightnessStep}%-";
"XF86MonBrightnessUp" = "${brightnessctl} set ${brightnessStep}%+";
};
spawn = {
"${mod}${sep}Return" = "${getExe cfg.app.terminal.package}";
"${mod}${sep}F" = "${getExe cfg.app.browser.package}";
"${mod}${sep}E" = "${cfg.app.terminal.run} ${cfg.app.file-browser.name}";
"${mod}${sep}CTRL${sep}P" = "${rbwSelector}";
"${mod}${sep}CTRL${sep}M" = "${toggleWlogout}";
# Launcher
"${mod}${sep}CTRL${sep}W" = "${rofiWall}";
"ALT${sep}SPACE" = "${rofi} -config config/rofi/apps.rasi -show drun";
"${mod}${sep}PERIOD" = "${rofi} -modi emoji -show emoji";
"${mod}${sep}CTRL${sep}C" = "${rofi} -modi calc -show calc -no-show-match -no-sort";
};
};
};
}

18
home/user/yazi.nix Executable file → Normal file
View file

@ -7,7 +7,7 @@
}: }:
let let
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
inherit (lib) getExe' getExe; inherit (lib) getExe';
yaziPlugins = pkgs.fetchFromGitHub { yaziPlugins = pkgs.fetchFromGitHub {
owner = "yazi-rs"; owner = "yazi-rs";
repo = "plugins"; repo = "plugins";
@ -43,11 +43,11 @@ in
enableFishIntegration = true; enableFishIntegration = true;
plugins = { plugins = {
toggle-pane = "${yaziPlugins}/toggle-pane.yazi"; toggle-pane = ''${yaziPlugins}/toggle-pane.yazi'';
mount = "${yaziPlugins}/mount.yazi"; mount = ''${yaziPlugins}/mount.yazi'';
zoom = "${yaziPlugins}/zoom"; zoom = ''${yaziPlugins}/zoom'';
vcs-files = "${yaziPlugins}/vcs-files"; vcs-files = ''${yaziPlugins}/vcs-files'';
git = "${yaziPlugins}/git"; git = ''${yaziPlugins}/git'';
}; };
settings = { settings = {
@ -66,7 +66,7 @@ in
opener = { opener = {
edit = [ edit = [
{ {
run = ''''\${EDITOR:=nvim} "$1"''; run = ''''\${EDITOR:=nvim} "$0"'';
desc = "$EDITOR"; desc = "$EDITOR";
block = true; block = true;
} }
@ -77,12 +77,12 @@ in
]; ];
player = [ player = [
{ run = ''${getExe pkgs.mpv} --force-window "$1"''; } { run = ''mpv --force-window "$0"''; }
]; ];
open = [ open = [
{ {
run = ''xdg-open "$1"''; run = ''xdg-open "$0"'';
desc = "Open"; desc = "Open";
} }
]; ];

2
home/user/zellij.nix Executable file → Normal file
View file

@ -21,7 +21,7 @@ let
zellij-sessionizer-src = fetchurl { zellij-sessionizer-src = fetchurl {
url = "https://raw.githubusercontent.com/dachxy/zellij-sessionizer/refs/heads/main/zellij-sessionizer"; url = "https://raw.githubusercontent.com/dachxy/zellij-sessionizer/refs/heads/main/zellij-sessionizer";
sha256 = "sha256:0p6s2mwcya448vgag42akwlfmzr9nw1vxh6gv5lmz1xmyrhkysjd"; sha256 = "sha256:12kbni75x9g424bymky8cy84i354j654rfmz9bffnabbblccfbpn";
}; };
zellij-sessionizer = pkgs.writeShellScriptBin "zellij-sessionizer" '' zellij-sessionizer = pkgs.writeShellScriptBin "zellij-sessionizer" ''

14
home/user/zen-browser.nix Executable file → Normal file
View file

@ -14,7 +14,7 @@ let
owner = "JustAdumbPrsn"; owner = "JustAdumbPrsn";
repo = "zen-nebula"; repo = "zen-nebula";
rev = "main"; rev = "main";
sha256 = "sha256-Eg9HsN+yDA8OdVcE9clS+FyUhVBH3ooN/odkZIVR/p4="; sha256 = "sha256-wtntRAkOGm6fr396kqzqk+GyPk+ytifXTqqOp0YIvlw=";
}; };
patchedNebula = patchedNebula =
@ -37,7 +37,6 @@ let
in in
{ {
programs.zen-browser = { programs.zen-browser = {
suppressXdgMigrationWarning = true;
enable = true; enable = true;
languagePacks = [ languagePacks = [
"en-US" "en-US"
@ -136,20 +135,14 @@ in
}; };
}; };
xdg.configFile."zen/${profileName}/zen-keyboard-shortcuts.json".source = home.file.".zen/${profileName}/zen-keyboard-shortcuts.json".source =
../config/zen/zen-keyboard-shortcuts.json; ../config/zen/zen-keyboard-shortcuts.json;
xdg.configFile."zen/${profileName}/chrome" = { home.file.".zen/${profileName}/chrome" = {
source = patchedNebula; source = patchedNebula;
recursive = true; recursive = true;
}; };
systemd.user.tmpfiles.rules = [
''
L+ ${config.home.homeDirectory}/.zen - - - - ${config.home.homeDirectory}/.config/zen
''
];
xdg.mimeApps = xdg.mimeApps =
let let
value = value =
@ -178,6 +171,7 @@ in
"application/xhtml+xml" "application/xhtml+xml"
"application/json" "application/json"
"application/pdf" "application/pdf"
"text/plain"
"text/html" "text/html"
] ]
); );

1
options/default.nix Executable file → Normal file
View file

@ -1,6 +1,5 @@
{ {
imports = [ imports = [
./systemconf.nix ./systemconf.nix
./game/velocity.nix
]; ];
} }

View file

@ -1,152 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (pkgs.writers) writeTOML;
inherit (lib)
mkIf
mkOption
mkEnableOption
mkPackageOption
types
getExe
;
cfg = config.services.velocity;
defaultSettings = {
config-version = "2.7";
motd = "<#09add3>A Velocity Server";
show-max-players = 500;
online-mode = true;
force-key-authentication = true;
prevent-client-proxy-connections = false;
player-info-forwarding-mode = "none";
forwarding-secret-file = "forwarding.secret";
announce-forge = false;
kick-existing-players = false;
ping-passthrough = "DISABLED";
sample-players-in-ping = false;
enable-player-address-logging = true;
servers = {
};
forced-hosts = {
};
advanced = {
compression-threshold = 256;
compression-level = -1;
login-ratelimit = 3000;
connection-timeout = 5000;
read-timeout = 30000;
haproxy-protocol = false;
tcp-fast-open = false;
bungee-plugin-message-channel = true;
show-ping-requests = false;
failover-on-unexpected-server-disconnect = true;
announce-proxy-commands = true;
log-command-executions = false;
log-player-connections = true;
accepts-transfers = false;
enable-reuse-port = false;
command-rate-limit = 50;
forward-commands-if-rate-limited = true;
kick-after-rate-limited-commands = 0;
tab-complete-rate-limit = 10;
kick-after-rate-limited-tab-completes = 0;
};
query = {
enabled = false;
port = 25565;
map = "Velocity";
show-plugins = false;
};
};
in
{
options.services.velocity = {
enable = mkEnableOption "Enable the minecraft proxy";
package = mkPackageOption pkgs "velocity" { };
user = mkOption {
type = types.str;
default = "velocity";
};
group = mkOption {
type = types.str;
default = "velocity";
};
host = mkOption {
type = types.str;
default = "0.0.0.0";
};
port = mkOption {
type = types.port;
default = 25565;
};
openFirewall = mkEnableOption "Open firewall for velocity" // {
default = true;
};
settings = mkOption {
type =
with types;
attrsOf (oneOf [
attrs
str
int
bool
]);
default = defaultSettings;
apply =
v:
defaultSettings
// {
bind = "${cfg.host}:${toString cfg.port}";
}
// v;
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
users.users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
};
users.groups.${cfg.group} = { };
systemd.services.velocity =
let
configFile = writeTOML "velocity.toml" cfg.settings;
in
{
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = cfg.user;
Group = cfg.group;
ExecStartPre =
let
configFilePath = "/var/lib/velocity/velocity.toml";
in
[
"${pkgs.coreutils}/bin/cp ${configFile} ${configFilePath}"
"${pkgs.coreutils}/bin/chmod 750 ${configFilePath}"
"${pkgs.coreutils}/bin/chown ${cfg.user}:${cfg.group} ${configFilePath}"
];
ExecStart = "${getExe cfg.package}";
StateDirectory = "velocity";
StateDirectoryMode = "0750";
WorkingDirectory = "/var/lib/velocity";
};
};
};
}

34
options/systemconf.nix Executable file → Normal file
View file

@ -1,5 +1,4 @@
{ {
self,
inputs, inputs,
config, config,
pkgs, pkgs,
@ -64,7 +63,7 @@ in
domain = mkOption { domain = mkOption {
type = types.str; type = types.str;
default = "local"; default = "local";
description = "Domain for system"; description = ''Domain for system'';
}; };
username = mkOption { username = mkOption {
@ -85,15 +84,16 @@ in
}; };
}; };
windowManager = mkOption { hyprland = {
type = enable = (mkEnableOption "Enable hyprland") // {
with types; default = false;
nullOr (enum [ };
"hyprland" };
"niri"
"mango" niri = {
]); enable = (mkEnableOption "Enable niri") // {
default = null; default = false;
};
}; };
enableHomeManager = (mkEnableOption "Home manager") // { enableHomeManager = (mkEnableOption "Home manager") // {
@ -116,9 +116,7 @@ in
system.stateVersion = stateVersion; system.stateVersion = stateVersion;
programs.hyprland.enable = cfg.windowManager == "hyprland"; programs.hyprland.enable = if (cfg.hyprland.enable && (!cfg.niri.enable)) then true else false;
programs.niri.enable = cfg.windowManager == "niri";
programs.mango.enable = cfg.windowManager == "mango";
# ==== Home Manager ==== # # ==== Home Manager ==== #
home-manager = mkIf cfg.enableHomeManager { home-manager = mkIf cfg.enableHomeManager {
@ -126,16 +124,10 @@ in
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit inherit helper inputs system;
helper
inputs
system
self
;
inherit (cfg) username hostname; inherit (cfg) username hostname;
}; };
sharedModules = [ sharedModules = [
inputs.mango.hmModules.mango
inputs.hyprland.homeManagerModules.default inputs.hyprland.homeManagerModules.default
inputs.caelestia-shell.homeManagerModules.default inputs.caelestia-shell.homeManagerModules.default
inputs.sops-nix.homeManagerModules.default inputs.sops-nix.homeManagerModules.default

0
pkgs/assets/discord.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

Before After
Before After

0
pkgs/assets/peepoLeave.gif.base64 Executable file → Normal file
View file

0
pkgs/fonts/dfkai-sb/default.nix Executable file → Normal file
View file

0
pkgs/fonts/sf-pro-display-bold/default.nix Executable file → Normal file
View file

3
pkgs/overlays/default.nix Executable file → Normal file
View file

@ -1,6 +1,5 @@
[ [
(import ./vesktop.nix) (import ./vesktop.nix)
(import ./proton-dw-bin.nix)
# (import ./powerdns-admin.nix) # (import ./powerdns-admin.nix)
# (import ./stalwart) # (import ./stalwart-mail)
] ]

0
pkgs/overlays/powerdns-admin.nix Executable file → Normal file
View file

View file

@ -1,41 +0,0 @@
final: prev: {
proton-dw-bin =
let
steamDisplayName = "Proton DW";
in
final.pkgs.stdenv.mkDerivation (finalAttrs: rec {
pname = "dwproton";
version = "10.0-16";
src = final.pkgs.fetchzip {
url = "https://dawn.wine/dawn-winery/dwproton/releases/download/${pname}-${finalAttrs.version}/${pname}-${finalAttrs.version}-x86_64.tar.xz";
hash = "sha256-9wDhtrB5IjFVZxyorAJUaivRwE85pzQ6/eDgHXCSEh8=";
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
outputs = [
"out"
"steamcompattool"
];
installPhase = ''
runHook preInstall
echo "${finalAttrs.pname} should not be installed into environments. Please use programs.steam.extraCompatPackages instead." > $out
mkdir $steamcompattool
ln -s $src/* $steamcompattool
rm $steamcompattool/compatibilitytool.vdf
cp $src/compatibilitytool.vdf $steamcompattool
runHook postInstall
'';
preFixup = ''
substituteInPlace "$steamcompattool/compatibilitytool.vdf" \
--replace-fail "${finalAttrs.pname}-${finalAttrs.version}-x86_64" "${steamDisplayName}"
'';
});
}

View file

@ -1,5 +1,5 @@
final: prev: { final: prev: {
stalwart = prev.stalwart.overrideAttrs (oldAttrs: { stalwart-mail = prev.stalwart-mail.overrideAttrs (oldAttrs: {
patches = [ patches = [
./enable_root_ca.patch ./enable_root_ca.patch
]; ];

0
pkgs/overlays/vesktop.nix Executable file → Normal file
View file

0
pkgs/patches/splash.patch Executable file → Normal file
View file

0
preview.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

Before After
Before After

0
system/dev/dn-lap/common/boot.nix Executable file → Normal file
View file

0
system/dev/dn-lap/common/default.nix Executable file → Normal file
View file

43
system/dev/dn-lap/common/hardware-configuration.nix Executable file → Normal file
View file

@ -1,42 +1,28 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "uas" "sd_mod" "rtsx_pci_sdmmc" ];
"xhci_pci"
"thunderbolt"
"nvme"
"uas"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-label/nixos"; {
fsType = "ext4"; device = "/dev/disk/by-label/nixos";
}; fsType = "ext4";
};
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-label/BOOT"; {
fsType = "vfat"; device = "/dev/disk/by-label/BOOT";
options = [ fsType = "vfat";
"fmask=0077" options = [ "fmask=0077" "dmask=0077" ];
"dmask=0077" };
];
};
swapDevices = [ swapDevices = [
{ device = "/dev/disk/by-label/swap"; } { device = "/dev/disk/by-label/swap"; }
@ -50,5 +36,6 @@
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

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