This commit is contained in:
Hadi 2024-10-07 18:34:06 +02:00
parent 8a41ffad2f
commit d37504de7c
13 changed files with 124 additions and 251 deletions

View File

@ -8,9 +8,6 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
- [ ] Hyprland
- [ ] Fix screenshots (screenshot region's border shows up in the screenshot, hyprshot jq error?) and add in the scripts doc
- [ ] Nixy
- [ ] Open Keybindings
- [ ] Nixvim
- [ ] Markdown tab size 2
- [ ] Harpoon
@ -20,5 +17,4 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
- [ ] <https://github.com/0fie/Mika>
- [ ] <https://github.com/redyf/Neve/blob/main/config/utils/whichkey.nix>
- [ ] Update docs
- [ ] Workflow README

View File

@ -320,11 +320,11 @@
]
},
"locked": {
"lastModified": 1727805723,
"narHash": "sha256-b8flytpuc4Ey/g3mcvpS/ICORcD4h56QDZeP5LogevY=",
"lastModified": 1728092656,
"narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "2f5ae3fc91db865eff2c5a418da85a0fbe6238a3",
"rev": "1211305a5b237771e13fcca0c51e60ad47326a9a",
"type": "github"
},
"original": {
@ -379,11 +379,11 @@
]
},
"locked": {
"lastModified": 1728041527,
"narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=",
"lastModified": 1728306985,
"narHash": "sha256-l/KpcWTv2SjxCnqFs5GYhvjeVYd40WQV4/F2+w9btd4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e",
"rev": "3ac39b2a8b7cbfc0f96628d8a84867c885bc988b",
"type": "github"
},
"original": {
@ -400,11 +400,11 @@
]
},
"locked": {
"lastModified": 1727383923,
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
"lastModified": 1728041527,
"narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ffe2d07e771580a005e675108212597e5b367d2d",
"rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e",
"type": "github"
},
"original": {
@ -476,11 +476,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1728086481,
"narHash": "sha256-+gip/MU9xo/0HzYotsJ28LvCBTsoWlr3h4+vZR3Uycw=",
"lastModified": 1728303775,
"narHash": "sha256-+DykzTwUrLGOLHQdnWB1Wp0WIfBGhpqXoyTXdwIOoiY=",
"ref": "refs/heads/main",
"rev": "595eb89f6e16df0e19916e3c02bf5ceac5a61c57",
"revCount": 5293,
"rev": "97444ed7a8a83406970fcc05907db1110435b59b",
"revCount": 5302,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@ -578,11 +578,11 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1728101408,
"narHash": "sha256-kOZc6KwXs0AzMVAFEst4pIItXqKQs4SI4zoZaMdvXo0=",
"lastModified": 1728290765,
"narHash": "sha256-cbManQ5eI6NdrwevngpqfxJiVT2xCSMxwWCFRUngOtw=",
"owner": "Jas-SinghFSU",
"repo": "HyprPanel",
"rev": "8a727a080e6917011211fb8616144be44763982a",
"rev": "6da84732a1bcde4e7f634a39bf9e7b74bdc75e5f",
"type": "github"
},
"original": {
@ -649,11 +649,11 @@
]
},
"locked": {
"lastModified": 1727707210,
"narHash": "sha256-8XZp5XO2FC6INZEZ2WlwErtvFVpl45ACn8CJ2hfTA0Y=",
"lastModified": 1727999297,
"narHash": "sha256-LTJuQPCsSItZ/8TieFeP30iY+uaLoD0mT0tAj1gLeyQ=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "f61d5f2051a387a15817007220e9fb3bbead57b3",
"rev": "8c8388ade72e58efdeae71b4cbb79e872c23a56b",
"type": "github"
},
"original": {
@ -664,11 +664,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1728056216,
"narHash": "sha256-IrO06gFUDTrTlIP3Sz+mRB6WUoO2YsgMtOD3zi0VEt0=",
"lastModified": 1728269138,
"narHash": "sha256-oKxDImsOvgUZMY4NwXVyUc/c1HiU2qInX+b5BU0yXls=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "b7ca02c7565fbf6d27ff20dd6dbd49c5b82eef28",
"rev": "ecfcd787f373f43307d764762e139a7cdeb9c22b",
"type": "github"
},
"original": {
@ -696,11 +696,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1725762081,
"narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
"lastModified": 1728156290,
"narHash": "sha256-uogSvuAp+1BYtdu6UWuObjHqSbBohpyARXDWqgI12Ss=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05",
"rev": "17ae88b569bb15590549ff478bab6494dde4a907",
"type": "github"
},
"original": {
@ -805,11 +805,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1727871072,
"narHash": "sha256-t+YLQwBB1soQnVjT6d7nQq4Tidaw7tpB8i6Zvpc+Zbs=",
"lastModified": 1728292968,
"narHash": "sha256-Jp/SQH5q2uTRBW625gFdfXLvYLjQiDNxtvQo0vVbyeA=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "0ca98d02104f7f0a703787a7a080a570b7f1bedd",
"rev": "d71cfaaae8353b4102169a9858422ce3738cd43b",
"type": "github"
},
"original": {
@ -821,11 +821,11 @@
"nixy-wallpapers": {
"flake": false,
"locked": {
"lastModified": 1728284470,
"narHash": "sha256-OCK5mTajkGATUGlayNZ25WaPr1Whl+shNi1nar1CKc8=",
"lastModified": 1728317558,
"narHash": "sha256-2ukRne/arOWKaLf7oqSatkbvfNxYEWrKHkJ3+sLAW/4=",
"owner": "anotherhadi",
"repo": "nixy-wallpapers",
"rev": "c1a5f921b82ee4c128dbea42fe26b5ffec0232df",
"rev": "285ffd7dcb3ca17fd7a7be8d9c99e38a5e2f1a79",
"type": "github"
},
"original": {
@ -843,11 +843,11 @@
]
},
"locked": {
"lastModified": 1727599661,
"narHash": "sha256-0R+1ih0Rfqrz/lcduvpNSnUw3uthUHiaGh0aWPyIqeQ=",
"lastModified": 1728017046,
"narHash": "sha256-ofWYux/uUAv8wq7sWw8XWke0sh8p4qYxSOn8d+EaJ8c=",
"owner": "NuschtOS",
"repo": "search",
"rev": "c3c3928b8de7d300c34e9d90fdc19febd1a32062",
"rev": "ba81d9c1eae20fc3a1cd066062a05ac2e799e629",
"type": "github"
},
"original": {
@ -956,11 +956,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1727734513,
"narHash": "sha256-i47LQwoGCVQq4upV2YHV0OudkauHNuFsv306ualB/Sw=",
"lastModified": 1728230538,
"narHash": "sha256-sbsMJOZgykaSdFbxLKghc0QMtolzl4P5nqpttBA3d5M=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "3198a242e547939c5e659353551b0668ec150268",
"rev": "2750ed784e93e745a33fb55be7c2657adfb57c00",
"type": "github"
},
"original": {
@ -977,11 +977,11 @@
]
},
"locked": {
"lastModified": 1728101832,
"narHash": "sha256-0cRtOtkcQvhcKq0vx2C/2uOVUlOmJNZQzcZiK581wto=",
"lastModified": 1728274624,
"narHash": "sha256-auf6OnXvV8LiH/KvGIDmxUdhPeivGSxOHxrPvMHd+T4=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "277107c2bc07582899d53e7fc901e93126d944bd",
"rev": "4bcc76b94f01cfddc899191e99d96059b8702608",
"type": "github"
},
"original": {
@ -1007,11 +1007,11 @@
"tinted-tmux": "tinted-tmux"
},
"locked": {
"lastModified": 1727723275,
"narHash": "sha256-k4HrG8TJQ0RqDS1tlDz71kvWFBNQ7qZI9T5Z0qLR85Y=",
"lastModified": 1728312564,
"narHash": "sha256-z01cTK5VeLFOUekhAXrJHLDzE74uAxxMwE2p6+Wp9Sg=",
"owner": "danth",
"repo": "stylix",
"rev": "e7e97059776da7e34b739415a7bc8f80f606b803",
"rev": "63426a59e714c4389c5a8e559dee05a0087a3043",
"type": "github"
},
"original": {
@ -1151,11 +1151,11 @@
]
},
"locked": {
"lastModified": 1727431250,
"narHash": "sha256-uGRlRT47ecicF9iLD1G3g43jn2e+b5KaMptb59LHnvM=",
"lastModified": 1727984844,
"narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "879b29ae9a0378904fbbefe0dadaed43c8905754",
"rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64",
"type": "github"
},
"original": {

View File

@ -28,7 +28,7 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
plugin-markdown = {
# TODO: Put the new url
# TODO: Put the new url (render-markdown.nvim)
url = "github:MeanderingProgrammer/markdown.nvim";
flake = false;
};
@ -41,19 +41,20 @@
outputs = inputs@{ nixpkgs, ... }: {
nixosConfigurations = {
nixy = nixpkgs.lib.nixosSystem { # CHANGEME
system = "x86_64-linux";
modules = [
{
nixpkgs.overlays = [ inputs.hyprpanel.overlay ];
_module.args = { inherit inputs; };
}
inputs.nixos-hardware.nixosModules.omen-16-n0005ne # CHANGEME
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
./hosts/laptop/configuration.nix # CHANGEME
];
};
nixy = # CHANGEME
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
nixpkgs.overlays = [ inputs.hyprpanel.overlay ];
_module.args = { inherit inputs; };
}
inputs.nixos-hardware.nixosModules.omen-16-n0005ne # CHANGEME
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
./hosts/laptop/configuration.nix # CHANGEME
];
};
};
};
}

