Compare commits

..

10 commits

Author SHA1 Message Date
danny
98b4f598f8 chore: update flake & niri blur 2026-03-06 17:06:53 +08:00
danny
601dfb9217 feat: add window manager options 2026-02-04 18:21:40 +08:00
danny
b4b7997ac5 chore: update flake 2026-01-24 15:10:26 +08:00
danny
25482857d4 chore: maintain 2026-01-20 13:41:53 +08:00
danny
2378a66114 feat: add pre-commit hook to check TODO|FIXME|FIX comment 2026-01-10 13:28:41 +08:00
danny
cf005ff872 feat: add formatter 2026-01-10 12:46:40 +08:00
danny
d036cf224a fix: nvf 2026-01-08 15:37:13 +08:00
danny
ea118b7995 feat: netbird 2026-01-08 14:21:53 +08:00
danny
53b83b3471 fix: yazi opener 2025-12-30 16:24:54 +08:00
danny
27482b20d7 feat: add wireguard watchdog 2025-12-30 15:11:46 +08:00
292 changed files with 4734 additions and 2255 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

3
.gitignore vendored Normal file → Executable file
View file

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

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

0
README.md Normal file → Executable file
View file

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

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

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

1083
flake.lock generated Normal file → Executable file

File diff suppressed because it is too large Load diff

