daily configuration optimization
Fix - airplay: systemd wantedBy target - fcitx5: remove redundant systemd service Remove - move scripts into configuration Style - ghostty: add more transparency to background Add - zellij
This commit is contained in:
parent
44c152fdc9
commit
9c9acc3494
24 changed files with 941 additions and 856 deletions
120
flake.lock
generated
120
flake.lock
generated
|
|
@ -644,11 +644,11 @@
|
||||||
"zon2nix": "zon2nix"
|
"zon2nix": "zon2nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755815920,
|
"lastModified": 1756057928,
|
||||||
"narHash": "sha256-LjARhUOGVN4uY4TSswomsyeiNDeeKf/AedP0Hc/IEtc=",
|
"narHash": "sha256-JHP75eqmFxMWkdiR97qgwsP17kUS7jownP/NMDfIH1Y=",
|
||||||
"owner": "ghostty-org",
|
"owner": "ghostty-org",
|
||||||
"repo": "ghostty",
|
"repo": "ghostty",
|
||||||
"rev": "298f11166d4762741dd84fb48c8f96a09d0fb326",
|
"rev": "400576f0b0dcb7743c9a11cc07ba831cc29f057a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -948,7 +948,7 @@
|
||||||
"hyprlang": "hyprlang",
|
"hyprlang": "hyprlang",
|
||||||
"hyprutils": "hyprutils",
|
"hyprutils": "hyprutils",
|
||||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
"systems": "systems_5",
|
"systems": "systems_5",
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
|
|
@ -1397,7 +1397,7 @@
|
||||||
"git-hooks": "git-hooks",
|
"git-hooks": "git-hooks",
|
||||||
"hercules-ci-effects": "hercules-ci-effects",
|
"hercules-ci-effects": "hercules-ci-effects",
|
||||||
"neovim-src": "neovim-src",
|
"neovim-src": "neovim-src",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -1477,7 +1477,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_7",
|
"flake-compat": "flake-compat_7",
|
||||||
"flake-utils": "flake-utils_5",
|
"flake-utils": "flake-utils_5",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755137329,
|
"lastModified": 1755137329,
|
||||||
|
|
@ -1495,7 +1495,7 @@
|
||||||
},
|
},
|
||||||
"nix-tmodloader": {
|
"nix-tmodloader": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734377184,
|
"lastModified": 1734377184,
|
||||||
|
|
@ -1559,6 +1559,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_10": {
|
"nixpkgs_10": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1752596105,
|
||||||
|
"narHash": "sha256-lFNVsu/mHLq3q11MuGkMhUUoSXEdQjCHvpReaGP1S2k=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "dab3a6e781554f965bde3def0aa2fda4eb8f1708",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_11": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727348695,
|
"lastModified": 1727348695,
|
||||||
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
|
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
|
||||||
|
|
@ -1575,6 +1591,19 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1755972213,
|
||||||
|
"narHash": "sha256-VYK7aDAv8H1enXn1ECRHmGbeY6RqLnNwUJkOwloIsko=",
|
||||||
|
"rev": "73e96df7cff5783f45e21342a75a1540c4eddce4",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://releases.nixos.org/nixos/unstable-small/nixos-25.11pre850642.73e96df7cff5/nixexprs.tar.xz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://channels.nixos.org/nixos-unstable-small/nixexprs.tar.xz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754725699,
|
"lastModified": 1754725699,
|
||||||
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
|
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
|
||||||
|
|
@ -1590,7 +1619,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754990257,
|
"lastModified": 1754990257,
|
||||||
"narHash": "sha256-eEq2wlYNF2t89PsNyEv5Sz4lSxdukZCj4SdhZBVAGpI=",
|
"narHash": "sha256-eEq2wlYNF2t89PsNyEv5Sz4lSxdukZCj4SdhZBVAGpI=",
|
||||||
|
|
@ -1606,7 +1635,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748929857,
|
"lastModified": 1748929857,
|
||||||
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
||||||
|
|
@ -1622,22 +1651,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1755027561,
|
|
||||||
"narHash": "sha256-IVft239Bc8p8Dtvf7UAACMG5P3ZV+3/aO28gXpGtMXI=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "005433b926e16227259a1843015b5b2b7f7d1fc3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_6": {
|
"nixpkgs_6": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755027561,
|
"lastModified": 1755027561,
|
||||||
|
|
@ -1655,6 +1668,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_7": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1755027561,
|
||||||
|
"narHash": "sha256-IVft239Bc8p8Dtvf7UAACMG5P3ZV+3/aO28gXpGtMXI=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "005433b926e16227259a1843015b5b2b7f7d1fc3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_8": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744868846,
|
"lastModified": 1744868846,
|
||||||
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
|
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
|
||||||
|
|
@ -1670,7 +1699,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_8": {
|
"nixpkgs_9": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753934836,
|
"lastModified": 1753934836,
|
||||||
"narHash": "sha256-G06FmIBj0I5bMW1Q8hAEIl5N7IHMK7+Ta4KA+BmneDA=",
|
"narHash": "sha256-G06FmIBj0I5bMW1Q8hAEIl5N7IHMK7+Ta4KA+BmneDA=",
|
||||||
|
|
@ -1686,22 +1715,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_9": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1752596105,
|
|
||||||
"narHash": "sha256-lFNVsu/mHLq3q11MuGkMhUUoSXEdQjCHvpReaGP1S2k=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "dab3a6e781554f965bde3def0aa2fda4eb8f1708",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": [
|
"flake-parts": [
|
||||||
|
|
@ -1819,7 +1832,7 @@
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nix-minecraft": "nix-minecraft",
|
"nix-minecraft": "nix-minecraft",
|
||||||
"nix-tmodloader": "nix-tmodloader",
|
"nix-tmodloader": "nix-tmodloader",
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": "nixpkgs_7",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
"swww": "swww",
|
"swww": "swww",
|
||||||
|
|
@ -1913,7 +1926,7 @@
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_7"
|
"nixpkgs": "nixpkgs_8"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754988908,
|
"lastModified": 1754988908,
|
||||||
|
|
@ -1982,7 +1995,7 @@
|
||||||
"swww": {
|
"swww": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_8",
|
"flake-compat": "flake-compat_8",
|
||||||
"nixpkgs": "nixpkgs_8",
|
"nixpkgs": "nixpkgs_9",
|
||||||
"rust-overlay": "rust-overlay_3"
|
"rust-overlay": "rust-overlay_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -2310,7 +2323,7 @@
|
||||||
"yazi": {
|
"yazi": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_6",
|
"flake-utils": "flake-utils_6",
|
||||||
"nixpkgs": "nixpkgs_9",
|
"nixpkgs": "nixpkgs_10",
|
||||||
"rust-overlay": "rust-overlay_4"
|
"rust-overlay": "rust-overlay_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -2329,7 +2342,7 @@
|
||||||
},
|
},
|
||||||
"zen-browser": {
|
"zen-browser": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_10"
|
"nixpkgs": "nixpkgs_11"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755788000,
|
"lastModified": 1755788000,
|
||||||
|
|
@ -2380,23 +2393,20 @@
|
||||||
"ghostty",
|
"ghostty",
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": "nixpkgs_2"
|
||||||
"ghostty",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742104771,
|
"lastModified": 1756000480,
|
||||||
"narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=",
|
"narHash": "sha256-fR5pdcjO0II5MNdCzqvyokyuFkmff7/FyBAjUS6sMfA=",
|
||||||
"owner": "jcollie",
|
"owner": "jcollie",
|
||||||
"repo": "zon2nix",
|
"repo": "zon2nix",
|
||||||
"rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
|
"rev": "d9dc9ef1ab9ae45b5c9d80c6a747cc9968ee0c60",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "jcollie",
|
"owner": "jcollie",
|
||||||
"repo": "zon2nix",
|
"repo": "zon2nix",
|
||||||
"rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
|
"rev": "d9dc9ef1ab9ae45b5c9d80c6a747cc9968ee0c60",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
21
flake.nix
21
flake.nix
|
|
@ -22,7 +22,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
ghostty = {
|
ghostty = {
|
||||||
# url = "github:ghostty-org/ghostty?rev=7f9bb3c0e54f585e11259bc0c9064813d061929c";
|
|
||||||
url = "github:ghostty-org/ghostty";
|
url = "github:ghostty-org/ghostty";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
@ -134,6 +133,8 @@
|
||||||
|
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
helper = import ./helper { inherit pkgs lib; };
|
||||||
|
|
||||||
# Declare COMMON modules here
|
# Declare COMMON modules here
|
||||||
common-settings = {
|
common-settings = {
|
||||||
modules = [
|
modules = [
|
||||||
|
|
@ -146,6 +147,7 @@
|
||||||
];
|
];
|
||||||
args = {
|
args = {
|
||||||
inherit
|
inherit
|
||||||
|
helper
|
||||||
inputs
|
inputs
|
||||||
system
|
system
|
||||||
nix-version
|
nix-version
|
||||||
|
|
@ -266,6 +268,7 @@
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit
|
inherit
|
||||||
|
helper
|
||||||
inputs
|
inputs
|
||||||
system
|
system
|
||||||
nix-version
|
nix-version
|
||||||
|
|
@ -411,7 +414,7 @@
|
||||||
lib.mapAttrs' (
|
lib.mapAttrs' (
|
||||||
name: value:
|
name: value:
|
||||||
lib.nameValuePair name (
|
lib.nameValuePair name (
|
||||||
nixpkgs.lib.nixosSystem ({
|
nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
inputs.microvm.nixosModules.microvm
|
inputs.microvm.nixosModules.microvm
|
||||||
|
|
@ -469,10 +472,20 @@
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
})
|
}
|
||||||
)
|
)
|
||||||
) vmList
|
) vmList
|
||||||
);
|
)
|
||||||
|
// {
|
||||||
|
vps = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = common-settings.args;
|
||||||
|
modules = [
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
./system/dev/generic
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
packages."${system}" = {
|
packages."${system}" = {
|
||||||
vm-1 = self.nixosConfigurations.vm-1.config.microvm.declaredRunner;
|
vm-1 = self.nixosConfigurations.vm-1.config.microvm.declaredRunner;
|
||||||
|
|
|
||||||
46
helper/default.nix
Normal file
46
helper/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (pkgs) writeShellScript;
|
||||||
|
inherit (lib) replaceString;
|
||||||
|
inherit (builtins) toJSON mapAttrs;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
mkToggleScript =
|
||||||
|
{
|
||||||
|
service,
|
||||||
|
start,
|
||||||
|
stop,
|
||||||
|
icon ? "",
|
||||||
|
extra ? { },
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
extraJson = replaceString "\"" "\\\"" (toJSON extra);
|
||||||
|
in
|
||||||
|
writeShellScript "${service}-toggle.sh" ''
|
||||||
|
SERVICE_NAME=${service}
|
||||||
|
EXTRA_JSON="${extraJson}"
|
||||||
|
|
||||||
|
case $1 in toggle)
|
||||||
|
if systemctl --user is-active --quiet "$SERVICE_NAME"; then
|
||||||
|
systemctl --user stop "$SERVICE_NAME"
|
||||||
|
notify-send "${icon} ''\${SERVICE_NAME^}" "stopping"
|
||||||
|
else
|
||||||
|
systemctl --user start "$SERVICE_NAME"
|
||||||
|
notify-send "${icon} ''\${SERVICE_NAME^}" "starting"
|
||||||
|
fi
|
||||||
|
esac
|
||||||
|
|
||||||
|
if systemctl --user is-active --quiet "$SERVICE_NAME"; then
|
||||||
|
json1=$(jq -nc --arg text "${icon} ''\${SERVICE_NAME^} starting" --arg class "${start}" \
|
||||||
|
'{text: $text, tooltip: $text, class: $class, alt: $class}')
|
||||||
|
else
|
||||||
|
json1=$(jq -nc --arg text "${icon} ''\${SERVICE_NAME^} stopped" --arg class "${stop}" \
|
||||||
|
'{text: $text, tooltip: $text, class: $class, alt: $class}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
jq -nc --argjson a "$json1" --argjson b "$EXTRA_JSON" '$a + $b'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -56,4 +56,4 @@ vim.g.clipboard = {
|
||||||
-- (instead of interacting with the "+" and/or "*" registers explicitly):
|
-- (instead of interacting with the "+" and/or "*" registers explicitly):
|
||||||
vim.opt.clipboard = "unnamedplus"
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
vim.g.gruvbox_material_transparent_background = 2
|
vim.opt.spelllang = { "en", "cjk" }
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
SERVICE="gamemode"
|
|
||||||
|
|
||||||
if [ "$1" = "toggle" ]; then
|
|
||||||
if systemctl --user is-active --quiet "$SERVICE"; then
|
|
||||||
systemctl --user stop "$SERVICE"
|
|
||||||
notify-send " Gamemode" "off" >/dev/null 2>&1
|
|
||||||
else
|
|
||||||
systemctl --user start "$SERVICE"
|
|
||||||
notify-send " Gamemode" "on" >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! systemctl --user is-active --quiet "$SERVICE"; then
|
|
||||||
echo "{\"text\": \"inactive\", \"tooltip\": \"gamemoded is inactive\", \"alt\": \"inactive\", \"class\": \"inactive\"}"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "{\"text\": \"active\", \"tooltip\": \"gamemoded is running\", \"alt\": \"active\", \"class\": \"active\"}"
|
|
||||||
exit 0
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
get_icons() {
|
|
||||||
local session_name="$1"
|
|
||||||
local result=""
|
|
||||||
|
|
||||||
local panes=($(tmux list-panes -t "$session_name" -F '#{pane_current_command}'))
|
|
||||||
|
|
||||||
for i in "${panes[@]}"; do
|
|
||||||
case "$i" in
|
|
||||||
nvim) result+=" " ;;
|
|
||||||
zsh | *) result+=" " ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$result"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (($# != 1)); then
|
|
||||||
echo "Usage: $0 <session-name>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
get_icons "$1"
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
#Taken from JaKoolit's dotfiles
|
|
||||||
|
|
||||||
bar="▁▂▃▄▅▆▇█"
|
|
||||||
dict="s/;//g"
|
|
||||||
|
|
||||||
bar_length=${#bar}
|
|
||||||
|
|
||||||
for ((i = 0; i < bar_length; i++)); do
|
|
||||||
dict+=";s/$i/${bar:$i:1}/g"
|
|
||||||
done
|
|
||||||
|
|
||||||
config_file="/tmp/bar_cava_config"
|
|
||||||
cat >"$config_file" <<EOF
|
|
||||||
[general]
|
|
||||||
bars = 10
|
|
||||||
|
|
||||||
[input]
|
|
||||||
method = pulse
|
|
||||||
source = auto
|
|
||||||
|
|
||||||
[output]
|
|
||||||
method = raw
|
|
||||||
raw_target = /dev/stdout
|
|
||||||
data_format = ascii
|
|
||||||
channels = mono
|
|
||||||
ascii_max_range = 7
|
|
||||||
EOF
|
|
||||||
|
|
||||||
pkill -f "cava -p $config_file"
|
|
||||||
|
|
||||||
cava -p "$config_file" | sed -u "$dict"
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
INTERFACE="wg0"
|
|
||||||
|
|
||||||
if [ "$1" = "toggle" ]; then
|
|
||||||
if ip link show "$INTERFACE" >/dev/null 2>&1; then
|
|
||||||
pkexec systemctl stop wg-quick-wg0.service
|
|
||||||
else
|
|
||||||
pkexec systemctl start wg-quick-wg0.service
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! ip link show "$INTERFACE" >/dev/null 2>&1; then
|
|
||||||
echo "{\"text\": \"Not Connected\", \"tooltip\": \"WireGuard is down\", \"alt\": \"disconnected\", \"class\": \"disconnected\"}"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "{\"text\": \"Connected\", \"tooltip\": \"WireGuard connected\", \"alt\": \"connected\", \"class\": \"connected\"}"
|
|
||||||
exit 0
|
|
||||||
|
|
@ -16,5 +16,6 @@
|
||||||
../user/virtualization.nix
|
../user/virtualization.nix
|
||||||
../user/vscode.nix
|
../user/vscode.nix
|
||||||
../user/yazi.nix
|
../user/yazi.nix
|
||||||
|
../user/zellij.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,51 +5,60 @@
|
||||||
let
|
let
|
||||||
record = pkgs.writeShellScript "toggle-wf-record" ''
|
record = pkgs.writeShellScript "toggle-wf-record" ''
|
||||||
PID_FILE="/tmp/wf-recorder.pid"
|
PID_FILE="/tmp/wf-recorder.pid"
|
||||||
OUTPUT_DIR="$HOME/Videos/recordings"
|
|
||||||
FILENAME="$OUTPUT_DIR/recording_$(date +%Y%m%d_%H%M%S).mp4"
|
|
||||||
SINK_DEV="$(${pkgs.pulseaudio.out}/bin/pactl get-default-sink).monitor"
|
|
||||||
|
|
||||||
declare -A recordOptions=(
|
if [[ $1 = "toggle" ]]; then
|
||||||
[Monitor]="${pkgs.slurp}/bin/slurp -o"
|
OUTPUT_DIR="$HOME/Videos/recordings"
|
||||||
[Area]="${pkgs.slurp}/bin/slurp"
|
FILENAME="$OUTPUT_DIR/recording_$(date +%Y%m%d_%H%M%S).mp4"
|
||||||
)
|
SINK_DEV="$(${pkgs.pulseaudio.out}/bin/pactl get-default-sink).monitor"
|
||||||
|
|
||||||
if [[ -f "$PID_FILE" ]]; then
|
declare -A recordOptions=(
|
||||||
pid=$(cat "$PID_FILE")
|
[Monitor]="${pkgs.slurp}/bin/slurp -o"
|
||||||
|
[Area]="${pkgs.slurp}/bin/slurp"
|
||||||
|
)
|
||||||
|
|
||||||
if kill "$pid" 2>/dev/null; then
|
if [[ -f "$PID_FILE" ]]; then
|
||||||
rm "$PID_FILE"
|
pid=$(cat "$PID_FILE")
|
||||||
echo "Stopped recording"
|
|
||||||
notify-send " RECORD" "Recording saved to $FILENAME"
|
if kill "$pid" 2>/dev/null; then
|
||||||
|
rm "$PID_FILE"
|
||||||
|
echo "Stopped recording"
|
||||||
|
notify-send " RECORD" "Recording saved to $FILENAME"
|
||||||
|
else
|
||||||
|
echo "No process found, cleaning up"
|
||||||
|
notify-send " RECORD" "Failed: No process found, cleaning up"
|
||||||
|
rm "$PID_FILE"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "No process found, cleaning up"
|
# Start recording
|
||||||
notify-send " RECORD" "Failed: No process found, cleaning up"
|
choice=$(printf "%s\n" "''\${!recordOptions[@]}" | rofi -i -dmenu -config ~/.config/rofi/config.rasi -p "Which mode")
|
||||||
rm "$PID_FILE"
|
|
||||||
|
if [[ -z "$choice" ]]; then
|
||||||
|
notify-send " RECORD" "Cancelled"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$OUTPUT_DIR"
|
||||||
|
|
||||||
|
geometry="$(''\${recordOptions[$choice]})"
|
||||||
|
|
||||||
|
if [[ -z "$geometry" ]]; then
|
||||||
|
notify-send " RECORD" "Cancelled"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
${pkgs.wf-recorder}/bin/wf-recorder -y \
|
||||||
|
-g "$geometry" \
|
||||||
|
--audio="$SINK_DEV" \
|
||||||
|
-f "$FILENAME" &
|
||||||
|
echo $! > "$PID_FILE"
|
||||||
|
echo "Started recording: $FILENAME"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$PID_FILE" ]; then
|
||||||
|
jq -nc --arg text "on" --arg class "on" '{text: $text, class: $class, alt: $class}'
|
||||||
else
|
else
|
||||||
# Start recording
|
jq -nc --arg text "off" --arg class "off" '{text: $text, class: $class, alt: $class}'
|
||||||
choice=$(printf "%s\n" "''\${!recordOptions[@]}" | rofi -i -dmenu -config ~/.config/rofi/config.rasi -p "Which mode")
|
|
||||||
|
|
||||||
if [[ -z "$choice" ]]; then
|
|
||||||
notify-send " RECORD" "Cancelled"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$OUTPUT_DIR"
|
|
||||||
|
|
||||||
geometry="$(''\${recordOptions[$choice]})"
|
|
||||||
|
|
||||||
if [[ -z "$geometry" ]]; then
|
|
||||||
notify-send " RECORD" "Cancelled"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
${pkgs.wf-recorder}/bin/wf-recorder -y \
|
|
||||||
-g "$geometry" \
|
|
||||||
--audio="$SINK_DEV" \
|
|
||||||
-f "$FILENAME" &
|
|
||||||
echo $! > "$PID_FILE"
|
|
||||||
echo "Started recording: $FILENAME"
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@ let
|
||||||
notransTag = "notrans";
|
notransTag = "notrans";
|
||||||
|
|
||||||
browser-bin = "zen";
|
browser-bin = "zen";
|
||||||
prefix = if nvidia-offload-enabled then "nvidia-offload" else "";
|
prefix = if nvidia-offload-enabled then "nvidia-offload " else "";
|
||||||
browser = "${prefix} ${browser-bin}";
|
browser = "${prefix}${browser-bin}";
|
||||||
terminal = "ghostty";
|
terminal = "${prefix}ghostty";
|
||||||
filemanager = "${terminal} -e yazi";
|
filemanager = "${terminal} -e yazi";
|
||||||
|
|
||||||
screenshotFolder = "--output-folder ~/Pictures/Screenshots";
|
screenshotFolder = "--output-folder ~/Pictures/Screenshots";
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,12 @@ in
|
||||||
|
|
||||||
"fullscreen, initialClass:^(cs2)$"
|
"fullscreen, initialClass:^(cs2)$"
|
||||||
|
|
||||||
|
# Zen browser
|
||||||
"opacity 0.9999 override, initialClass:^(zen)(.*)"
|
"opacity 0.9999 override, initialClass:^(zen)(.*)"
|
||||||
|
|
||||||
|
# Ghostty
|
||||||
|
"opacity 0.9999 override, initialClass:^(com.mitchellh.ghostty)$"
|
||||||
|
|
||||||
# Picture in picture windows
|
# Picture in picture windows
|
||||||
"float, title:^(Picture-in-Picture)$"
|
"float, title:^(Picture-in-Picture)$"
|
||||||
"pin, title:^(Picture-in-Picture)$"
|
"pin, title:^(Picture-in-Picture)$"
|
||||||
|
|
@ -53,10 +57,6 @@ in
|
||||||
"move ${right} 8%, class: ^(localsend_app)$"
|
"move ${right} 8%, class: ^(localsend_app)$"
|
||||||
"size 20% 80%, class: ^(localsend_app)$"
|
"size 20% 80%, class: ^(localsend_app)$"
|
||||||
|
|
||||||
# Airplay
|
|
||||||
"move ${right} 10%, class: ^(GStreamer)$"
|
|
||||||
"size 21% 80%, class: ^(GStreamer)$"
|
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
"move ${right} ${top}, class: ^(blueberry.py)$"
|
"move ${right} ${top}, class: ^(blueberry.py)$"
|
||||||
"size 25% 45%, class: ^(blueberry.py)$"
|
"size 25% 45%, class: ^(blueberry.py)$"
|
||||||
|
|
@ -72,6 +72,8 @@ in
|
||||||
"animation slide right 20%, class: ^(localsend_app)$"
|
"animation slide right 20%, class: ^(localsend_app)$"
|
||||||
|
|
||||||
# Airplay
|
# Airplay
|
||||||
|
"move ${right} 10%, class: ^(GStreamer)$"
|
||||||
|
"size 21% 80%, class: ^(GStreamer)$"
|
||||||
"pin, class: ^(GStreamer)$"
|
"pin, class: ^(GStreamer)$"
|
||||||
"float, class: ^(GStreamer)$"
|
"float, class: ^(GStreamer)$"
|
||||||
"opacity 1.0 override 1.0 override, class: ^(GStreamer)$"
|
"opacity 1.0 override 1.0 override, class: ^(GStreamer)$"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ let
|
||||||
fcitx5-rime # Bopomofo
|
fcitx5-rime # Bopomofo
|
||||||
rime-data
|
rime-data
|
||||||
];
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
i18n = {
|
i18n = {
|
||||||
|
|
@ -33,27 +32,54 @@ in
|
||||||
MenuFont = lib.mkForce font;
|
MenuFont = lib.mkForce font;
|
||||||
TrayFont = lib.mkForce font;
|
TrayFont = lib.mkForce font;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inputMethod = {
|
||||||
|
GroupOrder."0" = "Default";
|
||||||
|
"Groups/0" = {
|
||||||
|
Name = "Default";
|
||||||
|
"Default Layout" = "us";
|
||||||
|
DefaultIM = "rime";
|
||||||
|
};
|
||||||
|
"Groups/0/Items/0".Name = "keyboard-us";
|
||||||
|
"Groups/0/Items/1".Name = "rime";
|
||||||
|
"Groups/0/Items/2".Name = "mozc";
|
||||||
|
};
|
||||||
|
|
||||||
|
globalOptions = {
|
||||||
|
Hotkey = {
|
||||||
|
EnumerateWithRiggerKeys = true;
|
||||||
|
EnumerateSkipFirst = false;
|
||||||
|
ModifierOnlyKeyTimeout = 250;
|
||||||
|
};
|
||||||
|
"Hotkey/TriggerKeys" = {
|
||||||
|
"0" = "Super+space";
|
||||||
|
};
|
||||||
|
"Hotkey/AltTriggerKeys" = {
|
||||||
|
"0" = "Shift_L";
|
||||||
|
};
|
||||||
|
"Hotkey/EnumerateGroupForwardKeys" = {
|
||||||
|
"0" = "Super+space";
|
||||||
|
};
|
||||||
|
"Hotkey/PrevPage" = {
|
||||||
|
"0" = "Up";
|
||||||
|
};
|
||||||
|
"Hotkey/NextPage" = {
|
||||||
|
"0" = "Down";
|
||||||
|
};
|
||||||
|
Behavior = {
|
||||||
|
ActiveByDefault = false;
|
||||||
|
resetStateWhenFocusIn = "no";
|
||||||
|
ShareInputState = "no";
|
||||||
|
PreeditEnabledByDefault = true;
|
||||||
|
ShowInputMethodInformation = true;
|
||||||
|
ShowInputMethodInformationWhenFocusIn = false;
|
||||||
|
CompactInputMethodInformation = true;
|
||||||
|
DefaultPageSize = 5;
|
||||||
|
PreloadInputMethod = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.fcitx5 = {
|
|
||||||
Unit = {
|
|
||||||
WantedBy = [ "graphical-session.target" ];
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
Description = "Fcitx5 Input Method";
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "simple";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 2;
|
|
||||||
ExecStart = "${pkgs.fcitx5}/bin/fcitx5";
|
|
||||||
Environment = [
|
|
||||||
"GTK_IM_MODULE="
|
|
||||||
"XMODIFIERS=@im=fcitx"
|
|
||||||
"QT_IM_MODULE=fcitx"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@
|
||||||
settings = {
|
settings = {
|
||||||
unfocused-split-opacity = 0.85;
|
unfocused-split-opacity = 0.85;
|
||||||
desktop-notifications = false;
|
desktop-notifications = false;
|
||||||
|
background-opacity = 0.1;
|
||||||
|
background-blur = false;
|
||||||
|
|
||||||
wait-after-command = false;
|
wait-after-command = false;
|
||||||
shell-integration = "detect";
|
shell-integration = "detect";
|
||||||
|
|
|
||||||
1015
home/user/waybar.nix
1015
home/user/waybar.nix
File diff suppressed because it is too large
Load diff
6
home/user/zellij.nix
Normal file
6
home/user/zellij.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.zellij = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -23,6 +23,7 @@ in
|
||||||
"zen.view.compact.show-sidebar-and-toolbar-on-hover" = false;
|
"zen.view.compact.show-sidebar-and-toolbar-on-hover" = false;
|
||||||
"zen.tabs.vertical.right-side" = true;
|
"zen.tabs.vertical.right-side" = true;
|
||||||
"zen.urlbar.behavior" = "float";
|
"zen.urlbar.behavior" = "float";
|
||||||
|
"nebula-tab-loading-animation" = 0;
|
||||||
|
|
||||||
"app.update.auto" = false;
|
"app.update.auto" = false;
|
||||||
"app.normandy.first_run" = false;
|
"app.normandy.first_run" = false;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
inherit (lib) optionalString;
|
||||||
monitors = [
|
monitors = [
|
||||||
"desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271"
|
"desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271"
|
||||||
"desc:Acer Technologies XV272U V3 1322131231233"
|
"desc:Acer Technologies XV272U V3 1322131231233"
|
||||||
|
|
@ -52,141 +53,9 @@ in
|
||||||
../../modules/davinci-resolve.nix
|
../../modules/davinci-resolve.nix
|
||||||
../../modules/webcam.nix
|
../../modules/webcam.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
users."${username}" = {
|
|
||||||
imports = [
|
|
||||||
../../../home/presets/basic.nix
|
|
||||||
|
|
||||||
# Bitwarden client
|
|
||||||
(import ../../../home/user/bitwarden.nix {
|
|
||||||
email = "danny@net.dn";
|
|
||||||
baseUrl = "https://bitwarden.net.dn";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Proton Extra Versions
|
|
||||||
{
|
|
||||||
home.file.".steam/root/compatibilitytools.d/GE-Proton10-10" = {
|
|
||||||
source = fetchTarball {
|
|
||||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton10-10/GE-Proton10-10.tar.gz";
|
|
||||||
sha256 = "sha256:1vkj66x84yqmpqm857hjzmx1s02h2lffcbc60jdfqz9xj34dx5jc";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home.file.".steam/root/compatibilitytools.d/CachyOS-Proton10-0_v3" = {
|
|
||||||
source = fetchTarball {
|
|
||||||
url = "https://github.com/CachyOS/proton-cachyos/releases/download/cachyos-10.0-20250714-slr/proton-cachyos-10.0-20250714-slr-x86_64_v3.tar.xz";
|
|
||||||
sha256 = "sha256:0hp22hkfv3f1p75im3xpif0pmixkq2i3hq3dhllzr2r7l1qx16iz";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# waybar
|
|
||||||
(import ../../../home/user/waybar.nix {
|
|
||||||
settings =
|
|
||||||
let
|
|
||||||
id = 5;
|
|
||||||
in
|
|
||||||
[
|
|
||||||
# monitor 1
|
|
||||||
{
|
|
||||||
output = "DP-${toString id}";
|
|
||||||
height = 48;
|
|
||||||
modules-left = [
|
|
||||||
"custom/os"
|
|
||||||
"hyprland/workspaces"
|
|
||||||
"clock"
|
|
||||||
"custom/cava"
|
|
||||||
"mpris"
|
|
||||||
];
|
|
||||||
modules-right = (
|
|
||||||
[
|
|
||||||
"wlr/taskbar"
|
|
||||||
]
|
|
||||||
++ (
|
|
||||||
if config.programs.gamemode.enable then
|
|
||||||
[
|
|
||||||
"gamemode"
|
|
||||||
]
|
|
||||||
else
|
|
||||||
[ ]
|
|
||||||
)
|
|
||||||
++ [
|
|
||||||
"custom/bitwarden"
|
|
||||||
"custom/airplay"
|
|
||||||
"custom/wallRand"
|
|
||||||
"custom/wireguard"
|
|
||||||
"custom/recording"
|
|
||||||
"idle_inhibitor"
|
|
||||||
"network"
|
|
||||||
"cpu"
|
|
||||||
"memory"
|
|
||||||
"pulseaudio"
|
|
||||||
"custom/swaync"
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
# monitor 2
|
|
||||||
{
|
|
||||||
output = "DP-${toString (id + 1)}";
|
|
||||||
height = 54;
|
|
||||||
modules-left = [
|
|
||||||
"clock"
|
|
||||||
"mpris"
|
|
||||||
];
|
|
||||||
modules-right = [
|
|
||||||
"wlr/taskbar"
|
|
||||||
"temperature"
|
|
||||||
"cpu"
|
|
||||||
"memory"
|
|
||||||
"pulseaudio"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
# Hyprland
|
|
||||||
(import ../../../home/user/hyprland.nix { inherit monitors; })
|
|
||||||
{
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
settings = {
|
|
||||||
monitor = [
|
|
||||||
''desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271, 2560x1440@165, 0x0, 1''
|
|
||||||
''desc:Acer Technologies XV272U V3 1322131231233, 2560x1440@180, -1440x-600, 1, transform, 1''
|
|
||||||
];
|
|
||||||
|
|
||||||
misc = {
|
|
||||||
vrr = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# Git
|
|
||||||
(import ../../../home/user/git.nix {
|
|
||||||
inherit username;
|
|
||||||
email = "danny10132024@gmail.com";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Cs go
|
|
||||||
{
|
|
||||||
home.file.".steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg".text =
|
|
||||||
''
|
|
||||||
fps_max "250"
|
|
||||||
|
|
||||||
# Wheel Jump
|
|
||||||
bind "mwheeldown" "+jump"
|
|
||||||
bind "mwheelup" "+jump"
|
|
||||||
bind "space" "+jump"
|
|
||||||
|
|
||||||
echo "AUTOEXEC LOADED SUCCESSFULLY!"
|
|
||||||
host_writeconfig
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Power Management
|
# Power Management
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -219,4 +88,117 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
users."${username}" = {
|
||||||
|
imports = [
|
||||||
|
../../../home/presets/basic.nix
|
||||||
|
|
||||||
|
# Bitwarden client
|
||||||
|
(import ../../../home/user/bitwarden.nix {
|
||||||
|
email = "danny@net.dn";
|
||||||
|
baseUrl = "https://bitwarden.net.dn";
|
||||||
|
})
|
||||||
|
|
||||||
|
# waybar
|
||||||
|
(import ../../../home/user/waybar.nix {
|
||||||
|
settings = [
|
||||||
|
# monitor 1
|
||||||
|
{
|
||||||
|
output = "DP-3";
|
||||||
|
height = 48;
|
||||||
|
modules-left = [
|
||||||
|
"custom/os"
|
||||||
|
"hyprland/workspaces"
|
||||||
|
"clock"
|
||||||
|
"custom/cava"
|
||||||
|
"mpris"
|
||||||
|
];
|
||||||
|
modules-right = [
|
||||||
|
"wlr/taskbar"
|
||||||
|
(optionalString config.programs.gamemode.enable "custom/gamemode")
|
||||||
|
"custom/bitwarden"
|
||||||
|
"custom/airplay"
|
||||||
|
"custom/wallRand"
|
||||||
|
"custom/wireguard"
|
||||||
|
"custom/recording"
|
||||||
|
"idle_inhibitor"
|
||||||
|
"network"
|
||||||
|
"cpu"
|
||||||
|
"memory"
|
||||||
|
"pulseaudio"
|
||||||
|
"custom/swaync"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
# monitor 2
|
||||||
|
{
|
||||||
|
output = "DP-2";
|
||||||
|
height = 54;
|
||||||
|
modules-left = [
|
||||||
|
"clock"
|
||||||
|
"mpris"
|
||||||
|
];
|
||||||
|
modules-right = [
|
||||||
|
"wlr/taskbar"
|
||||||
|
"temperature"
|
||||||
|
"cpu"
|
||||||
|
"memory"
|
||||||
|
"pulseaudio"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
})
|
||||||
|
|
||||||
|
# Hyprland
|
||||||
|
(import ../../../home/user/hyprland.nix { inherit monitors; })
|
||||||
|
{
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
settings = {
|
||||||
|
monitor = [
|
||||||
|
''desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271, 2560x1440@165, 0x0, 1''
|
||||||
|
''desc:Acer Technologies XV272U V3 1322131231233, 2560x1440@180, -1440x-600, 1, transform, 1''
|
||||||
|
];
|
||||||
|
misc = {
|
||||||
|
vrr = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Git
|
||||||
|
(import ../../../home/user/git.nix {
|
||||||
|
inherit username;
|
||||||
|
email = "danny10132024@gmail.com";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
# CS go
|
||||||
|
".steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg".text = ''
|
||||||
|
fps_max "250"
|
||||||
|
|
||||||
|
# Wheel Jump
|
||||||
|
bind "mwheeldown" "+jump"
|
||||||
|
bind "mwheelup" "+jump"
|
||||||
|
bind "space" "+jump"
|
||||||
|
|
||||||
|
echo "AUTOEXEC LOADED SUCCESSFULLY!"
|
||||||
|
host_writeconfig
|
||||||
|
'';
|
||||||
|
# Proton GE
|
||||||
|
".steam/root/compatibilitytools.d/GE-Proton10-10" = {
|
||||||
|
source = fetchTarball {
|
||||||
|
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton10-10/GE-Proton10-10.tar.gz";
|
||||||
|
sha256 = "sha256:1vkj66x84yqmpqm857hjzmx1s02h2lffcbc60jdfqz9xj34dx5jc";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
".steam/root/compatibilitytools.d/CachyOS-Proton10-0_v3" = {
|
||||||
|
source = fetchTarball {
|
||||||
|
url = "https://github.com/CachyOS/proton-cachyos/releases/download/cachyos-10.0-20250714-slr/proton-cachyos-10.0-20250714-slr-x86_64_v3.tar.xz";
|
||||||
|
sha256 = "sha256:0hp22hkfv3f1p75im3xpif0pmixkq2i3hq3dhllzr2r7l1qx16iz";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
boot.swraid.enable = true;
|
|
||||||
boot.swraid.mdadmConf = "\n MAILADDR smitty\n ARRAY /dev/md126 metadata=1.2 name=stuff:0\n UUID=f3c41e6f:7e27b57f:8b44503a:42538a51\n ";
|
|
||||||
}
|
|
||||||
|
|
@ -10,15 +10,16 @@
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
./disk.nix
|
./disk.nix
|
||||||
./boot.nix
|
./hardware-configuration.nix
|
||||||
|
../../modules/nixsettings.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# boot.loader.systemd-boot.enable = true;
|
# boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
devices = [ "/dev/sda" ];
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
efiInstallAsRemovable = true;
|
efiInstallAsRemovable = true;
|
||||||
devices = [ "/dev/md126" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
@ -42,7 +43,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzLpMKn0Q24ACC6k/7lOX0FIdcFhq15NY6849yROeUK danny@dn-pre7780"
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJSAOufpee7f8D8ONIIGU3qsN+8+DGO7BfZnEOTYqtQ5 danny@pre7780.dn''
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = nix-version;
|
system.stateVersion = nix-version;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
device = "/dev/disk/by-id/md-uuid-f3c41e6f:7e27b57f:8b44503a:42538a51";
|
device = "/dev/sda";
|
||||||
type = "disk";
|
type = "disk";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
|
|
|
||||||
22
system/dev/generic/hardware-configuration.nix
Normal file
22
system/dev/generic/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
# 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, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "virtio_scsi" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens4.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
|
|
@ -25,9 +25,9 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.user.services.uxplay = {
|
systemd.user.services.uxplay = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.uxplay}/bin/uxplay ${
|
ExecStart = "${pkgs.uxplay}/bin/uxplay ${
|
||||||
optionalString (hostname != null) "-n ${hostname} -fs -fps 60 -nh"
|
optionalString (hostname != null) "-n ${hostname} -fs -fps 60 -nh"
|
||||||
} -p";
|
} -p";
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,31 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
getIconScript = pkgs.writeShellScript "get-icon" (
|
getIconScript = pkgs.writeShellScript "get-icon" ''
|
||||||
builtins.readFile ../../home/config/scripts/getIcons.sh
|
get_icons() {
|
||||||
);
|
local session_name="$1"
|
||||||
|
local result=""
|
||||||
|
|
||||||
|
local panes=($(tmux list-panes -t "$session_name" -F '#{pane_current_command}'))
|
||||||
|
|
||||||
|
for i in "''\${panes[@]}"; do
|
||||||
|
case "$i" in
|
||||||
|
nvim) result+=" " ;;
|
||||||
|
zsh | *) result+=" " ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "$result"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($# != 1)); then
|
||||||
|
echo "Usage: $0 <session-name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
get_icons "$1"
|
||||||
|
'';
|
||||||
|
|
||||||
prefixKey = "C-Space";
|
prefixKey = "C-Space";
|
||||||
tmuxConfigPath = "/etc/tmux.conf";
|
tmuxConfigPath = "/etc/tmux.conf";
|
||||||
in
|
in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue