Compare commits

..

52 Commits

Author SHA1 Message Date
86e0491a97 update system 2026-01-21 13:05:23 +01:00
7a30d561c0 feat: hyprland scrolling 2026-01-18 15:35:34 +01:00
e3e1d93b99 update astro service 2026-01-05 18:11:33 +01:00
648380f91b update system 2026-01-05 13:59:57 +01:00
6cb301eb81 feat: a50 dock service 2026-01-04 23:42:04 +01:00
63a657fc84 update system 2025-12-28 13:03:58 +01:00
a8528b7fcd update system 2025-12-17 13:20:39 +01:00
0b0b568916 update system 2025-12-17 13:12:53 +01:00
02103e2585 update system 2025-12-08 15:14:06 +01:00
de9477ad84 update system 2025-12-08 14:18:53 +01:00
3bf3bf5fa5 update system 2025-11-25 10:20:03 +01:00
ef0b2b07ef stuff 2025-11-25 10:11:11 +01:00
f530957112 feat: nvim 2025-11-20 11:06:28 +01:00
674daa80d1 update system 2025-11-18 12:37:07 +01:00
8ad676580e update system 2025-11-18 11:40:14 +01:00
80d26f037b update system 2025-11-18 11:28:41 +01:00
3b3a15322b update system 2025-11-18 11:07:48 +01:00
d33d53c6fb update system 2025-11-14 14:34:30 +01:00
fc8066a248 feat: cubyz 2025-11-14 13:51:17 +01:00
51196aaefa feat: cubyz 2025-11-12 20:38:35 +01:00
ae93255200 update system 2025-11-07 12:08:23 +01:00
d5eb686f7f update system 2025-11-05 14:13:32 +01:00
69eafb5594 update system 2025-10-20 14:51:44 +02:00
5ad6324de6 update system 2025-10-10 15:38:40 +02:00
c1145e6319 update system 2025-09-30 09:48:38 +02:00
4a6c182385 update system 2025-09-19 13:58:58 +02:00
8198e46252 update system 2025-09-19 13:20:35 +02:00
6d296224ce update system 2025-09-15 10:40:21 +02:00
6145732891 update system 2025-09-02 10:17:05 +02:00
71384d0740 update 2025-08-22 19:01:41 +02:00
d3f752328f update system 2025-08-11 17:15:37 +02:00
5c9bf6838c feat: stuff 2025-08-09 17:41:55 +02:00
75e460293c feat: shark 2025-08-09 17:27:54 +02:00
c570ea0f54 update system 2025-08-08 10:54:39 +02:00
86f5331def feat: change aero layout 2025-07-30 11:35:10 +02:00
e220474055 remove opendyslexic font 2025-07-29 13:54:34 +02:00
7f5076755c aero fixes 2025-07-28 20:43:11 +02:00
e414e3ac7b update system 2025-07-28 20:33:33 +02:00
3fd867084a update system 2025-07-28 13:32:19 +02:00
abace8ec55 update system 2025-07-23 12:05:59 +02:00
af6f381e49 update system 2025-07-14 17:10:26 +02:00
876650cf2e change minecraft server 2025-07-14 16:52:14 +02:00
d570d170f0 feat: add usb sniffer 2025-07-04 19:16:50 +02:00
37b65c6b7f update monitors 2025-06-29 14:35:51 +02:00
8ba3365456 update aero monitor 2025-06-29 14:32:29 +02:00
56f3c3c5e9 update hyprland display stuff 2025-06-29 14:25:08 +02:00
86025dc787 add prism launcher 2025-06-29 11:52:53 +02:00
8cd05c1d8f update system 2025-06-29 11:09:39 +02:00
4103176fa4 use lix 2025-06-20 17:59:20 +02:00
d3de8874bc refactor: restructure 2025-06-20 17:11:43 +02:00
05b437dbf8 update system 2025-06-20 13:14:05 +02:00
62639b6002 feat: update system 2025-05-29 19:56:55 +02:00
107 changed files with 3277 additions and 734 deletions

2
.gitignore vendored
View File

@@ -1 +1,3 @@
result
deploy-luci.sh
deploy-luci-now.sh

View File

@@ -41,6 +41,15 @@ sudo nixos-rebuild switch --flake .#
## Cleaning your system
### Cachix is down
By default nix will just crash if cachix is down even if you don't have to fetch anything from it.
Use `--option build-use-substitutes false` to temporarily disable it.
```sh
sudo nixos-rebuild switch --option build-use-substitutes false --flake .#
```
### Find (accidental) folders holding your gc back
```sh

View File

@@ -0,0 +1 @@
sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPX+YdfBdTBT3wXyWkXt3k+kFYqXxSFMAHE85bOUxkJJAAAABHNzaDo= theaninova@MONSTER

325
flake.lock generated
View File

@@ -1,5 +1,21 @@
{
"nodes": {
"dirt-samples-src": {
"flake": false,
"locked": {
"lastModified": 1698439458,
"narHash": "sha256-Mp8qBpsOvW9Zguv95Kv7EU6S3ICaF2aO02Wz6xGURtE=",
"owner": "tidalcycles",
"repo": "dirt-samples",
"rev": "9a6dff8f9ec3cd55b287290cf04e01afa6b8f532",
"type": "github"
},
"original": {
"owner": "tidalcycles",
"repo": "dirt-samples",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -8,11 +24,11 @@
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"lastModified": 1765835352,
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
"type": "github"
},
"original": {
@@ -21,24 +37,6 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"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"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -46,11 +44,11 @@
]
},
"locked": {
"lastModified": 1746317522,
"narHash": "sha256-/jZ4Wd4HHUEWPSlNj48k1E4Mh+1fUbwI/vSlPPIMG3U=",
"lastModified": 1767556355,
"narHash": "sha256-RDTUBDQBi9D4eD9iJQWtUDN/13MDLX+KmE+TwwNUp2s=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "621986fed37c5d0cb8df010ed8369694dc47c09b",
"rev": "f894bc4ffde179d178d8deb374fcf9855d1a82b7",
"type": "github"
},
"original": {
@@ -59,34 +57,6 @@
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737371634,
"narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.7",
"repo": "ixx",
"type": "github"
}
},
"matugen": {
"inputs": {
"nixpkgs": [
@@ -95,20 +65,78 @@
"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": 1767544157,
"narHash": "sha256-DVTMOUd4uHkDcZXWAqOS+Pa0M9a27G1Ya3B7SFG6BQs=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "d0e2c4bebf9d0b879410736f7abce628976bfb92",
"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": 1767530622,
"narHash": "sha256-ywnL1cc0A6fni7m859ImiBYA8DlXXJ+5OXIlcBqJ2B0=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "54c2e2ab476629d17fdba861895f58e7cdac32ab",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1739444422,
@@ -127,11 +155,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1746232882,
"narHash": "sha256-MHmBH2rS8KkRRdoU/feC/dKbdlMkcNkB5mwkuipVHeQ=",
"lastModified": 1767379071,
"narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7a2622e2c0dbad5c4493cb268aba12896e28b008",
"rev": "fb7944c166a3b630f177938e478f0378e64ce108",
"type": "github"
},
"original": {
@@ -141,20 +169,36 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1767480499,
"narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch"
"systems": "systems_2"
},
"locked": {
"lastModified": 1746309817,
"narHash": "sha256-oqOpTyjdeY+LP+WiU9LxGdZ/bZ9YK7MNzNMDUw98kPM=",
"lastModified": 1767553127,
"narHash": "sha256-H6JzPMmvBYlGjIBgrHIS2dFXh05h4bwMJTZTn3IGVtc=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "c978122396a4208bf1965d346b7456e7256fe70c",
"rev": "3d7bcda3d163c1c38e231f81e0e90155b7b9e9bf",
"type": "github"
},
"original": {
@@ -163,36 +207,31 @@
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1745046075,
"narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=",
"owner": "NuschtOS",
"repo": "search",
"rev": "066afe8643274470f4a294442aadd988356a478f",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"matugen": "matugen",
"niri": "niri",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
"nixvim": "nixvim",
"tidalcycles": "tidalcycles"
}
},
"superdirt-src": {
"flake": false,
"locked": {
"lastModified": 1697377840,
"narHash": "sha256-9qU9CHYAXbN1IE3xXDqGipuroifVaSVXj3c/cDfwM80=",
"owner": "musikinformatik",
"repo": "superdirt",
"rev": "c7f32998572984705d340e7c1b9ed9ad998a39b6",
"type": "github"
},
"original": {
"owner": "musikinformatik",
"repo": "superdirt",
"type": "github"
}
},
"systems": {
@@ -224,6 +263,114 @@
"repo": "default",
"type": "github"
}
},
"tidal-src": {
"flake": false,
"locked": {
"lastModified": 1712519522,
"narHash": "sha256-LbvxQmVxHElidCgvt+w0g1k+QQbNLebK46vtRCgsLeQ=",
"owner": "tidalcycles",
"repo": "tidal",
"rev": "88f09edf6bef2228d5f530dea872b08a9d803066",
"type": "github"
},
"original": {
"owner": "tidalcycles",
"ref": "v1.9.5",
"repo": "tidal",
"type": "github"
}
},
"tidalcycles": {
"inputs": {
"dirt-samples-src": "dirt-samples-src",
"nixpkgs": [
"nixpkgs"
],
"superdirt-src": "superdirt-src",
"tidal-src": "tidal-src",
"vim-tidal-src": "vim-tidal-src",
"vowel-src": "vowel-src"
},
"locked": {
"lastModified": 1730626669,
"narHash": "sha256-nFyZrvTPn9OM9UZmuAwy3e1Ba0ZuYc2FaDCOOhGtqg4=",
"owner": "mitchmindtree",
"repo": "tidalcycles.nix",
"rev": "0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4",
"type": "github"
},
"original": {
"owner": "mitchmindtree",
"ref": "0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4",
"repo": "tidalcycles.nix",
"type": "github"
}
},
"vim-tidal-src": {
"flake": false,
"locked": {
"lastModified": 1685703852,
"narHash": "sha256-8gyk17YLeKpLpz3LRtxiwbpsIbZka9bb63nK5/9IUoA=",
"owner": "tidalcycles",
"repo": "vim-tidal",
"rev": "e440fe5bdfe07f805e21e6872099685d38e8b761",
"type": "github"
},
"original": {
"owner": "tidalcycles",
"repo": "vim-tidal",
"type": "github"
}
},
"vowel-src": {
"flake": false,
"locked": {
"lastModified": 1641306144,
"narHash": "sha256-zfF6cvAGDNYWYsE8dOIo38b+dIymd17Pexg0HiPFbxM=",
"owner": "supercollider-quarks",
"repo": "vowel",
"rev": "ab59caa870201ecf2604b3efdd2196e21a8b5446",
"type": "github"
},
"original": {
"owner": "supercollider-quarks",
"repo": "vowel",
"type": "github"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1755491097,
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"ref": "v0.7",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1766429945,
"narHash": "sha256-9Kv4gWagx/u4RfZJzBMAoagW9ava5waxd+XoTkzqF7E=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "0dde7ca1d3a8e8c5082533d76084e2aa02bef70e",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}
},
"root": "root",

View File

@@ -6,7 +6,7 @@
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 = {
@@ -14,6 +14,14 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
tidalcycles = {
url = "github:mitchmindtree/tidalcycles.nix/?ref=0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@@ -23,29 +31,47 @@
nixvim,
matugen,
nix-flatpak,
niri,
tidalcycles,
...
}@inputs:
let
inherit (nixpkgs.lib) genAttrs;
eachSystem = genAttrs [ "x86_64-linux" ];
legacyPackages = eachSystem (
legacyPackages =
config:
(eachSystem (
system:
import nixpkgs {
inherit system;
config = {
config = config // {
allowUnfree = true;
allowUnsupportedSystem = true;
experimental-features = "nix-command flakes";
permittedInsecurePackages = [ "nix-2.25.0pre20240807_cfe66dbe" ];
};
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 { };
lpc21isp = prev.callPackage ./overlays/lpc21isp { };
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 { };
vimPlugins = prev.vimPlugins // {
strudel-nvim = prev.callPackage ./overlays/strudel-nvim { };
vim-tidal = tidalcycles.packages.${prev.system}.vim-tidal;
};
wireshark = prev.wireshark.overrideAttrs (
finalAttrs: prevAttrs: {
postInstall = prevAttrs.postInstall + ''
ln -s ${final.usb-sniffer}/bin/usb_sniffer $out/lib/wireshark/extcap/usb_sniffer
'';
}
);
plymouth = prev.plymouth.overrideAttrs (
final: prev: {
patches = prev.patches ++ [ ./overlays/plymouth/drm-close-fb.patch ];
@@ -54,20 +80,22 @@
})
];
}
);
));
mkHost =
{
hostname,
username,
system,
config ? { },
}:
nixpkgs.lib.nixosSystem rec {
pkgs = legacyPackages.${system};
pkgs = (legacyPackages config).${system};
modules = [
./modules/nixos
./hosts/${hostname}
home-manager.nixosModules.home-manager
niri.nixosModules.niri
nix-flatpak.nixosModules.nix-flatpak
{
_module.args =
@@ -86,7 +114,22 @@
if config.hardware.nvidia.prime.offload.enable then GPUOffloadApp pkg desktopName else pkg;
in
{
inherit username gpu-offload;
inherit username hostname gpu-offload;
};
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings = {
auto-optimise-store = true;
experimental-features = [
"nix-command"
"flakes"
];
};
gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--deleteOlderThan 10d";
};
};
networking.hostName = hostname;
services.flatpak.enable = true;
@@ -94,12 +137,21 @@
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit username inputs;
inherit username hostname inputs;
};
users.${username} = {
imports = [
matugen.homeManagerModules.default
sharedModules = [
./overlays/matugen/hm-module.nix
nix-flatpak.homeManagerModules.nix-flatpak
nixvim.homeModules.nixvim
./modules/home-manager/modules/nixvim
];
users.${username} = {
nix.gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--deleteOlderThan 10d";
};
imports = [
./modules/home-manager
./hosts/${hostname}/home.nix
];
@@ -116,12 +168,18 @@
hostname = "MONSTER";
username = "theaninova";
system = "x86_64-linux";
config.rocmSupport = true;
};
aero = mkHost {
hostname = "aero";
username = "theaninova";
system = "x86_64-linux";
};
shark = mkHost {
hostname = "shark";
username = "luci";
system = "x86_64-linux";
};
};
nixosModules.theaninovos = import ./modules/nixos;

View File

@@ -2,23 +2,13 @@
{
imports = [ ./hardware-configuration.nix ];
nix = {
package = pkgs.nixVersions.latest;
settings.experimental-features = [
"nix-command"
"flakes"
];
gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--deleteOlderThan 10d";
};
};
boot = {
loader.timeout = 0;
quiet.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_xanmod_stable;
kernelModules = [ "sg" ];
loader = {
systemd-boot = {
@@ -45,9 +35,8 @@
};
shell.components = {
#dunst.enable = true;
firefox-pip.enable = true;
flameshot.enable = true;
grimblast.enable = true;
gnome-keyring.enable = true;
hyprpicker.enable = true;
kde-connect.enable = true;
@@ -56,23 +45,26 @@
walker.enable = true;
waybar.enable = true;
};
desktops = {
hyprland.enable = true;
desktops.hyprland = {
enable = true;
scrolling = true;
};
locale.preset.theaninova.enable = true;
services = {
ollama = {
enable = true;
acceleration = "rocm";
rocmOverrideGfx = "10.3.0";
networking.hosts = {
"127.0.0.1:57461" = [ "ai.local" ];
};
services = {
ollama.enable = false;
open-webui = {
enable = false;
port = 57461;
environment = {
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
WEBUI_AUTH = "False";
};
printing = {
enable = true;
drivers = with pkgs; [
rastertokpsl-re
];
};
xserver.xkb.variant = "altgr-intl";
@@ -80,7 +72,9 @@
airprint.enable = true;
udev.packages = with pkgs; [ android-udev-rules ];
udev.packages = with pkgs; [
usb-sniffer
];
};
hardware = {
@@ -88,17 +82,44 @@
audio.preset.pipewire.enable = true;
cc1.enable = true;
fv43u.enable = true;
virtual-camera.enable = true;
hid-fanatecff.enable = true;
astro-a50.enable = true;
# virtual-camera.enable = true;
# hid-fanatecff.enable = true;
enableAllFirmware = true;
sane.enable = true;
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
virtualisation.oci-containers.containers = {
/*
statech = {
image = "eclipse-temurin:21-jre";
volumes = [ "/home/theaninova/.config/statech:/statech" ];
environment = { };
ports = [ "25565:25565" ];
workdir = "/statech";
entrypoint = "/bin/bash";
cmd = [ "start.sh" ];
extraOptions = [ "--network=host" ];
};
*/
/*
craftoria = {
image = "eclipse-temurin:21-jre";
volumes = [ "/home/theaninova/.config/craftoria:/craftoria" ];
environment = { };
ports = [ "25565:25565" ];
workdir = "/craftoria";
entrypoint = "/bin/bash";
cmd = [ "startserver.sh" ];
extraOptions = [ "--network=host" ];
};
*/
};
fonts = {
fira-code = {
enable = true;
@@ -111,7 +132,15 @@
nerd-fonts.enable = true;
};
programs.zsh.enable = true;
programs = {
zsh.enable = true;
wireshark = {
enable = false;
package = pkgs.wireshark;
usbmon.enable = true;
};
};
security.sudo.configFile = ''
Defaults env_reset,pwfeedback,passprompt="󰟵 "
'';
@@ -119,6 +148,7 @@
users.users.${username} = {
isNormalUser = true;
extraGroups = [
"wireshark"
"scanner"
"lp"
"storage"
@@ -134,9 +164,12 @@
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
# Essential utils
nix-output-monitor
alacritty
usbutils
usbimager
uhubctl
usb-sniffer
pciutils
htop
unar
@@ -159,7 +192,21 @@
];
networking = {
firewall.allowedUDPPorts = [ 50765 ];
firewall = {
allowedTCPPorts = [ 25565 ];
allowedUDPPorts = [
25565
50765
];
/*
allowedUDPPortRanges = [
{
from = 1;
to = 65535;
}
];
*/
};
networkmanager = {
enable = true;

View File

@@ -1,4 +1,4 @@
{ ... }:
{ pkgs, ... }:
{
theme.md3-evo = {
enable = true;
@@ -9,4 +9,44 @@
};
};
programs.zoxide.enable = true;
home.packages = with pkgs; [
hyperhdr
/*
(hyperion-ng.overrideAttrs (
final: prev: rec {
version = "2.1.1";
src = fetchFromGitHub {
owner = "hyperion-project";
repo = prev.pname;
rev = version;
hash = "sha256-lKLXgOrXp8DLmlpQe/33A30l4K9VX8P0q2LUA+lLYws=";
# needed for `dependencies/external/`:
# * rpi_ws281x` - not possible to use as a "system" lib
# * qmdnsengine - not in nixpkgs yet
fetchSubmodules = true;
};
buildInputs = prev.buildInputs ++ [
pkgs.libsForQt5.qtwebsockets
pkgs.libftdi1
];
nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.git ];
cmakeFlags = prev.cmakeFlags ++ [
"-DUSE_SYSTEM_LIBFTDI_LIBS=ON"
];
}
))
*/
];
wayland.windowManager.hyprland.settings.device =
let
targetDPI = 1200;
actualDPI = 3200;
in
[
{
name = "endgame-gear-endgame-gear-op1-8k-v2-gaming-mouse";
sensitivity = builtins.toString (((targetDPI + 0.0) / actualDPI) - 1);
accel_profile = "flat";
}
];
}

View File

@@ -7,19 +7,6 @@
{
imports = [ ./hardware-configuration.nix ];
nix = {
package = pkgs.nixVersions.latest;
settings.experimental-features = [
"nix-command"
"flakes"
];
gc = {
automatic = true;
randomizedDelaySec = "14m";
options = "--deleteOlderThan 10d";
};
};
boot = {
quiet.enable = true;
@@ -56,8 +43,8 @@
shell.components = {
firefox-pip.enable = true;
flameshot.enable = true;
gnome-keyring.enable = true;
grimblast.enable = true;
hyprpicker.enable = true;
kde-connect.enable = true;
kitty.enable = true;
@@ -87,31 +74,13 @@
cc1.enable = true;
nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
open = true;
nvidiaSettings = false;
nvidiaPersistenced = false;
preset.proprietary.enable = true;
prime = {
/*
offload = {
enable = true;
enableOffloadCmd = true;
};
*/
sync.enable = true;
reverseSync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
libvdpau-va-gl
nvidia-vaapi-driver
];
};
enableAllFirmware = true;
bluetooth = {
@@ -132,12 +101,26 @@
nerd-fonts.enable = true;
};
services.airprint.enable = true;
programs.zsh.enable = true;
security.sudo.configFile = ''
Defaults env_reset,pwfeedback,passprompt="󰟵 "
'';
security.tpm2.enable = true;
users.defaultUserShell = pkgs.zsh;
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ../../admins/theaninova.id_ed25519_sk.pub)
];
users.users.${username} = {
isNormalUser = true;
extraGroups = [

View File

@@ -9,7 +9,24 @@
};
};
programs.zoxide.enable = true;
home.packages = with pkgs; [ blueman ];
home = {
packages = with pkgs; [
blueman
kdePackages.okular
];
};
wayland.windowManager.hyprland.settings = {
general.layout = "master";
master = {
orientation = "right";
mfact = 0.65;
always_keep_position = true;
};
monitor = [
"eDP-1,3840x2160@60,0x0,2"
"HDMI-A-4,2560x1440@75,1920x-768,1"
];
};
systemd.user.services = {
nm-applet = {
Unit = {

200
hosts/shark/default.nix Normal file
View File

@@ -0,0 +1,200 @@
{
pkgs,
lib,
username,
...
}:
{
imports = [ ./hardware-configuration.nix ];
boot = {
loader.timeout = 0;
quiet.enable = true;
kernelParams = [ "module_blacklist=i915" ];
kernelPackages = pkgs.linuxPackages_xanmod_stable;
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = [ "tpm_tis" ];
systemd = {
enable = true;
tpm2.enable = true;
};
};
};
xdg.forced-compliance.enable = true;
usecases = {
gaming.enable = true;
"3d-printing".enable = true;
development.enable = true;
windows-vm.enable = true;
};
shell.components = {
firefox-pip.enable = true;
gnome-keyring.enable = true;
grimblast.enable = true;
hyprpicker.enable = true;
kde-connect.enable = true;
kitty.enable = true;
swaync.enable = true;
walker.enable = true;
waybar = {
enable = true;
mobile = true;
};
};
desktops = {
hyprland.enable = true;
};
locale.preset.theaninova.enable = true;
services.xserver = {
xkb = {
#variant = "altgr-intl";
#layout = "us";
layout = "de";
};
videoDrivers = [ "nvidia" ];
};
services.airprint.enable = true;
hardware = {
q3279vwf.enable = true;
audio.preset.pipewire.enable = true;
cc1.enable = true;
nvidia.preset.proprietary.enable = true;
enableAllFirmware = true;
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
fonts = {
fira-code = {
enable = true;
default = true;
};
noto-sans = {
enable = true;
default = true;
};
nerd-fonts.enable = true;
};
programs.zsh.enable = true;
security.sudo.configFile = ''
Defaults env_reset,pwfeedback,passprompt="󰟵 "
'';
security.tpm2.enable = true;
users.defaultUserShell = pkgs.zsh;
networking.hosts = {
"127.0.0.1:57461" = [ "ai.local" ];
};
services.ollama = {
enable = false;
package = pkgs.ollama.override {
config.cudaSupport = true;
config.rocmSupport = false;
};
};
services.open-webui = {
enable = false;
port = 57461;
environment = {
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
WEBUI_AUTH = "False";
};
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ../../admins/theaninova.id_ed25519_sk.pub)
];
users.users.${username} = {
isNormalUser = true;
extraGroups = [
"scanner"
"lp"
"storage"
"networkmanager"
"audio"
"video"
"plugdev"
"cdrom"
"kvm"
];
};
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
# Essential utils
usbutils
usbimager
uhubctl
bluetuith
pciutils
htop
unar
gnupg
libdrm
alsa-utils
graphicsmagick
ffmpeg
nfs-utils
opensc
openssl
# secure boot / tmp2
sbctl
tpm2-tss
# Essential command line apps
neovim
mc
git
p7zip
fzf
eza
];
networking = {
firewall = {
allowedUDPPortRanges = [
{
from = 1;
to = 65535;
}
];
};
networkmanager = {
enable = true;
plugins = with pkgs; [ networkmanager-openconnect ];
};
};
system.stateVersion = "24.11";
}

View File

@@ -0,0 +1,44 @@
# 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 =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9e1f4bb4-356b-4674-ba16-0d3f436cd882";
fsType = "xfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6585-4C3B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
/*fileSystems."/home2" =
{ device = "/dev/disk/by-uuid/fa017457-fef3-4fac-9348-d37d2cd98656";
fsType = "xfs";
};*/
swapDevices = [ ];
# 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.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

35
hosts/shark/home.nix Executable file
View File

@@ -0,0 +1,35 @@
{ pkgs, ... }:
{
theme.md3-evo = {
enable = true;
auto-dark = {
enable = true;
lat = 52.52;
lon = 13.40;
};
};
programs.zoxide.enable = true;
home = {
packages = with pkgs; [
blueman
kdePackages.okular
bitbox
gamma-launcher
];
};
wayland.windowManager.hyprland.settings.input.kb_options = [ "lv3:caps_switch" ];
services.nextcloud-client.enable = true;
systemd.user.services = {
blueman-applet = {
Unit = {
Description = "Bluetooth manager applet";
After = [ "graphical-session.target" ];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${pkgs.blueman}/bin/blueman-applet";
Restart = "always";
};
};
};
}

View File

@@ -1,7 +1,6 @@
{
username,
osConfig,
inputs,
...
}:
{
@@ -11,9 +10,9 @@
homeDirectory = "/home/${username}";
};
imports = [
inputs.nixvim.homeManagerModules.nixvim
./programs/nixvim/presets
./programs/neovide.nix
./programs/nixvim.nix
./programs/git.nix
./packages
./programs
./services

View File

@@ -13,12 +13,17 @@ let
hyprctl clients -j | jq -r "map(select(.workspace.id == $WORKSPACE) | select(.class == \"$1\") | .address | select(. != $WINDOW)) | .[0]"
'';
};
cfg = osConfig.desktops.hyprland;
in
{
config = lib.mkIf osConfig.desktops.hyprland.enable {
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
enable = true;
settings = {
general = {
allow_tearing = true;
layout = lib.mkIf cfg.scrolling "scrolling";
};
input = {
accel_profile = "flat";
kb_layout = osConfig.services.xserver.xkb.layout;
@@ -31,6 +36,29 @@ in
"SUPER,D,fullscreen,1"
"SUPER,V,fullscreen,0"
"SUPER,f,workspace,r-1"
"SUPER,h,workspace,r+1"
"SUPER_SHIFT,f,movetoworkspace,r-1"
"SUPER_SHIFT,h,movetoworkspace,r+1"
]
++ (
if cfg.scrolling then
[
"SUPER,up,layoutmsg,focus u"
"SUPER,down,layoutmsg,focus d"
"SUPER,right,layoutmsg,focus r"
"SUPER,left,layoutmsg,focus l"
"SUPER_SHIFT,up,layoutmsg,movewindowto u"
"SUPER_SHIFT,down,layoutmsg,movewindowto d"
"SUPER_SHIFT,left,layoutmsg,swapcol l"
"SUPER_SHIFT,right,layoutmsg,swapcol r"
"SUPER,mouse_up,layoutmsg,focus r"
"SUPER,mouse_down,layoutmsg,focus l"
]
else
[
"SUPER_SHIFT,up,movewindow,u"
"SUPER_SHIFT,down,movewindow,d"
"SUPER_SHIFT,left,movewindow,l"
@@ -41,13 +69,10 @@ in
"SUPER,left,movefocus,l"
"SUPER,right,movefocus,r"
"SUPER,f,workspace,r-1"
"SUPER,h,workspace,r+1"
"SUPER_SHIFT,f,movetoworkspace,r-1"
"SUPER_SHIFT,h,movetoworkspace,r+1"
"SUPER,mouse_up,workspace,r+1"
"SUPER,mouse_down,workspace,r-1"
];
]
);
bindm = [
"SUPER,mouse:272,movewindow"
"SUPER,mouse:273,resizewindow"
@@ -56,9 +81,10 @@ in
layers_hog_keyboard_focus = false;
disable_hyprland_logo = true;
disable_splash_rendering = true;
vrr = lib.mkDefault 2;
};
decoration.border_part_of_window = false;
input.touchpad.natural_scroll = true;
gestures.workspace_swipe = true;
};
};
@@ -74,7 +100,6 @@ in
# qt/kde packages
qt6.qtwayland
qt5.qtwayland
kdePackages.breeze-icons
# gnome packages
evince
baobab
@@ -88,7 +113,10 @@ in
xorg.xrandr
];
gtk.enable = true;
gtk = {
enable = true;
font.name = builtins.elemAt osConfig.fonts.fontconfig.defaultFonts.sansSerif 0;
};
qt.enable = true;
home.pointerCursor = {

View File

@@ -0,0 +1,2 @@
The configuration I use is located in [`/modules/home-manager/programs/nixvim.nix`](../../programs/nixvim.nix).
This module has to be included in home manager first as shown in [`/modules/home-manager/default.nix`](../../default.nix)

View File

@@ -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 = "󰡱";
}

View File

@@ -51,7 +51,7 @@ in
luasnip.enable = true;
lspkind = {
enable = true;
mode = "symbol_text";
settings.mode = "symbol_text";
};
lualine.settings.sections.lualine_x = lib.mkIf cfg.ollama (
lib.mkBefore [

View File

@@ -40,6 +40,13 @@ in
action.__raw = # lua
"function() vim.diagnostic.open_float(nil) end";
}
{
key = "<leader>sa";
mode = "n";
options.silent = true;
action.__raw = # lua
"require('actions-preview').code_actions";
}
{
key = "<leader>sx";
mode = "n";
@@ -67,10 +74,12 @@ in
}
];
plugins = {
actions-preview.enable = true;
lsp = {
enable = true;
inlayHints = false;
};
lsp-signature.enable = true;
telescope = {
enable = true;
keymaps = {
@@ -79,7 +88,6 @@ in
"<leader>si" = "lsp_implementations";
"<leader>sw" = "lsp_workspace_symbols";
"<leader>st" = "lsp_type_definitions";
"<leader>sa" = "quickfix";
};
};
inc-rename.enable = true;

View File

@@ -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 = "󰈙";
}

View File

@@ -0,0 +1,51 @@
{ lib, config, ... }:
let
cfg = config.presets.base.leap;
in
{
options.presets.base.leap = {
enable = lib.mkEnableOption "leap";
};
config = lib.mkIf cfg.enable {
plugins.leap.enable = true;
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
'';
}
];
};
}

View File

@@ -0,0 +1,51 @@
{ lib, config, ... }:
let
cfg = config.presets.base.tree;
in
{
options.presets.base.tree = {
enable = lib.mkEnableOption "file tree";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "<leader>t";
mode = "n";
action = # vim
"<cmd>:Neotree toggle<CR>";
}
];
plugins = {
web-devicons.enable = true;
neo-tree = {
enable = 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";
};
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>t";
desc = "Tree";
icon = "󰙅";
}
];
};
};
}

View File

@@ -1,11 +1,20 @@
{ lib, pkgs, ... }:
{
lib,
pkgs,
hostname,
username,
...
}:
{
options.programs.nixvim = lib.mkOption {
type = pkgs.lib.types.submoduleWith {
specialArgs = {
inherit pkgs;
inherit pkgs hostname username;
};
modules = [
./plugins/strudel.nix
./plugins/tidal.nix
./aerial.nix
./auto-save.nix
./auto-format.nix
@@ -20,6 +29,7 @@
./base/diagnostics.nix
./base/find.nix
./base/formatting.nix
./base/leap.nix
./base/spellcheck.nix
./base/status-line.nix
./base/syntax.nix
@@ -28,6 +38,7 @@
./languages/angular.nix
./languages/c.nix
./languages/css.nix
./languages/cue.nix
./languages/dart.nix
./languages/js.nix
./languages/lua.nix
@@ -35,6 +46,7 @@
./languages/python.nix
./languages/rust.nix
./languages/shell.nix
./languages/strudel.nix
./languages/svelte.nix
./remaps/half-page-scroll.nix

View File

@@ -27,12 +27,17 @@ in
};
};
lsp.servers = {
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;

View File

@@ -0,0 +1,16 @@
{ lib, config, ... }:
let
cfg = config.presets.languages.cue;
in
{
options.presets.languages.cue = {
enable = lib.mkEnableOption "CUE";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.cue = [ "cue_fmt" ];
lsp.servers.cue.enable = true;
};
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
pkgs,
hostname,
config,
...
}:
let
cfg = config.presets.languages.nix;
in
{
options.presets.languages.nix = {
enable = lib.mkEnableOption "Nix";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.nix = [ "nixfmt" ];
lsp.servers = {
nixd = {
enable = true;
settings = {
nixpkgs.expr = # nix
"import (builtins.getFlake (builtins.toString ./.)).inputs.nixpkgs { }";
formatting.command = [ "nixfmt" ];
options = {
nixos.expr = # nix
"(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${hostname}.options";
home-manager.expr = # nix
"(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${hostname}.options.home-manager.users.type.getSubOptions []";
};
};
};
nil_ls = {
enable = false;
settings = {
formatting.command = [ "nixfmt" ];
nix = {
maxMemoryMB = 8192;
flake.autoEvalInputs = true;
};
};
};
};
};
extraPackages = [ pkgs.nixfmt-rfc-style ];
};
}

View File

@@ -9,7 +9,7 @@ in
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formattters_by_ft.rust = [ "rustfmt" ];
conform-nvim.settings.formatters_by_ft.rust = [ "rustfmt" ];
lsp.servers.rust_analyzer = {
enable = true;
installCargo = false;

View File

@@ -0,0 +1,28 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.languages.strudel;
in
{
options.presets.languages.strudel = {
enable = lib.mkEnableOption "Strudel";
};
config = lib.mkIf cfg.enable {
plugins = {
strudel.enable = true;
web-devicons.customIcons = {
str = {
icon = " ";
color = "#34E2E1";
cterm_color = "14";
name = "Strudel";
};
};
};
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.plugins.mkNeovimPlugin {
name = "strudel";
package = "strudel-nvim";
maintainers = [ lib.maintainers.theaninova ];
description = "A Neovim based strudel.cc controller, live coding using Strudel from Neovim.";
settingsOptions = {
ui = {
maximise_menu_panel = defaultNullOpts.mkBool true ''
Maximise the menu panel
'';
hide_menu_panel = defaultNullOpts.mkBool false ''
Hide the Strudel menu panel (and handle)
'';
hide_top_bar = defaultNullOpts.mkBool false ''
Hide the default Strudel top bar (controls)
'';
hide_code_editor = defaultNullOpts.mkBool false ''
Hide the Strudel code editor
'';
hide_error_display = defaultNullOpts.mkBool false ''
Hide the Strudel eval error display under the editor
'';
};
start_on_launch = defaultNullOpts.mkBool true ''
Automatically start playback when launching Strudel
'';
update_on_save = defaultNullOpts.mkBool false ''
Set to `true` to automatically trigger the code evaluation after saving the buffer content
Only works if the playback was already started (doesn't start the playback on save)
'';
sync_cursor = defaultNullOpts.mkBool true ''
Enable two-way cursor position sync between Neovim and Strudel editor
'';
report_eval_errors = defaultNullOpts.mkBool true ''
Report evaluation errors from Strudel as Neovim notifications
'';
custom_css_file = defaultNullOpts.mkStr null ''
Path to a custom CSS file to style the Strudel web editor (base64-encoded and injected at launch)
This allows you to override or extend the default Strudel UI appearance
'';
headless = defaultNullOpts.mkBool false ''
Headless mode: set to `true` to run the browser without launching a window
'';
browser_data_dir = defaultNullOpts.mkStr "~/.cache/strudel-nvim/" ''
Path to the directory where Strudel browser user data (cookies, sessions, etc.) is stored
'';
browser_exec_path = defaultNullOpts.mkStr null ''
Path to a (chromium-based) browser executable of choice
'';
};
}

View File

@@ -0,0 +1,13 @@
{
lib,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.plugins.mkVimPlugin {
name = "vim-tidal";
package = "vim-tidal";
maintainers = [ lib.maintainers.theaninova ];
description = "Vim plugin for TidalCycles";
}

View File

@@ -7,6 +7,7 @@
sha256 = "0lghiiiphbkqgiprqirxifldvix0j4k04jh1z9f911shrzjgqq4s";
}
];
programs.mpv.enable = true;
home.packages = with pkgs; [
# nix
cachix
@@ -17,21 +18,23 @@
# browsers
firefox
chromium
brave
# media
jellyfin-media-player
yt-dlp
f3d
mpv
jellyfin-mpv-shim
makemkv
libfaketime
handbrake
metadata-cleaner
mediainfo
mediainfo-gui
prismlauncher
# chat apps
vesktop
# vesktop
discord
element-desktop
thunderbird
signal-desktop
# cinny-desktop
@@ -43,17 +46,15 @@
# creative
gimp3
inkscape-with-extensions
scribus
# scribus
audacity
pinta
kdePackages.kdenlive
losslesscut-bin
shotcut
blender-hip
# development
# TODO: .NET 6 avalonia-ilspy
# ghidra
ghidra
# utils
libqalculate

View File

@@ -14,8 +14,6 @@
pinentry = pkgs.pinentry-gnome3;
};
};
git = import ./git.nix;
nixvim = import ./nixvim { inherit pkgs; };
gpg.enable = true;
btop = {
enable = true;

View File

@@ -1,12 +1,16 @@
{ ... }:
{
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 = {
@@ -20,4 +24,5 @@
};
mergetool.prompt = false;
};
};
}

View File

@@ -0,0 +1,127 @@
{ ... }:
{
programs.nixvim = {
enable = true;
defaultEditor = true;
vimAlias = true;
opts = {
number = true;
relativenumber = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
expandtab = true;
smartindent = true;
signcolumn = "yes";
scrolloff = 12;
hlsearch = false;
incsearch = true;
ignorecase = true;
smartcase = true;
updatetime = 50;
fillchars.eob = " ";
};
clipboard = {
register = "unnamedplus";
providers.wl-copy.enable = true;
};
globals.mapleader = ";";
presets = {
auto-save.enable = true;
auto-format.enable = true;
lazygit.enable = true;
mergetool.enable = true;
undotree.enable = true;
aerial.enable = true;
base = {
completion = {
enable = true;
copilot = true;
};
diagnostics.enable = true;
coverage.enable = false;
find.enable = true;
formatting = {
enable = true;
prettier = true;
};
leap.enable = true;
spellcheck.enable = true;
status-line.enable = true;
syntax.enable = true;
tree.enable = true;
};
languages = {
c.enable = true;
css = {
enable = true;
stylelint = true;
};
cue.enable = true;
dart.enable = true;
js = {
enable = true;
eslint = true;
npm = true;
};
lua.enable = true;
nix.enable = true;
python.enable = true;
rust.enable = true;
shell.enable = true;
strudel.enable = true;
svelte.enable = true;
};
remaps = {
half-page-scroll.enable = true;
no-accidental-macro.enable = true;
paste-keep-buffer.enable = true;
wrapped-line-nav.enable = true;
};
};
plugins = {
which-key.enable = true;
schemastore.enable = true;
todo-comments.enable = true;
origami.enable = false;
nvim-surround.enable = true;
fidget.enable = true;
vim-tidal.enable = true;
treesitter-context = {
enable = false; # TODO: looks weird with Neovide
settings.line_numbers = false;
};
lsp.servers = {
html.enable = true;
svelte.enable = true;
dockerls.enable = true;
yamlls = {
enable = true;
settings.customTags = [
"!if mapping"
"!any sequence"
"!not scalar"
"!flat sequence"
"!repeat mapping"
"!param scalar"
"!macro mapping"
];
};
jsonls.enable = true;
taplo.enable = true;
};
};
};
}

View File

@@ -1,115 +0,0 @@
{ pkgs }:
{
enable = true;
defaultEditor = true;
vimAlias = true;
opts = {
number = true;
relativenumber = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
expandtab = true;
smartindent = true;
signcolumn = "yes";
scrolloff = 12;
hlsearch = false;
incsearch = true;
updatetime = 50;
fillchars.eob = " ";
};
clipboard = {
register = "unnamedplus";
providers.wl-copy.enable = true;
};
globals.mapleader = ";";
presets = {
auto-save.enable = true;
auto-format.enable = true;
# harpoon.enable = true;
lazygit.enable = true;
mergetool.enable = true;
trouble.enable = true;
undotree.enable = true;
aerial.enable = true;
base = {
completion = {
enable = true;
copilot = true;
};
diagnostics.enable = true;
coverage.enable = true;
find.enable = true;
formatting = {
enable = true;
prettier = true;
};
spellcheck.enable = false;
status-line.enable = true;
syntax.enable = true;
tree.enable = true;
};
languages = {
angular.enable = true;
c = {
enable = true;
# cppcheck = true;
};
css = {
enable = true;
stylelint = true;
};
dart.enable = true;
js = {
enable = true;
eslint = true;
npm = true;
};
lua.enable = true;
nix.enable = true;
python.enable = true;
rust.enable = true;
shell.enable = true;
svelte.enable = true;
};
remaps = {
half-page-scroll.enable = true;
no-accidental-macro.enable = true;
paste-keep-buffer.enable = true;
wrapped-line-nav.enable = true;
};
};
plugins = {
vim-surround.enable = true;
which-key.enable = true;
schemastore.enable = true;
comment.enable = true;
debugprint.enable = true;
todo-comments.enable = true;
treesitter-context = {
enable = false; # TODO: looks weird with Neovide
settings = {
line_numbers = false;
};
};
lsp.servers = {
html.enable = true;
svelte.enable = true;
dockerls.enable = true;
yamlls.enable = true;
jsonls.enable = true;
taplo.enable = true;
};
};
}

View File

@@ -1,47 +0,0 @@
{ lib, config, ... }:
let
cfg = config.presets.base.tree;
in
{
options.presets.base.tree = {
enable = lib.mkEnableOption "file tree";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "ft";
mode = "n";
action = # vim
"<cmd>:Neotree toggle<CR>";
}
];
plugins = {
web-devicons.enable = true;
neo-tree = {
enable = true;
filesystem = {
useLibuvFileWatcher = true;
followCurrentFile.enabled = true;
filteredItems.visible = true;
};
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";
desc = "Tree";
icon = "󰙅";
}
];
};
};
}

View File

@@ -1,27 +0,0 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.presets.languages.nix;
in
{
options.presets.languages.nix = {
enable = lib.mkEnableOption "Nix";
};
config = lib.mkIf cfg.enable {
plugins = {
conform-nvim.settings.formatters_by_ft.nix = [ "nixfmt" ];
none-ls = {
enable = true;
sources.diagnostics.statix.enable = true;
};
lsp.servers.nil_ls.enable = true;
nix.enable = true;
};
extraPackages = [ pkgs.nixfmt-rfc-style ];
};
}

View File

@@ -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,28 +92,16 @@ 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;
view_bg_color = transparent colors.background.background;
view_fg_color = colors.background.foreground;
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;
card_bg_color = colors.container.default;
card_fg_color = colors.container.foreground;
card_shade_color = colors.shade.default;
dialog_bg_color = transparent colors.background.background;
dialog_fg_color = colors.background.foreground;
popover_bg_color = transparent colors.background.background;
popover_fg_color = colors.background.foreground;
popover_shade_color = colors.shade.default;
shade_color = colors.shade.default;
@@ -91,15 +110,13 @@ let
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;
*/
};
in
builtins.concatStringsSep "\n" (

View File

@@ -1,7 +1,9 @@
general {
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.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 = 0
extend_border_grab_area = 4
gaps_in = {{custom.padding}}
gaps_out = {{custom.double_padding}}

View File

@@ -1,6 +1,7 @@
{
pkgs,
lib,
osConfig,
config,
...
}:
@@ -41,7 +42,7 @@ in
};
transparency = lib.mkOption {
type = lib.types.numbers.between 0 1;
default = 0.8;
default = 0.9;
description = "The transparency of apps";
};
radius = lib.mkOption {
@@ -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,6 +270,10 @@ 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"
else
@@ -277,22 +281,10 @@ in
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 = {
decoration = {
inactive_opacity = 0.8;
shadow = {
enabled = true;
range = 16;
color = "rgba(00000044)";
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
'';
};
};
});
};
};
};

View 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}}
}

View File

@@ -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}}

View File

@@ -0,0 +1,167 @@
# Somewhat adapted from https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/groups/syntax.lua
{ C, O }:
{
Comment.fg = C.outline; # just comments
SpecialComment.link = C.keywords; # special things inside a comment
Constant.fg = C.constants; # (preferred) any constant
String.fg = C.strings; # a string constant: "this is a string"
Character.fg = C.keywords; # a character constant: 'c', '\n'
Number.fg = C.numbers; # a number constant: 234, 0xff
Float.fg = C.numbers; # a floating point constant: 2.3e10
Boolean.fg = C.keywords; # a boolean constant: TRUE, false
Identifier.fg = C.on_surface; # (preferred) any variable name
Function.fg = C.functions; # function name (also: methods for classes)
Statement.fg = C.mauve; # (preferred) any statement
Conditional.fg = C.keywords; # if, then, else, endif, switch, etc.
Repeat.fg = C.keywords; # for, do, while, etc.
Label.fg = C.keywords; # case, default, etc.
Operator.fg = C.on_surface; # "sizeof", "+", "*", etc.
Keyword.fg = C.keywords; # any other keyword
Exception.fg = C.keywords; # try, catch, throw
PreProc.link = C.structures; # (preferred) generic Preprocessor
Include.fg = C.keywords; # preprocessor #include
Define.fg = C.keywords; # preprocessor #define
Macro.fg = C.keywords; # same as Define
PreCondit.fg = C.keywords; # preprocessor #if, #else, #endif, etc.
StorageClass.fg = C.keywords; # static, register, volatile, etc.
Structure.fg = C.structures; # struct, union, enum, etc.
Special.fg = C.keywords; # (preferred) any special symbol
Type.fg = C.types; # (preferred) int, long, char, etc.
Typedef.link = "Type"; # A typedef
SpecialChar.link = "Special"; # special character in a constant
Tag = C.structures; # you can use CTRL-] on this
Delimiter.fg = C.on_surface; # character that needs attention
Debug.link = "Special"; # debugging statements
Underlined.style = [ "underline" ]; # (preferred) text that stands out, HTML links
Bold.style = [ "bold" ];
Italic.style = [ "italic" ];
# ("Ignore", below, may be invisible...)
# Ignore = { }; # (preferred) left blank, hidden |hl-Ignore|
Error = {
bg = C.danger_container; # (preferred) any erroneous construct
fg = C.on_danger_container;
};
Todo = {
bg = C.yellow_container;
fg = C.on_yellow_container;
}; # (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
qfLineNr.fg = C.yellow;
qfFileName.fg = C.blue;
htmlH1 = {
fg = C.pink;
style = [ "bold" ];
};
htmlH2 = {
fg = C.blue;
style = [ "bold" ];
};
# mkdHeading = { fg = C.peach; style = [ "bold" ]; };
# mkdCode = { bg = C.terminal_black; fg = C.text; };
mkdCodeDelimiter = {
bg = C.base;
fg = C.text;
};
mkdCodeStart = {
fg = C.flamingo;
style = [ "bold" ];
};
mkdCodeEnd = {
fg = C.flamingo;
style = [ "bold" ];
};
# mkdLink = { fg = C.blue; style = [ "underline" ]; };
# debugging
debugPC = {
bg = if O.transparent_background then C.none else C.crust;
}; # used for highlighting the current line in terminal-debug
debugBreakpoint = {
bg = C.base;
fg = C.overlay0;
}; # used for breakpoint colors in terminal-debug
# illuminate
illuminatedWord = {
bg = C.surface1;
};
illuminatedCurWord = {
bg = C.surface1;
};
# diff
Added.fg = C.green;
Changed.fg = C.blue;
diffAdded.fg = C.green;
diffRemoved.fg = C.red;
diffChanged.fg = C.blue;
diffOldFile.fg = C.yellow;
diffNewFile.fg = C.peach;
diffFile.fg = C.blue;
diffLine.fg = C.overlay0;
diffIndexLine.fg = C.teal;
DiffAdd = {
bg = U.darken C.green 0.18 C.base;
}; # diff mode: Added line |diff.txt|
DiffChange = {
bg = U.darken C.blue 0.07 C.base;
}; # diff mode: Changed line |diff.txt|
DiffDelete = {
bg = U.darken C.red 0.18 C.base;
}; # diff mode: Deleted line |diff.txt|
DiffText = {
bg = U.darken C.blue 0.30 C.base;
}; # diff mode: Changed text within a changed line |diff.txt|
# NeoVim
healthError.fg = C.red;
healthSuccess.fg = C.teal;
healthWarning.fg = C.yellow;
# misc
# glyphs
GlyphPalette1.fg = C.red;
GlyphPalette2.fg = C.teal;
GlyphPalette3.fg = C.yellow;
GlyphPalette4.fg = C.blue;
GlyphPalette6.fg = C.teal;
GlyphPalette7.fg = C.text;
GlyphPalette9.fg = C.red;
# rainbow
rainbow1.fg = C.red;
rainbow2.fg = C.peach;
rainbow3.fg = C.yellow;
rainbow4.fg = C.green;
rainbow5.fg = C.sapphire;
rainbow6.fg = C.lavender;
# csv
csvCol0.fg = C.red;
csvCol1.fg = C.peach;
csvCol2.fg = C.yellow;
csvCol3.fg = C.green;
csvCol4.fg = C.sky;
csvCol5.fg = C.blue;
csvCol6.fg = C.lavender;
csvCol7.fg = C.mauve;
csvCol8.fg = C.pink;
# markdown
markdownHeadingDelimiter = {
fg = C.peach;
style = [ "bold" ];
};
markdownCode.fg = C.flamingo;
markdownCodeBlock.fg = C.flamingo;
markdownLinkText = {
fg = C.blue;
style = [ "underline" ];
};
markdownH1.link = "rainbow1";
markdownH2.link = "rainbow2";
markdownH3.link = "rainbow3";
markdownH4.link = "rainbow4";
markdownH5.link = "rainbow5";
markdownH6.link = "rainbow6";
}

View File

@@ -0,0 +1,415 @@
{ C, O }:
let
self = {
# Reference: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
# Identifiers
"@variable".fg = C.on_surface; # Any variable name that does not have another highlight.
"@variable.builtin".fg = C.keywords; # Variable names that are defined by the languages, like this or self.
"@variable.parameter".fg = C.on_surface; # For parameters of a function.
"@variable.member".fg = C.properties; # For fields.
"@constant".fg = C.constants; # For constants
"@constant.builtin".fg = C.keywords; # For constant that are built in the language: nil in Lua.
"@constant.macro".link = "Macro"; # For constants that are defined by macros: NULL in C.
"@module".fg = C.structures; # For identifiers referring to modules and namespaces.
"@label".link = "Label"; # For labels: label: in C and :label: in Lua.
# Literals
"@string".link = "String"; # For strings.
/*
"@string.documentation" = {
fg = C.teal;
style = O.styles.strings or { };
}; # For strings documenting code (e.g. Python docstrings).
"@string.regexp" = {
fg = C.pink;
style = O.styles.strings or { };
}; # For regexes.
"@string.escape" = {
fg = C.pink;
style = O.styles.strings or { };
}; # For escape characters within a string.
"@string.special".link = "Special"; # other special strings (e.g. dates)
"@string.special.path".link = "Special"; # filenames
"@string.special.symbol".fg = C.flamingo; # symbols or atoms
"@string.special.url" = {
fg = C.blue;
style = [
"italic"
"underline"
];
}; # urls, links and emails
"@punctuation.delimiter.regex" = {
link = "@string.regexp";
};
*/
"@character".link = "Character"; # character literals
"@character.special".link = "SpecialChar"; # special characters (e.g. wildcards)
"@boolean".link = "Boolean"; # For booleans.
"@number".link = "Number"; # For all numbers
"@number.float".link = "Float"; # For floats.
# Types
"@type".link = "Type"; # For types.
"@type.builtin".fg = C.keywords; # For builtin types.
"@type.definition".link = "Type"; # type definitions (e.g. `typedef` in C)
"@attribute".fg = C.properties; # attribute annotations (e.g. Python decorators)
"@property".fg = C.properties; # fields, like accessing `bar` property on `foo.bar`. Overriden later for data languages and CSS.
# Functions
"@function".link = "Function"; # For function (calls and definitions).
"@function.builtin" = {
fg = C.functions;
style = [ "bold" ];
}; # For builtin functions: table.insert in Lua.
"@function.call".link = "Function"; # function calls
"@function.macro".link = "Macro"; # For macro defined functions (calls and definitions): each macro_rules in Rust.
"@function.method".link = "Function"; # For method definitions.
"@function.method.call".link = "Function"; # For method calls.
"@constructor" = {
fg = C.yellow;
}; # For constructor calls and definitions: = { } in Lua, and Java constructors.
"@operator" = {
link = "Operator";
}; # For any operator: +, but also -> and * in C.
# Keywords
"@keyword".link = "Keyword"; # For keywords that don't fall in previous categories.
"@keyword.modifier".link = "Keyword"; # For keywords modifying other constructs (e.g. `const`, `static`, `public`)
"@keyword.type".link = "Keyword"; # For keywords describing composite types (e.g. `struct`, `enum`)
"@keyword.coroutine".link = "Keyword"; # For keywords related to coroutines (e.g. `go` in Go, `async/await` in Python)
"@keyword.function" = {
fg = C.mauve;
style = O.styles.keywords or { };
}; # For keywords used to define a function.
"@keyword.operator" = {
fg = C.mauve;
style = O.styles.keywords or { };
}; # For new keyword operator
"@keyword.import" = {
link = "Include";
}; # For includes: #include in C, use or extern crate in Rust, or require in Lua.
"@keyword.repeat" = {
link = "Repeat";
}; # For keywords related to loops.
"@keyword.return" = {
fg = C.mauve;
style = O.styles.keywords or { };
};
"@keyword.debug".link = "Exception"; # For keywords related to debugging
"@keyword.exception".link = "Exception"; # For exception related keywords.
"@keyword.conditional".link = "Conditional"; # For keywords related to conditionals.
"@keyword.conditional.ternary".link = "Operator"; # For ternary operators (e.g. `?` / `:`)
"@keyword.directive".link = "PreProc"; # various preprocessor directives & shebangs
"@keyword.directive.define".link = "Define"; # preprocessor definition directives
"@keyword.export" = {
fg = C.mauve;
style = O.styles.keywords;
}; # JS & derivative
# Punctuation
"@punctuation.delimiter".link = "Delimiter"; # For delimiters (e.g. `;` / `.` / `,`).
"@punctuation.bracket".fg = C.overlay2; # For brackets and parenthesis.
"@punctuation.special".link = "Special"; # For special punctuation that does not fall in the categories before (e.g. `{}` in string interpolation).
# Comment
"@comment".link = "Comment";
"@comment.documentation".link = "Comment"; # For comments documenting code
"@comment.error" = {
fg = C.base;
bg = C.red;
};
"@comment.warning" = {
fg = C.base;
bg = C.yellow;
};
"@comment.hint" = {
fg = C.base;
bg = C.blue;
};
"@comment.todo" = {
fg = C.base;
bg = C.flamingo;
};
"@comment.note" = {
fg = C.base;
bg = C.rosewater;
};
# Markup
"@markup" = {
fg = C.text;
}; # For strings considerated text in a markup language.
"@markup.strong" = {
fg = C.red;
style = [ "bold" ];
}; # bold
"@markup.italic" = {
fg = C.red;
style = [ "italic" ];
}; # italic
"@markup.strikethrough" = {
fg = C.text;
style = [ "strikethrough" ];
}; # strikethrough text
"@markup.underline" = {
link = "Underlined";
}; # underlined text
"@markup.heading".fg = C.blue; # titles like: # Example
"@markup.heading.markdown".style = [ "bold" ]; # bold headings in markdown, but not in HTML or other markup
"@markup.math".fg = C.blue; # math environments (e.g. `$ ... $` in LaTeX)
"@markup.quote".fg = C.pink; # block quotes
"@markup.environment".fg = C.pink; # text environments of markup languages
"@markup.environment.name".fg = C.blue; # text indicating the type of an environment
"@markup.link".fg = C.lavender; # text references, footnotes, citations, etc.
"@markup.link.label".fg = C.lavender; # link, reference descriptions
"@markup.link.url" = {
fg = C.blue;
style = [
"italic"
"underline"
];
}; # urls, links and emails
"@markup.raw" = {
fg = C.green;
}; # used for inline code in markdown and for doc in python (""")
"@markup.list" = {
fg = C.teal;
};
"@markup.list.checked" = {
fg = C.green;
}; # todo notes
"@markup.list.unchecked" = {
fg = C.overlay1;
}; # todo notes
# Diff
"@diff.plus" = {
link = "diffAdded";
}; # added text (for diff files)
"@diff.minus" = {
link = "diffRemoved";
}; # deleted text (for diff files)
"@diff.delta" = {
link = "diffChanged";
}; # deleted text (for diff files)
# Tags
"@tag" = {
fg = C.blue;
}; # Tags like HTML tag names.
"@tag.builtin" = {
fg = C.blue;
}; # JSX tag names.
"@tag.attribute" = {
fg = C.yellow;
style = O.styles.miscs or [ "italic" ];
}; # XML/HTML attributes (foo in foo="bar").
"@tag.delimiter" = {
fg = C.teal;
}; # Tag delimiter like < > /
# Misc
"@error" = {
link = "Error";
};
# Language specific:
"@function.builtin.bash" = {
fg = C.red;
style = O.styles.miscs or [ "italic" ];
};
"@variable.parameter.bash" = {
fg = C.green;
};
"@markup.heading.1.markdown".link = "rainbow1";
"@markup.heading.2.markdown".link = "rainbow2";
"@markup.heading.3.markdown".link = "rainbow3";
"@markup.heading.4.markdown".link = "rainbow4";
"@markup.heading.5.markdown".link = "rainbow5";
"@markup.heading.6.markdown".link = "rainbow6";
"@markup.heading.html" = {
link = "@markup";
};
"@markup.heading.1.html" = {
link = "@markup";
};
"@markup.heading.2.html" = {
link = "@markup";
};
"@markup.heading.3.html" = {
link = "@markup";
};
"@markup.heading.4.html" = {
link = "@markup";
};
"@markup.heading.5.html" = {
link = "@markup";
};
"@markup.heading.6.html" = {
link = "@markup";
};
"@constant.java" = {
fg = C.teal;
};
"@property.css" = {
fg = C.blue;
};
"@property.scss" = {
fg = C.blue;
};
"@property.id.css" = {
fg = C.yellow;
};
"@property.class.css" = {
fg = C.yellow;
};
"@type.css" = {
fg = C.lavender;
};
"@type.tag.css" = {
fg = C.blue;
};
"@string.plain.css" = {
fg = C.text;
};
"@number.css" = {
fg = C.peach;
};
"@keyword.directive.css" = {
link = "Keyword";
}; # CSS at-rules
"@string.special.url.html" = {
fg = C.green;
}; # Links in href, src attributes.
"@markup.link.label.html" = {
fg = C.text;
}; # Text between <a></a> tags.
"@character.special.html" = {
fg = C.red;
}; # Symbols such as &nbsp;.
"@constructor.lua" = {
link = "@punctuation.bracket";
}; # For constructor calls and definitions: = { } in Lua.
"@constructor.python" = {
fg = C.sky;
}; # __init__(), __new__().
"@label.yaml" = {
fg = C.yellow;
}; # Anchor and alias names.
"@string.special.symbol.ruby" = {
fg = C.flamingo;
};
"@function.method.php" = {
link = "Function";
};
"@function.method.call.php" = {
link = "Function";
};
"@keyword.import.c" = {
fg = C.yellow;
};
"@keyword.import.cpp" = {
fg = C.yellow;
};
"@attribute.c_sharp" = {
fg = C.yellow;
};
"@comment.warning.gitcommit" = {
fg = C.yellow;
};
"@string.special.path.gitignore" = {
fg = C.text;
};
gitcommitSummary = {
fg = C.rosewater;
style = O.styles.miscs or [ "italic" ];
};
zshKSHFunction = {
link = "Function";
};
# Legacy highlights
"@parameter" = self."@variable.parameter";
"@field" = self."@variable.member";
"@namespace" = self."@module";
"@float" = self."@number.float";
"@symbol" = self."@string.special.symbol";
"@string.regex" = self."@string.regexp";
"@text" = self."@markup";
"@text.strong" = self."@markup.strong";
"@text.emphasis" = self."@markup.italic";
"@text.underline" = self."@markup.underline";
"@text.strike" = self."@markup.strikethrough";
"@text.uri" = self."@markup.link.url";
"@text.math" = self."@markup.math";
"@text.environment" = self."@markup.environment";
"@text.environment.name" = self."@markup.environment.name";
"@text.title" = self."@markup.heading";
"@text.literal" = self."@markup.raw";
"@text.reference" = self."@markup.link";
"@text.todo.checked" = self."@markup.list.checked";
"@text.todo.unchecked" = self."@markup.list.unchecked";
"@text.todo" = self."@comment.todo";
"@text.warning" = self."@comment.warning";
"@text.note" = self."@comment.note";
"@text.danger" = self."@comment.error";
"@method" = self."@function.method";
"@method.call" = self."@function.method.call";
"@text.diff.add" = self."@diff.plus";
"@text.diff.delete" = self."@diff.minus";
"@type.qualifier" = self."@keyword.modifier";
"@keyword.storage" = self."@keyword.modifier";
"@define" = self."@keyword.directive.define";
"@preproc" = self."@keyword.directive";
"@storageclass" = self."@keyword.storage";
"@conditional" = self."@keyword.conditional";
"@exception" = self."@keyword.exception";
"@include" = self."@keyword.import";
"@repeat" = self."@keyword.repeat";
"@symbol.ruby" = self."@string.special.symbol.ruby";
"@variable.member.yaml" = self."@field.yaml";
"@text.title.1.markdown" = self."@markup.heading.1.markdown";
"@text.title.2.markdown" = self."@markup.heading.2.markdown";
"@text.title.3.markdown" = self."@markup.heading.3.markdown";
"@text.title.4.markdown" = self."@markup.heading.4.markdown";
"@text.title.5.markdown" = self."@markup.heading.5.markdown";
"@text.title.6.markdown" = self."@markup.heading.6.markdown";
"@method.php" = self."@function.method.php";
"@method.call.php" = self."@function.method.call.php";
};
in
self

