Compare commits

...

16 commits

Author SHA1 Message Date
f9af0ee523
feat: less 2025-05-27 17:44:51 -07:00
9978c79bd1
feat: just 2025-05-27 17:36:05 -07:00
281ebd52f0
feat: jq 2025-05-27 17:33:35 -07:00
23c028f620
feat: journalctl 2025-05-27 17:30:05 -07:00
bcab411b3a
fix: move apps back to hm 2025-05-27 17:26:51 -07:00
a2708e7c33
feat: hyfetch 2025-05-27 17:25:28 -07:00
82b1d1da11
feat: httpie 2025-05-27 17:23:47 -07:00
e9d85deaa6
feat: gpg 2025-05-27 17:23:47 -07:00
66e104d402
feat: move apps to global options 2025-05-27 17:20:12 -07:00
6908755316
feat: glow 2025-05-27 17:11:28 -07:00
5b0774350f
feat: git 2025-05-26 20:12:25 -07:00
fb29126d4c
fix: set and install clipboard 2025-05-26 20:12:25 -07:00
1a998d1edb
fix: move ddclient overlay to it's module 2025-05-26 20:12:25 -07:00
a8fa9c6c04
feat: gh 2025-05-26 19:58:07 -07:00
1f388342bb
feat: fzf 2025-05-26 19:44:01 -07:00
9576a8a998
fix: lix module already imports the overlay 2025-05-26 19:41:45 -07:00
25 changed files with 140 additions and 64 deletions

View file

@ -15,10 +15,6 @@
# TODO: Move these to custom modules # TODO: Move these to custom modules
overlays = [ overlays = [
# Lix pollutes my terminal with warnings if I move this to a module :(
inputs.lix.overlays.default
(import ./overlays/ddclient.nix)
(import ./overlays/firefox-addons { (import ./overlays/firefox-addons {
inherit (inputs.nixpkgs) lib; inherit (inputs.nixpkgs) lib;
inherit inputs; inherit inputs;

View file

@ -3,13 +3,7 @@
in { in {
config = { config = {
marleycfg = { marleycfg = {
profiles = { inherit (cfg) my profiles;
inherit (cfg.profiles) desktop server;
};
my = {
inherit (cfg.my) name fullName username email git;
};
}; };
}; };
} }

View file

@ -86,18 +86,9 @@
}; };
# config = lib.mkIf pkgs.stdenv.isLinux { # config = lib.mkIf pkgs.stdenv.isLinux {
# home.packages = [
# cfg.pinentry
# cfg.clipboard.package
# ];
#
# # TODO: move these to respective modules # # TODO: move these to respective modules
# programs.rbw = lib.mkDefault { # programs.rbw = lib.mkDefault {
# settings.pinentry = cfg.pinentry; # settings.pinentry = cfg.pinentry;
# }; # };
#
# services.gpg-agent = lib.mkDefault {
# pinentryPackage = cfg.pinentry;
# };
# }; # };
} }

View file

@ -16,7 +16,15 @@ in {
bat = enabled; bat = enabled;
curl = enabled; curl = enabled;
eza = enabled; eza = enabled;
figlet = enabled;
fish = enabled; fish = enabled;
gpg = enabled;
httpie = enabled;
hyfetch = enabled;
journalctl = enabled;
jq = enabled;
just = enabled;
less = enabled;
nh = enabled; nh = enabled;
}; };
} }
@ -28,7 +36,9 @@ in {
programs = { programs = {
cheat = enabled; cheat = enabled;
figlet = enabled; fzf = enabled;
gh = enabled;
glow = enabled;
nemo = enabled; nemo = enabled;
}; };

View file

@ -8,6 +8,17 @@
./figlet.nix ./figlet.nix
./fish.nix ./fish.nix
./fuzzel.nix ./fuzzel.nix
./fzf.nix
./gh.nix
./git
./glow.nix
./gpg.nix
./httpie.nix
./hyfetch
./journalctl.nix
./jq.nix
./just.nix
./less.nix
./nemo.nix ./nemo.nix
./nh.nix ./nh.nix
./waybar.nix ./waybar.nix

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
... ...
}: let }: let
cfg = config.marleyos.programs.fzf; cfg = config.marleyos.programs.fzf;

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
... ...
}: let }: let
cfg = config.marleyos.programs.gh; cfg = config.marleyos.programs.gh;

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
... ...
}: let }: let
cfg = config.marleyos.programs.git; cfg = config.marleyos.programs.git;
@ -14,6 +14,7 @@ in {
# ╚═╝ ╚═╝╚══════╝╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ # ╚═╝ ╚═╝╚══════╝╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
programs.git.aliases = let programs.git.aliases = let
has_fish = config.programs.fish.enable;
fish_fns = config.programs.fish.functions; fish_fns = config.programs.fish.functions;
in { in {
### Staging ### ### Staging ###
@ -84,8 +85,8 @@ in {
b = "branch"; b = "branch";
cb = "checkout -b"; cb = "checkout -b";
cm = lib.mkIf (fish_fns ? git_main_branch) "!git checkout $(git_main_branch)"; cm = lib.mkIf (has_fish && (fish_fns ? git_main_branch)) "!git checkout $(git_main_branch)";
cd = lib.mkIf (fish_fns ? git_develop_branch) "!git checkout $(git_develop_branch)"; cd = lib.mkIf (has_fish && (fish_fns ? git_develop_branch)) "!git checkout $(git_develop_branch)";
m = "merge"; m = "merge";
mtl = "mergetool --no-prompt"; mtl = "mergetool --no-prompt";
@ -159,9 +160,9 @@ in {
nevermind = "!git reset --hard head && git clean -df"; nevermind = "!git reset --hard head && git clean -df";
open = lib.mkIf (config.programs.fish.enable && (fish_fns ? git_open)) "!fish -c git_open"; open = lib.mkIf (has_fish && (fish_fns ? git_open)) "!fish -c git_open";
chash = "!git log --oneline | gum filter --height 10 | cut -d' ' -f1 | ${config.marleyos.apps.clipboard.copy-command} &>/dev/null"; chash = "!git log --oneline | gum filter --height 10 | cut -d' ' -f1 | ${config.marleycfg.apps.clipboard.copy-command} &>/dev/null";
}; };
}; };
} }

