Compare commits
6 commits
3e2454bc08
...
f48d94c58f
Author | SHA1 | Date | |
---|---|---|---|
f48d94c58f | |||
84d6ccf9b2 | |||
63533f0478 | |||
8da17cb0d5 | |||
a2f9247f5d | |||
1eae8c3ebb |
11 changed files with 202 additions and 205 deletions
|
@ -1,4 +1,9 @@
|
|||
{ lib, namespace, ... }:
|
||||
{
|
||||
lib,
|
||||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled;
|
||||
in
|
||||
|
@ -7,6 +12,14 @@ in
|
|||
|
||||
targets.genericLinux = enabled;
|
||||
|
||||
# TODO: Move this to a dev shell
|
||||
home.packages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
nil
|
||||
statix
|
||||
manix
|
||||
];
|
||||
|
||||
${namespace} = {
|
||||
isDesktop = true;
|
||||
|
||||
|
@ -50,6 +63,12 @@ in
|
|||
zathura = enabled;
|
||||
zoxide = enabled;
|
||||
};
|
||||
services = {
|
||||
clipboard = enabled;
|
||||
# TODO: bundle this with the WM under xorg
|
||||
dunst = enabled;
|
||||
syncthing = enabled;
|
||||
};
|
||||
xorg = {
|
||||
xsession = enabled;
|
||||
};
|
||||
|
|
|
@ -30,6 +30,8 @@ in
|
|||
unrar-free
|
||||
];
|
||||
|
||||
# TODO: Set the greeting to `figlet -f Elite marleyOS`
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
|
|
26
modules/home/services/clipboard/default.nix
Normal file
26
modules/home/services/clipboard/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.${namespace}) mkEnableModule;
|
||||
|
||||
cfg = config.${namespace}.services.clipboard;
|
||||
in
|
||||
{
|
||||
options = mkEnableModule "services.clipboard";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
clipboard-jh
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
CLIPBOARD_THEME = "ansi";
|
||||
};
|
||||
};
|
||||
}
|
122
modules/home/services/dunst/default.nix
Normal file
122
modules/home/services/dunst/default.nix
Normal file
|
@ -0,0 +1,122 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
enabled
|
||||
disabled
|
||||
mkMerge
|
||||
;
|
||||
inherit (lib.${namespace}) mkEnableModule;
|
||||
|
||||
cfg = config.${namespace}.services.dunst;
|
||||
inherit (config.${namespace}) theme;
|
||||
|
||||
isRosePine = theme.colors.base == "rose-pine";
|
||||
in
|
||||
{
|
||||
options = mkEnableModule "services.dunst";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
|
||||
# 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;
|
||||
|
||||
settings = mkMerge [
|
||||
### Rose Pine ###
|
||||
(mkIf isRosePine {
|
||||
global = {
|
||||
width = 400;
|
||||
offset = "20x60";
|
||||
progress_bar_min_width = 380;
|
||||
progress_bar_max_width = 380;
|
||||
progress_bar_corner_radius = 2;
|
||||
padding = 10;
|
||||
horizontal_padding = 10;
|
||||
frame_width = 1;
|
||||
gap_size = 3;
|
||||
corner_radius = 2;
|
||||
background = "#26233a";
|
||||
foreground = "#e0def4";
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
background = "#26273d";
|
||||
highlight = "#31748f";
|
||||
frame_color = "#31748f";
|
||||
default_icon = "dialog-information";
|
||||
format = "<b><span foreground='#31748f'>%s</span></b>\\n%b";
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#362e3c";
|
||||
highlight = "#f6c177";
|
||||
frame_color = "#f6c177";
|
||||
default_icon = "dialog-warning";
|
||||
format = "<b><span foreground='#f6c177'>%s</span></b>\\n%b";
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#35263d";
|
||||
highlight = "#eb6f92";
|
||||
frame_color = "#eb6f92";
|
||||
default_icon = "dialog-error";
|
||||
format = "<b><span foreground='#eb6f92'>%s</span></b>\\n%b";
|
||||
};
|
||||
})
|
||||
|
||||
### Custom ###
|
||||
{
|
||||
global = {
|
||||
monitor = 0;
|
||||
sort = "yes";
|
||||
idle_threshold = 120;
|
||||
font = (builtins.head config.fonts.fontconfig.defaultFonts.monospace) + " 10";
|
||||
markup = "full";
|
||||
show_age_threshold = 60;
|
||||
word_wrap = "yes";
|
||||
ignore_newline = "no";
|
||||
stack_duplicates = true;
|
||||
hide_duplicate_count = false;
|
||||
show_indicators = "yes";
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
browser = "/usr/bin/zen-browser --new-tab";
|
||||
always_run_script = true;
|
||||
title = "Dunst";
|
||||
class = "Dunst";
|
||||
mouse_left_click = "do_action";
|
||||
mouse_middle_click = "close_current";
|
||||
mouse_right_click = "close_all";
|
||||
};
|
||||
|
||||
signed_on = {
|
||||
appname = "Pidgin";
|
||||
summary = "*signed on*";
|
||||
urgency = "low";
|
||||
};
|
||||
|
||||
signed_off = {
|
||||
appname = "Pidgin";
|
||||
summary = "*signed off*";
|
||||
urgency = "low";
|
||||
};
|
||||
|
||||
says = {
|
||||
appname = "Pidgin";
|
||||
summary = "*says*";
|
||||
urgency = "critical";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
32
modules/home/services/syncthing/default.nix
Normal file
32
modules/home/services/syncthing/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.${namespace}) mkEnableModule;
|
||||
|
||||
cfg = config.${namespace}.services.syncthing;
|
||||
in
|
||||
{
|
||||
options = mkEnableModule "services.syncthing";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
config.services.syncthing.tray.package
|
||||
];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
tray = {
|
||||
enable = true;
|
||||
command = "syncthingtray";
|
||||
package = pkgs.syncthingtray-minimal;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "figlet";
|
||||
version = "2.2.5";
|
||||
|
||||
# some tools can be found here ftp://ftp.figlet.org/pub/figlet/util/
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-${version}.tar.gz";
|
||||
sha256 = "0za1ax15x7myjl8jz271ybly8ln9kb9zhm1gf6rdlxzhs07w925z";
|
||||
};
|
||||
|
||||
contributed = fetchFromGitHub {
|
||||
owner = "xero";
|
||||
repo = "figlet-fonts";
|
||||
rev = "a6d2db1a3ee88bec3518214e851825fc4495ac84";
|
||||
hash = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/figlet/musl-fix-cplusplus-decls.patch?h=3.4-stable&id=71776c73a6f04b6f671430f702bcd40b29d48399";
|
||||
name = "musl-fix-cplusplus-decls.patch";
|
||||
sha256 = "1720zgrfk9makznqkbjrnlxm7nnhk6zx7g458fv53337n3g3zn7j";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/cmatsuoka/figlet/commit/9a50c1795bc32e5a698b855131ee87c8d7762c9e.patch";
|
||||
name = "unistd-on-darwin.patch";
|
||||
sha256 = "hyfY87N+yuAwjsBIjpgvcdJ1IbzlR4A2yUJQSzShCRI=";
|
||||
})
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"prefix=$(out)"
|
||||
"CC:=$(CC)"
|
||||
"LD:=$(CC)"
|
||||
];
|
||||
|
||||
postInstall = "cp -ar ${contributed}/* $out/share/figlet/";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Program for making large letters out of ordinary text";
|
||||
homepage = "http://www.figlet.org/";
|
||||
license = lib.licenses.afl21;
|
||||
maintainers = with lib.maintainers; [ ehmry ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./javascript.nix
|
||||
./go.nix
|
||||
./nix.nix
|
||||
./php.nix
|
||||
];
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.go = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.sessionPath =
|
||||
let
|
||||
goPath = config.programs.go.goPath;
|
||||
in
|
||||
[
|
||||
"${if (goPath == null) then "go" else goPath}"
|
||||
];
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
clipboard-jh
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
CLIPBOARD_THEME = "ansi";
|
||||
};
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
|
||||
# I don't want to use the rose-pine icons; also don't want to deal with the
|
||||
# drop-in weirdness.
|
||||
rose-pine.enable = false;
|
||||
|
||||
settings = lib.mkMerge [
|
||||
### Rose Pine ###
|
||||
# TODO: Set this conditionally based on current theme.
|
||||
{
|
||||
global = {
|
||||
width = 400;
|
||||
offset = "20x60";
|
||||
progress_bar_min_width = 380;
|
||||
progress_bar_max_width = 380;
|
||||
progress_bar_corner_radius = 2;
|
||||
padding = 10;
|
||||
horizontal_padding = 10;
|
||||
frame_width = 1;
|
||||
gap_size = 3;
|
||||
corner_radius = 2;
|
||||
background = "#26233a";
|
||||
foreground = "#e0def4";
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
background = "#26273d";
|
||||
highlight = "#31748f";
|
||||
frame_color = "#31748f";
|
||||
default_icon = "dialog-information";
|
||||
format = "<b><span foreground='#31748f'>%s</span></b>\\n%b";
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#362e3c";
|
||||
highlight = "#f6c177";
|
||||
frame_color = "#f6c177";
|
||||
default_icon = "dialog-warning";
|
||||
format = "<b><span foreground='#f6c177'>%s</span></b>\\n%b";
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#35263d";
|
||||
highlight = "#eb6f92";
|
||||
frame_color = "#eb6f92";
|
||||
default_icon = "dialog-error";
|
||||
format = "<b><span foreground='#eb6f92'>%s</span></b>\\n%b";
|
||||
};
|
||||
}
|
||||
|
||||
### Custom ###
|
||||
{
|
||||
global = {
|
||||
monitor = 0;
|
||||
sort = "yes";
|
||||
idle_threshold = 120;
|
||||
font = (builtins.head config.fonts.fontconfig.defaultFonts.monospace) + " 10";
|
||||
markup = "full";
|
||||
show_age_threshold = 60;
|
||||
word_wrap = "yes";
|
||||
ignore_newline = "no";
|
||||
stack_duplicates = true;
|
||||
hide_duplicate_count = false;
|
||||
show_indicators = "yes";
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
browser = "/usr/bin/zen-browser --new-tab";
|
||||
always_run_script = true;
|
||||
title = "Dunst";
|
||||
class = "Dunst";
|
||||
mouse_left_click = "do_action";
|
||||
mouse_middle_click = "close_current";
|
||||
mouse_right_click = "close_all";
|
||||
};
|
||||
|
||||
signed_on = {
|
||||
appname = "Pidgin";
|
||||
summary = "*signed on*";
|
||||
urgency = "low";
|
||||
};
|
||||
|
||||
signed_off = {
|
||||
appname = "Pidgin";
|
||||
summary = "*signed off*";
|
||||
urgency = "low";
|
||||
};
|
||||
|
||||
says = {
|
||||
appname = "Pidgin";
|
||||
summary = "*says*";
|
||||
urgency = "critical";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
tray = {
|
||||
enable = true;
|
||||
command = "syncthingtray";
|
||||
package = pkgs.syncthingtray-minimal;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue