Compare commits

..

No commits in common. "8b06796596cbd40ff15664615e9403af282f75d5" and "26b0b450c6e96c4ed5318d5e80ea4c2f78562be5" have entirely different histories.

314 changed files with 3554 additions and 2307 deletions

View file

@ -74,14 +74,6 @@ genFirefoxAddons:
secret name:
cd secrets && agenix --edit {{name}}.age --identity ~/.ssh/marley@nyx && cd -
[group('maintainence')]
check:
nix flake check
[group('maintainence')]
checkall:
nix flake check --all-systems
alias s := search
search this:
nh search {{this}}

View file

@ -168,21 +168,6 @@
"type": "github"
}
},
"easy-hosts": {
"locked": {
"lastModified": 1747174689,
"narHash": "sha256-WEA2HdjC90GLf5VpMLpvOF3/uSSq6AV4DQ4ezLFspc0=",
"owner": "tgirlcloud",
"repo": "easy-hosts",
"rev": "e1210563fc527221e12544ce55cd954acf94e7ed",
"type": "github"
},
"original": {
"owner": "tgirlcloud",
"repo": "easy-hosts",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
@ -262,6 +247,22 @@
}
},
"flake-compat_5": {
"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-compat_6": {
"flake": false,
"locked": {
"lastModified": 1733328505,
@ -278,26 +279,6 @@
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"marleyvim",
@ -320,7 +301,7 @@
"type": "github"
}
},
"flake-parts_3": {
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"marleyvim",
@ -342,7 +323,7 @@
"type": "github"
}
},
"flake-parts_4": {
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"marleyvim",
@ -364,7 +345,7 @@
"type": "indirect"
}
},
"flake-parts_5": {
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nur",
@ -403,7 +384,59 @@
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils_3"
},
"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"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": [
"stylix",
@ -424,9 +457,9 @@
"type": "github"
}
},
"flake-utils_3": {
"flake-utils_5": {
"inputs": {
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1731533236,
@ -671,7 +704,7 @@
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-parts": "flake-parts_3",
"nixpkgs": [
"marleyvim",
"neovim-nightly-overlay",
@ -831,7 +864,7 @@
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks_2",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src",
@ -930,7 +963,7 @@
"marleyvim",
"devenv"
],
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts",
"libgit2": "libgit2",
"nixpkgs": "nixpkgs_2",
"nixpkgs-23-11": [
@ -997,6 +1030,27 @@
"type": "github"
}
},
"nixgl": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1713543440,
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=",
"owner": "nix-community",
"repo": "nixGL",
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixGL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1733212471,
@ -1013,22 +1067,6 @@
"type": "github"
}
},
"nixpkgs-darwin": {
"locked": {
"lastModified": 1748037224,
"narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f09dede81861f3a83f7f06641ead34f02f37597f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-24.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1747862697,
@ -1045,22 +1083,6 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1747958103,
"narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1717432640,
@ -1191,7 +1213,7 @@
},
"nur": {
"inputs": {
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_4",
"nixpkgs": [
"nixpkgs"
],
@ -1279,18 +1301,17 @@
"inputs": {
"agenix": "agenix",
"darwin": "darwin",
"easy-hosts": "easy-hosts",
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"lix": "lix",
"marleyvim": "marleyvim",
"niri-flake": "niri-flake",
"nixcord": "nixcord",
"nixgl": "nixgl",
"nixpkgs": "nixpkgs_8",
"nixpkgs-darwin": "nixpkgs-darwin",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur",
"snowfall-lib": "snowfall-lib",
"stylix": "stylix",
"unstable": "unstable",
"wezterm": "wezterm"
}
},
@ -1315,6 +1336,28 @@
"type": "github"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736130495,
"narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
@ -1322,13 +1365,13 @@
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": "flake-compat_5",
"flake-utils": "flake-utils_2",
"flake-compat": "flake-compat_6",
"flake-utils": "flake-utils_4",
"git-hooks": "git-hooks_3",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_9",
"systems": "systems_4",
"systems": "systems_5",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-tmux": "tinted-tmux"
@ -1422,6 +1465,21 @@
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
@ -1536,9 +1594,25 @@
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1748026106,
"narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"wezterm": {
"inputs": {
"flake-utils": "flake-utils_3",
"flake-utils": "flake-utils_5",
"freetype2": "freetype2",
"harfbuzz": "harfbuzz",
"libpng": "libpng",

View file

@ -2,12 +2,50 @@
description = "marleyOS";
outputs = inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {imports = [./flake];};
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
snowfall = {
namespace = "marleyos";
title = "marleyOS";
};
channels-config = {
allowUnfree = true;
};
overlays = with inputs; [
lix.overlays.default
nur.overlays.default
agenix.overlays.default
niri-flake.overlays.niri
];
systems.modules.nixos = with inputs; [
agenix.nixosModules.default
stylix.nixosModules.stylix
niri-flake.nixosModules.niri
];
systems.modules.darwin = with inputs; [
agenix.darwinModules.default
lix.nixosModules.default
];
homes.modules = with inputs; [
agenix.homeManagerModules.default
nixcord.homeModules.nixcord
];
outputs-builder = channels: {
formatter = channels.nixpkgs.alejandra;
};
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.11-darwin";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nur = {
url = "github:nix-community/NUR";
@ -19,13 +57,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
easy-hosts.url = "github:tgirlcloud/easy-hosts";
darwin = {
url = "github:LnL7/nix-darwin/nix-darwin-24.11";
inputs.nixpkgs.follows = "nixpkgs";
@ -45,6 +81,11 @@
};
};
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix.url = "github:danth/stylix/release-24.11";
niri-flake.url = "github:sodiboo/niri-flake";

View file

@ -1,22 +0,0 @@
{inputs, ...}: {
systems = [
"x86_64-linux"
"aarch64-darwin"
];
### Nixpkgs Config ###
perSystem = {system, ...}: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
# TODO: Move these to custom modules
overlays = [
(import ./overlays/wezterm.nix {inherit inputs;})
];
};
};
}