View file

@ -1,10 +1,12 @@
{ {
lib,
config, config,
lib,
pkgs, pkgs,
... ...
}: let }: let
cfg = config.marleyos.programs.git; cfg = config.marleyos.programs.git;
inherit (config.marleycfg) my;
in { in {
options.marleyos.programs.git.enable = lib.mkEnableOption "git"; options.marleyos.programs.git.enable = lib.mkEnableOption "git";
@ -15,7 +17,6 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
gum gum
config.marleyos.apps.clipboard.package
]; ];
# ██████╗ ██╗████████╗ # ██████╗ ██╗████████╗
@ -28,8 +29,8 @@ in {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "punkfairie"; userName = my.git.name;
userEmail = "marley@punkfairie.net"; userEmail = my.git.email;
signing = { signing = {
signByDefault = true; signByDefault = true;

View file

@ -1,7 +1,7 @@
{ {
lib,
config, config,
pkgs, pkgs,
lib,
... ...
}: let }: let
cfg = config.marleyos.programs.glow; cfg = config.marleyos.programs.glow;

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
... ...
}: let }: let
cfg = config.marleyos.programs.gpg; cfg = config.marleyos.programs.gpg;
@ -18,6 +18,8 @@ in {
# Don't ask for the password very often. # Don't ask for the password very often.
defaultCacheTtl = 60480000; defaultCacheTtl = 60480000;
maxCacheTtl = defaultCacheTtl; maxCacheTtl = defaultCacheTtl;
pinentryPackage = config.marleycfg.apps.pinentry;
}; };
}; };
} }

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
pkgs, pkgs,
... ...
}: let }: let

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
... ...
}: let }: let
cfg = config.marleyos.programs.hyfetch; cfg = config.marleyos.programs.hyfetch;

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
pkgs, pkgs,
... ...
}: let }: let

View file

@ -0,0 +1,19 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.marleyos.programs.journalctl;
in {
options.marleyos.programs.journalctl.enable = lib.mkEnableOption "journalctl";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
home.shellAbbrs = rec {
jctlf = "journalctl --follow --unit";
jctle = "journalctl --pager-end --unit";
sjctlf = "sudo ${jctlf}";
sjctle = "sudo ${jctle}";
};
};
}

View file

