diff --git a/docs/APPS.md b/docs/APPS.md index 870a514..1f36b4e 100644 --- a/docs/APPS.md +++ b/docs/APPS.md @@ -4,10 +4,9 @@ ## Laptop -The laptop configuration is used by a Omen 16 laptop w/ nvidia and an amd gpu running NixOS. +The laptop configuration is used by an Omen 16 laptop w/ nvidia and an amd gpu running NixOS. The configurations files can be found in the `hosts/laptop` directory. - | Category | Name | |----------------|---------------| | WM | Hyprland | @@ -42,7 +41,7 @@ The configurations files can be found in the `hosts/laptop` directory. The server configuration is used by a home server running NixOS. The configurations files can be found in the `hosts/server` directory. -I mainly use it for self hosting websites and services such as Nextcloud, Vaultwarden, ... +I mainly use it for self-hosting websites and services such as Nextcloud, Vaultwarden, ... I exposed some services to the internet using a reverse proxy (Nginx) and cloudflare-dyndns, others are accessed through a tailscale network ### Apps diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 1456bc6..fd178d0 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -6,7 +6,7 @@ The process is straight-forward. - Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0 and 1) - Fork Nixy [git repository](https://github.com/anotherhadi/nixy). -- Write your changes (new theme, bug fixes, task in todo, ...). +- Write your changes (new theme, bug fixes, task in to-do, ...). - Create a Pull Request against the main branch of Nixy. > [!WARNING] diff --git a/docs/THEMES.md b/docs/THEMES.md index 3cecf27..40ea07c 100644 --- a/docs/THEMES.md +++ b/docs/THEMES.md @@ -4,7 +4,7 @@ Themes are defined in `hosts/themes`. Those themes define the colors, fonts, ico You can change the selected theme by changing the import statement of your host's variables.nix file. > [!TIP] -> To apply the theme to Duckduckgo, follow the instructions in `$HOME/.duckduckgo-colorscheme.js` +> To apply the theme to DuckDuckGo, follow the instructions in `$HOME/.duckduckgo-colorscheme.js` ## Create your theme diff --git a/docs/TODO.md b/docs/TODO.md index 0f26f10..4228aa4 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -7,17 +7,20 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md)) - [ ] Variables-template with defaults - [ ] Themes - [ ] Upload new wallpapers - - [ ] MacOS theme + - [ ] macOS theme - [ ] Write a hyprland shortcuts markdown file (Parse the hyprland settings conf) - - [ ] Tofi (Wofi but terminal based) + - [ ] Tofi (Wofi, but terminal based) - [ ] add golang bin dir to path +- [ ] Qutebrowser + - [ ] Bitwarden integration (I need this.) + - [ ] Waybar - [ ] Caffeine status - [ ] Night-shift status - [ ] Hyprland - - [ ] Make hyprcursor work + - [ ] Implement Hyprcursor (see home/system/hyprland/hyprcursor.nix: Not working, small cursor on some apps, big one on others) - [ ] Animations based on app name - [ ] Wofi: popin - [ ] Wlogout: fade in @@ -27,6 +30,8 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md)) - [ ] Telescope: find with file content - [ ] Markdown snippets - [ ] Whichkey: Description for keybindings + - [ ] Flash.nvim + - [ ] Alpha: Open keybindings.md - [ ] Zen.nvim - [ ] Markdown fold - [ ] Markdown better table (maybe lsp?) diff --git a/docs/src/README_template.md b/docs/src/README_template.md index 835bcd2..622c1fa 100644 --- a/docs/src/README_template.md +++ b/docs/src/README_template.md @@ -50,4 +50,4 @@ sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname - [SCRIPTS.md](docs/SCRIPTS.md): Scripts that are available - [TODO.md](docs/TODO.md): What's next (feel free to contribute) - [CONTRIBUTING.md](docs/CONTRIBUTING.md): How to contribute -- [LICENSE](LICENSE): MIT Licensey +- [LICENSE](LICENSE): MIT License diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index 4d7e84d..9a92b69 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -25,6 +25,7 @@ ./plugins/noice.nix ./plugins/obsidian.nix ./plugins/image.nix + ./plugins/ltex.nix ./options.nix ./colorscheme.nix ]; diff --git a/home/programs/nvim/plugins/alpha.nix b/home/programs/nvim/plugins/alpha.nix index f81deca..19d8563 100644 --- a/home/programs/nvim/plugins/alpha.nix +++ b/home/programs/nvim/plugins/alpha.nix @@ -71,7 +71,7 @@ type = "button"; val = " NixOs Config"; on_press.__raw = - "function() vim.cmd[[e ${config.var.configDirectory}]] end"; + "function() vim.cmd[[Neotree ${config.var.configDirectory}]] end"; opts = { shortcut = "nc"; position = "center"; diff --git a/home/programs/nvim/plugins/lsp.nix b/home/programs/nvim/plugins/lsp.nix index e02bb9b..12c48b4 100644 --- a/home/programs/nvim/plugins/lsp.nix +++ b/home/programs/nvim/plugins/lsp.nix @@ -11,6 +11,13 @@ tailwindcss.enable = true; html.enable = true; svelte.enable = true; + ltex = { + enable = true; + settings = { + enabled = true; + language = "en"; + }; + }; }; keymaps.lspBuf = { "gd" = "definition"; diff --git a/home/programs/nvim/plugins/ltex.nix b/home/programs/nvim/plugins/ltex.nix new file mode 100644 index 0000000..337de0b --- /dev/null +++ b/home/programs/nvim/plugins/ltex.nix @@ -0,0 +1,10 @@ +{ + programs.nixvim.plugins.ltex-extra = { + enable = true; + settings = { + initCheck = true; + loadLangs = [ "en-US" "fr-FR" ]; + logLevel = "non"; + }; + }; +} diff --git a/home/programs/qutebrowser/default.nix b/home/programs/qutebrowser/default.nix index b3df58b..145dfa5 100644 --- a/home/programs/qutebrowser/default.nix +++ b/home/programs/qutebrowser/default.nix @@ -48,8 +48,8 @@ let src = pkgs.fetchFromGitHub { owner = "anotherhadi"; repo = "homepage"; - rev = "40286c5e03bcfb9993cce354b4f12c00a1b4966d"; - hash = "sha256-zlJ/bzFWE64HpUCxiRT5E9wrjVVwSTSgIOrifWKxphU="; + rev = "b77d35ed3596eb451bd2ec78063d7cc6e73c773d"; + hash = "sha256-j/40922kfAh6zqJ4IRYpr66YXNNYsxuXwZ0aiJFJea0="; }; # npmDepsHash = lib.fakeHash; @@ -73,7 +73,10 @@ let in { - imports = [ ./duckduckgo-colorscheme.nix ]; + imports = [ + ./duckduckgo-colorscheme.nix + # ./userscripts.nix + ]; programs.qutebrowser = { enable = true; diff --git a/home/programs/qutebrowser/userscripts.nix b/home/programs/qutebrowser/userscripts.nix new file mode 100644 index 0000000..7c15adb --- /dev/null +++ b/home/programs/qutebrowser/userscripts.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: { + + home.packages = with pkgs; [ + keyutils + python3 + python311Packages.pyperclip + python312Packages.tldextract + ]; + + xdg.configFile."qutebrowser/userscripts/bitwarden" = { + source = ./userscripts/qute-bitwarden.py; + executable = true; + }; +} diff --git a/home/programs/qutebrowser/userscripts/qute-bitwarden.py b/home/programs/qutebrowser/userscripts/qute-bitwarden.py new file mode 100644 index 0000000..92377ce --- /dev/null +++ b/home/programs/qutebrowser/userscripts/qute-bitwarden.py @@ -0,0 +1,291 @@ +#!/usr/bin/env python3 + +# SPDX-FileCopyrightText: Chris Braun (cryzed) +# +# SPDX-License-Identifier: GPL-3.0-or-later + +""" +Insert login information using Bitwarden CLI and a dmenu-compatible application +(e.g. dmenu, rofi -dmenu, ...). +""" + +USAGE = """The domain of the site has to be in the name of the Bitwarden entry, for example: "github.com/cryzed" or +"websites/github.com". The login information is inserted by emulating key events using qutebrowser's fake-key command in this manner: +[USERNAME][PASSWORD], which is compatible with almost all login forms. + +If enabled, with the `--totp` flag, it will also move the TOTP code to the +clipboard, much like the Firefox add-on. + +You must log into Bitwarden CLI using `bw login` prior to use of this script. +The session key will be stored using keyctl for the number of seconds passed to +the --auto-lock option. + +To use in qutebrowser, run: `spawn --userscript qute-bitwarden` +""" + +EPILOG = """Dependencies: tldextract (Python 3 module), pyperclip (optional +Python module, used for TOTP codes), Bitwarden CLI (1.7.4 is known to work +but older versions may well also work) + +WARNING: The login details are viewable as plaintext in qutebrowser's debug log +(qute://log) and might be shared if you decide to submit a crash report!""" + +import argparse +import enum +import functools +import os +import shlex +import subprocess +import sys +import json +import tldextract + +argument_parser = argparse.ArgumentParser( + description=__doc__, + usage=USAGE, + epilog=EPILOG, +) +argument_parser.add_argument('url', nargs='?', default=os.getenv('QUTE_URL')) +argument_parser.add_argument('--dmenu-invocation', '-d', default='wofi --dmenu -i', + help='Invocation used to execute a dmenu-provider') +argument_parser.add_argument('--password-prompt-invocation', '-p', default='rofi -dmenu -p "Master Password" -password -lines 0', + help='Invocation used to prompt the user for their Bitwarden password') +argument_parser.add_argument('--no-insert-mode', '-n', dest='insert_mode', action='store_false', + help="Don't automatically enter insert mode") +argument_parser.add_argument('--totp', '-t', action='store_true', + help="Copy TOTP key to clipboard") +argument_parser.add_argument('--io-encoding', '-i', default='UTF-8', + help='Encoding used to communicate with subprocesses') +argument_parser.add_argument('--merge-candidates', '-m', action='store_true', + help='Merge pass candidates for fully-qualified and registered domain name') +argument_parser.add_argument('--auto-lock', type=int, default=900, + help='Automatically lock the vault after this many seconds') +group = argument_parser.add_mutually_exclusive_group() +group.add_argument('--username-only', '-e', + action='store_true', help='Only insert username') +group.add_argument('--password-only', '-w', + action='store_true', help='Only insert password') +group.add_argument('--totp-only', '-T', + action='store_true', help='Only insert totp code') + +stderr = functools.partial(print, file=sys.stderr) + + +class ExitCodes(enum.IntEnum): + SUCCESS = 0 + FAILURE = 1 + # 1 is automatically used if Python throws an exception + NO_PASS_CANDIDATES = 2 + COULD_NOT_MATCH_USERNAME = 3 + COULD_NOT_MATCH_PASSWORD = 4 + + +def qute_command(command): + with open(os.environ['QUTE_FIFO'], 'w') as fifo: + fifo.write(command + '\n') + fifo.flush() + + +def ask_password(password_prompt_invocation): + process = subprocess.run( + shlex.split(password_prompt_invocation), + text=True, + stdout=subprocess.PIPE, + ) + if process.returncode > 0: + raise Exception('Could not unlock vault') + master_pass = process.stdout.strip() + return subprocess.check_output( + ['bw', 'unlock', '--raw', master_pass], + text=True, + ).strip() + + +def get_session_key(auto_lock, password_prompt_invocation): + if auto_lock == 0: + subprocess.call(['keyctl', 'purge', 'user', 'bw_session']) + return ask_password(password_prompt_invocation) + else: + process = subprocess.run( + ['keyctl', 'request', 'user', 'bw_session'], + text=True, + stdout=subprocess.PIPE, + ) + key_id = process.stdout.strip() + if process.returncode > 0: + session = ask_password(password_prompt_invocation) + if not session: + raise Exception('Could not unlock vault') + key_id = subprocess.check_output( + ['keyctl', 'add', 'user', 'bw_session', session, '@u'], + text=True, + ).strip() + + if auto_lock > 0: + subprocess.call(['keyctl', 'timeout', str(key_id), str(auto_lock)]) + return subprocess.check_output( + ['keyctl', 'pipe', str(key_id)], + text=True, + ).strip() + + +def pass_(domain, encoding, auto_lock, password_prompt_invocation): + session_key = get_session_key(auto_lock, password_prompt_invocation) + process = subprocess.run( + ['bw', 'list', 'items', '--session', session_key, '--url', domain], + capture_output=True, + ) + + err = process.stderr.decode(encoding).strip() + if err: + msg = 'Bitwarden CLI returned for {:s} - {:s}'.format(domain, err) + stderr(msg) + + if process.returncode: + return '[]' + + out = process.stdout.decode(encoding).strip() + + return out + + +def get_totp_code(selection_id, domain_name, encoding, auto_lock, password_prompt_invocation): + session_key = get_session_key(auto_lock, password_prompt_invocation) + process = subprocess.run( + ['bw', 'get', 'totp', '--session', session_key, selection_id], + capture_output=True, + ) + + err = process.stderr.decode(encoding).strip() + if err: + # domain_name instead of selection_id to make it more user-friendly + msg = 'Bitwarden CLI returned for {:s} - {:s}'.format(domain_name, err) + stderr(msg) + + if process.returncode: + return '[]' + + out = process.stdout.decode(encoding).strip() + + return out + + +def dmenu(items, invocation, encoding): + command = shlex.split(invocation) + process = subprocess.run(command, input='\n'.join( + items).encode(encoding), stdout=subprocess.PIPE) + return process.stdout.decode(encoding).strip() + + +def fake_key_raw(text): + for character in text: + # Escape all characters by default, space requires special handling + sequence = '" "' if character == ' ' else r'\{}'.format(character) + qute_command('fake-key {}'.format(sequence)) + + +def main(arguments): + if not arguments.url: + argument_parser.print_help() + return ExitCodes.FAILURE + + extract_result = tldextract.extract(arguments.url) + + # Try to find candidates using targets in the following order: fully-qualified domain name (includes subdomains), + # the registered domain name and finally: the IPv4 address if that's what + # the URL represents + candidates = [] + for target in filter(None, [ + extract_result.fqdn, + extract_result.registered_domain, + extract_result.subdomain + '.' + extract_result.domain, + extract_result.domain, + extract_result.ipv4]): + target_candidates = json.loads( + pass_( + target, + arguments.io_encoding, + arguments.auto_lock, + arguments.password_prompt_invocation, + ) + ) + if not target_candidates: + continue + + candidates = candidates + target_candidates + if not arguments.merge_candidates: + break + else: + if not candidates: + stderr('No pass candidates for URL {!r} found!'.format( + arguments.url)) + return ExitCodes.NO_PASS_CANDIDATES + + if len(candidates) == 1: + selection = candidates.pop() + else: + choices = ['{:s} | {:s}'.format(c['name'], c['login']['username']) for c in candidates] + choice = dmenu(choices, arguments.dmenu_invocation, arguments.io_encoding) + choice_tokens = choice.split('|') + choice_name = choice_tokens[0].strip() + choice_username = choice_tokens[1].strip() + selection = next((c for (i, c) in enumerate(candidates) + if c['name'] == choice_name + and c['login']['username'] == choice_username), + None) + + # Nothing was selected, simply return + if not selection: + return ExitCodes.SUCCESS + + username = selection['login']['username'] + password = selection['login']['password'] + totp = selection['login']['totp'] + + if arguments.username_only: + fake_key_raw(username) + elif arguments.password_only: + fake_key_raw(password) + elif arguments.totp_only: + # No point in moving it to the clipboard in this case + fake_key_raw( + get_totp_code( + selection['id'], + selection['name'], + arguments.io_encoding, + arguments.auto_lock, + arguments.password_prompt_invocation, + ) + ) + else: + # Enter username and password using fake-key and (which seems to work almost universally), then switch + # back into insert-mode, so the form can be directly submitted by + # hitting enter afterwards + fake_key_raw(username) + qute_command('fake-key ') + fake_key_raw(password) + + if arguments.insert_mode: + qute_command('mode-enter insert') + + # If it finds a TOTP code, it copies it to the clipboard, + # which is the same behavior as the Firefox add-on. + if not arguments.totp_only and totp and arguments.totp: + # The import is done here, to make pyperclip an optional dependency + import pyperclip + pyperclip.copy( + get_totp_code( + selection['id'], + selection['name'], + arguments.io_encoding, + arguments.auto_lock, + arguments.password_prompt_invocation, + ) + ) + + return ExitCodes.SUCCESS + + +if __name__ == '__main__': + arguments = argument_parser.parse_args() + sys.exit(main(arguments)) diff --git a/home/programs/yazi/default.nix b/home/programs/yazi/default.nix new file mode 100644 index 0000000..f089160 --- /dev/null +++ b/home/programs/yazi/default.nix @@ -0,0 +1,39 @@ +{ + programs.yazi = { + enable = true; + enableZshIntegration = true; + + settings = { + log = { enabled = false; }; + manager = { + show_hidden = false; + sort_by = "modified"; + sort_dir_first = true; + sort_reverse = true; + }; + }; + + theme = { + filetype = { + rules = [ + { + fg = "#7AD9E5"; + mime = "image/*"; + } + { + fg = "#F3D398"; + mime = "video/*"; + } + { + fg = "#F3D398"; + mime = "audio/*"; + } + { + fg = "#CD9EFC"; + mime = "application/x-bzip"; + } + ]; + }; + }; + }; +} diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/X_cursor.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/X_cursor.hlc new file mode 100644 index 0000000..4fa2af1 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/X_cursor.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/all-scroll.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/all-scroll.hlc new file mode 100644 index 0000000..7d9afd6 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/all-scroll.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/bottom_left_corner.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/bottom_left_corner.hlc new file mode 100644 index 0000000..350a56f Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/bottom_left_corner.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/bottom_right_corner.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/bottom_right_corner.hlc new file mode 100644 index 0000000..24dd10d Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/bottom_right_corner.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/bottom_tee.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/bottom_tee.hlc new file mode 100644 index 0000000..a0d0509 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/bottom_tee.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/center_ptr.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/center_ptr.hlc new file mode 100644 index 0000000..fb9a7f5 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/center_ptr.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/context-menu.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/context-menu.hlc new file mode 100644 index 0000000..e7d7112 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/context-menu.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/copy.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/copy.hlc new file mode 100644 index 0000000..9329ace Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/copy.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/cross.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/cross.hlc new file mode 100644 index 0000000..3203396 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/cross.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/crossed_circle.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/crossed_circle.hlc new file mode 100644 index 0000000..1459dce Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/crossed_circle.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/crosshair.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/crosshair.hlc new file mode 100644 index 0000000..c41078b Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/crosshair.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/dnd_no_drop.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/dnd_no_drop.hlc new file mode 100644 index 0000000..da718a1 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/dnd_no_drop.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/dotbox.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/dotbox.hlc new file mode 100644 index 0000000..d495e9a Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/dotbox.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/hand1.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/hand1.hlc new file mode 100644 index 0000000..4387b72 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/hand1.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/hand2.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/hand2.hlc new file mode 100644 index 0000000..598cba9 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/hand2.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/left_ptr.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/left_ptr.hlc new file mode 100644 index 0000000..ebc0945 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/left_ptr.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/left_ptr_watch.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/left_ptr_watch.hlc new file mode 100644 index 0000000..8bd0a6c Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/left_ptr_watch.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/left_side.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/left_side.hlc new file mode 100644 index 0000000..99c277a Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/left_side.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/left_tee.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/left_tee.hlc new file mode 100644 index 0000000..15fb62c Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/left_tee.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/link.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/link.hlc new file mode 100644 index 0000000..70d6bf9 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/link.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/ll_angle.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/ll_angle.hlc new file mode 100644 index 0000000..966de15 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/ll_angle.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/lr_angle.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/lr_angle.hlc new file mode 100644 index 0000000..e14a23d Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/lr_angle.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/move.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/move.hlc new file mode 100644 index 0000000..60d0a20 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/move.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/pencil.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/pencil.hlc new file mode 100644 index 0000000..87a665a Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/pencil.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/plus.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/plus.hlc new file mode 100644 index 0000000..5f782c6 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/plus.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/question_arrow.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/question_arrow.hlc new file mode 100644 index 0000000..5f92d7a Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/question_arrow.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/right_ptr.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/right_ptr.hlc new file mode 100644 index 0000000..266dc0a Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/right_ptr.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/right_tee.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/right_tee.hlc new file mode 100644 index 0000000..de4a9c0 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/right_tee.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/sb_down_arrow.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/sb_down_arrow.hlc new file mode 100644 index 0000000..b4b43df Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/sb_down_arrow.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/sb_h_double_arrow.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/sb_h_double_arrow.hlc new file mode 100644 index 0000000..78f720e Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/sb_h_double_arrow.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/sb_left_arrow.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/sb_left_arrow.hlc new file mode 100644 index 0000000..0b3292c Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/sb_left_arrow.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/sb_right_arrow.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/sb_right_arrow.hlc new file mode 100644 index 0000000..c976d17 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/sb_right_arrow.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/sb_up_arrow.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/sb_up_arrow.hlc new file mode 100644 index 0000000..2b30934 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/sb_up_arrow.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/sb_v_double_arrow.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/sb_v_double_arrow.hlc new file mode 100644 index 0000000..a09d48a Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/sb_v_double_arrow.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/top_side.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/top_side.hlc new file mode 100644 index 0000000..b1b6c94 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/top_side.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/top_tee.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/top_tee.hlc new file mode 100644 index 0000000..1c44d1e Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/top_tee.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/ul_angle.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/ul_angle.hlc new file mode 100644 index 0000000..126ceb1 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/ul_angle.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/ur_angle.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/ur_angle.hlc new file mode 100644 index 0000000..cdd8126 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/ur_angle.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/vertical-text.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/vertical-text.hlc new file mode 100644 index 0000000..b297848 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/vertical-text.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/wait.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/wait.hlc new file mode 100644 index 0000000..a13d93b Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/wait.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/wayland-cursor.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/wayland-cursor.hlc new file mode 100644 index 0000000..8d3d6f5 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/wayland-cursor.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/xterm.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/xterm.hlc new file mode 100644 index 0000000..144f322 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/xterm.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/zoom-in.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/zoom-in.hlc new file mode 100644 index 0000000..0f31814 Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/zoom-in.hlc differ diff --git a/home/system/hyprland/cursor/macOS/hyprcursors/zoom-out.hlc b/home/system/hyprland/cursor/macOS/hyprcursors/zoom-out.hlc new file mode 100644 index 0000000..b12fb2e Binary files /dev/null and b/home/system/hyprland/cursor/macOS/hyprcursors/zoom-out.hlc differ diff --git a/home/system/hyprland/cursor/macOS/manifest.hl b/home/system/hyprland/cursor/macOS/manifest.hl new file mode 100644 index 0000000..da013a0 --- /dev/null +++ b/home/system/hyprland/cursor/macOS/manifest.hl @@ -0,0 +1,4 @@ +name = macOS (SVG) +description = macOS cursors because they are a beaut! +version = 1 +cursors_directory = hyprcursors diff --git a/home/system/hyprland/default.nix b/home/system/hyprland/default.nix index 6be2951..7483783 100644 --- a/home/system/hyprland/default.nix +++ b/home/system/hyprland/default.nix @@ -1,11 +1,16 @@ { pkgs, config, inputs, ... }: { - imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ]; + imports = [ + ./hyprlock.nix + ./hypridle.nix + ./hyprpaper.nix + # ./hyprcursor.nix + ]; home.packages = with pkgs; [ hyprshot hyprpicker - hyprcursor + # hyprcursor xdg-desktop-portal-hyprland wlr-randr wl-clipboard @@ -83,10 +88,10 @@ "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}" ]) 9)); - bindm = [ + bindm = [ "$mod, mouse:272, movewindow" # Move Window (mouse) "$mod, R, resizewindow" # Resize Window (mouse) - ]; + ]; bindl = [ ",XF86AudioMute, exec, sound-toggle" # Toggle Mute @@ -112,8 +117,9 @@ "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" "GTK_THEME,FlatColor:dark" "GTK2_RC_FILES,/home/hadi/.local/share/themes/FlatColor/gtk-2.0/gtkrc" - # "HYPRCURSOR_THEME,rose-pine-hyprcursor" + # "HYPRCURSOR_THEME,macOS" # "HYPRCURSOR_SIZE,16" + # "XCURSOR_SIZE,16" ]; general = { diff --git a/home/system/hyprland/hyprcursor.nix b/home/system/hyprland/hyprcursor.nix new file mode 100644 index 0000000..916ad79 --- /dev/null +++ b/home/system/hyprland/hyprcursor.nix @@ -0,0 +1,6 @@ +{ + home.file.".local/share/icons/macOS" = { + recursive = true; + source = ./cursor/macOS; + }; +} diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 9fd8306..bafc208 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -16,6 +16,7 @@ ../../home/programs/fetch ../../home/programs/lf ../../home/programs/git + ../../home/programs/yazi # Scripts ../../home/scripts # All scripts diff --git a/hosts/modules/nvidia.nix b/hosts/modules/nvidia.nix index 83dcd54..67face8 100644 --- a/hosts/modules/nvidia.nix +++ b/hosts/modules/nvidia.nix @@ -31,9 +31,9 @@ in { hardware = { nvidia = { open = false; - nvidiaSettings = false; + nvidiaSettings = true; powerManagement.enable = - false; # This can cause sleep/suspend to fail and saves entire VRAM to /tmp/ + true; # This can cause sleep/suspend to fail and saves entire VRAM to /tmp/ modesetting.enable = true; package = nvidiaDriverChannel; }; diff --git a/hosts/server/modules/exposed/nextcloud.nix b/hosts/server/modules/exposed/nextcloud.nix index ace8c5c..d10d211 100644 --- a/hosts/server/modules/exposed/nextcloud.nix +++ b/hosts/server/modules/exposed/nextcloud.nix @@ -1,4 +1,5 @@ # Nextcloud +{ config, ... }: let hostname = "cloud.anotherhadi.com"; in { services.nextcloud = { @@ -14,6 +15,11 @@ in { [ "localhost" "127.0.0.1" "192.168.2.23" "cloud.anotherhadi.com" ]; }; nginx.recommendedHttpHeaders = true; + extraApps = { + inherit (config.services.nextcloud.package.packages.apps) + contacts calendar tasks notes; + }; + extraAppsEnable = true; }; services.nginx.virtualHosts.${hostname} = { forceSSL = false; diff --git a/hosts/server/modules/www/anotherhadi.com.nix b/hosts/server/modules/www/anotherhadi.com.nix index 7632dad..47dd16e 100644 --- a/hosts/server/modules/www/anotherhadi.com.nix +++ b/hosts/server/modules/www/anotherhadi.com.nix @@ -7,8 +7,8 @@ let src = pkgs.fetchFromGitHub { owner = "anotherhadi"; repo = "portfolio"; - rev = "1f30ea5d02f7a3831c7f3b2565c3bbfdddaac26e"; - hash = "sha256-fNt4IjfjhDtSEIC1MNWYkTIcHv+XnXFZTlw/dLoWhcY="; + rev = "48effd644da4d89921a4c1a3f5f6f5b6bd09eb6d"; + hash = "sha256-cFoq957oKS2MbKm94sUwAbS6GZ+IYWslZmvqyvK25m0="; }; npmDepsHash = "sha256-KMILWgZ6GNKoe/+RZS1tVDTd3SxXl6YtOuCb5kSFeis="; diff --git a/hosts/server/modules/www/home.anotherhadi.com.nix b/hosts/server/modules/www/home.anotherhadi.com.nix index ddbae07..e6e720b 100644 --- a/hosts/server/modules/www/home.anotherhadi.com.nix +++ b/hosts/server/modules/www/home.anotherhadi.com.nix @@ -110,8 +110,8 @@ let src = pkgs.fetchFromGitHub { owner = "anotherhadi"; repo = "homepage"; - rev = "40286c5e03bcfb9993cce354b4f12c00a1b4966d"; - hash = "sha256-zlJ/bzFWE64HpUCxiRT5E9wrjVVwSTSgIOrifWKxphU="; + rev = "b77d35ed3596eb451bd2ec78063d7cc6e73c773d"; + hash = "sha256-j/40922kfAh6zqJ4IRYpr66YXNNYsxuXwZ0aiJFJea0="; }; # npmDepsHash = lib.fakeHash;