Compare commits

...

3 commits

16 changed files with 706 additions and 82 deletions

23
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,23 @@
{
"recommendations": [
"bierner.emojisense",
"mkhl.direnv",
"irongeek.vscode-env",
"bmalehorn.vscode-fish",
"github.copilot",
"github.copilot-chat",
"golang.go",
"eamodio.gitlens",
"mblet.highlight-regex",
"oderwat.indent-rainbow",
"visualstudioexptteam.vscodeintellicode",
"visualstudioexptteam.intellicode-api-usage-examples",
"yzhang.markdown-all-in-one",
"shd101wyy.markdown-preview-enhanced",
"bierner.markdown-preview-github-styles",
"bbenoist.nix",
"brettm12345.nixfmt-vscode",
"ryu1kn.partial-diff",
"jeffersonlicet.snipped"
]
}

571
.vscode/settings.json vendored
View file

@ -21,5 +21,576 @@
],
"path": "systemd-run"
}
} , "highlight.regex.regexes": [
{
"languageIds": [
"css",
"fish",
"go",
"java",
"javascript",
"jsonc",
"nix",
"postcss",
"rust",
"shellscript",
"svelte",
"typescript",
"yuck"
],
"regexes": [
{
"decorations": [
{
"backgroundColor": "#4ebbff99",
"isWholeLine": true,
"overviewRulerColor": "#4ebbff"
}
],
"regex": "(<|</)(script)(.*)",
"regexes": [
{
"decorations": [
{
"color": "#4ebbff"
}
],
"regex": "[</>]"
},
{
"decorations": [
{
"color": "#ffa07a"
}
],
"regex": "script"
}
],
"regexFlag": "gm"
},
{
"decorations": [
{
"backgroundColor": "#ffa07a99",
"isWholeLine": true,
"overviewRulerColor": "#ffa07a"
}
],
"regex": "(<|</)(style)(.*)",
"regexes": [
{
"decorations": [
{
"color": "#ffa07a"
}
],
"regex": "[</>]"
},
{
"decorations": [
{
"color": "#7ad9ff"
}
],
"regex": "style"
}
],
"regexFlag": "gm"
},
{
"regex": "(/\\*|<\\!--)(.|[\r\n])*?((\\*/|-->)|-->)",
"regexes": [
{
"decorations": [
{
"color": "#d4be98",
"fontWeight": "bold",
"index": 0
}
],
"regex": "\\B:D"
},
{
"decorations": [
{
"color": "#f00",
"fontWeight": "bold",
"index": 0
}
],
"regex": "\\!\\!\\!"
},
{
"decorations": [
{
"color": "#D8A657",
"fontWeight": "bold",
"index": 0
}
],
"regex": "\\^\\^"
},
{
"decorations": [
{
"color": "#E78A4E",
"fontWeight": "bold",
"index": 1
},
{
"color": "#D3869B",
"fontWeight": "bold",
"index": 2
}
],
"regex": "(<)(>)"
},
{
"decorations": [
{
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#804600",
"color": "#d4be98",
"index": 1,
"overviewRulerColor": "#804600"
}
],
"regex": "(.*TODO:)((.|\\r|\\n)*?(\\*/|-->)$)",
"regexes": [
{
"decorations": [
{
"index": 0
},
{
"backgroundColor": "#80460099",
"color": "#d4be98",
"index": 2,
"overviewRulerColor": "#80460099"
}
],
"index": 2,
"regex": "([\\s]+)?( .*)"
}
]
},
{
"decorations": [
{
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#fffacd",
"color": "#282828",
"index": 1,
"overviewRulerColor": "#fffacd"
}
],
"regex": "(.*NOTE:)((.|\\r|\\n)*?(\\*/|-->)$)",
"regexes": [
{
"decorations": [
{
"index": 0
},
{
"backgroundColor": "#fffacd99",
"color": "#282828",
"index": 2,
"overviewRulerColor": "#fffacd99"
}
],
"index": 2,
"regex": "([\\s]+)?( .*)"
}
]
},
{
"decorations": [
{
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#6495ed",
"color": "#282828",
"index": 1,
"overviewRulerColor": "#6495ed"
}
],
"regex": "(.*IDEA:)((.|\\r|\\n)*?(\\*/|-->)$)",
"regexes": [
{
"decorations": [
{
"index": 0
},
{
"backgroundColor": "#6495ed99",
"color": "#282828",
"index": 2,
"overviewRulerColor": "#6495ed99"
}
],
"index": 2,
"regex": "([\\s]+)?( .*)"
}
]
},
{
"decorations": [
{
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#66cc99",
"color": "#282828",
"index": 1,
"overviewRulerColor": "#66cc99"
}
],
"regex": "(.*INFO:)((.|\\r|\\n)*?(\\*/|-->)$)",
"regexes": [
{
"decorations": [
{
"index": 0
},
{
"backgroundColor": "#66cc9999",
"color": "#282828",
"index": 2,
"overviewRulerColor": "#66cc9999"
}
],
"index": 2,
"regex": "([\\s]+)?( .*)"
}
]
},
{
"decorations": [
{
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#591d77",
"color": "#d4be98",
"index": 1,
"overviewRulerColor": "#591d77"
}
],
"regex": "(.*(?:ABOUT|EXP|\\?+):)((.|\\r|\\n)*?(\\*/|-->)$)",
"regexes": [
{
"decorations": [
{
"index": 0
},
{
"backgroundColor": "#591d7799",
"color": "#d4be98",
"index": 2,
"overviewRulerColor": "#591d7799"
}
],
"index": 2,
"regex": "([\\s]+)?( .*)"
}
]
},
{
"decorations": [
{
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#a74165",
"color": "#d4be98",
"index": 1,
"overviewRulerColor": "#a74165"
}
],
"regex": "(.*(?:FIXME|FIX|BUG|DEBUG|HACK|REMOVE):)((.|\\r|\\n)*?(\\*/|-->)$)",
"regexes": [
{
"decorations": [
{
"index": 0
},
{
"backgroundColor": "#a7416599",
"color": "#d4be98",
"index": 2,
"overviewRulerColor": "#a7416599"
}
],
"index": 2,
"regex": "([\\s]+)?( .*)"
}
]
},
{
"decorations": [
{
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#c36c5c",
"color": "#d4be98",
"index": 1,
"overviewRulerColor": "#c36c5c"
}
],
"regex": "(.*(?:SKELETON|COMPONENT):)((.|\\r|\\n)*?(\\*/|-->)$)",
"regexes": [
{
"decorations": [
{
"index": 0
},
{
"backgroundColor": "#c36c5c99",
"color": "#d4be98",
"index": 2,
"overviewRulerColor": "#c36c5c99"
}
],
"index": 2,
"regex": "([\\s]+)?( .*)"
}
]
}
],
"regexFlag": "gm",
"regexLimit": 25000
},
{
"regex": "(?<=\\s*)(//|#|;)(.|\r\n)*?$",
"regexes": [
{
"decorations": [
{
"color": "#d4be98",
"fontWeight": "bold",
"index": 0
}
],
"regex": "\\B:D"
},
{
"decorations": [
{
"fontWeight": "bold",
"index": 0
},
{
"color": "#D8A657",
"index": 1
},
{
"color": "#d4be98",
"index": 2
},
{
"color": "#d4be98",
"index": 4
},
{
"color": "#D8A657",
"index": 5
}
],
"regex": "(^/|#|;)(/|#|;)(.*)(/|#|;)(/|#|;$)"
},
{
"decorations": [
{
"color": "#f00",
"fontWeight": "bold",
"index": 0
}
],
"regex": "\\!\\!\\!"
},
{
"decorations": [
{
"color": "#D8A657",
"fontWeight": "bold",
"index": 0
}
],
"regex": "\\^\\^"
},
{
"decorations": [
{
"color": "#E78A4E",
"fontWeight": "bold",
"index": 1
},
{
"color": "#D3869B",
"fontWeight": "bold",
"index": 2
}
],
"regex": "(<)(>)"
},
{
"decorations": [
{
"color": "#d4be98",
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#804600",
"index": 1,
"overviewRulerColor": "#804600"
},
{
"backgroundColor": "#80460099",
"index": 2,
"overviewRulerColor": "#80460099"
}
],
"regex": "(.*TODO:)(.*)"
},
{
"decorations": [
{
"color": "#282828",
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#fffacd",
"index": 1,
"overviewRulerColor": "#fffacd"
},
{
"backgroundColor": "#fffacd99",
"index": 2,
"overviewRulerColor": "#fffacd99"
}
],
"regex": "(.*NOTE:)(.*)"
},
{
"decorations": [
{
"color": "#282828",
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#6495ed",
"index": 1,
"overviewRulerColor": "#6495ed"
},
{
"backgroundColor": "#6495ed99",
"index": 2,
"overviewRulerColor": "#6495ed99"
}
],
"regex": "(.*IDEA:)(.*)"
},
{
"decorations": [
{
"color": "#282828",
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#66cc99",
"index": 1,
"overviewRulerColor": "#66cc99"
},
{
"backgroundColor": "#66cc9999",
"index": 2,
"overviewRulerColor": "#66cc9999"
}
],
"regex": "(.*INFO:)(.*)"
},
{
"decorations": [
{
"color": "#d4be98",
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#591d77",
"index": 1,
"overviewRulerColor": "#591d77"
},
{
"backgroundColor": "#591d7799",
"index": 2,
"overviewRulerColor": "#591d7799"
}
],
"regex": "(.*(?:ABOUT|EXP|\\?+):)(.*)"
},
{
"decorations": [
{
"color": "#d4be98",
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#a74165",
"index": 1,
"overviewRulerColor": "#a74165"
},
{
"backgroundColor": "#a7416599",
"index": 2,
"overviewRulerColor": "#a7416599"
}
],
"regex": "(.*(?:FIXME|FIX|BUG|DEBUG|HACK|REMOVE):)(.*)"
},
{
"decorations": [
{
"color": "#d4be98",
"fontWeight": "bold",
"index": 0
},
{
"backgroundColor": "#c36c5c",
"index": 1,
"overviewRulerColor": "#c36c5c"
},
{
"backgroundColor": "#c36c5c99",
"index": 2,
"overviewRulerColor": "#c36c5c99"
}
],
"regex": "(.*(?:SKELETON|COMPONENT):)(.*)"
}
],
"regexFlag": "gm",
"regexLimit": 25000
}
]
}
],
}