@ -0,0 +1,20 @@
{
marleylib,
config,
osConfig,
lib,
...
}: let
inherit (marleylib.module) mkEnableOption';
cfg = config.marleyos.programs.jq;
osCfg = osConfig.marleyos.programs.jq;
in {
options.marleyos.programs.jq.enable = mkEnableOption' "jq" osCfg.enable;
config = lib.mkIf cfg.enable {
programs.jq = {
enable = true;
};
};
}

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
pkgs, pkgs,
... ...
}: let }: let

View file

@ -0,0 +1,27 @@
{
marleylib,
config,
osConfig,
lib,
...
}: let
inherit (marleylib.module) mkEnableOption';
cfg = config.marleyos.programs.less;
osCfg = osConfig.marleyos.programs.less;
in {
options.marleyos.programs.less.enable = mkEnableOption' "less" osCfg.enable;
config = lib.mkIf cfg.enable {
programs.less.enable = true;
home.sessionVariables = let
osEnv = osConfig.programs.less.envVariables;
in
lib.mkIf (osEnv ? LESS) {
inherit (osEnv) LESS;
};
programs.lesspipe.enable = true;
};
}

View file

@ -14,5 +14,15 @@
Requires = ["graphical-session-pre.target"]; Requires = ["graphical-session-pre.target"];
}; };
}; };
marleycfg.apps.clipboard = {
package = pkgs.wl-clipboard;
copy-command = lib.getExe' pkgs.wl-clipboard "wl-copy";
paste-command = lib.getExe' pkgs.wl-clipboard "wl-paste";
};
home.packages = [
config.marleycfg.apps.clipboard.package
];
}; };
} }

View file

@ -14,6 +14,8 @@ in {
programs = { programs = {
curl = enabled; curl = enabled;
fish = enabled; fish = enabled;
jq = enabled;
less = enabled;
nh = enabled; nh = enabled;
}; };

View file

@ -2,6 +2,8 @@
imports = [ imports = [
./curl.nix ./curl.nix
./fish.nix ./fish.nix
./jq.nix
./less.nix
./nh.nix ./nh.nix
./waybar.nix ./waybar.nix
]; ];

View file

@ -1,6 +1,7 @@
{ {
lib, lib,
config, config,
pkgs,
... ...
}: let }: let
cfg = config.marleyos.programs.jq; cfg = config.marleyos.programs.jq;
@ -8,8 +9,8 @@ in {
options.marleyos.programs.jq.enable = lib.mkEnableOption "jq"; options.marleyos.programs.jq.enable = lib.mkEnableOption "jq";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.jq = { environment.systemPackages = with pkgs; [
enable = true; jq
}; ];
}; };
} }

View file

@ -1,6 +1,7 @@
{ {
lib,
config, config,
lib,
pkgs,
... ...
}: let }: let
cfg = config.marleyos.programs.less; cfg = config.marleyos.programs.less;
@ -8,12 +9,14 @@ in {
options.marleyos.programs.less.enable = lib.mkEnableOption "less"; options.marleyos.programs.less.enable = lib.mkEnableOption "less";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.less.enable = true; programs.less = {
enable = true;
home.sessionVariables = { envVariables = {
LESS = "-R"; LESS = "-R";
};
lessopen = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
}; };
programs.lesspipe.enable = true;
}; };
} }

View file

@ -1,6 +1,6 @@
{ {
lib,
config, config,
lib,
... ...
}: let }: let
cfg = config.marleyos.services.ddclient; cfg = config.marleyos.services.ddclient;
@ -8,6 +8,8 @@ in {
options.marleyos.services.ddclient.enable = lib.mkEnableOption "ddclient"; options.marleyos.services.ddclient.enable = lib.mkEnableOption "ddclient";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
nixpkgs.overlays = [(import ../../../overlays/ddclient.nix)];
age.secrets.ddclient.file = ../../../secrets/ddclient.conf.age; age.secrets.ddclient.file = ../../../secrets/ddclient.conf.age;
services.ddclient = { services.ddclient = {

View file

@ -1,16 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.programs.journalctl;
in {
options.marleyos.programs.journalctl.enable = lib.mkEnableOption "journalctl";
config = lib.mkIf cfg.enable {
home.shellAbbrs = {
jctlf = "sudo journalctl --follow --unit";
jctle = "sudo journalctl --pager-end --unit";
};
};
}