Compare commits

..

No commits in common. "f9af0ee523dd4cf86d509878a34ce453d3bbbd2d" and "f8adbd437a859b25e44698ff2693c97bdb444030" have entirely different histories.

25 changed files with 64 additions and 140 deletions

View file

@ -15,6 +15,10 @@
# 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,7 +3,13 @@
in { in {
config = { config = {
marleycfg = { marleycfg = {
inherit (cfg) my profiles; profiles = {
inherit (cfg.profiles) desktop server;
};
my = {
inherit (cfg.my) name fullName username email git;
};
}; };
}; };
} }

View file

@ -86,9 +86,18 @@
}; };
# 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,15 +16,7 @@ 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;
}; };
} }
@ -36,9 +28,7 @@ in {
programs = { programs = {
cheat = enabled; cheat = enabled;
fzf = enabled; figlet = enabled;
gh = enabled;
glow = enabled;
nemo = enabled; nemo = enabled;
}; };

View file

@ -8,17 +8,6 @@
./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,19 +0,0 @@
{
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

@ -1,20 +0,0 @@
{
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,27 +0,0 @@
{
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,15 +14,5 @@
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,8 +14,6 @@ in {
programs = { programs = {
curl = enabled; curl = enabled;
fish = enabled; fish = enabled;
jq = enabled;
less = enabled;
nh = enabled; nh = enabled;
}; };

View file

@ -2,8 +2,6 @@
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,6 @@
{ {
config,
lib, lib,
config,
... ...
}: let }: let
cfg = config.marleyos.services.ddclient; cfg = config.marleyos.services.ddclient;
@ -8,8 +8,6 @@ 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,6 +1,6 @@
{ {
config,
lib, lib,
config,
... ...
}: let }: let
cfg = config.marleyos.programs.fzf; cfg = config.marleyos.programs.fzf;

View file

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

View file

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

View file

@ -1,12 +1,10 @@
{ {
config,
lib, lib,
config,
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";
@ -17,6 +15,7 @@ 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
]; ];
# ██████╗ ██╗████████╗ # ██████╗ ██╗████████╗
@ -29,8 +28,8 @@ in {
programs.git = { programs.git = {
enable = true; enable = true;
userName = my.git.name; userName = "punkfairie";
userEmail = my.git.email; userEmail = "marley@punkfairie.net";
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 @@
{ {
config,
lib, lib,
config,
... ...
}: let }: let
cfg = config.marleyos.programs.gpg; cfg = config.marleyos.programs.gpg;
@ -18,8 +18,6 @@ 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 @@
{ {
config,
lib, lib,
config,
pkgs, pkgs,
... ...
}: let }: let

View file

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

View file

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

View file

@ -0,0 +1,16 @@
{
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";
};
};
}

View file

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
pkgs,
... ...
}: let }: let
cfg = config.marleyos.programs.jq; cfg = config.marleyos.programs.jq;
@ -9,8 +8,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 {
environment.systemPackages = with pkgs; [ programs.jq = {
jq enable = true;
]; };
}; };
} }

View file

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

View file

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