Skip to content

Commit

Permalink
moving along... at 2:47 am
Browse files Browse the repository at this point in the history
  • Loading branch information
noriah committed Feb 20, 2025
1 parent 51ab2bc commit 3427bb8
Show file tree
Hide file tree
Showing 39 changed files with 360 additions and 191 deletions.
32 changes: 0 additions & 32 deletions etc/nix/home/apps/helix.nix

This file was deleted.

5 changes: 4 additions & 1 deletion etc/nix/home/home.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{ ... }:
{
imports = [ ./den.nix ];
imports = [
./hosts
./modules
];

den.enable = true;
den.user = "vix";
Expand Down
1 change: 1 addition & 0 deletions etc/nix/home/hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
./unknown.nix

./niji.nix
./vyxn.nix
];
}
9 changes: 8 additions & 1 deletion etc/nix/home/hosts/niji.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,27 @@ in

config = mkIf cfg.enable {
den = {
dir.self = "${config.den.dir.home}/den";
dir.opt = "${config.den.dir.home}/.opt";

apps = {
alacritty.enable = true;
gnome.enable = true;
openrgb.enable = true;
polybar.enable = true;
tor.enable = true;

go.goPath = ".opt/go";
};

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

xdg.enable = true;
xdg.userDirRoot = "${config.den.dir.home}/stuff";
};
};

Expand Down
2 changes: 1 addition & 1 deletion etc/nix/home/hosts/unknown.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in
};

config = mkIf cfg.enable {
den.modules = {
den.packs = {
comfy.enable = true;
};

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

config = mkIf cfg.enable {
den = {
apps = {
alacritty.enable = true;
tor.enable = true;
};

packs = {
comfy.enable = true;
development.enable = true;
};
};

home.packages = with pkgs; [
zip
wmctrl

# installed globally
# _1password-cli
# _1password-gui

# net util
rdap
whois
subnetcalc
dnsutils
nmap

kitty

vscode
];

# services.syncthing.enable = true;

# programs.gpg.enable = true;

# services.gpg-agent = {
# enable = true;
# pinentryPackage = pkgs.pinentry-gnome3;
# };
};
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 13 additions & 7 deletions etc/nix/home/apps/go.nix → etc/nix/home/modules/apps/go.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@
}:
with lib;
let
# https://github.com/nix-community/home-manager/blob/release-24.11/modules/programs/go.nix#L41
goFullPath = "${config.home.homeDirectory}/${config.programs.go.goPath}";
cfg = config.den.apps.go;
in
{
options.den.apps.go.enable = mkEnableOption "golang";
options.den.apps.go = {
enable = mkEnableOption "golang";

goPath = mkOption {
type = types.str;
default = "opt/go";
};
};

config = mkIf cfg.enable {

programs.go = {
enable = true;
goPath = "opt/go";
enable = mkDefault true;
goPath = mkDefault cfg.goPath;
};

home.sessionPath = [
# go paths
"${config.programs.go.goPath}/bin"
];
home.sessionPath = [ "${goFullPath}/bin" ];

programs.helix.languages = {
language-server.gopls.command = "${pkgs.gopls}/bin/gopls";
Expand Down
78 changes: 78 additions & 0 deletions etc/nix/home/modules/apps/helix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.den.apps.helix;
in
{
options.den.apps.helix.enable = mkEnableOption "helix";

config = mkIf cfg.enable {

home.packages = with pkgs; [
nixd # nix lsp
marksman # markdown lsp
vscode-langservers-extracted
];

programs.helix = {
enable = true;

settings = {
theme = "monokai";
editor.lsp.display-inlay-hints = true;
};

languages.language = [
# nix
{
name = "nix";
auto-format = true;
language-servers = [ "nixd" ];
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
}
# html
{
name = "html";
language-servers = [ "vscode-html-language-server" ];
formatter = {
command = "prettier";
args = [
"--stdin-filepath"
"file.html"
];
};
auto-format = true;
}
# json
{
name = "json";
language-servers = [
{
name = "vscode-json-language-server";
except-features = [ "format" ];
}
];
auto-format = true;
}
# markdown
{
name = "markdown";
language-servers = [ "marksman" ];
formatter = {
command = "prettier";
args = [
"--stdin-filepath"
"file.md"
];
};
auto-format = true;
}
];
};
};
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}:
with lib;
let
den_pkgs = pkgs.callPackage ../packages { };
den_pkgs = pkgs.callPackage ../../../packages { };

cfg = config.den.apps.openrgb;
in
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ in

config = mkIf cfg.enable {

home.packages = [
pkgs.rust-analyzer
];
home.packages = [ pkgs.rust-analyzer ];

home.sessionVariables = {
RUSTUP_HOME = "${config.den.dir.opt}/rustup";
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions etc/nix/home/modules/comfy.nix

This file was deleted.

11 changes: 5 additions & 6 deletions etc/nix/home/modules/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{ ... }:
{
imports = [
./comfy.nix
./development.nix
./fonts.nix
./media.nix
./den.nix
./shell.nix
./x11.nix
./xdg.nix
./workspace.nix

./apps
./packs
];
}
21 changes: 6 additions & 15 deletions etc/nix/home/den.nix → etc/nix/home/modules/den.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ let
cfg = config.den;
in
{
imports = [
./apps
./hosts
./modules
];

options.den = {
enable = mkOption {
type = types.bool;
Expand All @@ -45,7 +39,7 @@ in
dir = {
self = mkOption {
type = types.path;
default = "${cfg.dir.home}/den";
default = "${cfg.dir.opt}/den";
};

home = mkOption {
Expand Down Expand Up @@ -84,13 +78,11 @@ in

config = mkIf cfg.enable {

# enable some modules by default
den.modules = {
shell = {
enable = true;
aliases = {
hm = "home-manager";
};
# enable some packs by default
den.shell = {
enable = true;
aliases = {
hm = "home-manager";
};
};

Expand All @@ -114,7 +106,6 @@ in

home.sessionPath = [
"${cfg.dir.self}/bin"
"${cfg.dir.home}/bin"
"${cfg.dir.home}/rbin"
];

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

config = mkIf cfg.enable {
den.apps = {
neofetch.enable = true;
};

den.packs = { };
};
}
Loading

0 comments on commit 3427bb8

Please sign in to comment.