Compare commits
7 Commits
be45a769c7
...
96f1c6854b
Author | SHA1 | Date | |
---|---|---|---|
96f1c6854b | |||
32e4b957aa | |||
97f2fd94e6 | |||
fc8ae06a06 | |||
6e7d63bbfd | |||
295cfa4c67 | |||
2fd3865bd2 |
8
.typos.toml
Normal file
8
.typos.toml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[default]
|
||||||
|
extend-ignore-re = [
|
||||||
|
# Ignore `files = "";` declarations
|
||||||
|
"(?Rm)^\\s*files\\s*=.*;$"
|
||||||
|
]
|
||||||
|
|
||||||
|
[default.extend-words]
|
||||||
|
lazer = "lazer"
|
25
.vscode/settings.json
vendored
Normal file
25
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"files.eol": "\n",
|
||||||
|
"[nix]": {
|
||||||
|
"editor.tabSize": 2
|
||||||
|
},
|
||||||
|
"nix.enableLanguageServer": true,
|
||||||
|
"nix.serverPath": "nixd",
|
||||||
|
"nix.serverSettings": {
|
||||||
|
"nixd": {
|
||||||
|
"formatting": {
|
||||||
|
"command": [
|
||||||
|
"nixfmt"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"nixos": {
|
||||||
|
"expr": "(builtins.getFlake \"${workspaceFolder}\").nixosConfigurations.NixOS-VM.options",
|
||||||
|
},
|
||||||
|
// "home-manager": {
|
||||||
|
// "expr": "(builtins.getFlake \"${workspaceFolder}\").homeConfigurations.NixOS-VM.options",
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
901
flake.lock
generated
901
flake.lock
generated
File diff suppressed because it is too large
Load Diff
44
flake.nix
44
flake.nix
@ -8,8 +8,9 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
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.url = "github:cachix/devenv";
|
||||||
devenv-root = {
|
devenv-root = {
|
||||||
url = "file+file:///dev/null";
|
url = "file+file:///dev/null";
|
||||||
@ -23,12 +24,23 @@
|
|||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
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 =
|
outputs =
|
||||||
inputs:
|
inputs:
|
||||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
|
||||||
{ ... }:
|
{ self, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.devenv.flakeModule
|
inputs.devenv.flakeModule
|
||||||
@ -38,17 +50,27 @@
|
|||||||
lite-config = {
|
lite-config = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
nixpkgs = inputs.nixpkgs;
|
nixpkgs = inputs.nixpkgs;
|
||||||
config = { };
|
|
||||||
overlays = [ ];
|
|
||||||
patches = [ ./patches/onlyoffice.patch ];
|
|
||||||
exportOverlayPackages = false;
|
exportOverlayPackages = false;
|
||||||
setPerSystemPkgs = true;
|
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)
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
extraSpecialArgs = {
|
||||||
systemModules = [ ./modules/nixos ];
|
flake-self = self;
|
||||||
|
};
|
||||||
|
systemModules = [
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
./modules/nixos
|
||||||
|
];
|
||||||
homeModules = [ ./modules/home ];
|
homeModules = [ ./modules/home ];
|
||||||
hostModuleDir = ./hosts;
|
hostModuleDir = ./hosts;
|
||||||
|
|
||||||
hosts = {
|
hosts = {
|
||||||
NixOS-VM.system = "x86_64-linux";
|
NixOS-VM.system = "x86_64-linux";
|
||||||
};
|
};
|
||||||
@ -66,7 +88,11 @@
|
|||||||
|
|
||||||
name = "nixos-config";
|
name = "nixos-config";
|
||||||
packages = builtins.attrValues {
|
packages = builtins.attrValues {
|
||||||
inherit (pkgs) nixfmt-rfc-style git sops;
|
inherit (pkgs) nixfmt-rfc-style sops;
|
||||||
|
};
|
||||||
|
languages.nix = {
|
||||||
|
enable = true;
|
||||||
|
lsp.package = pkgs.nixd;
|
||||||
};
|
};
|
||||||
pre-commit.hooks = {
|
pre-commit.hooks = {
|
||||||
actionlint.enable = true;
|
actionlint.enable = true;
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
"${modulesPath}/virtualisation/qemu-vm.nix"
|
"${modulesPath}/virtualisation/qemu-vm.nix"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
ataraxia.defaults.role = "base";
|
||||||
|
|
||||||
virtualisation.memorySize = 4096;
|
virtualisation.memorySize = 4096;
|
||||||
virtualisation.cores = 4;
|
virtualisation.cores = 4;
|
||||||
virtualisation.resolution.x = 1920;
|
virtualisation.resolution.x = 1920;
|
||||||
@ -30,5 +32,10 @@
|
|||||||
boot.zfs.forceImportRoot = false;
|
boot.zfs.forceImportRoot = false;
|
||||||
networking.hostId = "84977205";
|
networking.hostId = "84977205";
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# test overlay
|
||||||
|
sing-box
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
{ ... }:
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) filterAttrs;
|
||||||
|
inherit (builtins) attrNames readDir;
|
||||||
|
moduleDirs =
|
||||||
|
dir:
|
||||||
|
map (name: dir + "/${name}") (attrNames (filterAttrs (_: type: type == "directory") (readDir dir)));
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
imports = moduleDirs ./.;
|
||||||
}
|
}
|
||||||
|
19
modules/nixos/lix/default.nix
Normal file
19
modules/nixos/lix/default.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption;
|
||||||
|
cfg = config.ataraxia.defaults.lix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.ataraxia.defaults.lix = {
|
||||||
|
enable = mkEnableOption "Enable lix";
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [ inputs.lix-module.nixosModules.default ];
|
||||||
|
|
||||||
|
config.lix.enable = cfg.enable;
|
||||||
|
}
|
65
modules/nixos/nix/default.nix
Normal file
65
modules/nixos/nix/default.nix
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
flake-self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
cfg = config.ataraxia.defaults.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.ataraxia.defaults.nix = {
|
||||||
|
enable = mkEnableOption "Nix defaults";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.etc.nixpkgs.source = config.nixpkgs.flake.source;
|
||||||
|
environment.etc.self.source = flake-self.outPath;
|
||||||
|
nix = {
|
||||||
|
channel.enable = false;
|
||||||
|
extraOptions = ''
|
||||||
|
keep-outputs = true
|
||||||
|
keep-derivations = true
|
||||||
|
# Prevent Nix from fetching the registry every time
|
||||||
|
flake-registry = ${inputs.flake-registry}/flake-registry.json
|
||||||
|
'';
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 90d";
|
||||||
|
};
|
||||||
|
registry.ataraxia.flake = flake-self;
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
require-sigs = true;
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
"https://ataraxiadev-foss.cachix.org"
|
||||||
|
"https://numtide.cachix.org"
|
||||||
|
"https://devenv.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
"ataraxiadev-foss.cachix.org-1:ws/jmPRUF5R8TkirnV1b525lP9F/uTBsz2KraV61058="
|
||||||
|
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
|
||||||
|
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
|
||||||
|
];
|
||||||
|
trusted-users = [
|
||||||
|
"root"
|
||||||
|
"deploy"
|
||||||
|
"@wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
33
modules/nixos/roles/default.nix
Normal file
33
modules/nixos/roles/default.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkIf
|
||||||
|
mkMerge
|
||||||
|
mkOption
|
||||||
|
types
|
||||||
|
;
|
||||||
|
role = config.ataraxia.defaults.role;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.ataraxia.defaults = {
|
||||||
|
role = mkOption {
|
||||||
|
type = types.enum [
|
||||||
|
"none"
|
||||||
|
"base"
|
||||||
|
"server"
|
||||||
|
"desktop"
|
||||||
|
];
|
||||||
|
default = "none";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkMerge [
|
||||||
|
(mkIf (role == "base") {
|
||||||
|
ataraxia.defaults.nix.enable = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
94
overlays/default.nix
Normal file
94
overlays/default.nix
Normal 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;
|
||||||
|
}
|
22
patches/hyprland-tablet.patch
Normal file
22
patches/hyprland-tablet.patch
Normal 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;
|
Loading…
x
Reference in New Issue
Block a user