Compare commits

...

18 commits

Author SHA1 Message Date
b05a8fbb75
fix(home): cfg.package -> cfg.icons.package 2024-11-16 23:58:06 -08:00
c0b8dbb3e4
fix(home): .enabled -> .enable 2024-11-16 23:57:21 -08:00
c619fcf50a
fix(home): Add enable 2024-11-16 23:57:21 -08:00
0b22f3b9ef
fix(home): Move non-options to config 2024-11-16 23:53:24 -08:00
02b37ea980
fix(home): Typo 2024-11-16 23:43:20 -08:00
a5c7443464
fix(home): Don't define top-level options under programs.git 2024-11-16 23:42:55 -08:00
465a717669
fix(home): Fix theme.colors hoisting 2024-11-16 23:41:21 -08:00
9a07f22743
fix(home): Fix marleyos.theme settings 2024-11-16 23:36:51 -08:00
4dd4d4a1cf
fix(home): Submodule opts weren't being detected correctly 2024-11-16 23:29:38 -08:00
910a7f1695
fix(home): options -> options.marleyos 2024-11-16 23:05:17 -08:00
0e2d5d093e
fix(home): Wrap cava config in programs.cava 2024-11-16 22:57:36 -08:00
7db00936a0
fix(home): Import enabled from correct lib 2024-11-16 22:48:42 -08:00
acc2be8b82
fix(home): Stop infinite recursion 2024-11-16 22:45:33 -08:00
67835fec4d
feat(home): Add isRosePine to work around infinite recursion
Hacky solution, need to come up with something better.
2024-11-16 22:40:50 -08:00
15372b7726
feat: ${namespace} -> marleyos
There was little point to doing this anyway as project-wide find &
replace is trivial.
2024-11-16 22:36:34 -08:00
b2a053e3f2
fix(lib): Stop mkEnableModule from referring to itself 2024-11-16 22:29:13 -08:00
e997894958
fix: Temporary - manually specify hostname
archgirlie hasn't been renamed to nyx yet (yes I could change the folder
name but I refuse)
2024-11-16 21:42:58 -08:00
c637b646f6
fix: Correct { _ } to _ 2024-11-16 21:42:03 -08:00
53 changed files with 389 additions and 431 deletions

View file

@ -4,7 +4,7 @@ default:
alias dh := deployhome
[group('home')]
deployhome user=env_var('USER'):
home-manager switch -b bak --flake .
home-manager switch -b bak --flake .#marley@nyx
[group('home')]
refreshhome:

View file

