common aspects reworked into base aspect
This commit is contained in:
parent
bfa2521ed0
commit
5d1b54c8bf
15 changed files with 72 additions and 112 deletions
|
|
@ -1,16 +1,22 @@
|
|||
{ ... }:
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.nixos.common-programs =
|
||||
flake.modules.nixos.base =
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
boot
|
||||
console
|
||||
firewall
|
||||
locale
|
||||
nix
|
||||
security
|
||||
ssh
|
||||
];
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
### Dev Tools ###
|
||||
git
|
||||
### System Utilities ###
|
||||
fastfetch
|
||||
nixos-firewall-tool
|
||||
nvd
|
||||
sysz
|
||||
wget
|
||||
yazi
|
||||
|
|
@ -26,14 +32,16 @@
|
|||
command-not-found.enable = false;
|
||||
fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
if set -q SSH_CONNECTION; and not set -q IN_NIX_SHELL; or not set -q TMUX
|
||||
export TERM=xterm-256color
|
||||
clear
|
||||
fastfetch
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
dbus.implementation = "broker";
|
||||
irqbalance.enable = true;
|
||||
fstrim.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
extraUpFlags = [ "--operator=user" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-boot =
|
||||
flake.modules.nixos.boot =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-console =
|
||||
flake.modules.nixos.console =
|
||||
{ ... }:
|
||||
{
|
||||
console = {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-firewall =
|
||||
flake.modules.nixos.firewall =
|
||||
{ ... }:
|
||||
{
|
||||
networking = {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-locale =
|
||||
flake.modules.nixos.locale =
|
||||
{ ... }:
|
||||
{
|
||||
time.timeZone = "America/Bahia";
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-nix =
|
||||
flake.modules.nixos.nix =
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.nixos-cli.nixosModules.nixos-cli ];
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-security =
|
||||
flake.modules.nixos.security =
|
||||
{ ... }:
|
||||
{
|
||||
security.sudo = {
|
||||
32
aspects/base/ssh.nix
Normal file
32
aspects/base/ssh.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
flake.modules.nixos.ssh =
|
||||
{ ... }:
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "no";
|
||||
extraConfig = ''
|
||||
PrintLastLog no
|
||||
'';
|
||||
};
|
||||
programs = {
|
||||
bash.interactiveShellInit = ''
|
||||
if { [ -n "$SSH_CONNECTION" ] && [ -z "$IN_NIX_SHELL" ]; } || [ -z "$TMUX" ]; then
|
||||
export TERM=xterm-256color
|
||||
clear
|
||||
fastfetch
|
||||
fi
|
||||
'';
|
||||
fish.interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
if set -q SSH_CONNECTION; and not set -q IN_NIX_SHELL; or not set -q TMUX
|
||||
export TERM=xterm-256color
|
||||
clear
|
||||
fastfetch
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-openssh =
|
||||
{ ... }:
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "no";
|
||||
extraConfig = ''
|
||||
PrintLastLog no
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-services =
|
||||
{ ... }:
|
||||
{
|
||||
services = {
|
||||
dbus.implementation = "broker";
|
||||
irqbalance.enable = true;
|
||||
fstrim.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
flake.modules.nixos.common-tailscale =
|
||||
{ ... }:
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
extraUpFlags = [ "--operator=user" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -16,21 +16,11 @@
|
|||
((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_alexandria)
|
||||
]
|
||||
++ (with inputs.self.modules.nixos; [
|
||||
# system aspects
|
||||
base
|
||||
cli
|
||||
|
||||
# Common aspects (always included)
|
||||
common-boot
|
||||
common-console
|
||||
common-firewall
|
||||
common-locale
|
||||
common-nix
|
||||
common-openssh
|
||||
common-programs
|
||||
common-security
|
||||
common-services
|
||||
common-tailscale
|
||||
|
||||
# User aspects
|
||||
# user aspects
|
||||
user
|
||||
root
|
||||
|
||||
|
|
|
|||
|
|
@ -19,21 +19,11 @@
|
|||
})
|
||||
]
|
||||
++ (with inputs.self.modules.nixos; [
|
||||
# system aspects
|
||||
base
|
||||
cli
|
||||
|
||||
# Common aspects (always included)
|
||||
common-boot
|
||||
common-console
|
||||
common-firewall
|
||||
common-locale
|
||||
common-nix
|
||||
common-openssh
|
||||
common-programs
|
||||
common-security
|
||||
common-services
|
||||
common-tailscale
|
||||
|
||||
# User aspects
|
||||
# user aspects
|
||||
user
|
||||
root
|
||||
|
||||
|
|
|
|||
|
|
@ -19,21 +19,11 @@
|
|||
})
|
||||
]
|
||||
++ (with inputs.self.modules.nixos; [
|
||||
# system aspects
|
||||
base
|
||||
cli
|
||||
|
||||
# Common aspects (always included)
|
||||
common-boot
|
||||
common-console
|
||||
common-firewall
|
||||
common-locale
|
||||
common-nix
|
||||
common-openssh
|
||||
common-programs
|
||||
common-security
|
||||
common-services
|
||||
common-tailscale
|
||||
|
||||
# User aspects
|
||||
# user aspects
|
||||
user
|
||||
root
|
||||
|
||||
|
|
|
|||
|
|
@ -12,30 +12,17 @@
|
|||
inputs.self.overlays.default
|
||||
];
|
||||
}
|
||||
|
||||
# Factory-generated ephemeral module
|
||||
((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_trantor)
|
||||
(inputs.self.factory.ephemeral {
|
||||
rootDevice = "/dev/disk/by-id/scsi-360b207ed25d84372a95d1ecf842f8e20-part2";
|
||||
})
|
||||
|
||||
((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_trantor)
|
||||
]
|
||||
++ (with inputs.self.modules.nixos; [
|
||||
# system aspects
|
||||
base
|
||||
cli
|
||||
|
||||
# Common aspects (always included)
|
||||
common-boot
|
||||
common-console
|
||||
common-firewall
|
||||
common-locale
|
||||
common-nix
|
||||
common-openssh
|
||||
common-programs
|
||||
common-security
|
||||
common-services
|
||||
common-tailscale
|
||||
|
||||
# User aspects
|
||||
# user aspects
|
||||
user
|
||||
root
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue