feat: add overlay, set some nixpkgs configuration

This commit is contained in:
Dmitriy Kholkin 2025-03-02 14:29:18 +03:00
parent be45a769c7
commit 2fd3865bd2
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
4 changed files with 1019 additions and 36 deletions

901
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,9 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
flake-parts.url = "github:hercules-ci/flake-parts";
lite-config.url = "github:ataraxiasjel/lite-config/v0.6.0";
lite-config.url = "github:ataraxiasjel/lite-config/v0.7.0";
devenv.url = "github:cachix/devenv";
devenv-root = {
url = "file+file:///dev/null";
@ -23,12 +24,23 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
ataraxiasjel-nur.url = "github:AtaraxiaSjel/nur";
lix-module = {
# url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz";
url = "github:ataraxiasjel/lix-nixos-module/2.92.0-1";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
{ ... }:
{ self, ... }:
{
imports = [
inputs.devenv.flakeModule
@ -38,17 +50,27 @@
lite-config = {
nixpkgs = {
nixpkgs = inputs.nixpkgs;
config = { };
overlays = [ ];
patches = [ ./patches/onlyoffice.patch ];
exportOverlayPackages = false;
setPerSystemPkgs = true;
config = {
allowUnfree = true;
};
patches = [ ./patches/onlyoffice.patch ];
overlays = [
inputs.ataraxiasjel-nur.overlays.default
inputs.ataraxiasjel-nur.overlays.grub2-unstable-argon2
(final: prev: (import ./overlays inputs) final prev)
];
};
systemModules = [ ./modules/nixos ];
extraSpecialArgs = {
flake-self = self;
};
systemModules = [
inputs.sops-nix.nixosModules.sops
./modules/nixos
];
homeModules = [ ./modules/home ];
hostModuleDir = ./hosts;
hosts = {
NixOS-VM.system = "x86_64-linux";
};

94
overlays/default.nix Normal file
View File

@ -0,0 +1,94 @@
inputs: final: prev:
let
inherit inputs;
inherit (prev.hostPlatform) system;
master = import inputs.nixpkgs-master {
config = {
allowUnfree = true;
};
localSystem = { inherit system; };
};
in
{
# attic-client = inputs.attic.packages.${system}.attic;
# attic-server = inputs.attic.packages.${system}.attic-server;
# cassowary-py = inputs.cassowary.packages.${system}.cassowary;
heroic = (prev.heroic.override { extraPkgs = [ final.umu-launcher ]; });
intel-vaapi-driver = prev.intel-vaapi-driver.override { enableHybridCodec = true; };
# nix-alien = inputs.nix-alien.packages.${system}.nix-alien;
# nix-direnv = inputs.nix-direnv.packages.${system}.default.override { nix = final.nix; };
# nix-fast-build = inputs.nix-fast-build.packages.${system}.default;
# nix-index-update = inputs.nix-alien.packages.${system}.nix-index-update;
osu-lazer = master.osu-lazer;
osu-lazer-bin = master.osu-lazer-bin;
# prismlauncher = inputs.prismlauncher.packages.${system}.prismlauncher.override {
# jdks = [ final.temurin-bin ];
# };
xray = master.xray;
# youtube-to-mpv = prev.callPackage ./packages/youtube-to-mpv.nix { term = config.defaultApplications.term.cmd; };
# yt-archivist = prev.callPackage ./packages/yt-archivist { };
yt-dlp = master.yt-dlp;
sing-box = master.sing-box;
steam = prev.steam.override {
extraPkgs =
pkgs:
builtins.attrValues {
inherit (pkgs)
mono
libkrb5
keyutils
;
};
};
wine = prev.wineWow64Packages.stagingFull;
# Move modprobed config to subdir. Easier to use with impermanence
modprobed-db = prev.modprobed-db.overrideAttrs (oa: {
postPatch =
(oa.postPatch or "")
+ ''
substituteInPlace ./common/modprobed-db.in \
--replace-fail "/modprobed-db.conf" "/modprobed-db/modprobed-db.conf"
substituteInPlace ./common/modprobed-db.skel \
--replace-fail "/.config" "/.config/modprobed-db"
'';
});
# TODO: remove after ver > v0.47.2
hyprland =
if prev.hyprland.version == "0.47.2" then
(prev.hyprland.overrideAttrs (oa: {
patches = (oa.patches or [ ]) ++ [
./patches/hyprland-tablet.patch
];
}))
else
prev.hyprland;
pass-secret-service = prev.pass-secret-service.overrideAttrs (_: {
installCheckPhase = null;
postInstall = ''
mkdir -p $out/share/{dbus-1/services,xdg-desktop-portal/portals}
cat > $out/share/dbus-1/services/org.freedesktop.secrets.service << EOF
[D-BUS Service]
Name=org.freedesktop.secrets
Exec=/run/current-system/sw/bin/systemctl --user start pass-secret-service
EOF
cp $out/share/dbus-1/services/{org.freedesktop.secrets.service,org.freedesktop.impl.portal.Secret.service}
cat > $out/share/xdg-desktop-portal/portals/pass-secret-service.portal << EOF
[portal]
DBusName=org.freedesktop.secrets
Interfaces=org.freedesktop.impl.portal.Secrets
UseIn=gnome
EOF
'';
});
# narodmon-py = prev.writers.writePython3Bin "temp.py" {
# libraries = with prev.python3Packages; [ requests ];
# } ./packages/narodmon-py.nix;
# yandex-taxi-py = prev.writers.writePython3 "yandex-taxi.py" {
# libraries = with prev.python3Packages; [ requests ];
# } ./packages/yandex-taxi-py.nix;
}

View File

@ -0,0 +1,22 @@
diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp
index 0952a7d..f61d818 100644
--- a/src/managers/input/Tablets.cpp
+++ b/src/managers/input/Tablets.cpp
@@ -159,13 +159,12 @@ void CInputManager::onTabletAxis(CTablet::SAxisEvent e) {
void CInputManager::onTabletTip(CTablet::STipEvent e) {
const auto PTAB = e.tablet;
const auto PTOOL = ensureTabletToolPresent(e.tool);
- const auto POS = e.tip;
- g_pPointerManager->warpAbsolute(POS, PTAB);
- refocusTablet(PTAB, PTOOL, true);
- if (e.in)
+ if (e.in) {
+ simulateMouseMovement();
+ refocusTablet(PTAB, PTOOL);
PROTO::tablet->down(PTOOL);
- else
+ } else
PROTO::tablet->up(PTOOL);
PTOOL->isDown = e.in;