View file

@ -1,7 +0,0 @@
{
imports = [
./config.nix
../hosts
];
}

View file

@ -0,0 +1,9 @@
{lib, ...}: let
inherit (lib.marleyos) enabled;
in {
marleyos = {
bundles.mac = enabled;
};
home.stateVersion = "24.05";
}

View file

@ -0,0 +1,9 @@
{lib, ...}: let
inherit (lib.marleyos) enabled;
in {
marleyos = {
bundles.server = enabled;
};
home.stateVersion = "24.05";
}

View file

@ -0,0 +1,9 @@
{lib, ...}: let
inherit (lib.marleyos) enabled;
in {
marleyos = {
bundles.server = enabled;
};
home.stateVersion = "24.05";
}

View file

@ -0,0 +1,14 @@
{lib, ...}: let
inherit (lib.marleyos) enabled;
in {
marleyos = {
bundles.desktop = enabled;
wayland.niri = {
enable = true;
monitors = ["DP-1" "HDMI-A-1"];
};
};
home.stateVersion = "24.05";
}

View file

@ -1,43 +0,0 @@
{
inputs,
lib,
self,
...
}: {
imports = [inputs.easy-hosts.flakeModule];
config.easy-hosts = {
shared.specialArgs.marleylib = import ../lib {inherit lib;};
perClass = class: {
modules = ["${self}/modules/${class}/default.nix"];
};
hosts = {
### Desktop ###
nyx = {
arch = "x86_64";
class = "nixos";
};
### Macbook Air ###
mairley = {
arch = "aarch64";
class = "darwin";
nixpkgs = inputs.nixpkgs-darwin;
};
### Servers ###
marleycentre = {
arch = "x86_64";
class = "nixos";
};
marleynet = {
arch = "x86_64";
class = "nixos";
};
};
};
}

View file

@ -1,35 +0,0 @@
{
marleylib,
config,
...
}: let
inherit (marleylib.module) enabled;
inherit (config.marleycfg.my) name;
in {
imports = [./hardware-configuration.nix ./mounts.nix ./autorandr.nix];
networking.hostName = "nyx";
# For local dev.
networking.firewall.allowedTCPPorts = [8080];
marleycfg.profiles.desktop = true;
marleyos = {
hardware = {
# nvidia = enabled;
};
};
home-manager.users."${name}" = {
marleyos = {
shell.niri.monitors = ["DP-1" "HDMI-A-1"];
programs.calibre = enabled;
services.syncthing = enabled;
};
home.stateVersion = "24.05";
};
system.stateVersion = "24.05";
}

View file

@ -1,43 +0,0 @@
modules/${class}/default.nix # imported by easy-hosts.perClass.modules
imports = [
../base # common across all systems
./base
./hardware
./shell # WM/DE
./programs
./services
./profiles.nix # enable/disable items
];
modules/base/default.nix
imports = [
../options # custom options used for deciding other config
{...} # modules w/i base
./home.nix # home-manager setup; imports modules/home
];
modules/home/default.nix # HOME MANAGER OPTIONS ONLY
imports = [
../options
{...}
./shell # WM/DE
./programs
# ${program}.nix - OS check here if needed
./services
# ${service}.nix - OS check here if needed
./profiles.nix # enable/disable items
];

View file

@ -1,3 +0,0 @@
{lib}: {
module = import ./module.nix {inherit lib;};
}

View file

@ -1,57 +0,0 @@
{lib}: {
## Quickly enable an option.
##
## ```nix
## services.nginx = enabled;
## ```
##
#@ true
enabled = {
enable = true;
};
## Quickly disable an option.
##
## ```nix
## services.nginx = enabled;
## ```
##
#@ false
disabled = {
enable = false;
};
## Like lib.mkEnableOption, but allows specifying the default.
##
## ```nix
## options.marleyos.wayland = mkEnableOption' "wayland" false;
## ```
mkEnableOption' = name: default:
lib.mkOption {
inherit default;
example = true;
description =
if name ? _type && name._type == "mdDoc"
then lib.mdDoc "Whether to enable ${name.text}."
else "Whether to enable ${name}.";
type = lib.types.bool;
};
## Like lib.mkDefault, but uses lib.mapAttrsRecursive to apply mkDefault to
## every attr in the set.
##
## ```nix
## starship.settings.username = mkDefault' {
## enabled = true;
## show_always = false;
## };
## ```
## is equivalent to:
## ```nix
## starship.settings.username = {
## enabled = mkDefault true;
## show_always = mkDefault false;
## };
## ```
mkDefault' = set: lib.mapAttrsRecursive (_: value: lib.mkDefault value) set;
}

23
lib/module/default.nix Normal file
View file

@ -0,0 +1,23 @@
_: {
enabled = {
## Quickly enable an option.
##
## ```nix
## services.nginx = enabled;
## ```
##
#@ true
enable = true;
};
disabled = {
## Quickly disable an option.
##
## ```nix
## services.nginx = enabled;
## ```
##
#@ false
enable = false;
};
}

View file

@ -1,14 +0,0 @@
{
imports = [
../options
./nix.nix
./stylix
./programs
./services
./profiles.nix
./home.nix
];
}

View file

@ -1,33 +0,0 @@
{
marleylib,
inputs,
inputs',
...
}: let
my = rec {
name = "marley";
fullName = "Marley Rae";
username = "punkfairie";
email = "marley@punkfairie.net";
git = {
name = username;
inherit email;
};
};
in {
config = {
marleycfg.my = my;
home-manager = {
useUserPackages = true;
backupFileExtension = "bak";
users."${my.name}" = {
home.username = my.name;
};
sharedModules = [../home];
extraSpecialArgs = {inherit marleylib inputs inputs';};
};
};
}

View file

@ -1,12 +0,0 @@
{inputs, ...}: {
config = {
allowUnfree = true;
};
overlays = [
inputs.nur.overlays.default
# Custom packages.
(import ../../overlays/marleyos.nix)
];
}

View file

@ -1,39 +0,0 @@
{
config,
marleylib,
lib,
...
}: let
cfg = config.marleycfg.profiles;
inherit (marleylib.module) enabled;
in {
marleyos = lib.mkMerge [
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
programs = {
btop = enabled;
curl = enabled;
fish = enabled;
jq = enabled;
less = enabled;
neovim = enabled;
nix-output-monitor = enabled;
ripgrep = enabled;
wget = enabled;
};
services = {
openssh = enabled; # required for agenix
};
}
#
#
# Graphical Desktop - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(lib.optionalAttrs cfg.desktop {})
#
#
# Server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(lib.optionalAttrs cfg.server {})
];
}

View file

@ -1,16 +0,0 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.marleyos.programs.curl;
in {
options.marleyos.programs.curl.enable = lib.mkEnableOption "curl";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
curl
];
};
}

View file

@ -1,13 +0,0 @@
{
imports = [
./btop.nix
./curl.nix
./fish.nix
./jq.nix
./less.nix
./neovim.nix
./nix-output-monitor.nix
./ripgrep.nix
./wget.nix
];
}

View file

@ -1,16 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.marleyos.programs.wget;
in {
options.marleyos.programs.wget.enable = lib.mkEnableOption "wget";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
wget
];
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./openssh.nix
];
}

View file

@ -1,25 +0,0 @@
{pkgs, ...}: {
config = {
nixpkgs.overlays = [(import ../../../overlays/maple-mono-NF.nix)];
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine.yaml";
override = {slug = "rose-pine";};
image = ./wallpaper.png;
fonts = {
monospace = {
package = pkgs.maple-mono-NF;
name = "Maple Mono";
};
sizes = {
terminal = 11;
};
};
};
};
}

View file

@ -0,0 +1,16 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.marleyos.appearance.base;
in {
options.marleyos.appearance.base.enable = lib.mkEnableOption "base";
config = lib.mkIf cfg.enable {
fonts.packages = with pkgs; [
maple-mono-NF
];
};
}

View file

@ -0,0 +1,9 @@
{
pkgs,
...
}:
{
config.nix = {
package = pkgs.lix;
};
}

View file

@ -1,15 +0,0 @@
{inputs, ...}: {
imports = [
inputs.agenix.darwinModules.default
../base
./home.nix
./stylix.nix
./system
./programs
./profiles.nix
];
}

View file

@ -1,15 +0,0 @@
{
config,
inputs,
...
}: let
inherit (config.marleycfg.my) name;
in {
imports = [inputs.home-manager.darwinModules.home-manager];
config = {
home-manager.users."${name}" = {
home.homeDirectory = "/Users/${name}";
};
};
}

View file

@ -1,16 +0,0 @@
{marleylib, ...}: let
inherit (marleylib.module) enabled;
in {
marleyos = {
programs = {
fish = enabled;
floorp = enabled;
nh = enabled;
phpstorm = enabled;
pidgin = enabled;
thunderbird = enabled;
wezterm = enabled;
wireguard = enabled;
};
};
}

View file

@ -1,12 +0,0 @@
{
imports = [
./fish.nix
./floorp.nix
./nh.nix
./phpstorm.nix
./pidgin.nix
./thunderbird.nix
./wezterm.nix
./wireguard.nix
];
}

View file

@ -1,11 +0,0 @@
{
config,
lib,
...
}: let
cfg = config.marleyos.programs.fish;
in {
config = lib.mkIf cfg.enable {
environment.shells = [config.programs.fish.package];
};
}

View file

@ -10,7 +10,10 @@ in {
config = lib.mkIf cfg.enable {
programs.fish = {
enable = true;
useBabelfish = true;
};
environment.shells = [config.programs.fish.package];
};
}

View file

@ -1,13 +0,0 @@
{
config,
lib,
...
}: let
cfg = config.marleyos.programs.floorp;
in {
options.marleyos.programs.floorp.enable = lib.mkEnableOption "floorp";
config = lib.mkIf cfg.enable {
homebrew.casks = ["floorp"];
};
}

View file

@ -1,13 +0,0 @@
{
config,
lib,
...
}: let
cfg = config.marleyos.programs.phpstorm;
in {
options.marleyos.programs.phpstorm.enable = lib.mkEnableOption "phpstorm";
config = lib.mkIf cfg.enable {
homebrew.casks = ["phpstorm"];
};
}