View File

@ -1,47 +0,0 @@
{
programs.nixvim = {
# colorschemes = {
# catppuccin = {
# enable = true;
# settings = {
# background = {
# light = "macchiato";
# dark = "mocha";
# };
# flavour =
# "mocha"; # "latte", "mocha", "frappe", "macchiato" or raw lua code
# disable_bold = false;
# disable_italic = false;
# disable_underline = false;
# transparent_background = true;
# term_colors = true;
# integrations = {
# cmp = true;
# noice = true;
# notify = true;
# neotree = true;
# harpoon = true;
# gitsigns = true;
# which_key = true;
# illuminate = { enabled = true; };
# treesitter = true;
# treesitter_context = true;
# telescope.enabled = true;
# indent_blankline.enabled = true;
# mini.enabled = true;
# native_lsp = {
# enabled = true;
# inlay_hints = { background = true; };
# underlines = {
# errors = [ "underline" ];
# hints = [ "underline" ];
# information = [ "underline" ];
# warnings = [ "underline" ];
# };
# };
# };
# };
# };
# };
};
}

View File

@ -10,7 +10,6 @@
./plugins/utils.nix
./options.nix
./colorscheme.nix
./keymaps.nix
];

View File

@ -1,123 +1,53 @@
{ pkgs, inputs, ... }: {
# The render-markdown.nvim plugin is a plugin that renders markdown files in a neovim in a more readable way.
{ pkgs, config, inputs, ... }: {
programs.nixvim = {
extraFiles = {
"ftplugin/markdown.lua".text = ''
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
'';
};
highlight = {
RenderMarkdownBg.bg = "#${config.lib.stylix.colors.base00}";
RenderMarkdownH1.fg = "#${config.lib.stylix.colors.base0D}";
RenderMarkdownH2.fg = "#${config.lib.stylix.colors.base0D}";
RenderMarkdownH3.fg = "#${config.lib.stylix.colors.base05}";
RenderMarkdownH4.fg = "#${config.lib.stylix.colors.base05}";
RenderMarkdownH5.fg = "#${config.lib.stylix.colors.base03}";
RenderMarkdownH6.fg = "#${config.lib.stylix.colors.base03}";
};
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {
name = "markdown.nvim";
src = inputs.plugin-markdown;
})
];
extraConfigLua = "require('render-markdown').setup({})";
plugins = {
mkdnflow = {
enable = false;
mappings = {
# Main
MkdnEnter = {
key = "<CR>";
modes = [ "n" "v" "i" ];
};
# Links
MkdnCreateLink = false;
MkdnCreateLinkFromClipboard = false;
MkdnDestroyLink = false;
MkdnFollowLink = false;
MkdnNextLink = {
key = "<Tab>";
modes = "n";
};
MkdnPrevLink = {
key = "<S-Tab>";
modes = "n";
};
MkdnYankAnchorLink = false;
MkdnYankFileAnchorLink = false;
MkdnDecreaseHeading = {
key = "-";
modes = "n";
};
MkdnIncreaseHeading = {
key = "+";
modes = "n";
};
MkdnExtendList = false;
MkdnFoldSection = {
key = "<leader>ff";
modes = "n";
};
MkdnUnfoldSection = {
key = "<leader>fu";
modes = "n";
};
MkdnGoBack = {
key = "<BS>";
modes = "n";
};
MkdnGoForward = false;
MkdnMoveSource = false;
MkdnNewListItem = false;
MkdnNewListItemAboveInsert = {
key = "O";
modes = "n";
};
MkdnNewListItemBelowInsert = {
key = "o";
modes = "n";
};
MkdnNextHeading = {
key = "]]";
modes = "n";
};
MkdnPrevHeading = {
key = "[[";
modes = "n";
};
MkdnSTab = false;
MkdnTab = false;
MkdnTableFormat = {
key = "<leader>tf";
modes = "n";
};
MkdnTableNewColAfter = {
key = "<leader>tc";
modes = "n";
};
MkdnTableNewColBefore = {
key = "<leader>tC";
modes = "n";
};
MkdnTableNewRowAbove = {
key = "<leader>tR";
modes = "n";
};
MkdnTableNewRowBelow = {
key = "<leader>tr";
modes = "n";
};
MkdnTableNextCell = {
key = "<S-Tab>";
modes = "i";
};
MkdnTableNextRow = false;
MkdnTablePrevCell = {
key = "<M-Tab>";
modes = "i";
};
MkdnTablePrevRow = {
key = "<M-CR>";
modes = "i";
};
MkdnToggleToDo = {
key = "<C-Space>";
modes = [ "n" "v" ];
};
MkdnUpdateNumbering = {
key = "<leader>nn";
modes = "n";
};
};
};
};
extraConfigLua =
# lua
''
require('render-markdown').setup({
heading = {
icons = { '# ', '󰲣 ', '󰲥 ', '󰲧 ', '󰲩 ', '󰲫 ' },
backgrounds = {
'RenderMarkdownBg',
},
foregrounds = {
'RenderMarkdownH1',
'RenderMarkdownH2',
'RenderMarkdownH3',
'RenderMarkdownH4',
'RenderMarkdownH5',
'RenderMarkdownH6',
},
},
checkbox = {
custom = {
pending = { raw = '[-]', rendered = '󰥔 ', highlight = 'RenderMarkdownTodo' },
important = { raw = '[!]', rendered = ' ', highlight = 'RenderMarkdownTodo' },
cancle = { raw = '[/]', rendered = '󱋬 ', highlight = 'RenderMarkdownTodo' },
},
},
})
'';
};
}