83
flake.nix Normal file → Executable 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/v0.4.2"; url = "github:nix-community/lanzaboote/v1.0.0";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -112,12 +112,6 @@
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";
@ -131,7 +125,8 @@
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";
}; };
@ -140,6 +135,8 @@
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";
@ -151,33 +148,39 @@
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";
path = ./system/dev/dn-pre7780; confPath = ./system/dev/dn-pre7780;
}; };
dn-server = { dn-server = {
system = "x86_64-linux"; system = "x86_64-linux";
path = ./system/dev/dn-server; confPath = ./system/dev/dn-server;
}; };
dn-lap = { dn-lap = {
system = "x86_64-linux"; system = "x86_64-linux";
path = ./system/dev/dn-lap; confPath = ./system/dev/dn-lap;
}; };
skydrive-lap = { skydrive-lap = {
system = "x86_64-linux"; system = "x86_64-linux";
path = ./system/dev/skydrive-lap; confPath = ./system/dev/skydrive-lap;
}; };
}; };
in in
@ -187,7 +190,7 @@
mapAttrs ( mapAttrs (
hostname: conf: hostname: conf:
let let
inherit (conf) path system; inherit (conf) confPath system;
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
}; };
@ -234,15 +237,67 @@
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 path { inherit hostname; }) (import confPath { 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

@ -0,0 +1,19 @@
{ 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 Normal file → Executable file
View file

0
home/config/.face Normal file → Executable 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 Normal file → Executable file
View file

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

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

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

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

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

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

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

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

0
home/config/wlogout/icons/hibernate.svg Normal file → Executable 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 Normal file → Executable 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 Normal file → Executable 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 Normal file → Executable 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 Normal file → Executable 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 Normal file → Executable 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 Normal file → Executable file
View file

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

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

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

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

@ -1,17 +1,19 @@
{ config, lib, ... }: { config, lib, ... }:
let let
inherit (lib) inherit (builtins)
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 Normal file → Executable file
View file

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

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

455
home/options/wm.nix Normal file
View file

@ -0,0 +1,455 @@
{
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 Normal file → Executable file
View file

@ -19,5 +19,7 @@
../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 Normal file → Executable file
View file

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

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

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

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

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

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

@ -13,11 +13,13 @@ 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
shift set -euo pipefail
shift
shift 2
${ ${
if shouldNotify then if shouldNotify then
@ -25,6 +27,11 @@ 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 Normal file → Executable file
View file

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

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

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

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

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

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

@ -1,12 +1,10 @@
{ {
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";
@ -28,9 +26,9 @@ in
"${ghosttyShaders}/ripple_cursor.glsl" "${ghosttyShaders}/ripple_cursor.glsl"
]; ];
unfocused-split-opacity = 0.85; unfocused-split-opacity = 0.65;
desktop-notifications = true; desktop-notifications = true;
background-opacity = mkDefault 0.6; background-opacity = 0.5;
background-blur = 20; background-blur = 20;
wait-after-command = false; wait-after-command = false;

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

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

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

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

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

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

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

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

@ -1,28 +1,32 @@
{ {
osConfig,
config,
lib,
pkgs, pkgs,
inputs, inputs,
... ...
}: }:
let let
inherit (lib) mkIf;
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
terminal = "ghostty"; wmCfg = config.wm;
bindCfg = wmCfg.keybinds;
execOnceScript = pkgs.writeShellScript "hyprlandExecOnce" '' mainMod = bindCfg.mod;
# 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 {
wm = {
exec-once = /* bash */ ''
dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE
'';
keybinds = {
mod = "SUPER";
separator = ",";
hypr-type = true;
};
};
home.packages = with pkgs; [ home.packages = with pkgs; [
hyprcursor hyprcursor
]; ];
@ -63,25 +67,25 @@ in
bindm = [ bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mainMod + LMB/RMB and dragging
''${mainMod}, mouse:272, movewindow'' "${mainMod}, mouse:272, movewindow"
''${mainMod}, mouse:273, resizewindow'' "${mainMod}, mouse:273, resizewindow"
]; ];
binde = binde =
let let
resizeStep = builtins.toString 20; resizeStep = toString 20;
brightnessStep = builtins.toString 10; brightnessStep = toString 10;
volumeStep = builtins.toString 4; volumeStep = toString 4;
in in
[ [
'',XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%+'' ",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}%-'' ",XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ ${volumeStep}%-"
'',XF86MonBrightnessDown, exec, brightnessctl set ${brightnessStep}%-'' ",XF86MonBrightnessDown, exec, brightnessctl set ${brightnessStep}%-"
'',XF86MonBrightnessUp, exec, brightnessctl set ${brightnessStep}%+'' ",XF86MonBrightnessUp, exec, brightnessctl set ${brightnessStep}%+"
''${mainMod} CTRL, l, resizeactive, ${resizeStep} 0'' "${mainMod} CTRL, l, resizeactive, ${resizeStep} 0"
''${mainMod} CTRL, h, resizeactive, -${resizeStep} 0'' "${mainMod} CTRL, h, resizeactive, -${resizeStep} 0"
''${mainMod} CTRL, k, resizeactive, 0 -${resizeStep}'' "${mainMod} CTRL, k, resizeactive, 0 -${resizeStep}"
''${mainMod} CTRL, j, resizeactive, 0 ${resizeStep}'' "${mainMod} CTRL, j, resizeactive, 0 ${resizeStep}"
]; ];
plugin = { plugin = {
@ -100,12 +104,12 @@ in
}; };
}; };
exec-once = [ "${execOnceScript}" ]; exec-once = [ "${wmCfg.exec-once}" ];
env = [ env = [
''XDG_CURRENT_DESKTOP, Hyprland'' "XDG_CURRENT_DESKTOP, Hyprland"
''XDG_SESSION_DESKTOP, Hyprland'' "XDG_SESSION_DESKTOP, Hyprland"
''GDK_PIXBUF_MODULE_FILE, ${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'' "GDK_PIXBUF_MODULE_FILE, ${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
]; ];
misc = { misc = {
@ -115,4 +119,5 @@ in
}; };
}; };
}; };
};
} }

View file

