From 0f58525994f43759850b03eb3c9e2a9ddcee6dcc Mon Sep 17 00:00:00 2001 From: illustris Date: Sun, 25 Jun 2023 13:15:00 +0530 Subject: [PATCH] bump inputs, add nixfs, add lib overlay, add udev rule for thinkvision --- configuration.nix | 10 +++++++++- desktop-configuration.nix | 2 ++ flake.lock | 30 ++++++++++++++++++++++++------ flake.nix | 15 +++++++++++++-- 4 files changed, 48 insertions(+), 9 deletions(-) diff --git a/configuration.nix b/configuration.nix index 8c3adcf..84f1f90 100644 --- a/configuration.nix +++ b/configuration.nix @@ -33,6 +33,7 @@ etc.nixpkgs.source = pkgs.path; systemPackages = with pkgs; [ asciinema + bcc bind binutils-unwrapped bmon cmatrix # More useful than you might think cscope @@ -178,10 +179,17 @@ qemuGuest.enable = true; udev = { # TODO: check if still needed - extraRules = '' + extraRules = pkgs.lib.indent '' SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service" + ACTION=="bind", SUBSYSTEM=="usb", ATTRS{idVendor}=="2d1f", ATTRS{idProduct}=="524c", RUN+="${pkgs.writeScript "thinkvision" (pkgs.lib.indent '' + #!${pkgs.bash}/bin/bash + export DISPLAY=:0 + export XAUTHORITY=/var/run/lightdm/root/:0 + xsetwacom list devices | grep -oP 'id:\s+\K[0-9]+' | xargs -I{} xsetwacom --set {} MapToOutput HEAD-1 + '')}" ''; packages = [ (pkgs.callPackage (import ./packages/xr-hardware/default.nix) {}) ]; + path = with pkgs; [ xf86_input_wacom findutils ]; }; zfs.autoScrub.enable = true; }; diff --git a/desktop-configuration.nix b/desktop-configuration.nix index af27192..0dd3706 100644 --- a/desktop-configuration.nix +++ b/desktop-configuration.nix @@ -76,9 +76,11 @@ xserver = { # defaultDepth = 30; displayManager.defaultSession = "none+dwm"; + # desktopManager.plasma5.enable = true; dpi = 100; enable = true; videoDrivers = [ "nvidia" ]; + wacom.enable = true; windowManager.dwm.enable = true; }; pipewire = { diff --git a/flake.lock b/flake.lock index a1bd5e7..ea031ee 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1686604884, - "narHash": "sha256-AkfxSmGGvNMtyXt1us9Lm8cMeIwqxpkSTeNeBQ00SL8=", + "lastModified": 1686922395, + "narHash": "sha256-ysevinohPxdKp0RXyhDRsz1/vh1eXazg4AWp0n5X/U4=", "owner": "nix-community", "repo": "home-manager", - "rev": "b01eb1eb3b579c74e6a4189ef33cc3fa24c40613", + "rev": "9ba7b3990eb1f4782ea3f5fe7ac4f3c88dd7a32c", "type": "github" }, "original": { @@ -62,13 +62,30 @@ "type": "github" } }, + "nixfs": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1687349512, + "narHash": "sha256-uB7xb/c7Z2FjRJQTpHL3/tLGLrXUCUDwf12u32TjQPg=", + "path": "/home/illustris/src/nixfs", + "type": "path" + }, + "original": { + "path": "/home/illustris/src/nixfs", + "type": "path" + } + }, "nixpkgs": { "locked": { - "lastModified": 1686501370, - "narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", + "lastModified": 1686869522, + "narHash": "sha256-tbJ9B8WLCTnVP/LwESRlg0dII6Zyg2LmUU/mB9Lu98E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", + "rev": "7c67f006ea0e7d0265f16d7df07cc076fdffd91f", "type": "github" }, "original": { @@ -82,6 +99,7 @@ "inputs": { "home-manager": "home-manager", "illustris": "illustris", + "nixfs": "nixfs", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index a4fe23b..531951c 100644 --- a/flake.nix +++ b/flake.nix @@ -11,9 +11,13 @@ url = "github:illustris/flake"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixfs = { + url = "path:/home/illustris/src/nixfs"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, home-manager, illustris, ... }: { + outputs = { self, nixpkgs, home-manager, illustris, nixfs, ... }: { nixosConfigurations = { desktop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -22,7 +26,14 @@ home-manager.nixosModule {nix.registry.np.flake = nixpkgs;} {environment.etc.flake.source = self;} - {nixpkgs.overlays = [ illustris.overlays.default ];} + {nixpkgs.overlays = [ + illustris.overlays.default + (self: super: { + lib = super.lib // illustris.lib; + }) + ];} + nixfs.nixosModules.nixfs + {services.nixfs.enable = true;} ]; }; };