@ -66,6 +66,22 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -88,21 +104,40 @@
"type": "github"
}
},
"flake-parts_2": {
"flake-utils": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
"systems": "systems"
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
@ -225,21 +260,6 @@
"type": "github"
}
},
"nixos-unified": {
"locked": {
"lastModified": 1729697921,
"narHash": "sha256-gqcmWE+4Vr5/l6AoQc2jIbJHCAXAY+qWPC0ruoAHV1Q=",
"owner": "srid",
"repo": "nixos-unified",
"rev": "e60e64841e74c777799624531dcb2f311f95f639",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "nixos-unified",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1730531603,
@ -256,18 +276,6 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1730504152,
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1717432640,
@ -319,13 +327,12 @@
"root": {
"inputs": {
"devenv": "devenv",
"flake-parts": "flake-parts_2",
"home-manager": "home-manager",
"nixos-unified": "nixos-unified",
"nixpkgs": "nixpkgs_4",
"rose-pine": "rose-pine",
"rose-pine-amfora": "rose-pine-amfora",
"rose-pine-qt5ct": "rose-pine-qt5ct"
"rose-pine-qt5ct": "rose-pine-qt5ct",
"snowfall-lib": "snowfall-lib"
}
},
"rose-pine": {
@ -374,6 +381,43 @@
"repo": "rose-pine-qt5ct",
"type": "github"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1730136121,
"narHash": "sha256-tfVayj13Zw+zzOKrmJhnvBod7Hdb9ixBR6/4GUlyMA0=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "dd348182c1a010993e68004eada86cf0341fe2c4",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View file

@ -1,11 +1,10 @@
{
lib,
namespace,
pkgs,
...
}:
let
inherit (lib.${namespace}) enabled;
inherit (lib.marleyos) enabled;
in
{
home.keyboard.options = [ "apple:alupckeys" ];
@ -20,7 +19,7 @@ in
manix
];
${namespace} = {
marleyos = {
isDesktop = true;
appearance = {

View file

@ -1,42 +1,4 @@
{ lib, namespace, ... }:
with lib;
rec {
## Create a module option with only an enable option.
## ```nix
## options = lib.mkEnableModule "module-name"
## ```
##
#@ String
mkEnableModule = name: {
${namespace}.${name}.enable = mkEnableModule "${name}";
};
## Create a NixOS module option.
##
## ```nix
## lib.mkOpt nixpkgs.lib.types.str "My default" "Description of my option."
## ```
##
#@ Type -> Any -> String
mkOpt =
type: default: description:
mkOption {
inherit
type
default
description
;
};
## Create a boolean NixOS module option.
##
## ```nix
## lib.mkBoolOpt true "Description of my option."
## ```
##
#@ Type -> Any -> String
mkBoolOpt = mkOpt types.bool;
_: {
enabled = {
## Quickly enable an option.
##

View file

@ -1,44 +1,48 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule enabled;
inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.appearance.base;
inherit (config.${namespace}) theme;
cfg = config.marleyos.appearance.base;
inherit (config.marleyos.theme) colors;
inherit (config.marleyos) isDesktop;
in
{
options = mkEnableModule "appearance.base";
options.marleyos.appearance.base.enable = mkEnableOption "base";
config = mkIf cfg.enable {
home.packages = with pkgs; [
maple-mono-NF
];
${theme.colors.base}.pointerCursor = enabled;
rose-pine.pointerCursor = mkIf colors.isRosePine enabled;
${namespace}.theme = {
default = "dark";
marleyos.theme = {
colors = {
default = "dark";
dark = {
base = "rose-pine";
flavor = "main";
dark = {
base = "rose-pine";
flavor = "main";
};
light = {
base = "rose-pine";
flavor = "dawn";
};
};
light = {
base = "rose-pine";
flavor = "dawn";
icons = {
package = pkgs.kora-icon-theme;
name = "kora";
};
};
${namespace}.theme.icons = {
package = pkgs.kora-icon-theme;
name = "kora";
pinentry = if isDesktop then pkgs.pinentry-gtk2 else pkgs.pinentry-curses;
};
# TODO: package font with harfbuzz features.

View file

@ -1,24 +1,23 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule enabled;
inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.appearance.gtk;
inherit (config.${namespace}) theme;
cfg = config.marleyos.appearance.gtk;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "appearance.gtk";
options.marleyos.appearance.gtk.enable = mkEnableOption "gtk";
config = mkIf cfg.enable {
gtk = {
enable = true;
"${theme.colors.theme}" = enabled;
rose-pine = mkIf colors.isRosePine enabled;
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
};

View file

@ -1,22 +1,20 @@
{
lib,
config,
namespace,
inputs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.appearance.qt;
inherit (config.${namespace}) theme;
cfg = config.marleyos.appearance.qt;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "appearance.qt";
options.marleyos.appearance.qt.enable = mkEnableOption "qt";
config = mkIf cfg.enable {
xdg.configFile = mkIf (theme.colors.base == "rose-pine") {
xdg.configFile = mkIf (colors.base == "rose-pine") {
"qt5ct/colors/rose-pine.conf" = {
source = "${inputs.rose-pine-qt5ct}/rose-pine.conf";
};

View file

@ -1,17 +1,16 @@
{
lib,
namespace,
pkgs,
...
}:
let
inherit (lib.${namespace}) enabled;
inherit (lib.marleyos) enabled;
in
{
# Anything in this folder should not include an enable/disable option. This is
# the only folder that is always applied.
config = {
${namespace}.my = {
marleyos.my = {
name = "marley";
username = "punkfairie";
fullName = "Marley Rae";

View file

@ -1,4 +1,4 @@
{ _ }:
_:
{
config = {
nix = {

View file

@ -1,13 +1,12 @@
{
config,
namespace,
lib,
pkgs,
...
}:
let
inherit (lib) mkMerge mkIf;
inherit (config.${namespace}) isDesktop;
inherit (config.marleyos) isDesktop;
in
{
config = {

View file

@ -1,9 +1,9 @@
{ lib, namespace, ... }:
{ lib, ... }:
let
inherit (lib) mkOption types;
in
{
options.${namespace}.isDesktop = mkOption {
options.marleyos.isDesktop = mkOption {
type = with types; bool;
default = false;
description = "Whether this machine is used as a graphical desktop.";

View file

@ -1,5 +1,4 @@
{
namespace,
lib,
config,
...
@ -13,7 +12,7 @@ let
;
in
{
options.${namespace}.my = rec {
options.marleyos.my = rec {
name = mkOption {
type = with types; str;
default = config.snowfallorg.user.name or "marley";
@ -53,13 +52,13 @@ in
config =
let
cfg = config.${namespace}.my;
cfg = config.marleyos.my;
in
{
assertions = [
{
assertion = cfg.name != null;
message = "${namespace}.my.name must be set.";
message = "marleyos.my.name must be set.";
}
];

View file

@ -1,6 +1,5 @@
{
lib,
namespace,
config,
pkgs,
...
@ -14,7 +13,7 @@ let
mkIf
mkDefault
;
cfg = config.${namespace}.theme;
cfg = config.marleyos.theme;
colorThemes = lib.types.enum [
"rose-pine"
@ -83,8 +82,8 @@ let
};
in
{
options.${namespace}.theme = {
colors = rec {
options.marleyos.theme = {
colors = {
default = mkOption {
type = with types; str;
default = "dark";
@ -94,9 +93,19 @@ in
light = mkColorThemeOpt "light" "dawn";
dark = mkColorThemeOpt "dark" "main";
inherit ("${default}") base;
inherit ("${default}") flavor;
inherit ("${default}") accent;
base = mkOption {
type = colorThemes;
};
flavor = mkOption {
type = with types; nullOr str;
};
accent = mkOption {
type = with types; nullOr str;
};
isRosePine = mkOption {
type = with types; bool;
};
};
icons = mkOption {
@ -113,19 +122,31 @@ in
};
config = mkMerge [
# colors
{
marleyos.theme.colors = rec {
inherit (cfg.colors."${cfg.colors.default}") base;
inherit (cfg.colors."${cfg.colors.default}") flavor;
inherit (cfg.colors."${cfg.colors.default}") accent;
# HACK: Need to come up with a better solution
isRosePine = base == "rose-pine";
};
}
# icons
(mkIf (cfg.icons != null) {
gtk = mkIf config.gtk.enable (mkDefault {
iconTheme = {
inherit (cfg.icons) name;
package = mkIf (cfg.icons.package != null) cfg.package;
package = mkIf (cfg.icons.package != null) cfg.icons.package;
};
});
services.dunst = mkIf config.services.dunst.enable (mkDefault {
iconTheme = {
inherit (cfg.icons) name;
package = mkIf (cfg.icons.package != null) cfg.package;
package = mkIf (cfg.icons.package != null) cfg.icons.package;
};
});
})

View file

@ -1,26 +1,24 @@
{
lib,
config,
namespace,
pkgs,
inputs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.amfora;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.amfora;
inherit (config.marleyos.theme) colors;
themeFiles = {
rose-pine = "${inputs.rose-pine-amfora}/themes/rose-pine.toml";
};
themeFile = themeFiles.${theme.colors.base};
themeFile = themeFiles."${colors.base}";
in
{
options = mkEnableModule "programs.amfora";
options.marleyos.programs.amfora.enable = mkEnableOption "amfora";
config = mkIf cfg.enable {
home.packages = with pkgs; [
@ -55,7 +53,7 @@ in
underline = true
# }}}
highlight_style = "${theme.colors.base}"
highlight_style = "${colors.base}"
# Defaults {{{
[auth]

View file

@ -1,19 +1,18 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule enabled;
inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.programs.bat;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.bat;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "programs.bat";
options.marleyos.programs.bat.enable = mkEnableOption "bat";
config = mkIf cfg.enable {
programs.bat = {
@ -24,7 +23,7 @@ in
batman
];
"${theme.colors.base}" = enabled;
rose-pine = mkIf colors.isRosePine enabled;
config = {
style = "auto";

View file

@ -1,24 +1,23 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule enabled;
inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.programs.btop;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.btop;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "programs.btop";
options.marleyos.programs.btop.enable = mkEnableOption "btop";
config = mkIf cfg.enable {
programs.btop = {
enable = true;
"${theme.colors.base}" = enabled;
rose-pine = mkIf colors.isRosePine enabled;
settings = {
theme_background = false;

View file

@ -1,30 +1,31 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf enabled;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.programs.cava;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.cava;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "programs.cava";
options.marleyos.programs.cava.enable = mkEnableOption "cava";
config = mkIf cfg.enable {
enable = true;
programs.cava = {
enable = true;
"${theme.colors.base}" = enabled;
rose-pine = mkIf colors.isRosePine enabled;
# TODO: disable this when mpd is not enabled? Can that be detected on non
# NixOS systems?
settings = {
input = {
method = "fifo";
source = "/tmp/mpd.fifo";
# TODO: disable this when mpd is not enabled? Can that be detected on non
# NixOS systems?
settings = {
input = {
method = "fifo";
source = "/tmp/mpd.fifo";
};
};
};
};

View file

@ -1,21 +1,19 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.cheat;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.cheat;
inherit (config.marleyos.theme) colors;
toYAML = (pkgs.formats.yaml { }).generate;
in
{
options = mkEnableModule "programs.cheat";
options.marleyos.programs.cheat.enable = mkEnableOption "cheat";
config = mkIf cfg.enable {
home.packages = with pkgs; [
@ -24,7 +22,7 @@ in
xdg.configFile."cheat/conf.yml".source = toYAML "conf.yml" {
colorize = true;
style = "${theme.colors.base}";
style = "${colors.base}";
formatter = "terminal256";
pager = "less -FRX";

View file

@ -1,18 +1,16 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.curl;
cfg = config.marleyos.programs.curl;
in
{
options = mkEnableModule "programs.curl";
options.marleyos.programs.curl.enable = mkEnableOption "curl";
config = mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.eza;
cfg = config.marleyos.programs.eza;
in
{
options = mkEnableModule "programs.eza";
options.marleyos.programs.eza.enable = mkEnableOption "eza";
config = mkIf cfg.enable {
programs.eza = {

View file

@ -1,18 +1,16 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.figlet;
cfg = config.marleyos.programs.figlet;
in
{
options = mkEnableModule "programs.figlet";
options.marleyos.programs.figlet.enable = mkEnableOption "figlet";
config = mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,19 +1,18 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule enabled;
inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.programs.fish;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.fish;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "programs.fish";
options.marleyos.programs.fish.enable = mkEnableOption "fish";
config = mkIf cfg.enable {
home.packages = with pkgs; [
@ -35,7 +34,7 @@ in
programs.fish = {
enable = true;
${theme.colors.name} = enabled;
rose-pine = mkIf colors.isRosePine enabled;
preferAbbrs = true;

View file

@ -1,15 +1,14 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf enabled;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.programs.fzf;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.fzf;
inherit (config.marleyos.theme) colors;
has-ripgrep = config.programs.ripgrep.enable;
has-fd = config.programs.fd.enable;
@ -20,13 +19,13 @@ let
has-difft = config.programs.git.difftastic.enable;
in
{
options = mkEnableModule "programs.fzf";
options.marleyos.programs.fzf.enable = mkEnableOption "fzf";
config = mkIf cfg.enable {
programs.fzf = {
enable = true;
"${theme.colors.base}" = enabled;
rose-pine = mkIf colors.isRosePine enabled;
defaultOptions = [
"--margin=10%,5%"

View file

@ -5,13 +5,12 @@
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.gh;
cfg = config.marleyos.programs.gh;
in
{
options = mkEnableModule "programs.gh";
options.marleyos.programs.gh.enable = mkEnableOption "gh";
config = mkIf cfg.enable {
programs.gh = {

View file

@ -1,13 +1,12 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.git;
cfg = config.marleyos.programs.git;
in
{
config = mkIf cfg.enable {

View file

@ -1,25 +1,22 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.git;
cfg = config.marleyos.programs.git;
in
{
options = mkEnableModule "programs.git";
options.marleyos.programs.git.enable = mkEnableOption "git";
imports = [
./aliases.nix
];
config = mkIf cfg.enable {
home.packages = with pkgs; [
gum
clipboard-jh
@ -73,7 +70,7 @@ in
# options = {
# navigate = true;
# # TODO: Add to rose-pine-nix
# syntax-theme = "${theme.colors.base}";
# syntax-theme = "${colors.base}";
# features = "mellow-barbet";
# true-color = "always";
# hyperlinks = true;
@ -182,88 +179,88 @@ in
credential.helper = "store";
};
};
# ███╗ ███╗██╗███████╗ ██████╗
# ████╗ ████║██║██╔════╝██╔════╝
# ██╔████╔██║██║███████╗██║
# ██║╚██╔╝██║██║╚════██║██║
# ██║ ╚═╝ ██║██║███████║╚██████╗
# ╚═╝ ╚═╝╚═╝╚══════╝ ╚═════╝
# ███╗ ███╗██╗███████╗ ██████╗
# ████╗ ████║██║██╔════╝██╔════╝
# ██╔████╔██║██║███████╗██║
# ██║╚██╔╝██║██║╚════██║██║
# ██║ ╚═╝ ██║██║███████║╚██████╗
# ╚═╝ ╚═╝╚═╝╚══════╝ ╚═════╝
home.shellAbbrs = {
g = "git";
};
home.shellAbbrs = {
g = "git";
};
programs.fish.functions = lib.mkIf config.programs.fish.enable {
git_develop_branch = # fish
''
command git rev-parse --git-dir &>/dev/null || return
set -l branch
programs.fish.functions = lib.mkIf config.programs.fish.enable {
git_develop_branch = # fish
''
command git rev-parse --git-dir &>/dev/null || return
set -l branch
for branch in dev devel develop development
if command git show-ref -q --verify refs/heads/$branch
echo $branch
return 0
for branch in dev devel develop development
if command git show-ref -q --verify refs/heads/$branch
echo $branch
return 0
end
end
echo develop
return 1
'';
git_main_branch = # fish
''
command git rev-parse --git-dir &>/dev/null || return
set -l ref
for ref in
refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default,master}
if command git show-ref -q --verify $ref
echo (basename $ref)
return 0
end
end
end
echo develop
return 1
'';
echo main
return 1
'';
git_main_branch = # fish
''
command git rev-parse --git-dir &>/dev/null || return
set -l ref
git_current_branch = # fish
''
set -l ref (git symbolic-ref --quiet HEAD 2>/dev/null)
set -l ret $status
for ref in
refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default,master}
if command git show-ref -q --verify $ref
echo (basename $ref)
return 0
end
end
if [ $ret -ne 0 ]
[ $ret -eq 128 ] && return # no git repo
set ref (git rev-parse --short HEAD 2>/dev/null) || return
end
echo main
return 1
'';
echo (string replace "refs/heads/" "" $ref)
'';
git_current_branch = # fish
''
set -l ref (git symbolic-ref --quiet HEAD 2>/dev/null)
set -l ret $status
git_open = # fish
''
set -f origin "$(git remote get-url origin)"
if [ $ret -ne 0 ]
[ $ret -eq 128 ] && return # no git repo
set ref (git rev-parse --short HEAD 2>/dev/null) || return
end
echo (string replace "refs/heads/" "" $ref)
'';
git_open = # fish
''
set -f origin "$(git remote get-url origin)"
switch "$origin"
case "*github*"
if command -v gh &>/dev/null
gh repo view --web &>/dev/null
else
set_color red
echo "[ERROR] Install gh-cli to open Github repos." >&2
set_color normal
return 1
end
case "https://*"
open '$origin' >/dev/null &
case "*"
set_color red
printf "[ERROR] Unrecognized origin %s" "$origin" >&2
return 1
end
'';
};
switch "$origin"
case "*github*"
if command -v gh &>/dev/null
gh repo view --web &>/dev/null
else
set_color red
echo "[ERROR] Install gh-cli to open Github repos." >&2
set_color normal
return 1
end
case "https://*"
open '$origin' >/dev/null &
case "*"
set_color red
printf "[ERROR] Unrecognized origin %s" "$origin" >&2
return 1
end
'';
};
};
}

View file

@ -1,19 +1,17 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.glow;
cfg = config.marleyos.programs.glow;
toYAML = (pkgs.formats.yaml { }).generate;
in
{
options = mkEnableModule "programs.glow";
options.marleyos.programs.glow.enable = mkEnableOption "glow";
config = mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.gpg;
cfg = config.marleyos.programs.gpg;
in
{
options = mkEnableModule "programs.gpg";
options.marleyos.programs.gpg.enable = mkEnableOption "gpg";
config = mkIf cfg.enable {
programs.gpg = {

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.hyfetch;
cfg = config.marleyos.programs.hyfetch;
in
{
options = mkEnableModule "programs.hyfetch";
options.marleyos.programs.hyfetch.enable = mkEnableOption "hyfetch";
imports = [
./neofetch.nix

View file

@ -1,14 +1,13 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.hyfetch;
cfg = config.marleyos.programs.hyfetch;
in
{
config = mkIf cfg.enable {

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.journalctl;
cfg = config.marleyos.programs.journalctl;
in
{
options = mkEnableModule "programs.journalctl";
options.marleyos.programs.journalctl.enable = mkEnableOption "journalctl";
config = mkIf cfg.enable {
home.shellAbbrs = {

View file

@ -1,18 +1,16 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.just;
cfg = config.marleyos.programs.just;
in
{
options = mkEnableModule "programs.just";
options.marleyos.programs.just.enable = mkEnableOption "just";
config = mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,19 +1,17 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.lazygit;
cfg = config.marleyos.programs.lazygit;
has-delta = config.programs.git.delta.enable;
has-difft = config.programs.git.difftastic.enable;
in
{
options = mkEnableModule "programs.lazygit";
options.marleyos.programs.lazygit.enable = mkEnableOption "lazygit";
config = mkIf cfg.enable {
programs.lazygit = {

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.less;
cfg = config.marleyos.programs.less;
in
{
options = mkEnableModule "programs.less";
options.marleyos.programs.less.enable = mkEnableOption "less";
config = mkIf cfg.enable {
programs.less.enable = true;

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.man;
cfg = config.marleyos.programs.man;
in
{
options = mkEnableModule "programs.man";
options.marleyos.programs.man.enable = mkEnableOption "man";
config = mkIf cfg.enable {
programs.man.enable = true;

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.ncmpcpp;
cfg = config.marleyos.programs.ncmpcpp;
in
{
options = mkEnableModule "programs.ncmpcpp";
options.marleyos.programs.ncmpcpp.enable = mkEnableOption "ncmpcpp";
config = mkIf cfg.enable {
programs.ncmpcpp.enable = true;

View file

@ -1,18 +1,16 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.neo;
cfg = config.marleyos.programs.neo;
in
{
options = mkEnableModule "programs.neo";
options.marleyos.programs.neo.enable = mkEnableOption "neo";
config = mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.rbw;
cfg = config.marleyos.programs.rbw;
in
{
options = mkEnableModule "programs.rbw";
options.marleyos.programs.rbw.enable = mkEnableOption "rbw";
config = mkIf cfg.enable {
programs.rbw = {

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.ripgrep;
cfg = config.marleyos.programs.ripgrep;
in
{
options = mkEnableModule "programs.ripgrep";
options.marleyos.programs.ripgrep.enable = mkEnableOption "ripgrep";
config = mkIf cfg.enable {
programs.ripgrep.enable = true;

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.ssh;
cfg = config.marleyos.programs.ssh;
in
{
options = mkEnableModule "programs.ssh";
options.marleyos.programs.ssh.enable = mkEnableOption "ssh";
config = mkIf cfg.enable {
programs.ssh = {

View file

@ -1,23 +1,22 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib)
mkEnableOption
mkIf
enabled
mkForce
concatStrings
;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.programs.starship;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.starship;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "programs.starship";
options.marleyos.programs.starship.enable = mkEnableOption "starship";
imports = [
./nerd-font-symbols.nix
@ -27,9 +26,9 @@ in
programs.starship = {
enable = true;
"${theme.colors.base}" = enabled;
rose-pine = mkIf colors.isRosePine enabled;
settings = mkIf config.programs.starship.rose-pine.enabled {
settings = mkIf config.programs.starship.rose-pine.enable {
format = mkForce (concatStrings [
"$username "
"$directory "

View file

@ -1,13 +1,12 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf mkForce;
cfg = config.${namespace}.programs.starship;
cfg = config.marleyos.programs.starship;
in
{
config = mkIf cfg.enable {

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.systemctl;
cfg = config.marleyos.programs.systemctl;
in
{
options = mkEnableModule "programs.systemctl";
options.marleyos.programs.systemctl.enable = mkEnableOption "systemctl";
config = mkIf cfg.enable {
home.shellAbbrs = {

View file

@ -1,25 +1,23 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.tmux;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.tmux;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "programs.tmux";
options.marleyos.programs.tmux.enable = mkEnableOption "tmux";
config = mkIf cfg.enable {
programs.tmux = {
enable = true;
rose-pine = mkIf (theme.colors.base == "rose-pine") {
rose-pine = mkIf (colors.base == "rose-pine") {
enable = true;
extraConfig = # tmux
''

View file

@ -1,21 +1,19 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.wezterm;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.wezterm;
inherit (config.marleyos.theme) colors;
isGenericLinux = config.targets.genericLinux.enable;
in
{
options = mkEnableModule "programs.wezterm";
options.marleyos.programs.wezterm.enable = mkEnableOption "wezterm";
config = mkIf cfg.enable {
programs.wezterm = {
@ -38,7 +36,7 @@ in
config.enable_tab_bar = false
config.color_scheme = "${theme.colors.base}"
config.color_scheme = "${colors.base}"
config.font = wezterm.font_with_fallback({
{

View file

@ -1,18 +1,16 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.wget;
cfg = config.marleyos.programs.wget;
in
{
options = mkEnableModule "programs.wget";
options.marleyos.programs.wget.enable = mkEnableOption "wget";
config = mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,24 +1,23 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf enabled;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.${namespace}.programs.zathura;
inherit (config.${namespace}) theme;
cfg = config.marleyos.programs.zathura;
inherit (config.marleyos.theme) colors;
in
{
options = mkEnableModule "programs.zathura";
options.marleyos.programs.zathura.enable = mkEnableOption "zathura";
config = mkIf cfg.enable {
programs.zathura = {
enable = true;
"${theme.colors.base}" = enabled;
rose-pine = mkIf colors.isRosePine enabled;
};
};
}

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.programs.zoxide;
cfg = config.marleyos.programs.zoxide;
in
{
options = mkEnableModule "programs.zoxide";
options.marleyos.programs.zoxide.enable = mkEnableOption "zoxide";
config = mkIf cfg.enable {
programs.zoxide = {

View file

@ -1,18 +1,16 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.services.clipboard;
cfg = config.marleyos.services.clipboard;
in
{
options = mkEnableModule "services.clipboard";
options.marleyos.services.clipboard.enable = mkEnableOption "clipboard";
config = mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,25 +1,23 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib)
mkEnableOption
mkIf
enabled
disabled
mkMerge
;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib.marleyos) disabled;
cfg = config.${namespace}.services.dunst;
inherit (config.${namespace}) theme;
cfg = config.marleyos.services.dunst;
inherit (config.marleyos.theme) colors;
isRosePine = theme.colors.base == "rose-pine";
isRosePine = colors.base == "rose-pine";
in
{
options = mkEnableModule "services.dunst";
options.marleyos.services.dunst.enable = mkEnableOption "dunst";
config = mkIf cfg.enable {
services.dunst = {
@ -28,7 +26,7 @@ in
# I don't want to use the rose-pine icons; also don't want to deal with
# the drop-in weirdness.
# TODO: Convert dunst.rose-pine to attr set to fix this.
"${theme.colors.base}" = if isRosePine then disabled else enabled;
rose-pine = disabled;
settings = mkMerge [
### Rose Pine ###

View file

@ -1,18 +1,16 @@
{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.services.syncthing;
cfg = config.marleyos.services.syncthing;
in
{
options = mkEnableModule "services.syncthing";
options.marleyos.services.syncthing.enable = mkEnableOption "syncthing";
config = mkIf cfg.enable {
home.packages = [

View file

@ -1,17 +1,15 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.xorg.xsession;
cfg = config.marleyos.xorg.xsession;
in
{
options = mkEnableModule "xorg.xsession";
options.marleyos.xorg.xsession.enable = mkEnableOption "xsession";
config = mkIf cfg.enable {
xsession = {
@ -20,7 +18,7 @@ in
numlock.enable = true;
# TODO: Switch to autorandr.
profileEtra = # sh
profileExtra = # sh
''
sudo mount -a
"${config.home.homeDirectory}/.config/xrandr/desktop.sh"

View file

@ -1,4 +1,4 @@
{ _ }:
_:
final: prev: {
figlet = prev.figlet.overrideAttrs (old: {
contributed = prev.fetchFromGitHub {