View File

@@ -19,8 +19,6 @@ in
config = mkIf cfg.enable {
users.users.${username}.linger = true;
boot = {
loader.timeout = 0;
plymouth.enable = true;
kernelParams = [

View File

@@ -4,12 +4,15 @@
./boot/quiet.nix
./desktops/hyprland.nix
./desktops/niri.nix
./fonts/fira-code.nix
./fonts/noto-sans.nix
./fonts/nerd-fonts.nix
./fonts/open-dyslexic.nix
./hardware/hid-fanatecff.nix
./hardware/astro-a50.nix
./hardware/audio.nix
./hardware/gbmonctl.nix
./hardware/nvidia-proprietary.nix
@@ -17,6 +20,7 @@
./hardware/amdgpu.nix
./hardware/cc1.nix
./hardware/fv43u.nix
./hardware/pimax.nix
./hardware/q3279vwf.nix
./hardware/virtual-camera.nix
@@ -33,6 +37,7 @@
./shell/firefox-pip.nix
./shell/flameshot.nix
./shell/gnome-keyring.nix
./shell/grimblast.nix
./shell/hyprpicker.nix
./shell/kde-connect.nix
./shell/kitty.nix

View File

@@ -12,6 +12,7 @@ in
{
options.desktops.hyprland = {
enable = lib.mkEnableOption "Enable a DE based on Hyprland";
scrolling = lib.mkEnableOption "Hyprland scrolling wm";
};
config = lib.mkIf cfg.enable {
@@ -27,6 +28,19 @@ in
systemd.enable = false;
package = null;
portalPackage = null;
settings = {
ecosystem = {
no_update_news = true;
no_donation_nag = true;
};
input.numlock_by_default = true;
};
plugins = lib.mkIf cfg.scrolling (
with pkgs.hyprlandPlugins;
[
hyprscrolling
]
);
};
home = {
packages = with pkgs; [ grim ];
@@ -36,7 +50,8 @@ in
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
# https://github.com/swaywm/sway/issues/6272
_JAVA_AWT_WM_NONREPARENTING = "1";
};
};
xdg.configFile."uwsm/env".source = pkgs.writeText "env" (
@@ -74,6 +89,9 @@ in
};
};
security.pam.services.gdm.enableGnomeKeyring = true;
security.pam.services.hyprland.enableGnomeKeyring = true;
services = {
kmscon = {
enable = true;
@@ -88,7 +106,7 @@ in
user = username;
};
default_session = {
command = "${lib.getExe pkgs.greetd.tuigreet} --asterisks --remember --user-menu --cmd 'uwsm start hyprland-uwsm.desktop'";
command = "${lib.getExe pkgs.tuigreet} --asterisks --remember --user-menu --cmd 'uwsm start hyprland-uwsm.desktop'";
user = username;
};
};

View 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;
};
};
}

View File

@@ -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"

View File

@@ -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 = {

View File

@@ -0,0 +1,40 @@
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.fonts.open-dyslexic;
in
{
options.fonts.open-dyslexic = {
enable = mkEnableOption "Enable the OpenDyslexic font";
default = mkOption {
type = types.bool;
description = "Make Noto Sans the default sans-serif font";
default = false;
};
};
config = mkIf cfg.enable {
fonts = {
packages =
with pkgs;
[
open-dyslexic
]
++ (if (config.fonts.nerd-fonts.enable) then [ nerd-fonts.open-dyslexic ] else [ ]);
fontconfig.defaultFonts = {
sansSerif = mkIf cfg.default [
(if (config.fonts.nerd-fonts.enable) then "OpenDyslexic Nerd Font" else "OpenDyslexic")
];
monospace = mkIf cfg.default [
(if (config.fonts.nerd-fonts.enable) then "OpenDyslexicM Nerd Font" else "OpenDyslexicM")
];
};
};
};
}

View File

@@ -47,7 +47,7 @@ in
environment.systemPackages = with pkgs; [
amdgpu_top
glxinfo
mesa-demos
libva-utils
vulkan-tools
clinfo

View File

@@ -0,0 +1,13 @@
stdbuf -oL hexdump -v -e '32/2 "%x " "\n"' "$HID_DEVICE" | while read -r line; do
echo "$line"
if [[ $line =~ ^c02[[:space:]]4[[:space:]]13[[:space:]]([0-9a-f]+) ]]; then
power_state=${BASH_REMATCH[1]}
if [[ $power_state == "0" ]]; then
echo "power=on"
wpctl set-default "$(pw-cli info "$HEADSET_NAME" | head -n 1 | awk '{print $2}')"
else
echo "power=off"
wpctl set-default "$(pw-cli info "$SPEAKERS_NAME" | head -n 1 | awk '{print $2}')"
fi
fi
done

View File

@@ -0,0 +1,11 @@
Preamp: -4.08 dB
Filter 1: ON LSC Fc 105.0 Hz Gain 3.9 dB Q 0.70
Filter 2: ON PK Fc 51.8 Hz Gain -4.3 dB Q 0.81
Filter 3: ON PK Fc 1118.3 Hz Gain -2.5 dB Q 3.36
Filter 4: ON PK Fc 2620.0 Hz Gain -0.9 dB Q 3.24
Filter 5: ON PK Fc 3300.0 Hz Gain 0.9 dB Q 5.82
Filter 6: ON PK Fc 3859.3 Hz Gain 4.1 dB Q 3.08
Filter 7: ON PK Fc 5115.7 Hz Gain 0.8 dB Q 5.14
Filter 8: ON PK Fc 6116.7 Hz Gain -3.4 dB Q 3.42
Filter 9: ON PK Fc 7416.1 Hz Gain -0.8 dB Q 4.16
Filter 10: ON HSC Fc 10000.0 Hz Gain 0.3 dB Q 0.70

View File

@@ -0,0 +1,118 @@
{
lib,
config,
username,
pkgs,
...
}:
with lib;
let
cfg = config.hardware.astro-a50;
in
{
options.hardware.astro-a50 = {
enable = mkEnableOption "Enable optimisations for the Logitech Astro A50 headset";
sinkWhenDocked = mkOption {
type = types.nullOr types.str;
description = "The PipeWire sink name to switch to when the Astro A50 is docked. If null, no switching will be done.";
default = "alsa_output.pci-0000_0a_00.4.analog-stereo";
};
};
config =
let
name = "Astro A50";
nick = "A50";
pipewireFilter = bitrate: {
"media.class" = "Audio/Sink";
"alsa.components" = "USB046d:0b1c";
"alsa.resolution_bits" = bitrate;
};
serviceName = "astro-a50-dock-detection";
nodeNameIn = "astro-a50-eq-harman-in";
hidrawName = "hidraw_astro_a50";
hidrawPath = "/dev/${hidrawName}";
deviceUnit = "dev-${hidrawName}.device";
in
mkIf cfg.enable {
services.udev.extraRules = lib.strings.join ", " [
"KERNEL==\"hidraw*\""
"ATTRS{idVendor}==\"046d\""
"ATTRS{idProduct}==\"0b1c\""
"MODE=\"0660\""
"GROUP=\"input\""
"TAG+=\"systemd\""
"SYMLINK+=\"${hidrawName}\""
];
users.extraGroups.input.members = [ username ];
home-manager.users.${username} = {
home.packages = with pkgs; [ zam-plugins ];
xdg.configFile = {
"wireplumber/wireplumber.conf.d/51-astro-a50.conf".text = builtins.toJSON {
"monitor.alsa.rules" = [
{
matches = [ (pipewireFilter 16) ];
actions.update-props = {
"node.description" = "${name} Chat";
"node.nick" = "${nick} Chat";
};
}
{
matches = [ (pipewireFilter 24) ];
actions.update-props = {
"node.description" = name;
"node.nick" = nick;
};
}
];
};
"pipewire/pipewire.conf.d/51-a50-eq.conf".text = builtins.toJSON {
"context.modules" = [
{
name = "libpipewire-module-parametric-equalizer";
args = {
"equalizer.filepath" = toString ./astro-a50-harman.txt;
"equalizer.description" = "${name} (Harman EQ)";
"capture.props" = {
"node.name" = nodeNameIn;
"filter.smart" = true;
"filter.smart.target" = pipewireFilter 24;
};
"playback.props"."node.name" = "EQ Output";
};
}
];
};
};
systemd.user.services.${serviceName} = mkIf (cfg.sinkWhenDocked != null) {
Unit = {
Description = "Astro A50 Dock Detection";
StopPropagatedFrom = [ deviceUnit ];
};
Install.WantedBy = [
"default.target"
deviceUnit
];
Service = {
Restart = "always";
RestartSec = "5";
ExecStart = "-${
lib.getExe (
pkgs.writeShellApplication {
name = "astro-dock-detect";
runtimeEnv = {
HID_DEVICE = hidrawPath;
HEADSET_NAME = nodeNameIn;
SPEAKERS_NAME = cfg.sinkWhenDocked;
};
text = builtins.readFile ./astro-a50-dock.sh;
}
)
}";
};
};
};
};
}

View File

@@ -13,72 +13,97 @@ in
{
options.hardware.fv43u = {
enable = mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
hdr = mkOption {
type = types.bool;
default = false;
description = "Enable HDR support for the Gigabyte FV43U monitor.";
};
};
config = mkIf cfg.enable {
fonts.fontconfig.subpixel.rgba = "bgr";
hardware = {
gbmonctl.enable = true;
firmware = [
(pkgs.runCommandNoCC "fv43u_edid" { } ''
mkdir -p $out/lib/firmware/edid
cp ${./fv43u_edid.bin} $out/lib/firmware/edid/fv43u.bin
'')
];
};
boot = {
kernelParams = [
"drm.edid_firmware=DP-3:edid/fv43u.bin"
"video=DP-3:3840x2160-30@144"
];
initrd.extraFiles."lib/firmware/edid/fv43u.bin".source =
pkgs.runCommandLocal "fv43u_edid" { }
"cp ${./fv43u_edid.bin} $out";
};
hardware.gbmonctl.enable = true;
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
'')
];
home-manager.users.${username} = {
home.sessionVariables = {
ENABLE_HDR_WSI = "1";
DXVK_HDR = "1";
home-manager.users.${username} =
let
monitorline = "DP-3,3840x2160@144,0x0,1,bitdepth,10,cm,${if cfg.hdr then "hdr" else "srgb"}";
in
{
programs.mpv.config = {
vo = "gpu-next";
gpu-api = "vulkan";
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";
allow_tearing = true;
plugin.hyprscrolling = lib.mkIf config.desktops.hyprland.scrolling {
column_width = 0.4;
};
master = {
orientation = "center";
slave_count_for_center_master = 0;
mfact = 0.4;
allow_small_split = true;
};
render.direct_scanout = 0;
monitorv2 = {
output = "DP-3";
mode = "3840x2160@144";
position = "0x0";
scale = 1;
bitdepth = 10;
addreserved = "80,0,0,0";
cm = if cfg.hdr then "hdredid" else "srgb";
sdr_min_luminance = 0.25;
sdr_max_luminance = 250;
};
render.direct_scanout = 1;
monitor = [
"DP-3,3840x2160@144,0x0,1,bitdepth,10"
"DP-3,addreserved,340,0,0,0"
];
xwayland.force_zero_scaling = true;
misc.vrr = 2; # VA suffers from VRR flicker
cursor = {
min_refresh_rate = 48;
no_break_fs_vrr = 1;
};
experimental = {
xx_color_management_v4 = true;
};
# experimental.xx_color_management_v4 = true;
};
programs.waybar.settings.mainBar."custom/brightness" =
programs.waybar.settings.mainBar =
let
tmpFile = "${config.home-manager.users.${username}.xdg.configHome}/gbmonctl-brightness";
cmd =
if cfg.hdr then
# sh
''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$(printf "1.%02d" $((BRIGHTNESS / 2)))
hyprctl keyword monitor ${monitorline},sdrbrightness,$BRIGHTNESS
''
else
"${pkgs.gbmonctl}/bin/gbmonctl -prop brightness -val $BRIGHTNESS";
in
{
"custom/saturation" = { };
"custom/brightness" = {
return-type = "json";
exec = pkgs.writeShellScript "waybar-brightness" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
@@ -105,14 +130,14 @@ in
BRIGHTNESS=$((BRIGHTNESS + 5))
BRIGHTNESS=$((BRIGHTNESS > 100 ? 100 : BRIGHTNESS))
echo $BRIGHTNESS > ${tmpFile}
${pkgs.gbmonctl}/bin/gbmonctl -prop brightness -val $BRIGHTNESS
${cmd}
'';
on-scroll-down = pkgs.writeShellScript "waybar-brightness-up" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$((BRIGHTNESS - 5))
BRIGHTNESS=$((BRIGHTNESS < 0 ? 0 : BRIGHTNESS))
echo $BRIGHTNESS > ${tmpFile}
${pkgs.gbmonctl}/bin/gbmonctl -prop brightness -val $BRIGHTNESS
${cmd}
'';
exec-on-event = true;
exec-if = "sleep 0.1";
@@ -120,4 +145,5 @@ in
};
};
};
};
}

View File

@@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "hid-fanatecff";
version = "0.1.0";
version = "0.2.1";
src = fetchFromGitHub {
owner = "gotzl";
repo = "hid-fanatecff";
rev = lib.versions.majorMinor version;
hash = "sha256-1Nm/34Er/qfel9LJp++IWd7cTh2Wi93Kgd28YLMVvWo=";
rev = version;
hash = "sha256-M2jm8pyxHRiswV4iJEawo57GkJ2XOclIo3NxEFgK+q0=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;

View File

@@ -27,7 +27,7 @@ in
};
environment.systemPackages = with pkgs; [
glxinfo
mesa-demos
libva-utils
vulkan-tools
];

View File

@@ -2,6 +2,7 @@
pkgs,
lib,
config,
username,
...
}:
with lib;
@@ -27,10 +28,6 @@ in
services.xserver.videoDrivers = [ "nvidia" ];
boot = {
kernelParams = [
"fbdev=1"
"nvidia_drm.fbdev=1"
];
kernelModules = [
"nvidia"
"nvidia_modeset"
@@ -55,6 +52,12 @@ in
nvidiaPersistenced = false;
};
home-manager.users.${username}.wayland.windowManager.hyprland.settings = {
cursor.no_hardware_cursors = true;
opengl.nvidia_anti_flicker = true;
# render.direct_scanout = 1;
};
environment = {
variables = {
VDPAU_DRIVER = "va_gl";
@@ -64,8 +67,8 @@ in
WLR_NO_HARDWARE_CURSORS = "1";
};
systemPackages = with pkgs; [
glxinfo
nvtopPackages.nvidia
mesa-demos
# nvtopPackages.nvidia
libva-utils
vulkan-tools
];

View 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";
};
}
);
}