36
flake.lock generated
View file

@ -333,11 +333,11 @@
},
"hardware": {
"locked": {
"lastModified": 1747900541,
"narHash": "sha256-dn64Pg9xLETjblwZs9Euu/SsjW80pd6lr5qSiyLY1pg=",
"lastModified": 1748634340,
"narHash": "sha256-pZH4bqbOd8S+si6UcfjHovWDiWKiIGRNRMpmRWaDIms=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "11f2d9ea49c3e964315215d6baa73a8d42672f06",
"rev": "daa628a725ab4948e0e2b795e8fb6f4c3e289a7a",
"type": "github"
},
"original": {
@ -374,11 +374,11 @@
]
},
"locked": {
"lastModified": 1748570847,
"narHash": "sha256-XU1a6wFctd+s3ZvBIFB6s4GhPJ+Oc6pkeOrEsbA2fMo=",
"lastModified": 1748668774,
"narHash": "sha256-fYk/vk4ClmvHIgnGv/5GNRiDLtNCwXo9aLq36L/x+P4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4e9efaa68b0be7e19127dad4f0506a9b89e28ef4",
"rev": "60e4624302d956fe94d3f7d96a560d14d70591b9",
"type": "github"
},
"original": {
@ -460,11 +460,11 @@
]
},
"locked": {
"lastModified": 1748570315,
"narHash": "sha256-laTKC6M+ciljWgUpzhLHyoz1+iRaMBWbQoycX0hhbe8=",
"lastModified": 1748656608,
"narHash": "sha256-VU+8/kZ57Y7XTmgMBpybGMxO/elvUn/4yMndZji2pY8=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "f85768830fdaee114ea6d18dee80737c74a8dcc9",
"rev": "b585487bb87faec1c7a09aada7cfe77dd7b3c5fe",
"type": "github"
},
"original": {
@ -545,11 +545,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1748370509,
"narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
"lastModified": 1748460289,
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
"type": "github"
},
"original": {
@ -561,11 +561,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1748370509,
"narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
"lastModified": 1748460289,
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
"type": "github"
},
"original": {
@ -768,11 +768,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1748572239,
"narHash": "sha256-Of7bmWQUEVILpx1GJz0gLHmRoGrEP/G7q9RnidxW5Go=",
"lastModified": 1748699906,
"narHash": "sha256-pu2UKagKKysJ7EYeOcm8vWoZq1lcxfwfu3/C1Y3OFz8=",
"owner": "danth",
"repo": "stylix",
"rev": "0512b0f685ab2ac0586c897460c247f49670460b",
"rev": "8762da957b8b04b8b73248144f1c0ff7a88924b5",
"type": "github"
},
"original": {

View file

@ -9,4 +9,13 @@ in
enable = true;
package = pkgs.vscode.fhsWithPackages (_: [ patched-openssh ]);
};
# Pkgs used with vscode regularly
home.packages = builtins.attrValues {
inherit (pkgs)
nixfmt-rfc-style # nix formatter
nixpkgs-review # nix review tool
biome
;
};
}

View file

@ -1,33 +0,0 @@
# https://github.com/sharkdp/bat
# https://github.com/eth-p/bat-extras
{ pkgs, ... }:
{
programs.bat = {
enable = true;
config = {
# Git modifications and file header (but no grid)
style = "changes,header";
# theme = "gruvbox-dark";
};
extraPackages = builtins.attrValues {
inherit (pkgs.bat-extras)
batgrep # search through and highlight files using ripgrep
batdiff # Diff a file against the current git index, or display the diff between to files
batman # read manpages using bat as the formatter
;
};
};
# Avoid [bat error]: The binary caches for the user-customized syntaxes and themes in
# '/home/<user>/.cache/bat' are not compatible with this version of bat (0.25.0).
home.activation.batCacheRebuild = {
after = [ "linkGeneration" ];
before = [ ];
data = ''
${pkgs.bat}/bin/bat cache --build
'';
};
}

10
home/global/core/btop.nix Normal file
View file

@ -0,0 +1,10 @@
{
# Processes and system monitor
programs.btop = {
enable = true;
settings = {
color_theme = "stylix";
theme_background = false;
};
};
}

View file

@ -30,10 +30,9 @@ in
];
sessionVariables = {
EDITOR = "micro";
FLAKE = lib.mkDefault "${homeDir}/git/Nix/dot.nix";
MANPAGER = "batman";
SHELL = lib.getExe shell;
VISUAL = "micro";
FLAKE = lib.mkDefault "${homeDir}/git/Nix/dot.nix";
SHELL = lib.getExe shell;
};
preferXdgDirectories = true; # whether to make programs use XDG directories whenever supported
@ -57,27 +56,16 @@ in
# Core pkgs with no configs
home.packages = builtins.attrValues {
inherit (pkgs)
btop # resource monitor
coreutils # basic gnu utils
delta # diffing
difftastic # diffing
direnv # environment per directory
dust # disk usage
eza # ls replacement
gh # github cli
jq # json parser
man-pages
man-pages-posix
nixfmt-rfc-style # nix formatter
nixpkgs-review # nix review tool
nmap # network scanner
pre-commit # git hooks
trashy # trash cli
unrar # rar extraction
unzip # zip extraction
xdg-user-dirs
xdg-utils # provide cli tools such as `xdg-mime` and `xdg-open`
zip # zip compression
microsoft-edit
;
};

