diff --git a/flake.lock b/flake.lock index bf6985f..30786fe 100755 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,5 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -58,61 +37,10 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1770380644, - "narHash": "sha256-P7dWMHRUWG5m4G+06jDyThXO7kwSk46C1kgjEWcybkE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ae67888ff7ef9dff69b3cf0cc0fbfbcd3a722abe", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixvim": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", - "systems": "systems" - }, - "locked": { - "lastModified": 1771135771, - "narHash": "sha256-wyvBIhDuyCRyjB3yPg77qoyxrlgQtBR1rVW3c9knV3E=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "ed0424f0b08d303a7348f52f7850ad1b2704f9ba", - "type": "github" - }, - "original": { - "id": "nixvim", - "type": "indirect" - } - }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs", - "nixvim": "nixvim" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index e9b8f2d..97cda4e 100644 --- a/flake.nix +++ b/flake.nix @@ -8,13 +8,13 @@ url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + }; # never got nixvim to wokrs. ): # nixvim = { # url = "github:nix-community/nixvim/nixos-25.11"; # }; - }; - outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs: + outputs = { self, nixpkgs, home-manager, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -22,8 +22,8 @@ { nixosConfigurations = { laptop = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ + specialArgs = { inherit inputs;}; + modules = [ ./hosts/laptop/configuration.nix ]; }; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index b4a3b22..1778911 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -9,7 +9,6 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix inputs.home-manager.nixosModules.default -# inputs.nixvim.homeModules.default ]; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index b42955e..8e6ec16 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -16,6 +16,7 @@ imports = [ ../../modules/home-manager/rofi.nix # launcher and keybindings helper ../../modules/home-manager/swaync.nix # notification daemon ../../modules/home-manager/neovim.nix # dont use nixvim. broken +../../modules/home-manager/rclone.nix ]; @@ -48,6 +49,7 @@ home.packages = [ (pkgs.callPackage ../../modules/scripts/weather.nix {}) (pkgs.callPackage ../../modules/scripts/cowsay.nix {}) (pkgs.callPackage ../../modules/scripts/wallpaper.nix {}) +(pkgs.callPackage ../../modules/scripts/mountkdrive.nix {}) # # Adds the 'hello' command to your environment. It prints a friendly # # "Hello, world!" when run. # pkgs.hello diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 524293b..682f536 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -144,6 +144,7 @@ in "swww img ${wallpaper}" "swww-daemon" "sleep 1 && custom-wallpaper" + "custom-mountkdrive" ]; # █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀ # █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█ diff --git a/modules/home-manager/librewolf.nix b/modules/home-manager/librewolf.nix new file mode 100644 index 0000000..cb6a272 --- /dev/null +++ b/modules/home-manager/librewolf.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: + +{ + programs.zoxide = { + enable = true; + enableZshIntegration = true; + }; +} diff --git a/modules/home-manager/rclone.nix b/modules/home-manager/rclone.nix new file mode 100644 index 0000000..e224d4c --- /dev/null +++ b/modules/home-manager/rclone.nix @@ -0,0 +1,7 @@ +{ config, pkgs, agenix, ... }: + +{ + programs.rclone = { + enable = true; + }; +} diff --git a/modules/scripts/mountkdrive.nix b/modules/scripts/mountkdrive.nix new file mode 100644 index 0000000..ed1dd6c --- /dev/null +++ b/modules/scripts/mountkdrive.nix @@ -0,0 +1,22 @@ +{ writeShellApplication, rclone, libnotify, ... }: + +writeShellApplication { + name = "custom-mountkdrive"; + runtimeInputs = [ + rclone + libnotify + ]; + text = '' +REMOTE_NAME="kdrive" +MOUNT_POINT="$HOME/kdrive" + +if rclone listremotes | rg "^''${REMOTE_NAME}:"; then + echo "Mounting ''${REMOTE_NAME}..." + rclone mount "''${REMOTE_NAME}:" "$MOUNT_POINT" --vfs-cache-mode writes & +else + notify-send "rclone mount failed" \ + "Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix." +echo "Remote ''${REMOTE_NAME} not found. Configure rclone or comment out the exec line in hyprland.nix." +fi + ''; +}