rework system, programs, desktop, cli and base aspects

This commit is contained in:
William 2026-02-15 16:36:06 -03:00
parent 4e78805bda
commit 7815017528
13 changed files with 66 additions and 85 deletions

View file

@ -1,6 +1,6 @@
{ ... }:
{
flake.modules.homeManager.shell-bash =
flake.modules.homeManager.bash =
{
config,
lib,

47
aspects/base/fish.nix Normal file
View file

@ -0,0 +1,47 @@
{ ... }:
{
flake.modules = {
nixos.fish =
{ ... }:
{
programs.fish.enable = true;
};
homeManager.fish =
{
config,
lib,
pkgs,
...
}:
{
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting
${lib.getExe pkgs.nix-your-shell} fish | source
'';
loginShellInit = "${lib.getExe pkgs.nix-your-shell} fish | source";
plugins = [
{
name = "bang-bang";
src = pkgs.fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-bang-bang";
rev = "f969c618301163273d0a03d002614d9a81952c1e";
sha256 = "sha256-A8ydBX4LORk+nutjHurqNNWFmW6LIiBPQcxS3x4nbeQ=";
};
}
{
name = "z";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "z";
rev = "067e867debee59aee231e789fc4631f80fa5788e";
sha256 = "sha256-emmjTsqt8bdI5qpx1bAzhVACkg0MNB/uffaRjjeuFxU=";
};
}
];
};
};
};
}

View file

@ -1,14 +0,0 @@
# aspects/server/boot.nix
{ ... }:
{
flake.modules.nixos.server-boot =
{
config,
lib,
pkgs,
...
}:
{
boot.kernelPackages = pkgs.linuxPackages_hardened;
};
}

View file

@ -1,22 +0,0 @@
# aspects/server/tailscale.nix
{ ... }:
{
flake.modules.nixos.server-tailscale =
{
config,
lib,
pkgs,
...
}:
{
services.tailscale = {
extraSetFlags = [ "--advertise-exit-node" ];
useRoutingFeatures = "server";
};
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
};
}

View file

@ -1,40 +0,0 @@
{ ... }:
{
flake.modules.homeManager.shell-fish =
{
config,
lib,
pkgs,
...
}:
{
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting
${lib.getExe pkgs.nix-your-shell} fish | source
'';
loginShellInit = "${lib.getExe pkgs.nix-your-shell} fish | source";
plugins = [
{
name = "bang-bang";
src = pkgs.fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-bang-bang";
rev = "f969c618301163273d0a03d002614d9a81952c1e";
sha256 = "sha256-A8ydBX4LORk+nutjHurqNNWFmW6LIiBPQcxS3x4nbeQ=";
};
}
{
name = "z";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "z";
rev = "067e867debee59aee231e789fc4631f80fa5788e";
sha256 = "sha256-emmjTsqt8bdI5qpx1bAzhVACkg0MNB/uffaRjjeuFxU=";
};
}
];
};
};
}

View file

@ -7,6 +7,7 @@
boot
console
firewall
fish
locale
nix
security
@ -28,12 +29,7 @@
};
};
programs = {
command-not-found.enable = false;
fish = {
enable = true;
};
};
programs.command-not-found.enable = false;
services = {
dbus.implementation = "broker";

View file

@ -1,7 +1,7 @@
# aspects/server/nix.nix
{ inputs, ... }:
{
flake.modules.nixos.server-nix =
flake.modules.nixos.server =
{
config,
lib,
@ -9,6 +9,14 @@
...
}:
{
boot = {
kernelPackages = pkgs.linuxPackages_hardened;
kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
};
environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath;
nix = {
@ -18,5 +26,11 @@
"/nix/var/nix/profiles/per-user/root/channels"
];
};
services.tailscale = {
extraSetFlags = [ "--advertise-exit-node" ];
useRoutingFeatures = "server";
};
};
}