View file

@ -2,10 +2,6 @@ set fish_greeting # Disable greeting
## Aliases and Overrides ##
function cd
zoxide $argv
end
function ls
eza $argv
end
@ -62,7 +58,7 @@ function zipz
# - The tar command outputs the archive to stdout.
# - zstd compresses it using 4 threads (-T4) and a compression level of 12 (-12).
# - The -c flag forces zstd to write to stdout.
tar cf - $directory | nix run nixpkgs#zstd -- -c -T5 -15 -v > $output_file
tar cf - $directory | nix run nixpkgs#zstd -- -c -T5 -15 -v >$output_file
# Check the exit status of the pipeline
if test $status -eq 0

View file

@ -1,10 +0,0 @@
{
programs.zoxide = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
options = [
"--cmd cd" # replace cd with z and zi (via cdi)
];
};
}

BIN
lib/public/gojo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

BIN
lib/public/gojo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
lib/public/inv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

BIN
lib/public/inv1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

View file

@ -0,0 +1,51 @@
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "microsoft-edit";
version = "1.0.0";
src = fetchFromGitHub {
owner = "microsoft";
repo = "edit";
tag = "v${finalAttrs.version}";
hash = "sha256-5GUAHa0/7k4uVNWEjn0hd1YvkRnUk6AdxTQhw5z95BY=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-DEzjfrXSmum/GJdYanaRDKxG4+eNPWf5echLhStxcIg=";
# Requires nightly features
env.RUSTC_BOOTSTRAP = 1;
# Add a patch to fix the write_filled error
patches = [
./write-filled-fix.patch
];
# Disabled for now, microsoft/edit#194
doInstallCheck = false;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/edit";
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
description = "Simple editor for simple needs";
longDescription = ''
This editor pays homage to the classic MS-DOS Editor,
but with a modern interface and input controls similar to VS Code.
The goal is to provide an accessible editor that even users largely
unfamiliar with terminals can easily use.
'';
mainProgram = "edit";
homepage = "https://github.com/microsoft/edit";
changelog = "https://github.com/microsoft/edit/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ RossSmyth ]; # https://github.com/NixOS/nixpkgs/pull/409075
};
})

View file

@ -0,0 +1,15 @@
--- a/src/tui.rs
+++ b/src/tui.rs
@@ -3529,7 +3529,11 @@ impl<'a> NodeMap<'a> {
let shift = 64 - width;
let mask = (slots - 1) as u64;
- let slots = arena.alloc_uninit_slice(slots).write_filled(None);
+ let uninit_slots = arena.alloc_uninit_slice(slots);
+ for slot in uninit_slots.iter_mut() {
+ slot.write(None);
+ }
+ let slots = unsafe { std::mem::transmute::<&mut [std::mem::MaybeUninit<Option<&'a NodeCell<'a>>>], &mut [Option<&'a NodeCell<'a>>]>(uninit_slots) };
let mut node = tree.root_first;
loop {

View file

@ -5,6 +5,10 @@
> **My NixOS & Home Manager Multi User/Host Configuration**
> A modular Nix flake managing multiple systems and users with a focus on reproducibility and ease of maintenance.
![alt text](lib/public/inv.png)
![alt text](lib/public/inv1.png)
![alt text](lib/public/gojo.png)
![alt text](lib/public/gojo1.png)
---
## 🏗️ Architecture Overview