@ -0,0 +1,43 @@
{ 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 Normal file → Executable file
View file

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

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

@ -1,13 +1,15 @@
{ {
osConfig, osConfig,
config,
pkgs, pkgs,
lib, lib,
inputs, inputs,
... ...
}: }:
let let
inherit (builtins) concatStringsSep;
inherit (lib.generators) mkLuaInline; inherit (lib.generators) mkLuaInline;
inherit (lib) concatStringsSep; inherit (lib) optionalString;
suda-nvim = pkgs.vimUtils.buildVimPlugin { suda-nvim = pkgs.vimUtils.buildVimPlugin {
name = "vim-suda"; name = "vim-suda";
@ -23,6 +25,8 @@ 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 = [
@ -44,6 +48,9 @@ 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
]; ];
@ -363,11 +370,11 @@ in
formatter = { formatter = {
conform-nvim = { conform-nvim = {
enable = true; enable = true;
setupOpts = { # setupOpts = {
formatters_by_ft = { # formatters_by_ft = {
nix = [ "nixfmt" ]; # nix = [ "nixfmt" ];
}; # };
}; # };
}; };
}; };
@ -414,7 +421,10 @@ in
nix = { nix = {
enable = true; enable = true;
extraDiagnostics.enable = false; extraDiagnostics.enable = false;
format.enable = false; # Manually configured in conform-nvim format = {
type = [ "nixfmt" ];
enable = true;
};
lsp.servers = [ "nixd" ]; lsp.servers = [ "nixd" ];
}; };
sql.enable = true; sql.enable = true;
@ -426,7 +436,10 @@ in
ts-error-translator.enable = true; ts-error-translator.enable = true;
}; };
}; };
python.enable = true; python = {
enable = true;
format.type = [ "ruff" ];
};
markdown = { markdown = {
enable = true; enable = true;
extensions = { extensions = {
@ -535,6 +548,7 @@ 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 Normal file → Executable file
View file

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

@ -1,5 +1,6 @@
{ {
lib, lib,
pkgs,
config, config,
osConfig, osConfig,
... ...
@ -11,6 +12,17 @@ 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 = {
@ -18,7 +30,7 @@ in
lang = "rust"; lang = "rust";
plugins.non_standalone = true; plugins.non_standalone = true;
storage.home = mkLuaInline ''"${dataDir}"''; storage.home = mkLuaInline ''"${dataDir}"'';
injector = mkLuaInline '' injector = mkLuaInline /* lua */ ''
{ {
['rust'] = { ['rust'] = {
before = { '#[allow(dead_code)]', 'fn main() {}', '#[allow(dead_code)]', 'struct Solution;' }, before = { '#[allow(dead_code)]', 'fn main() {}', '#[allow(dead_code)]', 'struct Solution;' },
@ -26,9 +38,7 @@ in
} }
''; '';
hooks."question_enter" = [ hooks."question_enter" = [
(mkLuaInline (mkLuaInline /* lua */ ''
# lua
''
function (question) function (question)
if question.lang ~= 'rust' then if question.lang ~= 'rust' then
return return
@ -60,8 +70,7 @@ in
print("Failed to open file " .. problem_dir) print("Failed to open file " .. problem_dir)
end end
end end
'' '')
)
]; ];
}; };
}; };

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

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

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

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

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

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

@ -1,10 +1,12 @@
{ {
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 Normal file → Executable file
View file

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

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

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

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

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

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

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

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

93
home/user/wm.nix Normal file
View file

@ -0,0 +1,93 @@
{
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 Normal file → Executable file
View file

@ -7,7 +7,7 @@
}: }:
let let
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
inherit (lib) getExe'; inherit (lib) getExe' 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} "$0"''; run = ''''\${EDITOR:=nvim} "$1"'';
desc = "$EDITOR"; desc = "$EDITOR";
block = true; block = true;
} }
@ -77,12 +77,12 @@ in
]; ];
player = [ player = [
{ run = ''mpv --force-window "$0"''; } { run = ''${getExe pkgs.mpv} --force-window "$1"''; }
]; ];
open = [ open = [
{ {
run = ''xdg-open "$0"''; run = ''xdg-open "$1"'';
desc = "Open"; desc = "Open";
} }
]; ];

2
home/user/zellij.nix Normal file → Executable 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:12kbni75x9g424bymky8cy84i354j654rfmz9bffnabbblccfbpn"; sha256 = "sha256:0p6s2mwcya448vgag42akwlfmzr9nw1vxh6gv5lmz1xmyrhkysjd";
}; };
zellij-sessionizer = pkgs.writeShellScriptBin "zellij-sessionizer" '' zellij-sessionizer = pkgs.writeShellScriptBin "zellij-sessionizer" ''

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

@ -14,7 +14,7 @@ let
owner = "JustAdumbPrsn"; owner = "JustAdumbPrsn";
repo = "zen-nebula"; repo = "zen-nebula";
rev = "main"; rev = "main";
sha256 = "sha256-wtntRAkOGm6fr396kqzqk+GyPk+ytifXTqqOp0YIvlw="; sha256 = "sha256-Eg9HsN+yDA8OdVcE9clS+FyUhVBH3ooN/odkZIVR/p4=";
}; };
patchedNebula = patchedNebula =
@ -37,6 +37,7 @@ let
in in
{ {
programs.zen-browser = { programs.zen-browser = {
suppressXdgMigrationWarning = true;
enable = true; enable = true;
languagePacks = [ languagePacks = [
"en-US" "en-US"
@ -135,14 +136,20 @@ in
}; };
}; };
home.file.".zen/${profileName}/zen-keyboard-shortcuts.json".source = xdg.configFile."zen/${profileName}/zen-keyboard-shortcuts.json".source =
../config/zen/zen-keyboard-shortcuts.json; ../config/zen/zen-keyboard-shortcuts.json;
home.file.".zen/${profileName}/chrome" = { xdg.configFile."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 =
@ -171,7 +178,6 @@ 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 Normal file → Executable file
View file

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

152
options/game/velocity.nix Normal file
View file

@ -0,0 +1,152 @@
{
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 Normal file → Executable file
View file

@ -1,4 +1,5 @@
{ {
self,
inputs, inputs,
config, config,
pkgs, pkgs,
@ -63,7 +64,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 {
@ -84,16 +85,15 @@ in
}; };
}; };
hyprland = { windowManager = mkOption {
enable = (mkEnableOption "Enable hyprland") // { type =
default = false; with types;
}; nullOr (enum [
}; "hyprland"
"niri"
niri = { "mango"
enable = (mkEnableOption "Enable niri") // { ]);
default = false; default = null;
};
}; };
enableHomeManager = (mkEnableOption "Home manager") // { enableHomeManager = (mkEnableOption "Home manager") // {
@ -116,7 +116,9 @@ in
system.stateVersion = stateVersion; system.stateVersion = stateVersion;
programs.hyprland.enable = if (cfg.hyprland.enable && (!cfg.niri.enable)) then true else false; programs.hyprland.enable = cfg.windowManager == "hyprland";
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 {
@ -124,10 +126,16 @@ in
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit helper inputs system; inherit
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 Normal file → Executable 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 Normal file → Executable file
View file

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

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

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

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

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

View file

@ -0,0 +1,41 @@
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-mail = prev.stalwart-mail.overrideAttrs (oldAttrs: { stalwart = prev.stalwart.overrideAttrs (oldAttrs: {
patches = [ patches = [
./enable_root_ca.patch ./enable_root_ca.patch
]; ];

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

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

0
preview.png Normal file → Executable 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 Normal file → Executable file
View file

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

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

@ -1,27 +1,41 @@
# 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 = [ "xhci_pci" "thunderbolt" "nvme" "uas" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [
"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"; device = "/dev/disk/by-label/nixos";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{
device = "/dev/disk/by-label/BOOT"; device = "/dev/disk/by-label/BOOT";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
"fmask=0077"
"dmask=0077"
];
}; };
swapDevices = [ swapDevices = [
@ -36,6 +50,5 @@
# 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 = hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

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