mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-02-15 04:52:48 +00:00
Compare commits
10 Commits
8198e46252
...
3b3a15322b
| Author | SHA1 | Date | |
|---|---|---|---|
|
3b3a15322b
|
|||
|
d33d53c6fb
|
|||
|
fc8066a248
|
|||
|
51196aaefa
|
|||
|
ae93255200
|
|||
|
d5eb686f7f
|
|||
|
69eafb5594
|
|||
|
5ad6324de6
|
|||
|
c1145e6319
|
|||
|
4a6c182385
|
258
flake.lock
generated
258
flake.lock
generated
@@ -8,11 +8,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1756770412,
|
||||
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||
"lastModified": 1762980239,
|
||||
"narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||
"rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
@@ -39,39 +39,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flakey-profile": {
|
||||
"locked": {
|
||||
"lastModified": 1712898590,
|
||||
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
|
||||
"owner": "lf-",
|
||||
"repo": "flakey-profile",
|
||||
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lf-",
|
||||
"repo": "flakey-profile",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -79,11 +46,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1757809953,
|
||||
"narHash": "sha256-29mlXbfAJhz9cWVrPP4STvVPDVZFCfCOmaIN5lFJa+Y=",
|
||||
"lastModified": 1762964643,
|
||||
"narHash": "sha256-RYHN8O/Aja59XDji6WSJZPkJpYVUfpSkyH+PEupBJqM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "17a10049486f6698fca32097d8f52c0c895542b0",
|
||||
"rev": "827f2a23373a774a8805f84ca5344654c31f354b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -120,63 +87,86 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1753306924,
|
||||
"narHash": "sha256-jLCEW0FvjFhC+c4RHzH+xbkSOxrnpFHnhjOw6sudhx0=",
|
||||
"rev": "1a4393d0aac31aba21f5737ede1b171e11336d77",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/1a4393d0aac31aba21f5737ede1b171e11336d77.tar.gz?rev=1a4393d0aac31aba21f5737ede1b171e11336d77"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/release-2.93.tar.gz"
|
||||
}
|
||||
},
|
||||
"lix-module": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flakey-profile": "flakey-profile",
|
||||
"lix": "lix",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1756125859,
|
||||
"narHash": "sha256-6a+PWILmqHCs9B5eIBLg6HSZ8jYweZpgOWO8FlyVwYI=",
|
||||
"rev": "d3292125035b04df00d01549a26e948631fabe1e",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/d3292125035b04df00d01549a26e948631fabe1e.tar.gz?rev=d3292125035b04df00d01549a26e948631fabe1e"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-2.tar.gz"
|
||||
}
|
||||
},
|
||||
"matugen": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_2"
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716548249,
|
||||
"narHash": "sha256-9jvSsYOCYpG7JN1YDdptu19EhG+fZuX278IbiTJ7814=",
|
||||
"owner": "Theaninova",
|
||||
"lastModified": 1731508795,
|
||||
"narHash": "sha256-+UibbVz5CTisKMms/5VXGe39FYr56qzaEtX4TWQPkjk=",
|
||||
"owner": "InioX",
|
||||
"repo": "matugen",
|
||||
"rev": "f79700eb42e5a6b7062ccdfcec3956e26573fc01",
|
||||
"rev": "cb9f81eb0150f6253895ea0adb1daa8534c15fc7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Theaninova",
|
||||
"ref": "add-home-manager-module",
|
||||
"owner": "InioX",
|
||||
"ref": "v2.4.1",
|
||||
"repo": "matugen",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri": {
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763090726,
|
||||
"narHash": "sha256-KglHTdxRYcfR8hzYUZDp1hkizZlapfg5uDlHgv0XGcg=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "d32bec21d280e91f502ad6bd6933a451202c2695",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1756556321,
|
||||
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"ref": "v25.08",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1763014447,
|
||||
"narHash": "sha256-nmu7S8J9IJKLQyIkSU8QWYHygrfw76NHGTkcr+bXMX0=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "a52df533c4694b5ed0a04140af60fd26146df911",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-flatpak": {
|
||||
"locked": {
|
||||
"lastModified": 1739444422,
|
||||
@@ -195,11 +185,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1757745802,
|
||||
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
|
||||
"lastModified": 1762977756,
|
||||
"narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
|
||||
"rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -209,6 +199,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1762756533,
|
||||
"narHash": "sha256-HiRDeUOD1VLklHeOmaKDzf+8Hb7vSWPVFcWwaTrpm+U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c2448301fb856e351aab33e64c33a3fc8bcf637d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
@@ -216,14 +222,14 @@
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"systems": "systems_4"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1757864383,
|
||||
"narHash": "sha256-oMoFAEC8A8BGBHIYiUNsgsVhEyNwTbn066J68LtbelY=",
|
||||
"lastModified": 1763109970,
|
||||
"narHash": "sha256-3azi7sNWVxHiUGMPcEwsd3ErYoMEdLRX/JmgoYEe+os=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "db1a991f33fb43cf0e2a4aff54a8c53b4dc12128",
|
||||
"rev": "6c2ac251d7cfc2416f23257df13c86d84d3eee34",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -234,7 +240,7 @@
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
@@ -242,11 +248,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1757624466,
|
||||
"narHash": "sha256-25ExS2AkQD05Jf0Y2Wnn5KHpucN2d3ObEQOVaDh7ubg=",
|
||||
"lastModified": 1761730856,
|
||||
"narHash": "sha256-t1i5p/vSWwueZSC0Z2BImxx3BjoUDNKyC2mk24krcMY=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "da8bcb74407e41d334fc79081fdd8948b795bd6f",
|
||||
"rev": "e29de6db0cb3182e9aee75a3b1fd1919d995d85b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -258,29 +264,14 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"lix-module": "lix-module",
|
||||
"matugen": "matugen",
|
||||
"niri": "niri",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
@@ -295,6 +286,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
@@ -310,18 +316,36 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"xwayland-satellite-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"lastModified": 1755491097,
|
||||
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"owner": "Supreeeme",
|
||||
"ref": "v0.7",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1762747449,
|
||||
"narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "6338574bc5c036487486acde264f38f39ea15fad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
||||
21
flake.nix
21
flake.nix
@@ -1,16 +1,12 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-2.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
matugen = {
|
||||
url = "github:Theaninova/matugen/add-home-manager-module";
|
||||
url = "github:InioX/matugen?ref=v2.4.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixvim = {
|
||||
@@ -18,6 +14,10 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||
niri = {
|
||||
url = "github:sodiboo/niri-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -25,9 +25,9 @@
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nixvim,
|
||||
lix-module,
|
||||
matugen,
|
||||
nix-flatpak,
|
||||
niri,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
@@ -45,7 +45,9 @@
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
overlays = [
|
||||
niri.overlays.niri
|
||||
(final: prev: {
|
||||
cubyz-bin = prev.callPackage ./overlays/cubyz-bin { };
|
||||
matugen = matugen.packages.${prev.system}.default;
|
||||
gccdiag = prev.callPackage ./overlays/gccdiag { };
|
||||
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
|
||||
@@ -53,6 +55,7 @@
|
||||
rquickshare = prev.callPackage ./overlays/rquickshare { };
|
||||
rastertokpsl-re = prev.callPackage ./overlays/rastertokpsl-re { };
|
||||
usb-sniffer = prev.callPackage ./overlays/usb-sniffer { };
|
||||
gamma-launcher = prev.callPackage ./overlays/gamma-launcher { };
|
||||
wireshark = prev.wireshark.overrideAttrs (
|
||||
finalAttrs: prevAttrs: {
|
||||
postInstall = prevAttrs.postInstall + ''
|
||||
@@ -83,7 +86,7 @@
|
||||
./modules/nixos
|
||||
./hosts/${hostname}
|
||||
home-manager.nixosModules.home-manager
|
||||
# lix-module.nixosModules.default
|
||||
niri.nixosModules.niri
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
{
|
||||
_module.args =
|
||||
@@ -128,7 +131,7 @@
|
||||
inherit username hostname inputs;
|
||||
};
|
||||
sharedModules = [
|
||||
matugen.homeManagerModules.default
|
||||
./overlays/matugen/hm-module.nix
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
nixvim.homeModules.nixvim
|
||||
./modules/home-manager/modules/nixvim
|
||||
@@ -157,7 +160,7 @@
|
||||
username = "theaninova";
|
||||
system = "x86_64-linux";
|
||||
config = {
|
||||
rocmSupport = true;
|
||||
# rocmSupport = true;
|
||||
};
|
||||
};
|
||||
aero = mkHost {
|
||||
|
||||
@@ -34,27 +34,25 @@
|
||||
|
||||
shell.components = {
|
||||
firefox-pip.enable = true;
|
||||
grimblast.enable = true;
|
||||
# grimblast.enable = true;
|
||||
gnome-keyring.enable = true;
|
||||
hyprpicker.enable = true;
|
||||
# hyprpicker.enable = true;
|
||||
kde-connect.enable = true;
|
||||
kitty.enable = true;
|
||||
swaync.enable = true;
|
||||
walker.enable = true;
|
||||
waybar.enable = true;
|
||||
};
|
||||
desktops = {
|
||||
hyprland.enable = true;
|
||||
};
|
||||
desktops.niri.enable = true;
|
||||
locale.preset.theaninova.enable = true;
|
||||
|
||||
networking.hosts = {
|
||||
"127.0.0.1:57461" = [ "ai.local" ];
|
||||
};
|
||||
services = {
|
||||
ollama.enable = true;
|
||||
ollama.enable = false;
|
||||
open-webui = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
port = 57461;
|
||||
environment = {
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
@@ -70,7 +68,6 @@
|
||||
airprint.enable = true;
|
||||
|
||||
udev.packages = with pkgs; [
|
||||
android-udev-rules
|
||||
usb-sniffer
|
||||
];
|
||||
};
|
||||
@@ -133,7 +130,7 @@
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
wireshark = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
package = pkgs.wireshark;
|
||||
usbmon.enable = true;
|
||||
};
|
||||
@@ -162,6 +159,8 @@
|
||||
# List packages installed in system profile. To search, run:
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Essential utils
|
||||
nix-output-monitor
|
||||
alacritty
|
||||
usbutils
|
||||
usbimager
|
||||
uhubctl
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
blueman
|
||||
kdePackages.okular
|
||||
bitbox
|
||||
gamma-launcher
|
||||
];
|
||||
};
|
||||
systemd.user.services = {
|
||||
|
||||
@@ -24,7 +24,7 @@ in
|
||||
":AerialNext<CR>";
|
||||
}
|
||||
{
|
||||
key = "fs";
|
||||
key = "<leader>fs";
|
||||
mode = "n";
|
||||
action = # vim
|
||||
":Telescope aerial<CR>";
|
||||
@@ -54,7 +54,7 @@ in
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "fs";
|
||||
__unkeyed-1 = "<leader>fs";
|
||||
group = "Symbols";
|
||||
icon = "";
|
||||
}
|
||||
|
||||
@@ -13,19 +13,19 @@ in
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"ff" = {
|
||||
"<leader>ff" = {
|
||||
action = "git_files";
|
||||
mode = "n";
|
||||
};
|
||||
"fa" = {
|
||||
"<leader>fa" = {
|
||||
action = "find_files";
|
||||
mode = "n";
|
||||
};
|
||||
"fg" = {
|
||||
"<leader>fg" = {
|
||||
action = "live_grep";
|
||||
mode = "n";
|
||||
};
|
||||
"fc" = {
|
||||
"<leader>fc" = {
|
||||
action = "buffers";
|
||||
mode = "n";
|
||||
};
|
||||
@@ -33,27 +33,27 @@ in
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "f";
|
||||
__unkeyed-1 = "<leader>f";
|
||||
group = "Find";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "ff";
|
||||
__unkeyed-1 = "<leader>ff";
|
||||
desc = "File";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "fa";
|
||||
__unkeyed-1 = "<leader>fa";
|
||||
desc = "All Files";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "fg";
|
||||
__unkeyed-1 = "<leader>fg";
|
||||
desc = "Grep";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "fc";
|
||||
__unkeyed-1 = "<leader>fc";
|
||||
desc = "Current";
|
||||
icon = "";
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
keymaps = [
|
||||
{
|
||||
key = "ft";
|
||||
key = "<leader>t";
|
||||
mode = "n";
|
||||
action = # vim
|
||||
"<cmd>:Neotree toggle<CR>";
|
||||
@@ -20,24 +20,28 @@ in
|
||||
web-devicons.enable = true;
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
filesystem = {
|
||||
useLibuvFileWatcher = true;
|
||||
followCurrentFile.enabled = true;
|
||||
filteredItems.visible = true;
|
||||
settings = {
|
||||
event_handlers = [
|
||||
{
|
||||
event = "neo_tree_buffer_leave";
|
||||
handler.__raw = ''
|
||||
function()
|
||||
require('neo-tree').close_all()
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
filesystem = {
|
||||
use_libuv_file_watcher = true;
|
||||
follow_current_file.enabled = true;
|
||||
filtered_items.visible = true;
|
||||
};
|
||||
popupBorderStyle = "rounded";
|
||||
};
|
||||
popupBorderStyle = "rounded";
|
||||
filesystem.window.mappings.f = "noop";
|
||||
window.mappings.f = "noop";
|
||||
eventHandlers.neo_tree_buffer_leave = # lua
|
||||
''
|
||||
function()
|
||||
require('neo-tree').close_all()
|
||||
end
|
||||
'';
|
||||
};
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "ft";
|
||||
__unkeyed-1 = "<leader>t";
|
||||
desc = "Tree";
|
||||
icon = "";
|
||||
}
|
||||
|
||||
@@ -30,10 +30,14 @@ in
|
||||
cmake.enable = true;
|
||||
clangd = {
|
||||
enable = true;
|
||||
packageFallback = true;
|
||||
cmd = [
|
||||
"clangd"
|
||||
"--offset-encoding=utf-16"
|
||||
"--clang-tidy"
|
||||
"--background-index"
|
||||
"--limit-references=0"
|
||||
"--cross-file-rename"
|
||||
];
|
||||
settings.InlayHints = {
|
||||
Designators = true;
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Thea Schöbl";
|
||||
userEmail = "dev@theaninova.de";
|
||||
signing = {
|
||||
key = "6C9E EFC5 1AE0 0131 78DE B9C8 68FF FB1E C187 88CA";
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
settings = {
|
||||
user = {
|
||||
email = "dev@theaninova.de";
|
||||
name = "Thea Schöbl";
|
||||
};
|
||||
pull.rebase = true;
|
||||
init.defaultBranch = "main";
|
||||
merge = {
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
hlsearch = false;
|
||||
incsearch = true;
|
||||
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
updatetime = 50;
|
||||
|
||||
fillchars.eob = " ";
|
||||
@@ -56,7 +59,6 @@
|
||||
tree.enable = true;
|
||||
};
|
||||
languages = {
|
||||
angular.enable = true;
|
||||
c.enable = true;
|
||||
css = {
|
||||
enable = true;
|
||||
@@ -83,12 +85,117 @@
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
keymaps = [
|
||||
{
|
||||
key = "s";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
action.__raw = "function() require('flash').jump() end";
|
||||
options.desc = "Flash";
|
||||
}
|
||||
{
|
||||
key = "S";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
action.__raw = "function() require('flash').treesitter() end";
|
||||
options.desc = "Flash Treesitter";
|
||||
}
|
||||
{
|
||||
key = "r";
|
||||
mode = "o";
|
||||
action.__raw = "function() require('flash').remote() end";
|
||||
options.desc = "Remote Flash";
|
||||
}
|
||||
{
|
||||
key = "R";
|
||||
mode = [
|
||||
"o"
|
||||
"x"
|
||||
];
|
||||
action.__raw = "function() require('flash').treesitter_search() end";
|
||||
options.desc = "Treesitter Search";
|
||||
}
|
||||
{
|
||||
key = "<c-s>";
|
||||
mode = [
|
||||
"c"
|
||||
];
|
||||
action.__raw = "function() require('flash').toggle() end";
|
||||
options.desc = "Toggle Flash Search";
|
||||
}
|
||||
];
|
||||
vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap)')
|
||||
vim.keymap.set('n', 'S', '<Plug>(leap-from-window)')
|
||||
*/
|
||||
keymaps = [
|
||||
{
|
||||
key = "s";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('leap').leap({
|
||||
windows = { vim.api.nvim_get_current_win() },
|
||||
inclusive = true
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.desc = "Leap";
|
||||
}
|
||||
{
|
||||
key = "R";
|
||||
mode = [
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
action.__raw = ''
|
||||
function ()
|
||||
require('leap.treesitter').select {
|
||||
-- To increase/decrease the selection in a clever-f-like manner,
|
||||
-- with the trigger key itself (vRRRRrr...). The default keys
|
||||
-- (<enter>/<backspace>) also work, so feel free to skip this.
|
||||
opts = require('leap.user').with_traversal_keys('R', 'r')
|
||||
}
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
which-key.enable = true;
|
||||
schemastore.enable = true;
|
||||
todo-comments.enable = true;
|
||||
origami.enable = false;
|
||||
nvim-surround.enable = true;
|
||||
fidget.enable = true;
|
||||
leap = {
|
||||
enable = true;
|
||||
};
|
||||
/*
|
||||
flash = {
|
||||
enable = true;
|
||||
settings = {
|
||||
label = {
|
||||
exclude = "jJxXqQ";
|
||||
rainbow.enabled = true;
|
||||
};
|
||||
search = {
|
||||
mode = "exact";
|
||||
trigger = ";";
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
treesitter-context = {
|
||||
enable = false; # TODO: looks weird with Neovide
|
||||
settings.line_numbers = false;
|
||||
|
||||
@@ -2,27 +2,36 @@ let
|
||||
transparent = color: "alpha(${color}, {{custom.transparency}})";
|
||||
mkBgColor = color: {
|
||||
${color} = {
|
||||
background = "{{colors.${color}.default.hex}}";
|
||||
background_lift = "{{colors.${color}_dim.default.hex}}";
|
||||
background = "{{colors.${color}_dim.default.hex}}";
|
||||
foreground = "{{colors.on_${color}.default.hex}}";
|
||||
};
|
||||
};
|
||||
mkColor = color: {
|
||||
${color} = {
|
||||
standalone = "{{colors.${color}_fixed_dim.default.hex}}";
|
||||
background = "{{colors.${color}_fixed.default.hex}}";
|
||||
foreground = "{{colors.on_${color}_fixed.default.hex}}";
|
||||
};
|
||||
};
|
||||
mkSemantic = color: {
|
||||
${color} = {
|
||||
standalone = "{{colors.${color}.default.hex}}";
|
||||
background = "{{colors.${color}_container.default.hex}}";
|
||||
foreground = "{{colors.on_${color}_container.default.hex}}";
|
||||
background = "{{colors.${color}.default.hex}}";
|
||||
foreground = "{{colors.on_${color}.default.hex}}";
|
||||
};
|
||||
};
|
||||
colors =
|
||||
(mkColor "primary")
|
||||
// (mkColor "secondary")
|
||||
// (mkColor "tertiary")
|
||||
// (mkColor "danger")
|
||||
// (mkColor "warning")
|
||||
// (mkColor "success")
|
||||
// (mkColor "error")
|
||||
// (mkColor "info")
|
||||
// (mkSemantic "danger")
|
||||
// (mkSemantic "warning")
|
||||
// (mkSemantic "success")
|
||||
// (mkSemantic "error")
|
||||
// (mkSemantic "info")
|
||||
// (mkBgColor "background")
|
||||
// (mkBgColor "surface")
|
||||
// (mkBgColor "surface_variant")
|
||||
// {
|
||||
outline = "{{colors.outline.default.hex}}";
|
||||
@@ -40,11 +49,33 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
# https://github.com/AvengeMedia/DankMaterialShell/blob/master/matugen/templates/gtk-colors.css
|
||||
gtk = rec {
|
||||
accent_color = colors.primary.standalone;
|
||||
accent_bg_color = colors.primary.background;
|
||||
accent_fg_color = colors.primary.foreground;
|
||||
|
||||
window_bg_color = transparent colors.surface.background;
|
||||
window_fg_color = colors.surface.foreground;
|
||||
|
||||
popover_bg_color = transparent colors.surface.background;
|
||||
popover_fg_color = colors.surface.foreground;
|
||||
|
||||
headerbar_bg_color = transparent colors.surface.background;
|
||||
headerbar_fg_color = colors.surface.foreground;
|
||||
|
||||
view_bg_color = transparent colors.surface.background_lift;
|
||||
view_fg_color = colors.surface.foreground;
|
||||
|
||||
card_bg_color = colors.surface.background_lift;
|
||||
card_fg_color = colors.surface.foreground;
|
||||
|
||||
sidebar_bg_color = window_bg_color;
|
||||
sidebar_fg_color = window_fg_color;
|
||||
|
||||
sidebar_border_color = colors.surface.background;
|
||||
sidebar_backdrop_color = window_bg_color;
|
||||
|
||||
destructive_color = colors.danger.standalone;
|
||||
destructive_bg_color = colors.danger.background;
|
||||
destructive_fg_color = colors.danger.foreground;
|
||||
@@ -61,45 +92,31 @@ let
|
||||
error_bg_color = colors.error.background;
|
||||
error_fg_color = colors.error.foreground;
|
||||
|
||||
window_bg_color = transparent colors.background.background;
|
||||
window_fg_color = colors.background.foreground;
|
||||
/*
|
||||
headerbar_border_color = colors.outline;
|
||||
headerbar_backdrop_color = transparent colors.background.background;
|
||||
headerbar_shade_color = colors.shade.default;
|
||||
headerbar_darker_shade_color = colors.shade.darker;
|
||||
|
||||
view_bg_color = transparent colors.background.background;
|
||||
view_fg_color = colors.background.foreground;
|
||||
card_shade_color = colors.shade.default;
|
||||
|
||||
headerbar_bg_color = transparent colors.background.background;
|
||||
headerbar_fg_color = colors.background.foreground;
|
||||
headerbar_border_color = colors.outline;
|
||||
headerbar_backdrop_color = transparent colors.background.background;
|
||||
headerbar_shade_color = colors.shade.default;
|
||||
headerbar_darker_shade_color = colors.shade.darker;
|
||||
dialog_bg_color = transparent colors.background.background;
|
||||
dialog_fg_color = colors.background.foreground;
|
||||
popover_shade_color = colors.shade.default;
|
||||
|
||||
card_bg_color = colors.container.default;
|
||||
card_fg_color = colors.container.foreground;
|
||||
card_shade_color = colors.shade.default;
|
||||
shade_color = colors.shade.default;
|
||||
scrollbar_outline_color = colors.outline;
|
||||
|
||||
dialog_bg_color = transparent colors.background.background;
|
||||
dialog_fg_color = colors.background.foreground;
|
||||
thumbnail_bg_color = colors.secondary.background;
|
||||
thumbnail_fg_color = colors.secondary.foreground;
|
||||
|
||||
popover_bg_color = transparent colors.background.background;
|
||||
popover_fg_color = colors.background.foreground;
|
||||
popover_shade_color = colors.shade.default;
|
||||
sidebar_shade_color = colors.shade.default;
|
||||
|
||||
shade_color = colors.shade.default;
|
||||
scrollbar_outline_color = colors.outline;
|
||||
|
||||
thumbnail_bg_color = colors.secondary.background;
|
||||
thumbnail_fg_color = colors.secondary.foreground;
|
||||
|
||||
sidebar_bg_color = transparent colors.background.background;
|
||||
sidebar_fg_color = colors.background.foreground;
|
||||
sidebar_backdrop_color = transparent colors.background.background;
|
||||
sidebar_shade_color = colors.shade.default;
|
||||
|
||||
secondary_sidebar_bg_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_fg_color = colors.surface_variant.foreground;
|
||||
secondary_sidebar_backdrop_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_shade_color = colors.shade.default;
|
||||
secondary_sidebar_bg_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_fg_color = colors.surface_variant.foreground;
|
||||
secondary_sidebar_backdrop_color = transparent colors.surface_variant.background;
|
||||
secondary_sidebar_shade_color = colors.shade.default;
|
||||
*/
|
||||
};
|
||||
in
|
||||
builtins.concatStringsSep "\n" (
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
general {
|
||||
col.inactive_border = 0x00000000
|
||||
col.active_border = 0x00000000
|
||||
# col.inactive_border = rgba({{colors.surface.default.hex_stripped}}{{custom.transparency_hex | to_lower}})
|
||||
col.active_border = rgb({{colors.primary.default.hex_stripped}})
|
||||
border_size = 4
|
||||
# col.active_border = rgb({{colors.primary.default.hex_stripped}})
|
||||
border_size = 0
|
||||
extend_border_grab_area = 4
|
||||
gaps_in = {{custom.padding}}
|
||||
gaps_out = {{custom.double_padding}}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
@@ -241,7 +242,6 @@ in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
THEME_SERVICE_PATH="${config.xdg.configHome}/systemd/user/theme-init.timer"
|
||||
if [ "$MODE" = "auto" ]; then
|
||||
TIME=$(sunwait poll ${builtins.toString cfg.auto-dark.lat}N ${builtins.toString cfg.auto-dark.lon}E || :)
|
||||
@@ -270,29 +270,21 @@ in
|
||||
systemctl --user daemon-reload &> /dev/null || :
|
||||
systemctl --user restart theme-init.timer &> /dev/null || :
|
||||
|
||||
if command -v niri &> /dev/null; then
|
||||
niri msg action do-screen-transition --delay-ms 500
|
||||
fi
|
||||
|
||||
if [ "$MODE" = "light" ]; then
|
||||
GTK_THEME="adw-gtk3"
|
||||
GTK_THEME="adw-gtk3"
|
||||
else
|
||||
GTK_THEME="adw-gtk3-dark"
|
||||
GTK_THEME="adw-gtk3-dark"
|
||||
fi
|
||||
|
||||
matugen image "$WALLPAPER" --type scheme-${cfg.flavour} --contrast ${builtins.toString cfg.contrast} --mode "$MODE"
|
||||
sed -i "s/set background=dark/set background=$MODE/g" ${config.xdg.configHome}/nvim/colors/md3-evo.vim
|
||||
|
||||
dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'"
|
||||
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'"
|
||||
|
||||
if command -v hyprctl &> /dev/null; then
|
||||
hyprctl reload
|
||||
fi
|
||||
|
||||
if which swaync-client; then
|
||||
swaync-client --reload-css
|
||||
fi
|
||||
|
||||
for i in $(pgrep -u "$USER" -x nvim); do
|
||||
kill -USR1 "$i"
|
||||
done
|
||||
dconf write /org/gnome/desktop/interface/icon-theme "'Adwaita'"
|
||||
'';
|
||||
}
|
||||
);
|
||||
@@ -309,6 +301,9 @@ in
|
||||
"@import './theme.css';";
|
||||
gtk4.extraCss = # css
|
||||
"@import './theme.css';";
|
||||
theme = {
|
||||
name = "Adwaita";
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Tela";
|
||||
package = pkgs.tela-icon-theme;
|
||||
@@ -347,19 +342,29 @@ in
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
windowrulev2 = [ "float,class:^(zenity)$" ];
|
||||
decoration.shadow = {
|
||||
enabled = true;
|
||||
range = 16;
|
||||
color = "rgba(00000044)";
|
||||
decoration = {
|
||||
inactive_opacity = 0.8;
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 32;
|
||||
render_power = 8;
|
||||
color = "rgba(000000aa)";
|
||||
color_inactive = "rgba(00000011)";
|
||||
};
|
||||
};
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
bezier = [
|
||||
"expoOut, 0.16, 1, 0.3, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 5, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"windowsIn, 1, 5, expoOut, slide bottom"
|
||||
"windows, 1, 5, expoOut, slide"
|
||||
"windowsOut, 1, 5, expoOut, slide bottom"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 7, default"
|
||||
"fadeShadow, 1, 10, default"
|
||||
"fadeDim, 1, 10, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
@@ -369,12 +374,23 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
programs = {
|
||||
kitty = {
|
||||
extraConfig = ''
|
||||
include ${config.xdg.configHome}/kitty/theme.conf
|
||||
# TODO: include is coming in the next release
|
||||
/*
|
||||
xdg.configFile.niri-config = {
|
||||
enable = osConfig.programs.niri.enable;
|
||||
target = "niri/override.kdl";
|
||||
text = ''
|
||||
include "${config.xdg.configHome}/niri/config.kdl"
|
||||
include "${config.programs.matugen.settings.templates.niri.output_path}"
|
||||
'';
|
||||
};
|
||||
home.sessionVariables.NIRI_CONFIG = "${config.xdg.configHome}/niri/override.kdl";
|
||||
*/
|
||||
|
||||
programs = {
|
||||
kitty.extraConfig = ''
|
||||
include ${config.programs.matugen.settings.templates.kitty.output_path}
|
||||
'';
|
||||
|
||||
nixvim = {
|
||||
opts.termguicolors = true;
|
||||
@@ -395,15 +411,14 @@ in
|
||||
enable = true;
|
||||
settings = {
|
||||
config = {
|
||||
reload_apps = true;
|
||||
version_check = false;
|
||||
|
||||
reload_apps_list = {
|
||||
kitty = config.programs.kitty.enable;
|
||||
waybar = config.programs.waybar.enable;
|
||||
dunst = config.services.dunst.enable;
|
||||
};
|
||||
|
||||
set_wallpaper = true;
|
||||
wallpaper_tool = "Swww";
|
||||
wallpaper.command = lib.getExe pkgs.swww;
|
||||
|
||||
custom_colors =
|
||||
let
|
||||
@@ -455,23 +470,17 @@ in
|
||||
templates =
|
||||
let
|
||||
gtk = pkgs.writeText "gtk4.css" (import ./gtk.nix);
|
||||
signal =
|
||||
name: signal:
|
||||
(pkgs.writeShellScript "kill-${name}" ''
|
||||
pkill -${signal} -u "$USER" -x ${name} || :
|
||||
'');
|
||||
in
|
||||
{
|
||||
kitty = {
|
||||
input_path = ./kitty.conf;
|
||||
output_path = "${config.xdg.configHome}/kitty/theme.conf";
|
||||
};
|
||||
nvim = {
|
||||
input_path = ./nvim.vim;
|
||||
output_path = "${config.xdg.configHome}/nvim/colors/md3-evo.vim";
|
||||
};
|
||||
hyprland = {
|
||||
input_path = ./hyprland.conf;
|
||||
output_path = "${config.xdg.configHome}/hypr/theme.conf";
|
||||
};
|
||||
anyrun = {
|
||||
input_path = ./anyrun.css;
|
||||
output_path = "${config.xdg.configHome}/anyrun/theme.css";
|
||||
post_hook = signal "nvim" "USR1";
|
||||
};
|
||||
gtk3 = {
|
||||
input_path = gtk;
|
||||
@@ -485,15 +494,49 @@ in
|
||||
input_path = ./discord.css;
|
||||
output_path = "${config.xdg.configHome}/vesktop/themes/matugen.theme.css";
|
||||
};
|
||||
}
|
||||
// (lib.optionalAttrs osConfig.programs.niri.enable {
|
||||
niri = {
|
||||
input_path = ./niri.kdl;
|
||||
output_path = "${config.xdg.configHome}/niri/md3-evo.kdl";
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs config.programs.kitty.enable {
|
||||
kitty = {
|
||||
input_path = ./kitty.conf;
|
||||
output_path = "${config.xdg.configHome}/kitty/theme.conf";
|
||||
post_hook = signal ".kitty-wrapped" "USR1";
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs osConfig.programs.hyprland.enable {
|
||||
hyprland = {
|
||||
input_path = ./hyprland.conf;
|
||||
output_path = "${config.xdg.configHome}/hypr/theme.conf";
|
||||
post_hook = pkgs.writeShellScript "reload-hyprland-theme" ''
|
||||
if command -v hyprctl &> /dev/null; then
|
||||
hyprctl reload
|
||||
fi
|
||||
'';
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs config.programs.waybar.enable {
|
||||
waybar = {
|
||||
input_path = ./waybar.css;
|
||||
output_path = "${config.xdg.configHome}/waybar/style.css";
|
||||
post_hook = signal "waybar" "USR2";
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs config.services.swaync.enable {
|
||||
swaync = {
|
||||
input_path = ./swaync.css;
|
||||
output_path = "${config.xdg.configHome}/swaync/style.css";
|
||||
post_hook = pkgs.writeShellScript "reload-swaync" ''
|
||||
if which swaync-client; then
|
||||
swaync-client --reload-css
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
12
modules/home-manager/theme/niri.kdl
Normal file
12
modules/home-manager/theme/niri.kdl
Normal file
@@ -0,0 +1,12 @@
|
||||
layout {
|
||||
gaps {{custom.padding}}
|
||||
struts {{custom.double_padding}}
|
||||
}
|
||||
|
||||
overview {
|
||||
backdrop-color "{{colors.surface.default.hex}}"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius {{custom.radius}}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ let g:terminal_color_14 = "{{colors.cyan.default.hex}}"
|
||||
let g:terminal_color_15 = "{{colors.on_surface_variant.default.hex}}"
|
||||
set termguicolors
|
||||
|
||||
set background=dark
|
||||
set background={{mode | to_lower}}
|
||||
|
||||
if exists("g:neovide")
|
||||
hi! Normal guibg={{colors.surface.default.hex}} guifg={{colors.on_surface.default.hex}}
|
||||
@@ -72,7 +72,12 @@ hi! TabLineFill guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.d
|
||||
|
||||
hi! SpecialKey guifg={{colors.primary.default.hex}}
|
||||
hi! Directory guifg={{colors.primary.default.hex}}
|
||||
hi! Search guifg={{colors.on_tertiary.default.hex}} guibg={{colors.tertiary.default.hex}}
|
||||
|
||||
hi! Search guifg={{colors.on_primary.default.hex}} guibg={{colors.primary.default.hex}}
|
||||
hi! link IncSearch Search
|
||||
hi! link CurSearch Search
|
||||
hi! link LeapMatch Search
|
||||
hi! link LeapLabel Search
|
||||
|
||||
hi! CmpItemKindCopilot guifg={{colors.cyan.default.hex}}
|
||||
hi! CmpItemKindNpm guifg={{colors.red.default.hex}}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
./boot/quiet.nix
|
||||
|
||||
./desktops/hyprland.nix
|
||||
./desktops/niri.nix
|
||||
|
||||
./fonts/fira-code.nix
|
||||
./fonts/noto-sans.nix
|
||||
@@ -19,6 +20,7 @@
|
||||
./hardware/amdgpu.nix
|
||||
./hardware/cc1.nix
|
||||
./hardware/fv43u.nix
|
||||
./hardware/pimax.nix
|
||||
./hardware/q3279vwf.nix
|
||||
./hardware/virtual-camera.nix
|
||||
|
||||
|
||||
@@ -27,10 +27,14 @@ in
|
||||
systemd.enable = false;
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
settings.ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
settings = {
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
};
|
||||
};
|
||||
plugins = with pkgs.hyprlandPlugins; [
|
||||
];
|
||||
};
|
||||
home = {
|
||||
packages = with pkgs; [ grim ];
|
||||
|
||||
164
modules/nixos/desktops/niri.nix
Normal file
164
modules/nixos/desktops/niri.nix
Normal file
@@ -0,0 +1,164 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.desktops.niri;
|
||||
in
|
||||
{
|
||||
options.desktops.niri = {
|
||||
enable = lib.mkEnableOption "Enable a DE based on Niri";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri.enable = true;
|
||||
|
||||
home-manager.users.${username} = {
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GDK_BACKEND = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
xwayland-satellite
|
||||
# fonts
|
||||
noto-fonts
|
||||
# gnome packages
|
||||
qalculate-gtk
|
||||
evince
|
||||
baobab
|
||||
gnome.gvfs
|
||||
nautilus
|
||||
simple-scan
|
||||
eog
|
||||
ghex
|
||||
gnome-disk-utility
|
||||
# fixes
|
||||
xorg.xrandr
|
||||
];
|
||||
|
||||
pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
niri.settings = {
|
||||
binds = {
|
||||
"Mod+Left".action.focus-column-left = [ ];
|
||||
"Mod+Right".action.focus-column-right = [ ];
|
||||
"Mod+Up".action.focus-window-or-workspace-up = [ ];
|
||||
"Mod+Down".action.focus-window-or-workspace-down = [ ];
|
||||
|
||||
"Mod+WheelScrollUp".action.focus-column-left = [ ];
|
||||
"Mod+WheelScrollDown".action.focus-column-right = [ ];
|
||||
|
||||
"Mod+Shift+Left".action.move-column-left = [ ];
|
||||
"Mod+Shift+Right".action.move-column-right = [ ];
|
||||
"Mod+Shift+Up".action.move-window-up-or-to-workspace-up = [ ];
|
||||
"Mod+Shift+Down".action.move-window-down-or-to-workspace-down = [ ];
|
||||
|
||||
"Mod+C".action.close-window = [ ];
|
||||
/*
|
||||
"Mod+M".action.spawn = [
|
||||
(pkgs.writeShellScript "qalculate" ''
|
||||
if niri msg --json windows | jq -e 'any(.[]; .app_id == "qalculate-gtk")'; then
|
||||
pkill qalculate-gtk
|
||||
else
|
||||
qalculate-gtk &
|
||||
fi
|
||||
'')
|
||||
];
|
||||
*/
|
||||
|
||||
"Mod+T".action.spawn = [ "kitty" ];
|
||||
|
||||
"Mod+V".action.maximize-column = [ ];
|
||||
"Mod+D".action.fullscreen-window = [ ];
|
||||
"Mod+P".action.toggle-window-floating = [ ];
|
||||
|
||||
"Mod+Shift+V".action.screenshot = [ ];
|
||||
# "Mod+Shift+C".action.pick-color = [ ];
|
||||
};
|
||||
overview.zoom = 0.8;
|
||||
window-rules = [
|
||||
{
|
||||
clip-to-geometry = true;
|
||||
tiled-state = true;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "neovide"; } ];
|
||||
default-column-width.fixed = 1300;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "firefox"; } ];
|
||||
default-column-width.fixed = 1500;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "qalculate-gtk"; } ];
|
||||
open-floating = true;
|
||||
default-column-width.fixed = 1000;
|
||||
default-window-height.fixed = 800;
|
||||
default-floating-position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
relative-to = "bottom";
|
||||
};
|
||||
}
|
||||
];
|
||||
layout = {
|
||||
always-center-single-column = true;
|
||||
center-focused-column = "always";
|
||||
focus-ring.enable = false;
|
||||
border.enable = false;
|
||||
};
|
||||
input = {
|
||||
mouse.accel-profile = "flat";
|
||||
warp-mouse-to-focus.enable = true;
|
||||
focus-follows-mouse = {
|
||||
enable = false;
|
||||
max-scroll-amount = "5%";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
kmscon = {
|
||||
enable = true;
|
||||
hwRender = true;
|
||||
};
|
||||
greetd = {
|
||||
enable = true;
|
||||
greeterManagesPlymouth = false;
|
||||
settings = {
|
||||
initial_session = {
|
||||
command = "${pkgs.niri}/bin/niri-session";
|
||||
user = username;
|
||||
};
|
||||
default_session = {
|
||||
command = "${lib.getExe pkgs.tuigreet} --asterisks --remember --user-menu --cmd '${pkgs.niri}/bin/niri-session'";
|
||||
user = username;
|
||||
};
|
||||
};
|
||||
};
|
||||
dbus = {
|
||||
enable = true;
|
||||
implementation = "broker";
|
||||
};
|
||||
pcscd.enable = true;
|
||||
gvfs.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -16,7 +16,6 @@ in
|
||||
type = types.listOf types.str;
|
||||
description = mdDoc "[Stylistic sets](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets) for Fira Code";
|
||||
default = [
|
||||
"zero"
|
||||
"onum"
|
||||
"ss04"
|
||||
"cv19"
|
||||
|
||||
@@ -26,7 +26,7 @@ in
|
||||
[
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
noto-fonts-color-emoji
|
||||
]
|
||||
++ (if (config.fonts.nerd-fonts.enable) then [ nerd-fonts.noto ] else [ ]);
|
||||
fontconfig = {
|
||||
|
||||
@@ -47,7 +47,7 @@ in
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
amdgpu_top
|
||||
glxinfo
|
||||
mesa-demos
|
||||
libva-utils
|
||||
vulkan-tools
|
||||
clinfo
|
||||
|
||||
@@ -15,7 +15,7 @@ in
|
||||
enable = mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
|
||||
hdr = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
default = false;
|
||||
description = "Enable HDR support for the Gigabyte FV43U monitor.";
|
||||
};
|
||||
};
|
||||
@@ -26,7 +26,7 @@ in
|
||||
boot.kernelParams = [ "video=DP-3:3840x2160-30@144" ];
|
||||
services.colord.enable = true;
|
||||
environment.systemPackages = [
|
||||
(pkgs.runCommandNoCC "fv43u_icc" { } ''
|
||||
(pkgs.runCommand "fv43u_icc" { } ''
|
||||
mkdir -p $out/share/color/icc
|
||||
cp ${./fv43u.icc} $out/share/color/icc/fv43u.icc
|
||||
'')
|
||||
@@ -43,12 +43,26 @@ in
|
||||
gpu-context = "waylandvk";
|
||||
target-colorspace-hint = "auto";
|
||||
};
|
||||
programs.niri.settings = {
|
||||
prefer-no-csd = true;
|
||||
outputs."DP-3" = {
|
||||
scale = 1;
|
||||
mode = {
|
||||
width = 3840;
|
||||
height = 2160;
|
||||
refresh = 143.999;
|
||||
};
|
||||
variable-refresh-rate = "on-demand";
|
||||
};
|
||||
layout.struts.top = 80;
|
||||
};
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general.layout = "master";
|
||||
master = {
|
||||
orientation = "center";
|
||||
slave_count_for_center_master = 0;
|
||||
mfact = 0.4;
|
||||
allow_small_split = true;
|
||||
};
|
||||
render.direct_scanout = 0;
|
||||
/*
|
||||
@@ -64,9 +78,9 @@ in
|
||||
scale = 1;
|
||||
bitdepth = 10;
|
||||
addreserved = "340,0,0,0";
|
||||
cm = if cfg.hdr then "hdr" else "srgb";
|
||||
cm = if cfg.hdr then "hdredid" else "srgb";
|
||||
sdr_min_luminance = 0.25;
|
||||
sdr_max_luminance = 400;
|
||||
sdr_max_luminance = 250;
|
||||
};
|
||||
xwayland.force_zero_scaling = true;
|
||||
misc.vrr = 2; # VA suffers from VRR flicker
|
||||
|
||||
@@ -27,7 +27,7 @@ in
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
glxinfo
|
||||
mesa-demos
|
||||
libva-utils
|
||||
vulkan-tools
|
||||
];
|
||||
|
||||
@@ -67,7 +67,7 @@ in
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
};
|
||||
systemPackages = with pkgs; [
|
||||
glxinfo
|
||||
mesa-demos
|
||||
nvtopPackages.nvidia
|
||||
libva-utils
|
||||
vulkan-tools
|
||||
|
||||
92
modules/nixos/hardware/pimax.nix
Normal file
92
modules/nixos/hardware/pimax.nix
Normal file
@@ -0,0 +1,92 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.hardware.pimax;
|
||||
in
|
||||
{
|
||||
options.hardware.pimax = {
|
||||
enable = mkEnableOption "";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
let
|
||||
monado-pimax =
|
||||
# https://gitlab.freedesktop.org/Coreforge/monado/-/commits/pimax?ref_type=heads
|
||||
pkgs.monado.overrideAttrs {
|
||||
pname = "monado-pimax";
|
||||
patches = [ ];
|
||||
src = pkgs.fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "Coreforge";
|
||||
repo = "monado";
|
||||
rev = "f858ee5dd8ca7696bd9219e8278f2671df56fe6e";
|
||||
hash = "sha256-Si56yvG+oSfyUaPAlF1FgB7WJo8td1xuVxYnkJvbu4o=";
|
||||
};
|
||||
};
|
||||
monado-pimax-new =
|
||||
# https://gitlab.freedesktop.org/Coreforge/monado/-/commits/pimax?ref_type=heads
|
||||
pkgs.monado.overrideAttrs {
|
||||
pname = "monado-pimax";
|
||||
patches = [ ];
|
||||
src = pkgs.fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "Coreforge";
|
||||
repo = "monado";
|
||||
rev = "f712f680dd57753a31d2605ae1505b06f30d50eb";
|
||||
hash = "sha256-ke7UXimIvPBDvBU7RV7Q8fAum5LYnHC64NLA7x3XftU=";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
opencomposite
|
||||
];
|
||||
|
||||
home-manager.users."${username}".xdg.configFile = {
|
||||
"openxr/1/active_runtime.json".source = "${monado-pimax}/share/openxr/1/openxr_monado.json";
|
||||
"openvr/openvrpaths.vrpath".text = builtins.toJSON {
|
||||
config = [ "~/.local/share/Steam/config" ];
|
||||
external_drivers = null;
|
||||
jsonid = "vrpathreg";
|
||||
log = [ "~/.local/share/Steam/logs" ];
|
||||
runtime = [ "${pkgs.opencomposite}/lib/opencomposite" ];
|
||||
version = 1;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelPatches = [
|
||||
{
|
||||
name = "pimax-quirks";
|
||||
patch = ./pimax.patch;
|
||||
}
|
||||
{
|
||||
name = "amdgpu-ignore-ctx-privileges";
|
||||
patch = pkgs.fetchpatch {
|
||||
name = "cap_sys_nice_begone.patch";
|
||||
url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch";
|
||||
hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
services.monado = {
|
||||
enable = true;
|
||||
defaultRuntime = true;
|
||||
highPriority = true;
|
||||
package = monado-pimax;
|
||||
};
|
||||
|
||||
systemd.user.services.monado.environment = {
|
||||
STEAMVR_LH_ENABLE = "1";
|
||||
XRT_COMPOSITOR_COMPUTE = "1";
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
31
modules/nixos/hardware/pimax.patch
Normal file
31
modules/nixos/hardware/pimax.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 13da539f1115fe9803ea5570be0d9ec5310e404c Mon Sep 17 00:00:00 2001
|
||||
From: Sefa Eyeoglu <contact@scrumplex.net>
|
||||
Date: Mon, 20 May 2024 18:28:39 +0200
|
||||
Subject: [PATCH] drm/edid: add non-desktop quirk to Pimax VR headsets
|
||||
|
||||
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
||||
---
|
||||
drivers/gpu/drm/drm_edid.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
|
||||
index 0f7c4c5b14b9..87ca0637732b 100644
|
||||
--- a/drivers/gpu/drm/drm_edid.c
|
||||
+++ b/drivers/gpu/drm/drm_edid.c
|
||||
@@ -237,6 +237,13 @@ static const struct edid_quirk {
|
||||
EDID_QUIRK('S', 'E', 'C', 0x144a, EDID_QUIRK_NON_DESKTOP),
|
||||
EDID_QUIRK('A', 'U', 'S', 0xc102, EDID_QUIRK_NON_DESKTOP),
|
||||
|
||||
+ /* Pimax VR Headsets */
|
||||
+ EDID_QUIRK('O', 'V', 'R', 0x0003, EDID_QUIRK_NON_DESKTOP),
|
||||
+ EDID_QUIRK('S', 'V', 'R', 0x1019, EDID_QUIRK_NON_DESKTOP),
|
||||
+ EDID_QUIRK('P', 'V', 'R', 0x1019, EDID_QUIRK_NON_DESKTOP),
|
||||
+ EDID_QUIRK('P', 'V', 'R', 0x101a, EDID_QUIRK_NON_DESKTOP),
|
||||
+ EDID_QUIRK('P', 'V', 'R', 0x101b, EDID_QUIRK_NON_DESKTOP),
|
||||
+
|
||||
/* Sony PlayStation VR Headset */
|
||||
EDID_QUIRK('S', 'N', 'Y', 0x0704, EDID_QUIRK_NON_DESKTOP),
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
||||
@@ -36,6 +36,23 @@ in
|
||||
"move ${pipPadding} ${pipPadding},${firefoxPipInitial}"
|
||||
];
|
||||
};
|
||||
programs.niri.settings.window-rules = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
app-id = "firefox";
|
||||
title = "Picture-in-Picture";
|
||||
}
|
||||
];
|
||||
open-focused = false;
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = homeConfig.theme.md3-evo.padding;
|
||||
y = homeConfig.theme.md3-evo.padding;
|
||||
relative-to = "top-left";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ in
|
||||
"ignorealpha 0.3, anyrun"
|
||||
];
|
||||
};
|
||||
programs.niri.settings.binds."Mod+Space".action.spawn = [ (lib.getExe pkgs.walker) ];
|
||||
home.packages = with pkgs; [
|
||||
walker
|
||||
wl-clipboard
|
||||
|
||||
@@ -20,6 +20,8 @@ in
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
|
||||
height = 24;
|
||||
reload_style_on_change = true;
|
||||
exclusive = true;
|
||||
@@ -35,25 +37,24 @@ in
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
modules-right =
|
||||
[
|
||||
"privacy"
|
||||
"gamemode"
|
||||
"tray"
|
||||
"pulseaudio"
|
||||
]
|
||||
++ (
|
||||
if cfg.mobile then
|
||||
[ "backlight" ]
|
||||
else
|
||||
[
|
||||
"custom/brightness"
|
||||
]
|
||||
)
|
||||
++ [
|
||||
# "custom/theme"
|
||||
# "network"
|
||||
];
|
||||
modules-right = [
|
||||
"privacy"
|
||||
"gamemode"
|
||||
"tray"
|
||||
"pulseaudio"
|
||||
]
|
||||
++ (
|
||||
if cfg.mobile then
|
||||
[ "backlight" ]
|
||||
else
|
||||
[
|
||||
"custom/brightness"
|
||||
]
|
||||
)
|
||||
++ [
|
||||
# "custom/theme"
|
||||
# "network"
|
||||
];
|
||||
|
||||
"pulseaudio" = {
|
||||
format = "{icon} {volume}%";
|
||||
|
||||
@@ -28,18 +28,20 @@ in
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
steam
|
||||
cubyz-bin
|
||||
oversteer
|
||||
obs-studio
|
||||
(lutris.override {
|
||||
extraLibraries =
|
||||
pkgs: with pkgs; [
|
||||
libgudev
|
||||
libvdpau
|
||||
];
|
||||
})
|
||||
rpcs3
|
||||
/*
|
||||
(lutris.override {
|
||||
extraLibraries =
|
||||
pkgs: with pkgs; [
|
||||
libgudev
|
||||
libvdpau
|
||||
];
|
||||
})
|
||||
*/
|
||||
# rpcs3
|
||||
bottles
|
||||
wineWowPackages.stagingFull
|
||||
wineWow64Packages.stagingFull
|
||||
winetricks
|
||||
protontricks
|
||||
|
||||
@@ -28,25 +28,34 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
# WARN: sometimes the VM will place hard-coded/hashed paths in the config,
|
||||
# which breaks after NixOS updates because hashes change.
|
||||
# The error might look something like
|
||||
# "Unable to find efi firmware that is compatible with the current configuration".
|
||||
# To fix this, manually edit the VM config in the VM manager in the XML tab of the Boot Options.
|
||||
# Replace
|
||||
# <loader readonly="yes" secure="yes" type="pflash" format="raw">/nix/store/yd1rlziy0cnjjp78zc7wr9dcv5hah16w-qemu-10.1.0/share/qemu/edk2-x86_64-secure-code.fd</loader>
|
||||
# <nvram template="/nix/store/yd1rlziy0cnjjp78zc7wr9dcv5hah16w-qemu-10.1.0/share/qemu/edk2-i386-vars.fd" templateFormat="raw" format="raw">/var/lib/libvirt/qemu/nvram/win11_VARS.fd</nvram>
|
||||
# with
|
||||
# <loader readonly="yes" secure="yes" type="pflash" format="raw">/run/libvirt/nix-ovmf/edk2-x86_64-secure-code.fd</loader>
|
||||
# <nvram template="/run/libvirt/nix-ovmf/edk2-i386-vars.fd" templateFormat="raw" format="raw">/var/lib/libvirt/qemu/nvram/win11_VARS.fd</nvram>
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virt-viewer
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
win-virtio
|
||||
virtio-win
|
||||
win-spice
|
||||
adwaita-icon-theme
|
||||
qemu
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
qemu.swtpm.enable = true;
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
@@ -94,8 +94,8 @@ in
|
||||
".zshenv".enable = lib.mkIf itgr.zsh false;
|
||||
# This might break some stuff, see
|
||||
# https://github.com/nix-community/home-manager/blob/bfa7c06436771e3a0c666ccc6ee01e815d4c33aa/modules/config/home-cursor.nix#L152
|
||||
".icons/default/index.theme".enable = lib.mkIf itgr.home-cursor false;
|
||||
".icons/${homeConfig.home.pointerCursor.name}".enable = lib.mkIf itgr.home-cursor false;
|
||||
# ".icons/default/index.theme".enable = lib.mkIf itgr.home-cursor false;
|
||||
# ".icons/${homeConfig.home.pointerCursor.name}".enable = lib.mkIf itgr.home-cursor false;
|
||||
};
|
||||
gtk.gtk2.configLocation = lib.mkIf itgr.gtk2 "${xdgConfig.configHome}/gtk-2.0/gtkrc";
|
||||
programs = {
|
||||
|
||||
34
overlays/cubyz-bin/assets.nix
Normal file
34
overlays/cubyz-bin/assets.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
version = "0-unstable-2025-09-13";
|
||||
pname = "cubyz-assets";
|
||||
src = fetchFromGitHub {
|
||||
owner = "PixelGuys";
|
||||
repo = "Cubyz-Assets";
|
||||
rev = "fc6e9a79b7806fe753799ac0ebe83735da9cd999";
|
||||
hash = "sha256-adMgfoAlyqRTIO8R42djn6FbLoDpFZDcWQdbm9f0p+A=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -r $src/* $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/PixelGuys/Cubyz-assets";
|
||||
description = "Cache for large assets, like music, used by Cubyz";
|
||||
license = lib.licenses.gpl3Only;
|
||||
mainProgram = "cubyz";
|
||||
maintainers = with lib.maintainers; [ leha44581 ];
|
||||
};
|
||||
})
|
||||
121
overlays/cubyz-bin/default.nix
Normal file
121
overlays/cubyz-bin/default.nix
Normal file
@@ -0,0 +1,121 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
callPackage,
|
||||
makeWrapper,
|
||||
libx11,
|
||||
libxcursor,
|
||||
libGL,
|
||||
alsa-lib,
|
||||
vulkan-loader,
|
||||
vulkan-validation-layers,
|
||||
vulkan-tools,
|
||||
zig,
|
||||
}:
|
||||
|
||||
let
|
||||
# This is kinda atrocious, but it works
|
||||
# Override default zig flags
|
||||
zig_hook =
|
||||
(zig.overrideAttrs {
|
||||
version = "0.15.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ziglang";
|
||||
repo = "zig";
|
||||
rev = "bd97b66186dabb3533df1ea9eb650d7574496a59";
|
||||
hash = "sha256-EVIg01kQ3JCZxnnrk6qMJn3Gm3+BZzPs75x9Q+sxqBw=";
|
||||
};
|
||||
}).hook.overrideAttrs
|
||||
{
|
||||
zig_default_flags = "";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
version = "0.0.1";
|
||||
pname = "cubyz";
|
||||
src = fetchFromGitHub {
|
||||
owner = "pixelguys";
|
||||
repo = "cubyz";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-SbMRr4kktwagYUyVBKFZLOwgSmkPngV8NbwkJRk2Zvg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
|
||||
'';
|
||||
|
||||
preBuild = "
|
||||
mkdir -p ../Cubyz-libs/zig-out
|
||||
ln -s ${callPackage ./libs.nix { }}/* ../Cubyz-libs/zig-out/
|
||||
";
|
||||
|
||||
nativeBuildInputs = [
|
||||
zig_hook # Needed for building zig stuff
|
||||
makeWrapper # Needed for env variables
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libx11
|
||||
libGL
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
vulkan-tools
|
||||
libxcursor
|
||||
alsa-lib
|
||||
];
|
||||
|
||||
zigBuildFlags = [
|
||||
#"-j6" # Included in zig default flags
|
||||
"-Dcpu=baseline" # Included in zig default flags
|
||||
"-Drelease"
|
||||
"-Dlocal" # Use local libraries
|
||||
"-Doptimize=ReleaseSafe"
|
||||
];
|
||||
|
||||
# Symlink the assets to $out, add a desktop entry
|
||||
postBuild = ''
|
||||
mkdir -p $out/assets/cubyz
|
||||
ln -s ${callPackage ./assets.nix { }}/* $out/assets/cubyz/
|
||||
ln -s $src/assets/cubyz/* $out/assets/cubyz/
|
||||
|
||||
printf "
|
||||
[Desktop Entry]
|
||||
Name=Cubyz
|
||||
Exec=$out/bin/Cubyz
|
||||
Icon=$out/assets/cubyz/logo.png
|
||||
Type=Application
|
||||
Categories=Game;
|
||||
" > $out/cubyz.desktop
|
||||
'';
|
||||
|
||||
# Change some env variables, move a bunch of stuff under .config for modding purposes, symlink a desktop entry
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/Cubyz \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}" \
|
||||
--prefix VK_LAYER_PATH : "${vulkan-validation-layers}/share/vulkan/explicit_layer.d" \
|
||||
--run "
|
||||
cd \$HOME/.config/cubyz
|
||||
mkdir -p \$HOME/.config/cubyz/logs
|
||||
mkdir -p \$HOME/.config/cubyz/assets
|
||||
[ ! -d \$HOME/.config/cubyz/assets/cubyz ] && cp -pr $out/assets/cubyz \$HOME/.config/cubyz/assets/
|
||||
|
||||
[ ! -f \$HOME/.config/cubyz/launchConfig.zon ] && printf \".{
|
||||
.cubyzDir = \\\"\$HOME/.config/cubyz\\\",
|
||||
}\" > \$HOME/.config/cubyz/launchConfig.zon
|
||||
|
||||
[ ! -l \$HOME/.local/share/applications/cubyz.desktop ] && ln -sf $out/cubyz.desktop \$HOME/.local/share/applications/cubyz.desktop
|
||||
"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/PixelGuys/Cubyz";
|
||||
description = "Voxel sandbox game with a large render distance, procedurally generated content and some cool graphical effects";
|
||||
changelog = "https://github.com/PixelGuys/Cubyz/releases/tag/${finalAttrs.version}";
|
||||
license = lib.licenses.gpl3Only;
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "cubyz";
|
||||
maintainers = with lib.maintainers; [ leha44581 ];
|
||||
};
|
||||
})
|
||||
67
overlays/cubyz-bin/deps.nix
Normal file
67
overlays/cubyz-bin/deps.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
# generated by zon2nix (https://github.com/nix-community/zon2nix)
|
||||
|
||||
{
|
||||
linkFarm,
|
||||
fetchzip,
|
||||
fetchgit,
|
||||
}:
|
||||
|
||||
linkFarm "zig-packages" [
|
||||
{
|
||||
name = "N-V-__8AAAI8tQKULcx4VW98BqluDNYJhHtN2OBlFw2Cm19f";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/8/cubyz_deps_aarch64-windows-gnu.tar.gz";
|
||||
hash = "sha256-hLn1ppvYtpj2SzPR9TnHIKUqp9cjW4Wvnpjn+hMzyFE=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAAxDUATPdad1MQC8jeiFsoXRet_SvG6acW5Dmxdh";
|
||||
path = fetchgit {
|
||||
url = "https://github.com/PixelGuys/Cubyz-Assets/";
|
||||
rev = "e0ea686f86c008b29cd109e1bdd757ce6574eaf3";
|
||||
hash = "sha256-/Yl8z3KPK07/zedSjdQDgnWF2FWFVp+OIgWeQcepzfY=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AADJklgJD6krSuvgtV1hLIkVBhgIjmFZVB-Yzu9F8";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/8/cubyz_deps_aarch64-linux-musl.tar.gz";
|
||||
hash = "sha256-1OV6MNCoOnaVRWbs9Ln879ItoeMBS6hJOqG/oTCe2PQ=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAESlRAJiVpVgSi6YuJieVxeJkkCVVsorbxiSyRyZ";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/8/cubyz_deps_aarch64-macos-none.tar.gz";
|
||||
hash = "sha256-L2J87H61k7Ki5/EnVjNWXnsrwSVU/1WlysR/AqbstuU=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAI-aOwAGCfJiF1xWZSQ0yxGSyyuj-VO5P_UqqyJ0";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/8/cubyz_deps_headers.tar.gz";
|
||||
hash = "sha256-HE/C+d7H6eQcr1R0GtBijVWhGtueO6ymQV7hFIsGhbw=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAIKQlALN_67_ilCxZcxIGddSBBi7A4lVVa0jFeW9";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/8/cubyz_deps_x86_64-linux-musl.tar.gz";
|
||||
hash = "sha256-CVXw/7XLVP8iyLIwhQb6QWKOLAjts5VPzqj5Qg9oZJA=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAM4p1wKrLLOhfB8egk7fpA7WnEGIU46h_pKk8Xou";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/8/cubyz_deps_x86_64-windows-gnu.tar.gz";
|
||||
hash = "sha256-lEVL5HT6JBh1rAxk7ClbUtzPBfgNZVuDCfrPiANem2E=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AANi9PQLVH2WpYTmNnlcdBHDkNZI9yJz6fAznklHu";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/PixelGuys/Cubyz-Libs/releases/download/8/cubyz_deps_x86_64-macos-none.tar.gz";
|
||||
hash = "sha256-kowp1WD8Fa2nV9sQBrbIMHSIpNfDqphcxOLqa7nGRhE=";
|
||||
};
|
||||
}
|
||||
]
|
||||
48
overlays/cubyz-bin/libs.nix
Normal file
48
overlays/cubyz-bin/libs.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
callPackage,
|
||||
zig_0_14,
|
||||
}:
|
||||
|
||||
let
|
||||
zig = zig_0_14;
|
||||
zig_hook = zig.hook.overrideAttrs {
|
||||
zig_default_flags = "";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
version = "8";
|
||||
pname = "cubyz-libs";
|
||||
src = fetchFromGitHub {
|
||||
owner = "pixelguys";
|
||||
repo = "cubyz-libs";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-xg6nk2Oxe7PjT6CbPjDPegcZEn1P36PNc3YKLopb168=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${callPackage ./libsdeps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
zig_hook
|
||||
];
|
||||
|
||||
zigBuildFlags = [
|
||||
#"-j6" # Included in zig default flags
|
||||
"-Dcpu=baseline" # Included in zig default flags
|
||||
"-Dtarget=native-linux-musl"
|
||||
"-Doptimize=ReleaseSafe"
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/PixelGuys/Cubyz-libs";
|
||||
description = "Contains libraries used in Cubyz";
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "cubyz";
|
||||
maintainers = with lib.maintainers; [ leha44581 ];
|
||||
};
|
||||
})
|
||||
59
overlays/cubyz-bin/libsdeps.nix
Normal file
59
overlays/cubyz-bin/libsdeps.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
# generated by zon2nix (https://github.com/nix-community/zon2nix)
|
||||
|
||||
{
|
||||
linkFarm,
|
||||
fetchzip,
|
||||
fetchgit,
|
||||
}:
|
||||
|
||||
linkFarm "zig-packages" [
|
||||
{
|
||||
name = "N-V-__8AAHgEOgBtc1wN1FEbxkhfZ2mjZ1rElhauQ0FnJ-FT";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/KhronosGroup/SPIRV-Headers/archive/09913f088a1197aba4aefd300a876b2ebbaa3391.tar.gz";
|
||||
hash = "sha256-Q1i6i5XimULuGufP6mimwDW674anAETUiIEvDQwvg5Y=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAKLKpwC4H27Ps_0iL3bPkQb-z6ZVSrB-x_3EEkub";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/freetype/freetype/archive/refs/tags/VER-2-13-2.tar.gz";
|
||||
hash = "sha256-Io9k8xmOKrk+4GSi3PUU60X68T4BpG8dru1/KO+jVRk=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAL40TADEbrysYHBl-UIZO4KiG4chP8pLDVDINGH4";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz";
|
||||
hash = "sha256-FcnQPDeNHgov1Z07gjFze0VMz2diOrpbKZCsI96ngz0=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AALI5agF9e8bfTFSiJU8WAeG6Qu90t9vSM9tDsgeL";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/KhronosGroup/SPIRV-Tools/archive/f289d047f49fb60488301ec62bafab85573668cc.tar.gz";
|
||||
hash = "sha256-2Wv0dxVQ8NvuDRTcsXkH1GKmuA6lsIuwTl0j6kbTefo=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAMnvlQXSfQ493UdwXL4VBQdgWMtBZJM2016lE2ns";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/8.2.2.tar.gz";
|
||||
hash = "sha256-UymxU4MiHWuEkpgjMmkRujS+SQC3+YOa4Bs0LGAjp/E=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAP4lXQKz3tL4vtQfkU_xbsKoxat8ehi0lpR9s7-3";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/KhronosGroup/glslang/archive/7200bc12a8979d13b22cd52de80ffb7d41939615.tar.gz";
|
||||
hash = "sha256-HkVRuxxxM7NVUnCj3I0uvj0pHaE6TVnOtX/+3gSU/08=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "glslang-1.4.309-eMn68Pu-CQBK98WlBPbet0hMUVM2hNWdVP4mKn1hNsD-";
|
||||
path = fetchzip {
|
||||
url = "https://github.com/Games-by-Mason/glslang-zig/archive/4d2877072dc0ebb97698e6620a59e55ef3f367ce.tar.gz";
|
||||
hash = "sha256-0Jt+IExSP93qzbl0Q+nxhXoUz1n6lTkk2dEW2s+yeRs=";
|
||||
};
|
||||
}
|
||||
]
|
||||
67
overlays/gamma-launcher/default.nix
Normal file
67
overlays/gamma-launcher/default.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
unrar,
|
||||
}:
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "gamma-launcher";
|
||||
version = "2.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Mord3rca";
|
||||
repo = "gamma-launcher";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-qzjfgDFimEL6vtsJBubY6fHsokilDB248WwHJt3F7fI=";
|
||||
};
|
||||
|
||||
pyproject = true;
|
||||
|
||||
buildInputs = [ python3Packages.setuptools ];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
beautifulsoup4
|
||||
cloudscraper
|
||||
gitpython
|
||||
platformdirs
|
||||
py7zr
|
||||
unrardll
|
||||
requests
|
||||
tenacity
|
||||
tqdm
|
||||
(python3Packages.buildPythonPackage rec {
|
||||
pname = "python-unrar";
|
||||
version = "0.4";
|
||||
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matiasb";
|
||||
repo = "python-unrar";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-JeuMDwKltpp2i7rkGiQ5yAOIEtiUdfhOJGDVAGGib+A=";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace unrar/unrarlib.py \
|
||||
--replace-fail "os.environ.get('UNRAR_LIB_PATH', None)" "r'${unrar}/lib/libunrar.so'"
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "unrar" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Work with RAR archive files through unrar library using ctypes";
|
||||
homepage = "https://github.com/matiasb/python-unrar";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ theaninova ];
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "This is a reimplementation of G.A.M.M.A. launcher used for the first setup";
|
||||
homepage = "https://github.com/Mord3rca/gamma-launcher";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ theaninova ];
|
||||
};
|
||||
}
|
||||
23
overlays/matugen/hm-module.nix
Normal file
23
overlays/matugen/hm-module.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.matugen;
|
||||
in
|
||||
{
|
||||
options.programs.matugen = {
|
||||
enable = lib.mkEnableOption "matugen";
|
||||
package = lib.mkPackageOption pkgs "matugen" { };
|
||||
settings = lib.mkOption { type = lib.types.attrs; };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
xdg.configFile."matugen/config.toml".source = lib.mkIf (cfg.settings != null) (
|
||||
(pkgs.formats.toml { }).generate "matugen" cfg.settings
|
||||
);
|
||||
};
|
||||
}
|
||||
1
rebuild.sh
Executable file
1
rebuild.sh
Executable file
@@ -0,0 +1 @@
|
||||
nixos-rebuild switch --flake .# --log-format internal-json -v |& nom --json
|
||||
Reference in New Issue
Block a user