View File

@ -1,13 +1,7 @@
{ pkgs, config, ... }: {
{ pkgs, ... }: {
home.packages = with pkgs; [ ctags ];
programs.nixvim = {
highlight = {
Headline.bg = "#${config.lib.stylix.colors.base0D}";
Headline.bold = true;
Headline1.bg = "#${config.lib.stylix.colors.base01}";
Headline1.bold = true;
};
plugins = {
lualine = {
enable = true;
@ -56,7 +50,6 @@
enable = true;
settings.current_line_blame = false;
};
# bufferline.enable = true;
trouble.enable = true;
indent-blankline.enable = true;
which-key.enable = true;

View File

@ -6,26 +6,24 @@
{ pkgs, config, ... }:
let
nerdfont-fzf = pkgs.writeShellScriptBin "nerdfont-fzf" ''
# Dependencies: jq, fzf, wl-copy, wget
icons=$(jq -r 'to_entries[] | "\(.key):\(.value.char)"' "/home/${config.var.username}/.config/nerdfont_glyphnames.json" | awk -F: '{print "\033[95m "$2" \033[0m "$1}')
fzf_result=$(echo "$icons" | fzf --ansi --border none | awk '{print $1}')
icons=$(${pkgs.jq}/bin/jq -r 'to_entries[] | "\(.key):\(.value.char)"' "/home/${config.var.username}/.config/nerdfont_glyphnames.json" | awk -F: '{print "\033[95m "$2" \033[0m "$1}')
fzf_result=$(echo "$icons" | ${pkgs.fzf}/bin/fzf --ansi --border none | awk '{print $1}')
if [ -z "$fzf_result" ]; then
echo "No icon selected"
exit 1
fi
echo "Copied to clipboard: $fzf_result"
${pkgs.wl-clipboard}/bin/wl-copy "$fzf_result" # wait for paste before exiting.. not cool
'';
nerdfont-fzf-fetch = pkgs.writeShellScriptBin "nerdfont-fzf-fetch" ''
wget "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/glyphnames.json" -O "glyphnames.json" || exit 1
jq 'del(.METADATA)' "glyphnames.json"
${pkgs.wl-clipboard}/bin/wl-copy "$fzf_result"
'';
in {
home.packages = [ nerdfont-fzf nerdfont-fzf-fetch ];
home.packages = [ nerdfont-fzf ];
xdg.configFile."nerdfont_glyphnames.json" = {
source = ./nerdfont_glyphnames.json;
source = pkgs.fetchurl {
url =
"https://raw.githubusercontent.com/ryanoasis/nerd-fonts/384b1825ea0037b0314f7f9c660a80c1ecdb219a/glyphnames.json";
hash = "sha256-Ps0dyFcMs51RMTthBOVSOf/lafPV/53JxuNSKlmZ7cc=";
};
};
}

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
#- - `nixy` - UI wizard to manage the system.
#- - `nixy rebuild` - Rebuild the system.
#- - `nixy ...` - ... see the script for more commands.
{ pkgs, config, ... }:
{ pkgs, config, inputs, ... }:
let
nixy = pkgs.writeShellScriptBin "nixy"
# bash
@ -24,7 +24,8 @@ let
"󰚰;Update;nixy update"
";Collect Garbage;nixy gc"
"󰍜;Clean Boot Menu;nixy cb"
" ;Hyprland Keybindings;nvim ${config.var.configDirectory}/docs/KEYBINDINGS-HYPRLAND.md"
"󰌌;Hyprland Keybindings;nvim ${config.var.configDirectory}/docs/KEYBINDINGS-HYPRLAND.md"
"󰋩;Wallpapers;nvim ${inputs.nixy-wallpapers}/docs/MOBILE-VIEW.md"
)
# Apply default icons if empty:

View File

@ -40,7 +40,7 @@
bar = {
transparent = false;
floating = true;
font-size = 13;
font-size = 15;
};
};
};

View File

@ -1,5 +1,8 @@
{ config, ... }: {
nixpkgs.config.allowUnfree = true;
nixpkgs.config = {
allowUnfree = true;
allowBroken = true;
};
nix = {
extraOptions = ''
warn-dirty = false

View File

@ -51,7 +51,7 @@
};
polarity = "dark";
image = inputs.nixy-wallpapers + "/magma.png";
image = inputs.nixy-wallpapers + "/wallpapers/degirled.png";
};
}