View 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

View File

@@ -21,13 +21,13 @@ in
home-manager.users.${username}.wayland.windowManager.hyprland.settings = {
general.layout = "master";
master = {
orientation = "center";
always_center_master = true;
mfact = 0.4;
orientation = "right";
mfact = 0.65;
always_keep_position = true;
};
monitor = [ "DP-1,highrr,0x0,1" ];
monitor = [ "DP-1,2560x1440@75,0x0,1" ];
xwayland.force_zero_scaling = true;
misc.vrr = 2; # VA suffers from VRR flicker
misc.vrr = 0; # VA suffers from VRR flicker
};
};
}

View File

@@ -20,7 +20,10 @@ in
enable = true;
extraBackends = [ pkgs.sane-airscan ];
};
services.printing.enable = true;
services.printing = {
enable = true;
stateless = true;
};
services.avahi = {
enable = true;
nssmdns4 = true;

View File

@@ -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";
};
}
];
};
};
}

View File

@@ -24,11 +24,17 @@ in
];
home.packages = with pkgs; [
polkit_gnome
(gnome-keyring.overrideAttrs (oldAttrs: {
configureFlags = oldAttrs.configureFlags ++ [
(gnome-keyring.overrideAttrs (
{
configureFlags ? [ ],
...
}:
{
configureFlags = configureFlags ++ [
"--disable-ssh-agent"
];
}))
}
))
];
/*
systemd.user.services = {

View File

@@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
username,
...
}:
let
cfg = config.shell.components.grimblast;
in
{
options.shell.components.grimblast = {
enable = lib.mkEnableOption (lib.mdDoc "Enable pre-configured grimblast");
};
config = lib.mkIf cfg.enable {
home-manager.users.${username} = {
wayland.windowManager.hyprland = {
settings = {
bind = [
"SUPER_SHIFT,V,exec,uwsm app -- ${lib.getExe pkgs.grimblast} --freeze copy area"
];
};
};
home = {
# bugged, freezes
sessionVariables.GRIMBLAST_EDITOR = "${lib.getExe pkgs.annotator}";
packages = with pkgs; [
grimblast
annotator
];
};
};
};
}

View File

@@ -19,12 +19,15 @@ in
home-manager.users.${username} = {
wayland.windowManager.hyprland.settings = {
bindr = [ "SUPER,SUPER_L,exec,uwsm app -- ${lib.getExe pkgs.walker}" ];
/*
layerrule = [
# TODO: Add layer rules for walker
"blur, anyrun"
"ignorealpha 0.3, anyrun"
];
*/
};
programs.niri.settings.binds."Mod+Space".action.spawn = [ (lib.getExe pkgs.walker) ];
home.packages = with pkgs; [
walker
wl-clipboard

View File

@@ -20,6 +20,8 @@ in
enable = true;
settings = {
mainBar = {
layer = "top";
height = 24;
reload_style_on_change = true;
exclusive = true;
@@ -35,8 +37,7 @@ in
modules-center = [
"clock"
];
modules-right =
[
modules-right = [
"privacy"
"gamemode"
"tray"

View File

@@ -21,7 +21,7 @@ in
lpc21isp
dfu-util
openscad
orca-slicer
# orca-slicer
];
home-manager.users.${username} = {
services.flatpak.packages = [

View File

@@ -28,6 +28,7 @@ in
environment.systemPackages = with pkgs; [
steam
cubyz-bin
oversteer
obs-studio
(lutris.override {
@@ -35,11 +36,11 @@ in
pkgs: with pkgs; [
libgudev
libvdpau
libsoup_2_4
];
})
rpcs3
wine64
# rpcs3
bottles
wineWow64Packages.stagingFull
winetricks
protontricks
mangohud

View File

@@ -21,28 +21,50 @@ in
users.users.${username}.extraGroups = [ "libvirtd" ];
boot = {
kernelParams = [
"amd_iommu=on"
"iommu=pt"
];
};
# 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;
};
services.spice-vdagentd.enable = true;
networking.firewall.trustedInterfaces = [ "virbr0" ];
services = {
spice-vdagentd.enable = true;
spice-webdavd.enable = true;
};
};
}

View File

@@ -94,15 +94,15 @@ 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 = {
gpg.homedir = lib.mkIf itgr.gpg "${xdgConfig.configHome}/gnupg";
bash.historyFile = lib.mkIf itgr.bash "${xdgConfig.stateHome}/bash/history";
zsh = lib.mkIf itgr.zsh {
dotDir = ".config/zsh";
dotDir = "${xdgConfig.configHome}/zsh";
history.path = "${xdgConfig.stateHome}/zsh/history";
};
};

View 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 ];
};
})

View 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 ];
};
})

View 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=";
};
}
]

View 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 ];
};
})

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