Compare commits

...

7 commits

Author SHA1 Message Date
274a3af93a
feat(meta): Write a real readme 2024-11-16 16:42:41 -08:00
4da2995cee
feat(home): Gh 2024-11-16 15:27:19 -08:00
45ce61172e
feat(home): Fzf 2024-11-16 15:10:11 -08:00
0c1105b2da
feat(home): Figlet 2024-11-16 15:03:00 -08:00
774e2cf818
feat(home): Eza 2024-11-16 14:56:50 -08:00
768f4ff30d
feat(home): Curl 2024-11-16 14:20:26 -08:00
cfc908e1a0
feat(home): Cheat 2024-11-16 14:06:44 -08:00
16 changed files with 415 additions and 163 deletions

111
assets/lesbian-nix.svg Normal file
View file

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="420"
height="420"
viewBox="0 0 411.363 411.363"
version="1.1"
xml:space="preserve"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2"
id="svg12"
sodipodi:docname="lix.svg"
inkscape:export-filename="../lix.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs12" /><sodipodi:namedview
id="namedview12"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.203125"
inkscape:cx="174.12987"
inkscape:cy="174.54545"
inkscape:window-width="1276"
inkscape:window-height="1392"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg12" />
<g
id="Flake"
transform="translate(-186.20448,-20.133533)">
<g
id="path4861"
transform="translate(66.1334,798.311)">
<path
d="m 247.523,-568.202 97.757,169.34 -44.925,0.422 -26.099,-45.495 -26.285,45.252 -22.322,-0.009 -11.433,-19.752 37.448,-64.392 -26.583,-46.26 z"
style="fill:#5277c3;stroke:#ffffff;stroke-width:10px"
id="path5" />
</g>
<g
id="use4863"
transform="translate(66.1334,798.311)">
<path
d="m 282.807,-637.955 -97.774,169.331 -22.827,-38.696 26.35,-45.35 -52.332,-0.138 -11.153,-19.335 11.389,-19.777 74.489,0.235 26.771,-46.152 z"
style="fill:#d52d00;stroke:#ffffff;stroke-width:10px"
id="path6" />
</g>
<g
id="use4865"
transform="translate(66.1334,798.311)">
<path
d="m 290.308,-502.594 195.532,0.009 -22.098,39.118 -52.45,-0.146 26.047,45.39 -11.168,19.327 -22.822,0.025 -37.041,-64.627 -53.355,-0.108 z"
style="fill:#d52d00;stroke:#ffffff;stroke-width:10px"
id="path7" />
</g>
<g
id="use4867"
transform="translate(66.1334,798.311)">
<path
d="m 404.115,-576.791 -97.758,-169.34 44.926,-0.421 26.099,45.495 26.285,-45.252 22.322,0.009 11.432,19.751 -37.448,64.392 26.584,46.261 z"
style="fill:#d52d00;stroke:#ffffff;stroke-width:10px"
id="path8" />
</g>
<g
id="path4873"
transform="translate(66.1334,798.311)">
<path
d="m 247.523,-568.202 97.757,169.34 -44.925,0.422 -26.099,-45.495 -26.285,45.252 -22.322,-0.009 -11.433,-19.752 37.448,-64.392 -26.583,-46.26 z"
style="fill:#5277c3;stroke:#ffffff;stroke-width:10px"
id="path9" />
</g>
<g
id="use4875"
transform="translate(66.1334,798.311)">
<path
d="m 361.069,-642.826 -195.531,-0.01 22.097,-39.117 52.45,0.145 -26.047,-45.389 11.169,-19.327 22.822,-0.025 37.041,64.627 53.354,0.108 z"
style="fill:#d362a4;stroke:#ffffff;stroke-width:10px"
id="path10" />
</g>
<g
id="use4877"
transform="translate(66.1334,798.311)">
<path
d="m 368.697,-507.074 97.774,-169.33 22.828,38.696 -26.35,45.35 52.332,0.137 11.153,19.336 -11.389,19.777 -74.49,-0.235 -26.771,46.152 z"
style="fill:#a30262;stroke:#ffffff;stroke-width:10px"
id="path11" />
</g>
<g
id="path3336-6"
transform="translate(66.1334,798.311)">
<path
d="m 247.639,-568.311 97.758,169.341 -44.926,0.421 -26.099,-45.495 -26.285,45.252 -22.322,-0.009 -11.433,-19.752 37.449,-64.392 -26.584,-46.26 z"
style="fill:#ff9a56;stroke:#ffffff;stroke-width:10px"
id="path12" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -18,7 +18,13 @@ in
bat = enabled; bat = enabled;
btop = enabled; btop = enabled;
cava = enabled; cava = enabled;
cheat = enabled;
curl = enabled;
eza = enabled;
figlet = enabled;
fish = enabled; fish = enabled;
fzf = enabled;
gh = enabled;
journalctl = enabled; journalctl = enabled;
neo = enabled; neo = enabled;
systemctl = enabled; systemctl = enabled;

