From 346ad6aecf930ba1e5573ddd08b2159810abd565 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 20 Feb 2024 13:11:57 -0600 Subject: [PATCH] nix-index as a flake --- flake.lock | 46 +++++++++++++++----- modules/desktop/window-managers/hyprland.nix | 24 +++------- modules/development/dev.nix | 2 - modules/nix.nix | 11 ++++- 4 files changed, 50 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 8ea1c17..815526f 100644 --- a/flake.lock +++ b/flake.lock @@ -68,11 +68,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1708346705, - "narHash": "sha256-Zevax+tbcABJ9ZT/jOtJ8x4nudSAXhlBF0uIDSp8v4o=", + "lastModified": 1708452876, + "narHash": "sha256-UrFrNfIwd0pcCTZYc6RAppzvpL6icfhelFMgufY5vxU=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "df82625206b6faffbf02d5d802e857143d656239", + "rev": "13d985489788fa5349b3457d6eb1c19bad8f37e9", "type": "github" }, "original": { @@ -180,17 +180,18 @@ "hyprland": "hyprland", "hyprland-contrib": "hyprland-contrib", "nix-eval-jobs": "nix-eval-jobs", + "nix-index-database": "nix-index-database", "nixpkgs": "nixpkgs", "nixpkgs-wayland": "nixpkgs-wayland", "pinix": "pinix" }, "locked": { "dir": "inputs", - "lastModified": 1708362494, - "narHash": "sha256-ldp9eBp8/slVmtUIas1lNUBScZTTnXWW7jFBnrr90qg=", + "lastModified": 1708454456, + "narHash": "sha256-1B0dBpETWny25gVSCGi1r02AeEwVMxu4kz2KDFzK8Xs=", "owner": "daylinmorgan", "repo": "oizys", - "rev": "8965a18cceb4c07c5b66442ea5562977df19941e", + "rev": "a471f5a799c6ba0e4a4e57bc4ae4485f6c0b664e", "type": "github" }, "original": { @@ -265,13 +266,34 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "inputs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708225687, + "narHash": "sha256-NJBDfvknI26beOFmjO2coeJMTTUCCtw2Iu+rvJ1Zb9k=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "17352eb241a8d158c4ac523b19d8d2a6c8efe127", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1708341091, - "narHash": "sha256-3R7doGV1AoB5VKFifEd5elj8t4cld6VpJRpn9NaYr1Y=", + "lastModified": 1708407374, + "narHash": "sha256-EECzarm+uqnNDCwaGg/ppXCO11qibZ1iigORShkkDf0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "86ef6bd96b6279e1a4a53236d341f5df1ede3803", + "rev": "f33dd27a47ebdf11dc8a5eb05e7c8fbdaf89e73f", "type": "github" }, "original": { @@ -310,11 +332,11 @@ ] }, "locked": { - "lastModified": 1708345677, - "narHash": "sha256-kmay2PfLBNL1fDYDlKyYj7P/JSqyFeMKzA+PMhEPbJI=", + "lastModified": 1708377258, + "narHash": "sha256-qSVr87oW9P4VqX0ojSq4uiVq+Zmar5kYawpDl4++7bA=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "e01cca334cae6d9e852c8d657633695c681250fd", + "rev": "aa244b9568e89d7fb91cf0fb614dc1eae460982e", "type": "github" }, "original": { diff --git a/modules/desktop/window-managers/hyprland.nix b/modules/desktop/window-managers/hyprland.nix index 4c35d15..de10c55 100644 --- a/modules/desktop/window-managers/hyprland.nix +++ b/modules/desktop/window-managers/hyprland.nix @@ -17,45 +17,33 @@ }; in { config = mkIf cfg.enable { - systemd.services.screen-locker = { - wantedBy = ["sleep.target"]; - description = "Lock the screen using a custom lock script"; - before = ["suspend.target"]; - serviceConfig = { - User = "daylin"; - Type = "forking"; - Environment = "DISPLAY=:0"; - ExecStart = "${lock}/bin/lock"; - }; - }; security.pam.services.swaylock = {}; # programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default; # Optional, hint electron apps to use wayland: environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.systemPackages = with pkgs; [ + swayidle wlr-randr kanshi lock brightnessctl udiskie + eww-wayland # notifications libnotify dunst - # screenshots + # utils grimblast - - eww-wayland + wl-clipboard rofi-wayland - hyprpaper - - catppuccin-cursors.mochaDark pavucontrol - wl-clipboard + catppuccin-cursors.mochaDark + hyprpaper ]; nixpkgs.overlays = [ diff --git a/modules/development/dev.nix b/modules/development/dev.nix index 347018b..982ac8e 100644 --- a/modules/development/dev.nix +++ b/modules/development/dev.nix @@ -19,7 +19,5 @@ wget curl htop - - comma ]; } diff --git a/modules/nix.nix b/modules/nix.nix index becbb73..0d38d99 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -4,6 +4,10 @@ pkgs, ... }: { + imports = [ + inputs.nix-index-database.nixosModules.nix-index + ]; + nixpkgs.config.allowUnfree = true; nix.package = pkgs.nixUnstable; nix.extraOptions = '' @@ -18,12 +22,17 @@ }; environment.systemPackages = with pkgs; [ - # nix-output-monitor alejandra + self.packages.${pkgs.system}.oizys inputs.pinix.packages.${pkgs.system}.default ]; + programs.nix-index-database.comma.enable = true; + + # nix-index didn't like this being enabled? + programs.command-not-found.enable = false; + nix.settings = { trusted-users = ["@wheel"]; accept-flake-config = true;