View file

@ -1,13 +0,0 @@
{
config,
lib,
...
}: let
cfg = config.marleyos.programs.pidgin;
in {
options.marleyos.programs.pidgin.enable = lib.mkEnableOption "pidgin";
config = lib.mkIf cfg.enable {
homebrew.casks = ["pidgin"];
};
}

View file

@ -1,13 +0,0 @@
{
config,
lib,
...
}: let
cfg = config.marleyos.programs.thunderbird;
in {
options.marleyos.programs.thunderbird.enable = lib.mkEnableOption "thunderbird";
config = lib.mkIf cfg.enable {
homebrew.casks = ["thunderbird"];
};
}

View file

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

View file

@ -1,15 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.programs.wireguard;
in {
options.marleyos.programs.wireguard.enable = lib.mkEnableOption "wireguard";
config = lib.mkIf cfg.enable {
homebrew.masApps = {
"WireGuard" = 1451685025;
};
};
}

View file

@ -0,0 +1,20 @@
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.marleyos.programs.wireguard;
in
{
options.marleyos.programs.wireguard.enable = mkEnableOption "wireguard";
config = mkIf cfg.enable {
homebrew.masApps = {
"WireGuard" = 1451685025;
};
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./openssh.nix
];
}

View file

@ -1,13 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.services.openssh;
in {
config = lib.mkIf cfg.enable {
services.openssh.extraConfig = ''
PermitRootLogin prohibit-password
'';
};
}

View file

@ -1,3 +0,0 @@
{inputs, ...}: {
imports = [inputs.stylix.darwinModules.stylix];
}

View file

@ -1,6 +0,0 @@
{
imports = [
./homebrew.nix
./nix.nix
];
}

View file

@ -1,11 +0,0 @@
{
config = {
nix = {
settings = {
trusted-users = [
"@darwin"
];
};
};
};
}

View file

@ -0,0 +1,40 @@
{
lib,
config,
pkgs,
system,
inputs,
...
}: let
inherit (lib.snowfall.system) is-darwin;
cfg = config.marleyos.appearance.base;
inherit (config.marleyos) isDesktop;
in {
options.marleyos.appearance.base.enable = lib.mkEnableOption "base";
config = lib.mkIf cfg.enable {
marleyos = {
apps = {
pinentry =
if isDesktop
then pkgs.pinentry-gtk2
else pkgs.pinentry-curses;
};
};
stylix = {
iconTheme = {
package = pkgs.kora-icon-theme;
dark = "kora";
light = "kora-light-panel";
};
fonts.sizes.terminal = lib.mkIf (is-darwin system) 14;
};
home.packages = with pkgs; [
kora-icon-theme
];
};
}

View file

