Skip to content

Commit

Permalink
more nix
Browse files Browse the repository at this point in the history
  • Loading branch information
vix committed Feb 24, 2025
1 parent deae79e commit f5315d0
Show file tree
Hide file tree
Showing 22 changed files with 462 additions and 24 deletions.
1 change: 1 addition & 0 deletions etc/nix/home/hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
imports = [
./unknown.nix

./ersa.nix
./niji.nix
./vyxn.nix
];
Expand Down
52 changes: 52 additions & 0 deletions etc/nix/home/hosts/ersa.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.den.hosts.ersa;
in
{
options.den.hosts.ersa = {
enable = mkEnableOption "ersa host";
};

config = mkIf cfg.enable {
den = {

gui.enable = true;

apps = {
alacritty.enable = true;
i3.enable = true;
openrgb.enable = true;
picom.enable = true;
polybar.enable = true;
tor.enable = true;
};

packs = {
comfy.enable = true;
development.enable = true;
fonts.enable = true;
media.enable = true;

xdg.enable = true;
};
};

home.packages = with pkgs; [];

services.syncthing.enable = true;

programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
pinentryPackage = pkgs.pinentry-gnome3;
};

systemd.user.startServices = "sd-switch";
};
}
9 changes: 7 additions & 2 deletions etc/nix/home/hosts/niji.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
}:
with lib;
let
den_pkgs = pkgs.callPackage ../../packages { };

cfg = config.den.hosts.niji;
in
{
Expand All @@ -18,6 +20,8 @@ in
dir.self = "${config.den.dir.home}/den";
dir.opt = "${config.den.dir.home}/.opt";

gui.enable = true;

apps = {
alacritty.enable = true;
gnome.enable = true;
Expand All @@ -31,6 +35,7 @@ in
packs = {
comfy.enable = true;
development.enable = true;

fonts.enable = true;
media.enable = true;

Expand Down Expand Up @@ -59,8 +64,6 @@ in

kitty

vscode

# communication
signal-desktop
telegram-desktop
Expand All @@ -73,6 +76,8 @@ in
obsidian

cheese

den_pkgs.r2modman
];

services.syncthing.enable = true;
Expand Down
4 changes: 4 additions & 0 deletions etc/nix/home/modules/apps/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
./julia.nix
./neofetch.nix
./openrgb.nix
./picom.nix
./polybar.nix
./rust.nix
./syncthing.nix
./tmux.nix
./tor.nix
./vscode.nix
./wezterm.nix
];
}
4 changes: 2 additions & 2 deletions etc/nix/home/modules/apps/gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ in
"[email protected]"
"[email protected]"
"[email protected]"
"[email protected]"
"[email protected]"
];
enabled-extensions = [
"[email protected]"
"[email protected]"
"[email protected]"
];
remember-mount-password = false;
};
Expand Down
106 changes: 106 additions & 0 deletions etc/nix/home/modules/apps/picom.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.den.apps.picom;
in
{
options.den.apps.picom.enable = mkEnableOption "picom composter";

config = mkIf cfg.enable {

# home.packages = [ pkgs.picom ];

services.picom = {
enable = true;

backend = "glx";
vSync = true;

shadow = false;
shadowExclude = [
"class_g = 'Polybar'"
"class_g = 'polybar'"
"class_g = 'i3-frame'"

"name = 'Notification'"
"class_g = 'Conky'"
"class_g ?= 'Notify-osd'"
"class_g = 'Cairo-clock'"
"_GTK_FRAME_EXTENTS@:c"
];

fade = false;

activeOpacity = 1.0;
inactiveOpacity = 1.0;

wintypes = {
tooltip = {
fade = true;
shadow = true;
opacity = 1.0;
focus = true;
full-shadow = false;
};
dock = {
shadow = false;
clip-shadow-above = true;
};
dnd = {
shadow = false;
};
popup_menu = {
opacity = 1.0;
};
dropdown_menu = {
opacity = 1.0;
};
};

settings = {
experimental-backends = true;
inactive-opacity-override = false;

frame-opacity = 1.0;

focus-exclude = [
"class_g = 'slop'" # maim
"class_g = 'Cairo-clock'"
];

rounded-corners-exclude = [
"class_g = 'Alacritty'"
"class_g = 'Polybar'"
"class_g = 'polybar'"

"window_type = 'dock'"
"window_type = 'desktop'"
];

blur-background = false;
blur-kern = "3x3box";
blur-background-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
"_GTK_FRAME_EXTENTS@:c"
];

dithered-present = false;

mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
detect-transient = true;
glx-no-stencil = true;
use-damage = true;
log-level = "warn";
};
};
};
}
19 changes: 19 additions & 0 deletions etc/nix/home/modules/apps/syncthing.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.den.apps.syncthing;
in
{
options.den.apps.syncthing.enable = mkEnableOption "syncthing";

config = mkIf cfg.enable {
# xdg.configFile = {}

services.syncthing.enable = true;
};
}
35 changes: 35 additions & 0 deletions etc/nix/home/modules/apps/tmux.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.den.apps.tmux;
in
{
options.den.apps.tmux.enable = mkEnableOption "tmux";

config = mkIf cfg.enable {

programs.tmux = {
enable = true;
terminal = "screen-256color";
mouse = true;
baseIndex = 1;

extraConfig = ''
set-option -g allow-rename on
set-option -g set-titles on
set-option -g set-titles-string "#W"
'';
};

# tmux-config = {
# target = ".tmux.conf";
# source = "${config.den.dir.etc}/tmux/tmux.conf";
# force = true;
# };
};
}
36 changes: 36 additions & 0 deletions etc/nix/home/modules/apps/vscode.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.den.apps.vscode;
in
{
options.den.apps.vscode = {
enable = mkEnableOption "vscode";

client = mkOption {
type = types.bool;
default = true;
};

server = mkOption {
type = types.bool;
default = false;
};

clientPackage = mkPackageOption pkgs "vscode" { };
};

config =
mkIf (cfg.enable && cfg.client) {
home.packages = [ cfg.clientPackage ];
# link client config, keybindings, and snippets
}
// mkIf (cfg.enable && cfg.server) {
# link server config
};
}
1 change: 1 addition & 0 deletions etc/nix/home/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
imports = [
./den.nix
./gui.nix
./shell.nix
./workspace.nix

Expand Down
17 changes: 17 additions & 0 deletions etc/nix/home/modules/gui.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.den.gui;
in
{
options.den.gui = {
enable = mkEnableOption "gui environment components";
};

config = mkIf cfg.enable {};
}
30 changes: 22 additions & 8 deletions etc/nix/home/modules/packs/development.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,30 @@ let
cfg = config.den.packs.development;
in
{
options.den.packs.development.enable = mkEnableOption "development module";
options.den.packs.development = {
enable = mkEnableOption "development module";

config = mkIf cfg.enable {
den.apps = {
helix.enable = true;
git.enable = true;
go.enable = true;
julia.enable = true;
rust.enable = true;
gui = mkOption {
type = types.bool;
default = config.den.gui.enable;
};
};

config = mkIf cfg.enable {
den.apps =
{

helix.enable = true;
git.enable = true;

go.enable = true;
julia.enable = true;
rust.enable = true;

}
// mkIf cfg.gui {
vscode.enable = true;
};

den.shell.aliases = {
base16 = "xxd -c 0 -ps";
Expand Down
Loading

0 comments on commit f5315d0

Please sign in to comment.