View file

@ -0,0 +1,51 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.cheat;
inherit (config.${namespace}) theme;
toYAML = (pkgs.formats.yaml { }).generate;
in
{
options = mkEnableModule "programs.cheat";
config = mkIf cfg.enable {
home.packages = with pkgs; [
cheat
];
xdg.configFile."cheat/conf.yml".source = toYAML "conf.yml" {
colorize = true;
style = "${theme.colors.base}";
formatter = "terminal256";
pager = "less -FRX";
cheatpaths =
let
cheatDir = "${config.xdg.configHome}/cheat/cheatsheets";
in
[
{
name = "community";
path = "${cheatDir}/community";
tags = [ "community" ];
readonly = true;
}
{
name = "personal";
path = "${cheatDir}/personal";
tags = [ "personal" ];
readonly = false;
}
];
};
};
}

View file

@ -0,0 +1,38 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.curl;
in
{
options = mkEnableModule "programs.curl";
config = mkIf cfg.enable {
home.packages = with pkgs; [
curl
];
xdg.configFile.".curlrc".text = # ini
''
# Limit the timeout in seconds.
connect-timeout = 60
# Follow HTTP redirects.
location
# Show error messages.
show-error
# Disguise as IE 9 on Windows 7.
user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
'';
};
}

View file

@ -0,0 +1,33 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.eza;
in
{
options = mkEnableModule "programs.eza";
config = mkIf cfg.enable {
programs.eza = {
enable = true;
git = true;
icons = "always";
colors = "always";
extraOptions = [
"--all"
"--sort=name"
"--group-directories-first"
"--header"
"--group"
];
};
};
}

View file

@ -0,0 +1,32 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.figlet;
in
{
options = mkEnableModule "programs.figlet";
config = mkIf cfg.enable {
home.packages = with pkgs; [
figlet
];
programs.fish.functions = lib.mkIf config.programs.fish.enable {
figlet = {
wraps = "figlet";
body = # fish
''
command figlet -f "ANSI Shadow" $argv
'';
};
};
};
}

View file

@ -0,0 +1,68 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf enabled;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.fzf;
inherit (config.${namespace}) theme;
has-ripgrep = config.programs.ripgrep.enable;
has-fd = config.programs.fd.enable;
has-eza = config.programs.eza.enable;
has-bat = config.programs.bat.enable;
has-tmux = config.programs.tmux.enable;
has-delta = config.programs.git.delta.enable;
has-difft = config.programs.git.difftastic.enable;
in
{
options = mkEnableModule "programs.fzf";
config = mkIf cfg.enable {
programs.fzf = {
enable = true;
"${theme.colors.base}" = enabled;
defaultOptions = [
"--margin=10%,5%"
"--border=sharp"
"--pointer= "
"--marker= "
"--prompt= "
"--preview-label-pos='bottom'"
"--preview-window='border-sharp'"
];
defaultCommand = lib.mkIf has-ripgrep "rg --files --hidden --glob \"!.git\"";
changeDirWidgetCommand = lib.mkIf has-fd "fd --type d";
changeDirWidgetOptions = lib.mkIf has-eza [
"--preview 'eza --all --color=always --sort=name --group-directories-first --level=3 {}'"
];
fileWidgetCommand = lib.mkIf has-fd "fd --type f";
fileWidgetOptions = lib.mkIf has-bat [
"--preview 'bat {}'"
];
tmux.enableShellIntegration = lib.mkIf has-tmux true;
};
home.sessionVariables =
if has-delta then
{
fzf_diff_highlighter = "delta --paging=never --features=arctic-fox";
}
else if has-difft then
{
fzf_diff_highlighter = "difft --color=always";
}
else
{ };
};
}

View file

@ -0,0 +1,26 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.gh;
in
{
options = mkEnableModule "programs.gh";
config = mkIf cfg.enable {
programs.gh = {
enable = true;
gitCredentialHelper.enable = true;
};
programs.gh-dash = {
enable = true;
};
};
}

View file

@ -1,36 +0,0 @@
{ pkgs, config, ... }:
let
toYaml = (pkgs.formats.yaml { }).generate;
in
{
home.packages = with pkgs; [
cheat
];
xdg.configFile."cheat/conf.yml".source = toYaml "conf.yml" {
colorize = true;
# TODO set based on global color scheme
style = "rose-pine";
formatter = "terminal256";
pager = "less -FRX";
cheatpaths =
let
cheatDir = "${config.xdg.configHome}/cheat/cheatsheets";
in
[
{
name = "community";
path = "${cheatDir}/community";
tags = [ "community" ];
readonly = true;
}
{
name = "personal";
path = "${cheatDir}/personal";
tags = [ "personal" ];
readonly = false;
}
];
};
}

View file

@ -1,26 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
curl
];
xdg.configFile.".curlrc" = {
enable = true;
target = ".curlrc";
text = # conf
''
# Limit the timeout in seconds.
connect-timeout = 60
# Follow HTTP redirects.
location
# Show error messages.
show-error
# Disguise as IE 9 on Windows 7.
user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
'';
};
}

View file

@ -1,18 +0,0 @@
{ ... }:
{
programs.eza = {
enable = true;
git = true;
icons = "always";
colors = "always";
extraOptions = [
"--all"
"--sort=name"
"--group-directories-first"
"--header"
"--group"
];
};
}

View file

@ -1,26 +0,0 @@
{
flake,
pkgs,
lib,
config,
...
}:
let
inherit (flake.inputs) self;
in
{
home.packages = with pkgs; [
# Could not get overlays or overrides to work.
(callPackage "${self}/derivations/figlet-with-fonts.nix" { })
];
programs.fish.functions = lib.mkIf config.programs.fish.enable {
figlet = {
wraps = "figlet";
body = # fish
''
command figlet -f "ANSI Shadow" $argv
'';
};
};
}

View file

@ -1,44 +0,0 @@
{ lib, config, ... }:
let
has-ripgrep = config.programs.ripgrep.enable;
has-fd = config.programs.fd.enable;
has-eza = config.programs.eza.enable;
has-bat = config.programs.bat.enable;
has-tmux = config.programs.tmux.enable;
has-delta = config.programs.git.delta.enable;
in
{
programs.fzf = {
enable = true;
rose-pine.enable = true;
defaultOptions = [
"--margin=10%,5%"
"--border=sharp"
"--pointer= "
"--marker= "
"--prompt= "
"--preview-label-pos='bottom'"
"--preview-window='border-sharp'"
];
defaultCommand = lib.mkIf has-ripgrep "rg --files --hidden --glob \"!.git\"";
changeDirWidgetCommand = lib.mkIf has-fd "fd --type d";
changeDirWidgetOptions = lib.mkIf has-eza [
"--preview 'eza --all --color=always --sort=name --group-directories-first --level=3 {}'"
];
fileWidgetCommand = lib.mkIf has-fd "fd --type f";
fileWidgetOptions = lib.mkIf has-bat [
"--preview 'bat {}'"
];
tmux.enableShellIntegration = lib.mkIf has-tmux true;
};
home.sessionVariables = lib.mkIf has-delta {
fzf_diff_highlighter = "delta --paging=never --features=arctic-fox";
};
}

View file

@ -1,11 +0,0 @@
{ ... }:
{
programs.gh = {
enable = true;
gitCredentialHelper.enable = true;
};
programs.gh-dash = {
enable = true;
};
}

View file

@ -0,0 +1,11 @@
{ _ }:
final: prev: {
figlet = prev.figlet.overrideAttrs (old: {
contributed = prev.fetchFromGitHub {
owner = "xero";
repo = "figlet-fonts";
rev = "a6d2db1a3ee88bec3518214e851825fc4495ac84";
hash = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY";
};
});
}

View file

@ -1,3 +1,40 @@
# mar does dotfiles <div align="center">
<img width="200" src="./assets/lesbian-nix.svg" alt="The Nix logo recolored with the colors of the lesbian flag.">
<h1>marleyOS</h1>
<img alt="Last Commit" src="https://img.shields.io/gitea/last-commit/punkfairie/nix?gitea_url=https%3A%2F%2Fcodewith.babesonthe.net&style=for-the-badge&logo=git&logoColor=d362a4&label=updated&color=d362a4">
<img alt="Build With" src="https://img.shields.io/badge/built_with-nix-ff9a56?style=for-the-badge&logo=nixos&logoColor=ff9a56">
<br><br>
<p>My dotfiles.</p>
</div>
My dotfiles - as managed by [Nix](https://nixos.org/) and [Home Manager](https://github.com/nix-community/home-manager). ## 🩷 About
This is my personal system configuration. You are welcome to use it, but I
wouldn't advise doing so. It's written to be publicly accessible but not
publicly released, therefore things are likely to break.
## 🥚 Inputs
- [Snowfall Lib](https://snowfall.org/guides/lib/quickstart/)
- [Home Manager](https://nix-community.github.io/home-manager/)
- [Rose Pine](https://codewith.babesonthe.net/punkfairie/rose-pine-nix)
## 🐣 Outputs
- `homes`: Home manager config
- `homes/<system>/marley@nyx`: My main desktop. Currently running Arch Linux
but will be switched to NixOS once I've finished migrating my dotfiles.
- `modules`: Most config is done here. The file structure is pretty
self-explanatory.
- `modules/{home,nixos,darwin}/base`: Anything in a base folder directly under
a platform folder is always enabled and does not include a `<module>.enable`
option.
- `modules/{home,nixos,darwin}/<category>/base`: These are not subject to the
above, they simply denote options that apply to the whole category.
- `overlays`
- `overlays/figlet`: Adding in [xero's custom fonts](https://github.com/xero/figlet-fonts/).
## 🫶 Credits
- [jakehamilton/config](https://github.com/jakehamilton/config)
- [the nix logo used in this readme](https://lix.systems/)