@ -1,10 +1,13 @@
{
lib,
config,
pkgs,
...
}: {
config = lib.mkIf (config.marleycfg.profiles.desktop && pkgs.stdenv.isLinux) {
}: let
cfg = config.marleyos.appearance.gtk;
in {
options.marleyos.appearance.gtk.enable = lib.mkEnableOption "gtk";
config = lib.mkIf cfg.enable {
home.pointerCursor.gtk.enable = true;
gtk = {

View file

@ -0,0 +1,16 @@
{
lib,
config,
inputs,
...
}: let
cfg = config.marleyos.appearance.qt;
in {
options.marleyos.appearance.qt.enable = lib.mkEnableOption "qt";
config = lib.mkIf cfg.enable {
qt = {
enable = true;
};
};
}

View file

@ -0,0 +1,25 @@
{
lib,
system,
...
}: let
inherit (lib.snowfall.system) is-linux;
in {
# Anything in this folder should not include an enable/disable option. This is
# the only folder that is always applied.
config = {
marleyos.my = {
name = "marley";
username = "punkfairie";
fullName = "Marley Rae";
email = "marley@punkfairie.net";
};
home.language.base = "en_US.UTF-8";
programs.home-manager.enable = true;
# Autostart wanted systemd services.
systemd.user.startServices = lib.mkIf (is-linux system) true;
};
}

View file

@ -1,15 +1,13 @@
{
inputs,
pkgs,
inputs,
config,
lib,
...
}: {
imports = [
inputs.lix.nixosModules.default # this is universal, despite the 'nixos'
];
config = {
nix = {
package = pkgs.lix;
package = lib.mkForce pkgs.lix;
# Pin system <nixpkgs> to flake nixpkgs version.
# i.e. for use in pkgs = import <nixpkgs> {}.
@ -22,11 +20,15 @@
};
settings = {
experimental-features = ["nix-command" "flakes"];
trusted-users = [
"root"
# @wheel/@admin are added in OS specific modules.
"@wheel"
];
# Enable flakes.
experimental-features = [
"nix-command"
"flakes"
];
# Set up caches.
@ -45,20 +47,28 @@
warn-dirty = false;
auto-optimise-store = true;
use-xdg-base-directories = true;
};
# Garbage collection.
gc.automatic = true;
};
nixpkgs = import ./nixpkgs.nix {inherit inputs;};
nixpkgs.config.import = "${config.xdg.configHome}/nixpkgs/config.nix";
# More useful repl.
environment.systemPackages = let
xdg.configFile."nixpkgs/config.nix".text =
# nix
''
{
allowUnfree = true;
}
'';
home.packages = let
nrepl =
pkgs.writeShellScriptBin "nrepl"
# sh
''
nix repl --file "${toString ../../repl.nix}" "$@"
nix repl "${toString ./.}/repl.nix" "$@"
'';
in [
nrepl

View file

@ -0,0 +1,17 @@
{config, ...}: {
config.home = {
sessionPath = [
"${config.home.homeDirectory}/.local/bin"
];
sessionVariables = {
HACK = "${config.home.homeDirectory}/hackin";
};
shellAbbrs = {
c = "clear";
e = "${config.home.sessionVariables.EDITOR}";
v = "${config.home.sessionVariables.EDITOR}";
};
};
}

View file

@ -1,39 +1,42 @@
{
config,
lib,
system,
pkgs,
...
}: let
inherit (config.marleycfg) profiles;
inherit (lib.snowfall.system) is-linux;
inherit (config.marleyos) isDesktop;
in {
config = {
home.preferXdgDirectories = true;
xdg = let
home = config.home.homeDirectory;
homeDir = config.home.homeDirectory;
in
lib.mkMerge [
{
enable = true;
cacheHome = "${home}/.cache";
configHome = "${home}/.config";
dataHome = "${home}/.local/share";
stateHome = "${home}/.local/state";
cacheHome = "${homeDir}/.cache";
configHome = "${homeDir}/.config";
dataHome = "${homeDir}/.local/share";
stateHome = "${homeDir}/.local/state";
}
(lib.mkIf (profiles.desktop && pkgs.stdenv.isLinux) {
(lib.mkIf (isDesktop && (is-linux system)) {
userDirs = {
enable = true;
createDirectories = true;
desktop = "${home}/desktop";
desktop = "${homeDir}/desktop";
documents = null;
download = "${home}/downloads";
download = "${homeDir}/downloads";
music = null;
pictures = "${home}/pictures";
pictures = "${homeDir}/pictures";
templates = null;
videos = "${home}/videos";
videos = "${homeDir}/videos";
};
portal = {
@ -47,7 +50,7 @@ in {
enable = true;
associations.added = let
browser = "${lib.getName config.marleycfg.apps.browser}";
browser = "${lib.getName config.marleyos.apps.browser}";
in {
"application/json" = ["nvim.desktop"];
"application/pdf" = ["org.pwmt.zathura-pdf-mupdf.desktop"];

View file

@ -0,0 +1,34 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.bundles.desktop;
inherit (lib.marleyos) enabled;
in {
options.marleyos.bundles.desktop.enable = lib.mkEnableOption "desktop";
config = lib.mkIf cfg.enable {
marleyos = {
isDesktop = true;
appearance = {
base = enabled;
gtk = enabled;
qt = enabled;
};
programs = {
cli = enabled;
tui = enabled;
gui = enabled;
};
services = {
# syncthing = enabled;
udiskie = enabled;
};
};
};
}

View file

@ -0,0 +1,29 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.bundles.mac;
inherit (lib.marleyos) enabled disabled;
in {
options.marleyos.bundles.mac.enable = lib.mkEnableOption "mac";
config = lib.mkIf cfg.enable {
marleyos = {
isDesktop = true;
programs = {
cli = enabled;
journalctl = disabled;
systemctl = disabled;
tui = enabled;
cava = disabled;
ncmpcpp = disabled;
wezterm = enabled;
};
};
};
}

View file

@ -0,0 +1,28 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.bundles.server;
inherit (lib.marleyos) enabled disabled;
in {
options.marleyos.bundles.server.enable = lib.mkEnableOption "server";
config = lib.mkIf cfg.enable {
marleyos = {
isServer = true;
programs = {
cli = enabled;
tui = enabled;
neo = lib.mkForce disabled;
rbw = lib.mkForce disabled;
amfora = lib.mkForce disabled;
cava = lib.mkForce disabled;
ncmpcpp = lib.mkForce disabled;
};
};
};
}

View file

@ -1,17 +0,0 @@
{
imports = [
../options
./option-inheritance.nix
./options
./home-manager.nix
./nix.nix
./system
./shell
./programs
./services
./profiles.nix
];
}

View file

@ -1,10 +0,0 @@
{
config = {
programs.home-manager.enable = true;
home.language.base = "en_US.UTF-8";
# Autostart wanted systemd services on Linux.
systemd.user.startServices = true;
};
}

View file

@ -1,3 +0,0 @@
{inputs, ...}: {
config.nixpkgs = import ../base/nixpkgs.nix {inherit inputs;};
}

View file

@ -0,0 +1,17 @@
{
lib,
config,
inputs,
...
}: let
cfg = config.marleyos.nixGL;
in {
options.marleyos.nixGL.enable = lib.mkEnableOption "nixGL";
config = lib.mkIf cfg.enable {
nixGL = {
inherit (inputs.nixgl) packages;
defaultWrapper = "nvidia";
};
};
}

View file

@ -1,9 +0,0 @@
{osConfig, ...}: let
cfg = osConfig.marleycfg;
in {
config = {
marleycfg = {
inherit (cfg) my profiles;
};
};
}

View file

@ -2,9 +2,14 @@
lib,
config,
pkgs,
system,
...
}: {
options.marleycfg.apps = {
}: let
inherit (lib.snowfall.system) is-linux;
cfg = config.marleyos.apps;
in {
options.marleyos.apps = {
pinentry = lib.mkOption {
type = lib.types.package;
default = pkgs.pinentry-gtk2;
@ -41,7 +46,7 @@
};
};
inherit default;
default = default;
};
terminal = lib.mkOption {
@ -72,10 +77,15 @@
options = {
package = lib.mkOption {
type = lib.types.package;
default =
if config.marleyos.wayland.hyprland.enable
then config.programs.wofi.package
else config.programs.rofi.package;
description = "The launcher to use.";
};
command = lib.mkOption {
type = lib.types.str;
default = "--show drun";
description = ''
The command appended after the launcher binary to run it.
'';
@ -85,10 +95,18 @@
};
};
# config = lib.mkIf pkgs.stdenv.isLinux {
# # TODO: move these to respective modules
# programs.rbw = lib.mkDefault {
# settings.pinentry = cfg.pinentry;
# };
# };
config = lib.mkIf (is-linux system) {
home.packages = [
cfg.pinentry
cfg.clipboard.package
];
programs.rbw = lib.mkDefault {
settings.pinentry = cfg.pinentry;
};
services.gpg-agent = lib.mkDefault {
pinentryPackage = cfg.pinentry;
};
};
}

View file

@ -1,6 +0,0 @@
{
imports = [
./apps.nix
./shellAbbrs.nix
];
}

View file

@ -0,0 +1,7 @@
{lib, ...}: {
options.marleyos.isDesktop = lib.mkOption {
type = with lib.types; bool;
default = false;
description = "Whether this machine is used as a graphical desktop.";
};
}

View file

@ -0,0 +1,7 @@
{lib, ...}: {
options.marleyos.isServer = lib.mkOption {
type = with lib.types; bool;
default = false;
description = "Whether this machine is a server.";
};
}

View file

@ -3,10 +3,10 @@
config,
...
}: {
options.marleycfg.my = rec {
options.marleyos.my = rec {
name = lib.mkOption {
type = with lib.types; str;
default = "marley";
default = config.snowfallorg.user.name or "marley";
description = "Your username, for use as your login name.";
};
@ -42,13 +42,20 @@
};
config = let
cfg = config.marleycfg.my;
cfg = config.marleyos.my;
in {
assertions = [
{
assertion = cfg.name != null;
message = "marleycfg.my.name must be set.";
message = "marleyos.my.name must be set.";
}
];
home.username = lib.mkDefault cfg.name;
programs.git = {
userName = lib.mkDefault cfg.git.name;
userEmail = lib.mkDefault cfg.git.email;
};
};
}

View file

@ -1,83 +0,0 @@
{
config,
marleylib,
lib,
...
}: let
cfg = config.marleycfg.profiles;
inherit (marleylib.module) enabled;
in {
marleyos = lib.mkMerge [
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
programs = {
agenix = enabled;
bat = enabled;
btop = enabled;
curl = enabled;
eza = enabled;
figlet = enabled;
fish = enabled;
git = enabled;
gpg = enabled;
httpie = enabled;
hyfetch = enabled;
journalctl = enabled;
jq = enabled;
just = enabled;
lazydocker = enabled;
lazygit = enabled;
less = enabled;
man = enabled;
nh = enabled;
ripgrep = enabled;
ssh = enabled;
starship = enabled;
systemctl = enabled;
tmux = enabled;
wget = enabled;
zoxide = enabled;
};
}
#
#
# Graphical Desktop - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(lib.optionalAttrs cfg.desktop {
shell.niri = enabled;
programs = {
amfora = enabled;
cava = enabled;
CEmu = enabled;
cheat = enabled;
discord = enabled;
floorp = enabled;
fzf = enabled;
gh = enabled;
glow = enabled;
jqp = enabled;
ncmpcpp = enabled;
nemo = enabled;
neo = enabled;
neovim = enabled;
phpstorm = enabled;
pidgin = enabled;
superfile = enabled;
tea = enabled;
thunderbird = enabled;
vlc = enabled;
wezterm = enabled;
zathura = enabled;
};
services = {
udiskie = enabled;
};
})
#
#
# Server - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(lib.optionalAttrs cfg.server {})
];
}

View file

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

View file

@ -1,7 +1,7 @@
{
config,
lib,
inputs',
config,
pkgs,
...
}: let
cfg = config.marleyos.programs.agenix;
@ -9,9 +9,8 @@ in {
options.marleyos.programs.agenix.enable = lib.mkEnableOption "agenix";
config = lib.mkIf cfg.enable {
home.packages = [
# The overlay doesn't work for some reason...
inputs'.agenix.packages.default
home.packages = with pkgs; [
agenix
];
};
}

View file

@ -1,6 +1,7 @@
{
config,
lib,
config,
# pkgs,
...
}: let
cfg = config.marleyos.programs.bat;
@ -11,11 +12,21 @@ in {
programs.bat = {
enable = true;
# FIX: Currently broken. Re-enable when not broken.
# extraPackages = with pkgs.bat-extras; [
# batdiff
# batman
# ];
config = {
style = "auto";
};
};
home.sessionVariables = lib.mkIf config.programs.git.delta.enable {
# BATDIFF_USE_DELTA = "true";
};
programs.fish = {
functions = {
cat = {

View file

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

View file

@ -1,17 +1,12 @@
{
marleylib,
config,
osConfig,
lib,
config,
pkgs,
...
}: let
inherit (marleylib.module) mkEnableOption';
cfg = config.marleyos.programs.curl;
osCfg = osConfig.marleyos.programs.curl;
in {
options.marleyos.programs.curl.enable = mkEnableOption' "curl" osCfg.enable;
options.marleyos.programs.curl.enable = lib.mkEnableOption "curl";
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -0,0 +1,47 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.programs.cli;
inherit (lib.marleyos) enabled;
in {
options.marleyos.programs.cli.enable = lib.mkEnableOption "cli";
config = lib.mkIf cfg.enable {
marleyos.programs = {
agenix = enabled;
bat = enabled;
# cheat = enabled;
curl = enabled;
eza = enabled;
figlet = enabled;
fish = enabled;
fzf = enabled;
gh = enabled;
git = enabled;
glow = enabled;
gpg = enabled;
httpie = enabled;
hyfetch = enabled;
journalctl = enabled;
jq = enabled;
just = enabled;
less = enabled;
man = enabled;
neo = enabled;
nh = enabled;
nix-output-monitor = enabled;
rbw = enabled;
ripgrep = enabled;
ssh = enabled;
starship = enabled;
systemctl = enabled;
tea = enabled;
tmux = enabled;
wget = enabled;
zoxide = enabled;
};
};
}

View file

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

View file

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

View file

@ -1,17 +1,15 @@
{
marleylib,
config,
osConfig,
lib,
config,
pkgs,
system,
...
}: let
inherit (marleylib.module) mkEnableOption';
inherit (lib.snowfall.system) is-linux is-darwin;
cfg = config.marleyos.programs.fish;
osCfg = osConfig.marleyos.programs.fish;
in {
options.marleyos.programs.fish.enable = mkEnableOption' "fish" osCfg.enable;
options.marleyos.programs.fish.enable = lib.mkEnableOption "fish";
config = lib.mkIf cfg.enable {
home.packages = with pkgs;
@ -33,8 +31,8 @@ in {
pax
]
# unrar-free is broken on darwin :(
++ (lib.optionals pkgs.stdenv.isLinux [unrar-free])
++ (lib.optionals pkgs.stdenv.isDarwin [unrar]);
++ (lib.optionals (is-linux system) [unrar-free])
++ (lib.optionals (is-darwin system) [unrar]);
programs.fish = {
enable = true;

View file

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

View file

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

View file

@ -1,6 +1,6 @@
{
config,
lib,
config,
...
}: let
cfg = config.marleyos.programs.git;
@ -14,7 +14,6 @@ in {
# ╚═╝ ╚═╝╚══════╝╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
programs.git.aliases = let
has_fish = config.programs.fish.enable;
fish_fns = config.programs.fish.functions;
in {
### Staging ###
@ -85,8 +84,8 @@ in {
b = "branch";
cb = "checkout -b";
cm = lib.mkIf (has_fish && (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)";
cm = lib.mkIf (fish_fns ? git_main_branch) "!git checkout $(git_main_branch)";
cd = lib.mkIf (fish_fns ? git_develop_branch) "!git checkout $(git_develop_branch)";
m = "merge";
mtl = "mergetool --no-prompt";
@ -160,9 +159,9 @@ in {
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,
config,
pkgs,
...
}: let
cfg = config.marleyos.programs.git;
inherit (config.marleycfg) my;
in {
options.marleyos.programs.git.enable = lib.mkEnableOption "git";
@ -17,6 +15,7 @@ in {
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
gum
config.marleyos.apps.clipboard.package
];
# ██████╗ ██╗████████╗
@ -29,8 +28,8 @@ in {
programs.git = {
enable = true;
userName = my.git.name;
userEmail = my.git.email;
userName = "punkfairie";
userEmail = "marley@punkfairie.net";
signing = {
signByDefault = true;
@ -90,7 +89,7 @@ in {
};
# Laravel Sail makes permissions fucky so this is required...
safe.directory = "/home/${my.name}/hackin/*";
safe.directory = "/home/${config.marleyos.my.name}/hackin/*";
# Do not guess the user's identity.
user.useConfigOnly = true;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
{
config,
lib,
config,
...
}: let
cfg = config.marleyos.programs.man;
@ -12,11 +12,8 @@ in {
home.sessionVariables = {
MANWIDTH = "80";
MANPAGER =
lib.mkIf
config.marleyos.programs.neovim.enable
"nvim +NoNeckPain '+set nowrap' +Man!";
# TODO: Only set this is nvim is installed. Also install plugin here?
MANPAGER = "nvim +NoNeckPain '+set nowrap' +Man!";
};
};
}

View file

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

View file

@ -1,10 +1,11 @@
{
config,
lib,
config,
pkgs,
...
}: let
cfg = config.marleyos.programs.nh;
home = config.home.homeDirectory;
in {
options.marleyos.programs.nh.enable = lib.mkEnableOption "nh";
@ -12,5 +13,11 @@ in {
home.packages = with pkgs; [
nh
];
home.sessionVariables.FLAKE = lib.mkDefault "${home}/marleyos";
home.shellAbbrs = {
nhs = "nh search";
};
};
}

View file

@ -1,16 +1,15 @@
{
config,
lib,
config,
pkgs,
...
}: let
cfg = config.marleyos.programs.nix-output-monitor;
in {
options.marleyos.programs.nix-output-monitor.enable =
lib.mkEnableOption "nix-output-monitor";
options.marleyos.programs.nix-output-monitor.enable = lib.mkEnableOption "nix-output-monitor";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
home.packages = with pkgs; [
nix-output-monitor
];
};

View file

@ -0,0 +1,17 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.programs.rbw;
in {
options.marleyos.programs.rbw.enable = lib.mkEnableOption "rbw";
config = lib.mkIf cfg.enable {
programs.rbw = {
enable = true;
settings.email = "bitwarden@punkfairie.net";
};
};
}

View file

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

View file

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

View file

@ -0,0 +1,208 @@
{
lib,
config,
...
}: let
inherit (lib) mkDefault;
cfg = config.marleyos.programs.starship;
in {
config = lib.mkIf cfg.enable {
programs.starship.settings = with config.lib.stylix.colors.withHashtag; let
mkFormat = t: " [](fg:${base02})[${t}]($style)[](fg:${base02}) ";
langFormat = mkFormat "$symbol$version";
in {
format = mkDefault (lib.concatStrings [
"$username"
"$hostname"
"$directory"
"$nix_shell"
"$git_branch"
"$git_status"
"$fill"
"$c"
"$elixir"
"$elm"
"$golang"
"$haskell"
"$java"
"$julia"
"$nodejs"
"$nim"
"$rust"
"$scala"
"$python"
"$time"
"$line_break"
"$character"
]);
username = {
disabled = mkDefault false;
format = mkDefault " [](fg:${base02})[ 󰧱 $user@]($style)";
show_always = mkDefault true;
style_root = mkDefault "bg:${base02} fg:${base0D}";
style_user = mkDefault "bg:${base02} fg:${base0D}";
};
hostname = {
ssh_only = mkDefault false;
format = mkDefault "[$hostname ]($style)[](fg:${base02}) ";
style = mkDefault "bg:${base02} fg:${base0D}";
};
directory = {
format = mkDefault (mkFormat " $path ");
style = mkDefault "bg:${base02} fg:${base0B}";
truncation_length = mkDefault 3;
truncation_symbol = mkDefault "/";
substitutions = {
Documents = mkDefault "󰈙";
Downloads = mkDefault " ";
Music = mkDefault " ";
Pictures = mkDefault " ";
};
};
git_branch = {
format = mkDefault (mkFormat " $symbol $branch ");
style = mkDefault "bg:${base02} fg:${base0C}";
symbol = mkDefault "";
};
git_status = {
disabled = mkDefault false;
style = mkDefault "bg:${base02} fg:${base08}";
format = mkDefault (mkFormat "$all_status$ahead_behind");
up_to_date = mkDefault "[ ](bg:${base02} fg:${base0D})";
untracked = mkDefault "[?\\($count\\)](bg:${base02} fg:${base09})";
stashed = mkDefault "[\\$](bg:${base02} fg:${base0D})";
modified = mkDefault "[!\\($count\\)](bg:${base02} fg:${base09})";
renamed = mkDefault "[»\\($count\\)](bg:${base02} fg:${base0D})";
deleted = mkDefault "[\\($count\\)](style)";
staged = mkDefault "[++\\($count\\)](bg:${base02} fg:${base09})";
ahead = mkDefault "[\\(\${count}\\)](bg:${base02} fg:${base0C})";
diverged = mkDefault "[\\[](bg:${base02} fg:${base0D})[\\(\${ahead_count}\\)](bg:${base02} fg:${base0C})[\\(\${behind_count}\\)](bg:${base02} fg:${base0A})[\\]](bg:${base02} fg:${base0D})";
behind = mkDefault "[\\(\${count}\\)](bg:${base02} fg:${base0A})";
};
fill = {
style = mkDefault "fg:${base02}";
symbol = mkDefault " ";
};
time = {
disabled = mkDefault false;
format = mkDefault (mkFormat " $time 󰴈 ");
style = mkDefault "bg:${base02} fg:${base0A}";
time_format = mkDefault "%I:%M%P";
use_12hr = mkDefault true;
};
character = let
vim = "";
mkChar = sym: col: " [${sym}](fg:${col}) [󰄾](fg:${base0C})";
in {
success_symbol = mkChar "" "${base0D}";
error_symbol = mkChar "󰋔" "${base08}";
vimcmd_symbol = mkChar vim "${base0A}";
vimcmd_replace_one_symbol = mkChar vim "${base0C}";
vimcmd_replace_symbol = mkChar vim "${base0C}";
vimcmd_visual_symbol = mkChar vim "${base0D}";
};
### Languages ###
c = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
elixir = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
elm = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
haskell = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
java = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
julia = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
nodejs = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault "󰎙 ";
};
nim = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault "󰆥 ";
};
python = {
style = mkDefault "bg:${base02} fg:${base0B}";
disabled = mkDefault false;
symbol = mkDefault " ";
};
rust = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault "";
};
scala = {
style = "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = false;
symbol = " ";
};
### Tools ###
conda = {
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault (mkFormat "$symbol$environment");
disabled = mkDefault false;
symbol = mkDefault "🅒 ";
};
nix_shell = {
style = "bg:${base02} fg:${base0C}";
format = mkDefault (mkFormat " $symbol $state( \($name\)) ");
disabled = mkDefault false;
symbol = mkDefault " ";
};
};
};
}

View file

@ -0,0 +1,21 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.programs.systemctl;
in {
options.marleyos.programs.systemctl.enable = lib.mkEnableOption "systemctl";
config = lib.mkIf cfg.enable {
home.shellAbbrs = {
sctl = "sudo systemctl";
sctls = "sudo systemctl status";
sctle = "sudo systemctl enable --now";
sctld = "sudo systemctl disable --now";
sctlr = "sudo systemctl restart";
sctla = "sudo systemctl start";
sctlo = "sudo systemctl stop";
};
};
}

Some files were not shown because too many files have changed in this diff Show more