Compare commits
16 commits
f8adbd437a
...
f9af0ee523
Author | SHA1 | Date | |
---|---|---|---|
f9af0ee523 | |||
9978c79bd1 | |||
281ebd52f0 | |||
23c028f620 | |||
bcab411b3a | |||
a2708e7c33 | |||
82b1d1da11 | |||
e9d85deaa6 | |||
66e104d402 | |||
6908755316 | |||
5b0774350f | |||
fb29126d4c | |||
1a998d1edb | |||
a8fa9c6c04 | |||
1f388342bb | |||
9576a8a998 |
25 changed files with 140 additions and 64 deletions
|
@ -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;
|
||||||
|
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
# };
|
|
||||||
# };
|
# };
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.fzf;
|
cfg = config.marleyos.programs.fzf;
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.gh;
|
cfg = config.marleyos.programs.gh;
|
|
@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -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;
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.glow;
|
cfg = config.marleyos.programs.glow;
|
|
@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.hyfetch;
|
cfg = config.marleyos.programs.hyfetch;
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
19
modules/home/programs/journalctl.nix
Normal file
19
modules/home/programs/journalctl.nix
Normal 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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
20
modules/home/programs/jq.nix
Normal file
20
modules/home/programs/jq.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
27
modules/home/programs/less.nix
Normal file
27
modules/home/programs/less.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
|
@ -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
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@ in {
|
||||||
programs = {
|
programs = {
|
||||||
curl = enabled;
|
curl = enabled;
|
||||||
fish = enabled;
|
fish = enabled;
|
||||||
|
jq = enabled;
|
||||||
|
less = enabled;
|
||||||
nh = enabled;
|
nh = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
];
|
];
|
||||||
|
|
|
@ -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
|
||||||
};
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -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 = {
|
||||||
|
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue