From 6432f7b69e1a8080332842cb65ea0f5c19af1cf1 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Wed, 12 Jun 2024 19:06:00 -0400 Subject: [PATCH] add nix-index-database other bits of cleanup --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 6 ++++++ hosts/gerg-desktop/main.nix | 28 +++++++++++++++++----------- hosts/gerg-desktop/vfio.nix | 4 ++-- 4 files changed, 46 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 78c4691..10c1b18 100644 --- a/flake.lock +++ b/flake.lock @@ -323,6 +323,26 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "unstable" + ] + }, + "locked": { + "lastModified": 1717919703, + "narHash": "sha256-4i/c31+dnpv6KdUA3BhbMDS9Lvg/CDin78caYJlq0bY=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "a157a81d0a4bc909b2b6666dd71909bcdc8cd0d6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixlib": { "locked": { "lastModified": 1712450863, @@ -495,6 +515,7 @@ "lanzaboote": "lanzaboote", "master": "master", "nix": "nix", + "nix-index-database": "nix-index-database", "nixos-generators": "nixos-generators", "nvim-flake": "nvim-flake", "sops-nix": "sops-nix", diff --git a/flake.nix b/flake.nix index 068bb3b..5c5774c 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,12 @@ repo = "lanzaboote"; inputs.nixpkgs.follows = "unstable"; }; + nix-index-database = { + type = "github"; + owner = "nix-community"; + repo = "nix-index-database"; + inputs.nixpkgs.follows = "unstable"; + }; #my own packages spicetify-nix = { type = "github"; diff --git a/hosts/gerg-desktop/main.nix b/hosts/gerg-desktop/main.nix index 9a3d628..f9714b5 100644 --- a/hosts/gerg-desktop/main.nix +++ b/hosts/gerg-desktop/main.nix @@ -1,4 +1,5 @@ { + nix-index-database, nvim-flake, self, _file, @@ -53,6 +54,11 @@ nix-direnv.package = pkgs.nix-direnv.override { nix = config.nix.package; }; }; + programs.nix-index = { + enable = true; + package = nix-index-database.packages.nix-index-with-db; + }; + nix = { settings.system-features = [ "kvm" @@ -77,18 +83,18 @@ ripgrep fd jq + wget xautoclick prismlauncher deadnix statix - nix-index element-desktop webcord - # QMK configuration - via - qmk gh nixfmt-rfc-style + # QMK configuration + #via + #qmk ; inherit (nvim-flake.packages) neovim; inherit (self.packages) lint; @@ -102,12 +108,12 @@ }; }; - services.udev.packages = [ - pkgs.android-udev-rules - pkgs.via - pkgs.qmk-udev-rules - ]; - programs.adb.enable = true; + #services.udev.packages = [ + # pkgs.android-udev-rules + # pkgs.via + # pkgs.qmk-udev-rules + #]; + #programs.adb.enable = true; networking = { useNetworkd = false; @@ -157,7 +163,7 @@ isNormalUser = true; extraGroups = [ "wheel" - "adbusers" + #"adbusers" #"plugdev" ]; openssh.authorizedKeys.keys = [ diff --git a/hosts/gerg-desktop/vfio.nix b/hosts/gerg-desktop/vfio.nix index 19a3dcb..c333719 100644 --- a/hosts/gerg-desktop/vfio.nix +++ b/hosts/gerg-desktop/vfio.nix @@ -137,7 +137,7 @@ in if [ "$GUEST_NAME" != "Windows" ]; then exit 0 - else if [ "$OPERATION" == "prepare" ]; then + elif [ "$OPERATION" == "prepare" ]; then # Stop display-manager systemctl stop display-manager.service @@ -157,7 +157,7 @@ in ln -fs /etc/Xorg/1_mon.conf /etc/X11/xorg.conf.d/99-custom.conf touch /etc/Xorg/ONE_MONITOR systemctl start display-manager.service - else if [ "$OPERATION" == "release" ]; then + elif [ "$OPERATION" == "release" ]; then # Dual gpu/monitor stuff systemctl stop display-manager.service