Compare commits
No commits in common. "98b4f598f83ab5e2755c53c27f2405395f3cb396" and "b3c5ad28807d0cef47ae6455d6ef84eab3e58c59" have entirely different histories.
98b4f598f8
...
b3c5ad2880
1
.envrc
|
|
@ -1 +0,0 @@
|
|||
use flake
|
||||
3
.gitignore
vendored
Executable file → Normal file
|
|
@ -1,4 +1 @@
|
|||
**/result
|
||||
.direnv
|
||||
|
||||
.pre-commit-config.yaml
|
||||
|
|
|
|||
0
.sops.yaml
Executable file → Normal file
0
README.md
Executable file → Normal file
0
docs/fcitx.md
Executable file → Normal file
0
docs/hyprland.md
Executable file → Normal file
0
docs/yazi.md
Executable file → Normal file
1083
flake.lock
generated
Executable file → Normal file
83
flake.nix
Executable file → Normal file
|
|
@ -41,7 +41,7 @@
|
|||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v1.0.0";
|
||||
url = "github:nix-community/lanzaboote/v0.4.2";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
@ -112,6 +112,12 @@
|
|||
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 = {
|
||||
url = "github:dachxy/nix-mail-server";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -125,8 +131,7 @@
|
|||
nix-search-tv.url = "github:3timeslazy/nix-search-tv";
|
||||
|
||||
niri = {
|
||||
# url = "github:sodiboo/niri-flake";
|
||||
url = "github:dachxy/niri-flake"; # Wait for blur configurations
|
||||
url = "github:sodiboo/niri-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
@ -135,8 +140,6 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||
|
||||
# ==== Shell ==== #
|
||||
caelestia-shell = {
|
||||
url = "github:caelestia-dots/shell";
|
||||
|
|
@ -148,39 +151,33 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
mango = {
|
||||
url = "github:DreamMaoMao/mango";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (builtins) mapAttrs;
|
||||
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
|
||||
hosts = {
|
||||
dn-pre7780 = {
|
||||
system = "x86_64-linux";
|
||||
confPath = ./system/dev/dn-pre7780;
|
||||
path = ./system/dev/dn-pre7780;
|
||||
};
|
||||
dn-server = {
|
||||
system = "x86_64-linux";
|
||||
confPath = ./system/dev/dn-server;
|
||||
path = ./system/dev/dn-server;
|
||||
};
|
||||
dn-lap = {
|
||||
system = "x86_64-linux";
|
||||
confPath = ./system/dev/dn-lap;
|
||||
path = ./system/dev/dn-lap;
|
||||
};
|
||||
skydrive-lap = {
|
||||
system = "x86_64-linux";
|
||||
confPath = ./system/dev/skydrive-lap;
|
||||
path = ./system/dev/skydrive-lap;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
@ -190,7 +187,7 @@
|
|||
mapAttrs (
|
||||
hostname: conf:
|
||||
let
|
||||
inherit (conf) confPath system;
|
||||
inherit (conf) path system;
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
|
|
@ -237,67 +234,15 @@
|
|||
inputs.attic.nixosModules.atticd
|
||||
inputs.mail-server.nixosModules.default
|
||||
inputs.niri.nixosModules.niri
|
||||
inputs.mango.nixosModules.mango
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
./options
|
||||
|
||||
# ==== Private Configuration ==== #
|
||||
(import confPath { inherit hostname; })
|
||||
(import path { inherit hostname; })
|
||||
];
|
||||
}
|
||||
) 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 ==== #
|
||||
# packages."${system}" = {
|
||||
# vm-1 = self.nixosConfigurations.vm-1.config.microvm.declaredRunner;
|
||||
|
|
|
|||
|
|
@ -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
0
home/config/.face
Executable file → Normal file
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
0
home/config/firefox/autohide_toolbox.css
Executable file → Normal file
0
home/config/firefox/nightTab.json
Executable file → Normal file
0
home/config/fish/functions/fish_prompt.fish
Executable file → Normal file
0
home/config/gh/config.yaml
Executable file → Normal file
0
home/config/ghostty/shader/mnoise.glsl
Executable file → Normal file
0
home/config/rofi/apps.rasi
Executable file → Normal file
0
home/config/rofi/config.rasi
Executable file → Normal file
0
home/config/rofi/gruvbox-material.rasi
Executable file → Normal file
0
home/config/tmux.yaml
Executable file → Normal file
0
home/config/wlogout/icons/hibernate.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 307 B |
0
home/config/wlogout/icons/lock.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
0
home/config/wlogout/icons/logout.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
0
home/config/wlogout/icons/reboot.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
0
home/config/wlogout/icons/shutdown.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 306 B |
0
home/config/wlogout/icons/suspend.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 350 B |
0
home/config/zen/zen-keyboard-shortcuts.json
Executable file → Normal file
1
home/options/default.nix
Executable file → Normal file
|
|
@ -4,6 +4,5 @@
|
|||
./hyprlock.nix
|
||||
./sunsetr.nix
|
||||
./noctalia.nix
|
||||
./wm.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
0
home/options/hyprlock.nix
Executable file → Normal file
10
home/options/noctalia.nix
Executable file → Normal file
|
|
@ -1,19 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (builtins)
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
elem
|
||||
isList
|
||||
filter
|
||||
listToAttrs
|
||||
concatMap
|
||||
nameValuePair
|
||||
attrNames
|
||||
isAttrs
|
||||
;
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
nameValuePair
|
||||
;
|
||||
|
||||
filterAttrsRecursive' =
|
||||
pred: set:
|
||||
|
|
|
|||
0
home/options/ntfy-client.nix
Executable file → Normal file
9
home/options/sunsetr.nix
Executable file → Normal file
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
|
|
@ -16,7 +11,7 @@ in
|
|||
{
|
||||
options.services.sunsetr = {
|
||||
enable = mkEnableOption "Enable sunsetr.";
|
||||
package = mkPackageOption pkgs "sunsetr" { };
|
||||
package = mkPackageOption "sunsetr";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -19,7 +19,5 @@
|
|||
../user/wm-service.nix
|
||||
../user/ghostty.nix
|
||||
../user/podman.nix
|
||||
../user/image-viewer.nix
|
||||
../user/wm.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
0
home/scripts/md2html.nix
Executable file → Normal file
6
home/scripts/memeSelector.nix
Executable file → Normal file
|
|
@ -3,8 +3,8 @@
|
|||
url,
|
||||
...
|
||||
}:
|
||||
pkgs.writers.writePython3Bin "memeSelector" { libraries = with pkgs.python3Packages; [ requests ]; }
|
||||
''
|
||||
pkgs.writers.writePython3Bin "memeSelector" {libraries = with pkgs.python3Packages; [requests];}
|
||||
''
|
||||
import requests
|
||||
import xml.etree.ElementTree as ET
|
||||
import urllib.parse
|
||||
|
|
@ -67,4 +67,4 @@ pkgs.writers.writePython3Bin "memeSelector" { libraries = with pkgs.python3Packa
|
|||
"Meme Copied: ",
|
||||
f"{selected}"
|
||||
])
|
||||
''
|
||||
''
|
||||
|
|
|
|||
0
home/scripts/mkWall.nix
Executable file → Normal file
0
home/scripts/ntfy.nix
Executable file → Normal file
0
home/scripts/rbwSelector.nix
Executable file → Normal file
0
home/scripts/record.nix
Executable file → Normal file
11
home/scripts/remoteRebuild.nix
Executable file → Normal file
|
|
@ -13,13 +13,11 @@ let
|
|||
--sudo --ask-sudo-password $@'';
|
||||
in
|
||||
pkgs.writeShellScriptBin "rRebuild" ''
|
||||
NOTIFY="''\${NOTIFY:-0}"
|
||||
TARGET=$1
|
||||
BUILD=$2
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
shift 2
|
||||
shift
|
||||
shift
|
||||
|
||||
${
|
||||
if shouldNotify then
|
||||
|
|
@ -27,11 +25,6 @@ pkgs.writeShellScriptBin "rRebuild" ''
|
|||
export NTFY_TITLE="🎯 $TARGET built by 🏗️ ''\${BUILD:-${hostName}}"
|
||||
export NTFY_TAGS="gear"
|
||||
|
||||
if [ "$NOTIFY" -eq 0 ] ; then
|
||||
${rebuildCommand}
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ${rebuildCommand}
|
||||
then
|
||||
ntfy pub system-build "✅ Build success" > /dev/null 2>&1
|
||||
|
|
|
|||
0
home/scripts/rofiwall.nix
Executable file → Normal file
0
home/user/bitwarden.nix
Executable file → Normal file
0
home/user/config.nix
Executable file → Normal file
0
home/user/direnv.nix
Executable file → Normal file
0
home/user/environment.nix
Executable file → Normal file
0
home/user/firefox.nix
Executable file → Normal file
6
home/user/ghostty.nix
Executable file → Normal file
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (lib) mkDefault;
|
||||
|
||||
ghosttyShaders = pkgs.fetchFromGitHub {
|
||||
owner = "sahaj-b";
|
||||
|
|
@ -26,9 +28,9 @@ in
|
|||
"${ghosttyShaders}/ripple_cursor.glsl"
|
||||
];
|
||||
|
||||
unfocused-split-opacity = 0.65;
|
||||
unfocused-split-opacity = 0.85;
|
||||
desktop-notifications = true;
|
||||
background-opacity = 0.5;
|
||||
background-opacity = mkDefault 0.6;
|
||||
background-blur = 20;
|
||||
|
||||
wait-after-command = false;
|
||||
|
|
|
|||
0
home/user/git.nix
Executable file → Normal file
0
home/user/gtk.nix
Executable file → Normal file
0
home/user/hypr/bind.nix
Executable file → Normal file
0
home/user/hypr/input.nix
Executable file → Normal file
0
home/user/hypr/window.nix
Executable file → Normal file
0
home/user/hypr/windowrule.nix
Executable file → Normal file
0
home/user/hypr/workspace.nix
Executable file → Normal file
69
home/user/hyprland.nix
Executable file → Normal file
|
|
@ -1,32 +1,28 @@
|
|||
{
|
||||
osConfig,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
|
||||
wmCfg = config.wm;
|
||||
bindCfg = wmCfg.keybinds;
|
||||
mainMod = bindCfg.mod;
|
||||
terminal = "ghostty";
|
||||
|
||||
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
|
||||
{
|
||||
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; [
|
||||
hyprcursor
|
||||
];
|
||||
|
|
@ -67,25 +63,25 @@ in
|
|||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
"${mainMod}, mouse:272, movewindow"
|
||||
"${mainMod}, mouse:273, resizewindow"
|
||||
''${mainMod}, mouse:272, movewindow''
|
||||
''${mainMod}, mouse:273, resizewindow''
|
||||
];
|
||||
|
||||
binde =
|
||||
let
|
||||
resizeStep = toString 20;
|
||||
brightnessStep = toString 10;
|
||||
volumeStep = toString 4;
|
||||
resizeStep = builtins.toString 20;
|
||||
brightnessStep = builtins.toString 10;
|
||||
volumeStep = builtins.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}"
|
||||
'',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 = {
|
||||
|
|
@ -104,12 +100,12 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
exec-once = [ "${wmCfg.exec-once}" ];
|
||||
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"
|
||||
''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 = {
|
||||
|
|
@ -119,5 +115,4 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
0
home/user/music-production.nix
Executable file → Normal file
30
home/user/nvf/default.nix
Executable file → Normal file
|
|
@ -1,15 +1,13 @@
|
|||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (builtins) concatStringsSep;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib) optionalString;
|
||||
inherit (lib) concatStringsSep;
|
||||
|
||||
suda-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-suda";
|
||||
|
|
@ -25,8 +23,6 @@ let
|
|||
name = "marks-nvim";
|
||||
src = inputs.marks-nvim;
|
||||
};
|
||||
|
||||
yaziOpenDir = config.programs.nvf.settings.vim.utility.yazi-nvim.setupOpts.open_for_directories;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
|
@ -48,9 +44,6 @@ in
|
|||
vim = {
|
||||
enableLuaLoader = true;
|
||||
vimAlias = true;
|
||||
luaConfigPre = ''
|
||||
${optionalString yaziOpenDir "vim.g.loaded_netrwPlugin = 1"}
|
||||
'';
|
||||
extraPackages = with pkgs; [
|
||||
nixfmt
|
||||
];
|
||||
|
|
@ -370,11 +363,11 @@ in
|
|||
formatter = {
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
# setupOpts = {
|
||||
# formatters_by_ft = {
|
||||
# nix = [ "nixfmt" ];
|
||||
# };
|
||||
# };
|
||||
setupOpts = {
|
||||
formatters_by_ft = {
|
||||
nix = [ "nixfmt" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -421,10 +414,7 @@ in
|
|||
nix = {
|
||||
enable = true;
|
||||
extraDiagnostics.enable = false;
|
||||
format = {
|
||||
type = [ "nixfmt" ];
|
||||
enable = true;
|
||||
};
|
||||
format.enable = false; # Manually configured in conform-nvim
|
||||
lsp.servers = [ "nixd" ];
|
||||
};
|
||||
sql.enable = true;
|
||||
|
|
@ -436,10 +426,7 @@ in
|
|||
ts-error-translator.enable = true;
|
||||
};
|
||||
};
|
||||
python = {
|
||||
enable = true;
|
||||
format.type = [ "ruff" ];
|
||||
};
|
||||
python.enable = true;
|
||||
markdown = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
|
|
@ -548,7 +535,6 @@ in
|
|||
|
||||
yazi-nvim = {
|
||||
enable = true;
|
||||
setupOpts.open_for_directories = true;
|
||||
mappings.openYaziDir = "<leader>-";
|
||||
mappings.openYazi = "<leader>e";
|
||||
};
|
||||
|
|
|
|||
0
home/user/nvf/extra-lsp.nix
Executable file → Normal file
21
home/user/nvf/plugins/leetcode/default.nix
Executable file → Normal file
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
|
|
@ -12,17 +11,6 @@ let
|
|||
dataDir = "${config.home.homeDirectory}/${relativeDir}";
|
||||
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 = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
|
|
@ -30,7 +18,7 @@ in
|
|||
lang = "rust";
|
||||
plugins.non_standalone = true;
|
||||
storage.home = mkLuaInline ''"${dataDir}"'';
|
||||
injector = mkLuaInline /* lua */ ''
|
||||
injector = mkLuaInline ''
|
||||
{
|
||||
['rust'] = {
|
||||
before = { '#[allow(dead_code)]', 'fn main() {}', '#[allow(dead_code)]', 'struct Solution;' },
|
||||
|
|
@ -38,7 +26,9 @@ in
|
|||
}
|
||||
'';
|
||||
hooks."question_enter" = [
|
||||
(mkLuaInline /* lua */ ''
|
||||
(mkLuaInline
|
||||
# lua
|
||||
''
|
||||
function (question)
|
||||
if question.lang ~= 'rust' then
|
||||
return
|
||||
|
|
@ -70,7 +60,8 @@ in
|
|||
print("Failed to open file " .. problem_dir)
|
||||
end
|
||||
end
|
||||
'')
|
||||
''
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
0
home/user/nvf/plugins/lualine/default.nix
Executable file → Normal file
0
home/user/nvf/plugins/snacks-nvim/default.nix
Executable file → Normal file
0
home/user/nvf/plugins/snacks-nvim/keymaps.nix
Executable file → Normal file
0
home/user/packages.nix
Executable file → Normal file
0
home/user/podman.nix
Executable file → Normal file
2
home/user/shell.nix
Executable file → Normal file
|
|
@ -1,12 +1,10 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkForce;
|
||||
remoteRebuld = import ../scripts/remoteRebuild.nix { inherit osConfig config pkgs; };
|
||||
in
|
||||
{
|
||||
|
|
|
|||
0
home/user/shellAlias.nix
Executable file → Normal file
0
home/user/shells/caelestia.nix
Executable file → Normal file
0
home/user/tmux.nix
Executable file → Normal file
0
home/user/virtualization.nix
Executable file → Normal file
0
home/user/vscode.nix
Executable file → Normal file
0
home/user/wallpaper-engine.nix
Executable file → Normal file
0
home/user/waybar.nix
Executable file → Normal file
0
home/user/wlogout.nix
Executable file → Normal file
0
home/user/wm-service.nix
Executable file → Normal 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
|
|
@ -7,7 +7,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
inherit (lib) getExe' getExe;
|
||||
inherit (lib) getExe';
|
||||
yaziPlugins = pkgs.fetchFromGitHub {
|
||||
owner = "yazi-rs";
|
||||
repo = "plugins";
|
||||
|
|
@ -43,11 +43,11 @@ in
|
|||
enableFishIntegration = true;
|
||||
|
||||
plugins = {
|
||||
toggle-pane = "${yaziPlugins}/toggle-pane.yazi";
|
||||
mount = "${yaziPlugins}/mount.yazi";
|
||||
zoom = "${yaziPlugins}/zoom";
|
||||
vcs-files = "${yaziPlugins}/vcs-files";
|
||||
git = "${yaziPlugins}/git";
|
||||
toggle-pane = ''${yaziPlugins}/toggle-pane.yazi'';
|
||||
mount = ''${yaziPlugins}/mount.yazi'';
|
||||
zoom = ''${yaziPlugins}/zoom'';
|
||||
vcs-files = ''${yaziPlugins}/vcs-files'';
|
||||
git = ''${yaziPlugins}/git'';
|
||||
};
|
||||
|
||||
settings = {
|
||||
|
|
@ -66,7 +66,7 @@ in
|
|||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = ''''\${EDITOR:=nvim} "$1"'';
|
||||
run = ''''\${EDITOR:=nvim} "$0"'';
|
||||
desc = "$EDITOR";
|
||||
block = true;
|
||||
}
|
||||
|
|
@ -77,12 +77,12 @@ in
|
|||
];
|
||||
|
||||
player = [
|
||||
{ run = ''${getExe pkgs.mpv} --force-window "$1"''; }
|
||||
{ run = ''mpv --force-window "$0"''; }
|
||||
];
|
||||
|
||||
open = [
|
||||
{
|
||||
run = ''xdg-open "$1"'';
|
||||
run = ''xdg-open "$0"'';
|
||||
desc = "Open";
|
||||
}
|
||||
];
|
||||
|
|
|
|||
2
home/user/zellij.nix
Executable file → Normal file
|
|
@ -21,7 +21,7 @@ let
|
|||
|
||||
zellij-sessionizer-src = fetchurl {
|
||||
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" ''
|
||||
|
|
|
|||
14
home/user/zen-browser.nix
Executable file → Normal file
|
|
@ -14,7 +14,7 @@ let
|
|||
owner = "JustAdumbPrsn";
|
||||
repo = "zen-nebula";
|
||||
rev = "main";
|
||||
sha256 = "sha256-Eg9HsN+yDA8OdVcE9clS+FyUhVBH3ooN/odkZIVR/p4=";
|
||||
sha256 = "sha256-wtntRAkOGm6fr396kqzqk+GyPk+ytifXTqqOp0YIvlw=";
|
||||
};
|
||||
|
||||
patchedNebula =
|
||||
|
|
@ -37,7 +37,6 @@ let
|
|||
in
|
||||
{
|
||||
programs.zen-browser = {
|
||||
suppressXdgMigrationWarning = true;
|
||||
enable = true;
|
||||
languagePacks = [
|
||||
"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;
|
||||
|
||||
xdg.configFile."zen/${profileName}/chrome" = {
|
||||
home.file.".zen/${profileName}/chrome" = {
|
||||
source = patchedNebula;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules = [
|
||||
''
|
||||
L+ ${config.home.homeDirectory}/.zen - - - - ${config.home.homeDirectory}/.config/zen
|
||||
''
|
||||
];
|
||||
|
||||
xdg.mimeApps =
|
||||
let
|
||||
value =
|
||||
|
|
@ -178,6 +171,7 @@ in
|
|||
"application/xhtml+xml"
|
||||
"application/json"
|
||||
"application/pdf"
|
||||
"text/plain"
|
||||
"text/html"
|
||||
]
|
||||
);
|
||||
|
|
|
|||
1
options/default.nix
Executable file → Normal file
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./systemconf.nix
|
||||
./game/velocity.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
|
|
@ -64,7 +63,7 @@ in
|
|||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = "local";
|
||||
description = "Domain for system";
|
||||
description = ''Domain for system'';
|
||||
};
|
||||
|
||||
username = mkOption {
|
||||
|
|
@ -85,15 +84,16 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
windowManager = mkOption {
|
||||
type =
|
||||
with types;
|
||||
nullOr (enum [
|
||||
"hyprland"
|
||||
"niri"
|
||||
"mango"
|
||||
]);
|
||||
default = null;
|
||||
hyprland = {
|
||||
enable = (mkEnableOption "Enable hyprland") // {
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
niri = {
|
||||
enable = (mkEnableOption "Enable niri") // {
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
enableHomeManager = (mkEnableOption "Home manager") // {
|
||||
|
|
@ -116,9 +116,7 @@ in
|
|||
|
||||
system.stateVersion = stateVersion;
|
||||
|
||||
programs.hyprland.enable = cfg.windowManager == "hyprland";
|
||||
programs.niri.enable = cfg.windowManager == "niri";
|
||||
programs.mango.enable = cfg.windowManager == "mango";
|
||||
programs.hyprland.enable = if (cfg.hyprland.enable && (!cfg.niri.enable)) then true else false;
|
||||
|
||||
# ==== Home Manager ==== #
|
||||
home-manager = mkIf cfg.enableHomeManager {
|
||||
|
|
@ -126,16 +124,10 @@ in
|
|||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
helper
|
||||
inputs
|
||||
system
|
||||
self
|
||||
;
|
||||
inherit helper inputs system;
|
||||
inherit (cfg) username hostname;
|
||||
};
|
||||
sharedModules = [
|
||||
inputs.mango.hmModules.mango
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
inputs.caelestia-shell.homeManagerModules.default
|
||||
inputs.sops-nix.homeManagerModules.default
|
||||
|
|
|
|||
0
pkgs/assets/discord.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
0
pkgs/assets/peepoLeave.gif.base64
Executable file → Normal file
0
pkgs/fonts/dfkai-sb/default.nix
Executable file → Normal file
0
pkgs/fonts/sf-pro-display-bold/default.nix
Executable file → Normal file
3
pkgs/overlays/default.nix
Executable file → Normal file
|
|
@ -1,6 +1,5 @@
|
|||
[
|
||||
(import ./vesktop.nix)
|
||||
(import ./proton-dw-bin.nix)
|
||||
# (import ./powerdns-admin.nix)
|
||||
# (import ./stalwart)
|
||||
# (import ./stalwart-mail)
|
||||
]
|
||||
|
|
|
|||
0
pkgs/overlays/powerdns-admin.nix
Executable file → Normal 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}"
|
||||
'';
|
||||
});
|
||||
}
|
||||
2
pkgs/overlays/stalwart/default.nix → pkgs/overlays/stalwart-mail/default.nix
Executable file → Normal file
|
|
@ -1,5 +1,5 @@
|
|||
final: prev: {
|
||||
stalwart = prev.stalwart.overrideAttrs (oldAttrs: {
|
||||
stalwart-mail = prev.stalwart-mail.overrideAttrs (oldAttrs: {
|
||||
patches = [
|
||||
./enable_root_ca.patch
|
||||
];
|
||||
0
pkgs/overlays/stalwart/enable_root_ca.patch → pkgs/overlays/stalwart-mail/enable_root_ca.patch
Executable file → Normal file
0
pkgs/overlays/vesktop.nix
Executable file → Normal file
0
pkgs/patches/splash.patch
Executable file → Normal file
0
preview.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
0
system/dev/dn-lap/common/boot.nix
Executable file → Normal file
0
system/dev/dn-lap/common/default.nix
Executable file → Normal file
31
system/dev/dn-lap/common/hardware-configuration.nix
Executable file → Normal file
|
|
@ -1,41 +1,27 @@
|
|||
# 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") ];
|
||||
|
||||
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.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
|
|
@ -50,5 +36,6 @@
|
|||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||