re-work cli aspect for nixos and homeModules
This commit is contained in:
parent
5f1c05f090
commit
bfa2521ed0
13 changed files with 264 additions and 230 deletions
|
|
@ -1,20 +1,28 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.cli-btop =
|
flake.modules = {
|
||||||
{
|
nixos.btop =
|
||||||
config,
|
{ pkgs, ... }:
|
||||||
lib,
|
{
|
||||||
pkgs,
|
environment.systemPackages = with pkgs; [ btop ];
|
||||||
...
|
};
|
||||||
}:
|
|
||||||
{
|
homeManager.btop =
|
||||||
programs.btop = {
|
{
|
||||||
enable = true;
|
config,
|
||||||
settings = {
|
lib,
|
||||||
theme_background = false;
|
pkgs,
|
||||||
proc_sorting = "cpu direct";
|
...
|
||||||
update_ms = 500;
|
}:
|
||||||
|
{
|
||||||
|
programs.btop = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
theme_background = false;
|
||||||
|
proc_sorting = "cpu direct";
|
||||||
|
update_ms = 500;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
28
aspects/cli/cli.nix
Normal file
28
aspects/cli/cli.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
flake.modules = {
|
||||||
|
nixos.cli =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = with inputs.self.modules.nixos; [
|
||||||
|
btop
|
||||||
|
helix
|
||||||
|
tmux
|
||||||
|
];
|
||||||
|
};
|
||||||
|
homeManager.cli =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = with inputs.self.modules.nixos; [
|
||||||
|
btop
|
||||||
|
comma
|
||||||
|
direnv
|
||||||
|
helix
|
||||||
|
hm-cli
|
||||||
|
starship
|
||||||
|
tmux
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.cli-comma =
|
flake.modules.homeManager.comma =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.cli-direnv =
|
flake.modules.homeManager.direnv =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
||||||
|
|
@ -1,57 +1,67 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.cli-helix =
|
flake.modules = {
|
||||||
{
|
nixos.helix =
|
||||||
config,
|
{ pkgs, ... }:
|
||||||
lib,
|
{
|
||||||
pkgs,
|
environment.systemPackages = with pkgs; [
|
||||||
...
|
helix
|
||||||
}:
|
];
|
||||||
{
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "hx";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.helix = {
|
homeManager.helix =
|
||||||
enable = true;
|
{
|
||||||
settings = {
|
config,
|
||||||
editor = {
|
lib,
|
||||||
file-picker.hidden = false;
|
pkgs,
|
||||||
idle-timeout = 0;
|
...
|
||||||
line-number = "relative";
|
}:
|
||||||
cursor-shape = {
|
{
|
||||||
normal = "underline";
|
home.sessionVariables = {
|
||||||
insert = "bar";
|
EDITOR = "hx";
|
||||||
select = "underline";
|
|
||||||
};
|
|
||||||
soft-wrap.enable = true;
|
|
||||||
auto-format = true;
|
|
||||||
indent-guides.render = true;
|
|
||||||
};
|
|
||||||
keys.normal = {
|
|
||||||
space = {
|
|
||||||
o = "file_picker_in_current_buffer_directory";
|
|
||||||
esc = [
|
|
||||||
"collapse_selection"
|
|
||||||
"keep_primary_selection"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
languages = {
|
|
||||||
language = [
|
programs.helix = {
|
||||||
{
|
enable = true;
|
||||||
name = "nix";
|
settings = {
|
||||||
|
editor = {
|
||||||
|
file-picker.hidden = false;
|
||||||
|
idle-timeout = 0;
|
||||||
|
line-number = "relative";
|
||||||
|
cursor-shape = {
|
||||||
|
normal = "underline";
|
||||||
|
insert = "bar";
|
||||||
|
select = "underline";
|
||||||
|
};
|
||||||
|
soft-wrap.enable = true;
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
formatter.command = "nixfmt";
|
indent-guides.render = true;
|
||||||
}
|
};
|
||||||
{
|
keys.normal = {
|
||||||
name = "typst";
|
space = {
|
||||||
auto-format = true;
|
o = "file_picker_in_current_buffer_directory";
|
||||||
formatter.command = "typstyle -c 1000 -i";
|
esc = [
|
||||||
}
|
"collapse_selection"
|
||||||
];
|
"keep_primary_selection"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
languages = {
|
||||||
|
language = [
|
||||||
|
{
|
||||||
|
name = "nix";
|
||||||
|
auto-format = true;
|
||||||
|
formatter.command = "nixfmt";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "typst";
|
||||||
|
auto-format = true;
|
||||||
|
formatter.command = "typstyle -c 1000 -i";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.cli-base =
|
flake.modules.homeManager.hm-cli =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.cli-starship =
|
flake.modules.homeManager.starship =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,29 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
flake.modules.homeManager.cli-tmux =
|
flake.modules = {
|
||||||
{
|
nixos.tmux =
|
||||||
config,
|
{ pkgs, ... }:
|
||||||
lib,
|
{
|
||||||
pkgs,
|
environment.systemPackages = with pkgs; [
|
||||||
...
|
tmux
|
||||||
}:
|
];
|
||||||
{
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
|
||||||
clock24 = true;
|
|
||||||
terminal = "xterm-256color";
|
|
||||||
mouse = true;
|
|
||||||
keyMode = "vi";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
homeManager.tmux =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
clock24 = true;
|
||||||
|
terminal = "xterm-256color";
|
||||||
|
mouse = true;
|
||||||
|
keyMode = "vi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,10 @@
|
||||||
### Dev Tools ###
|
### Dev Tools ###
|
||||||
git
|
git
|
||||||
### System Utilities ###
|
### System Utilities ###
|
||||||
btop
|
|
||||||
fastfetch
|
fastfetch
|
||||||
helix
|
|
||||||
nixos-firewall-tool
|
nixos-firewall-tool
|
||||||
nvd
|
nvd
|
||||||
sysz
|
sysz
|
||||||
tmux
|
|
||||||
wget
|
wget
|
||||||
yazi
|
yazi
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, ... }:
|
{ inputs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations.alexandria = inputs.nixpkgs-stable.lib.nixosSystem {
|
flake.nixosConfigurations.alexandria = inputs.nixpkgs-stable.lib.nixosSystem {
|
||||||
|
|
@ -13,39 +13,34 @@
|
||||||
inputs.self.overlays.default
|
inputs.self.overlays.default
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_alexandria)
|
||||||
|
]
|
||||||
|
++ (with inputs.self.modules.nixos; [
|
||||||
|
cli
|
||||||
|
|
||||||
# Common aspects (always included)
|
# Common aspects (always included)
|
||||||
inputs.self.modules.nixos.common-boot
|
common-boot
|
||||||
inputs.self.modules.nixos.common-console
|
common-console
|
||||||
inputs.self.modules.nixos.common-firewall
|
common-firewall
|
||||||
inputs.self.modules.nixos.common-locale
|
common-locale
|
||||||
inputs.self.modules.nixos.common-nix
|
common-nix
|
||||||
inputs.self.modules.nixos.common-openssh
|
common-openssh
|
||||||
inputs.self.modules.nixos.common-programs
|
common-programs
|
||||||
inputs.self.modules.nixos.common-security
|
common-security
|
||||||
inputs.self.modules.nixos.common-services
|
common-services
|
||||||
inputs.self.modules.nixos.common-tailscale
|
common-tailscale
|
||||||
|
|
||||||
# User aspects
|
# User aspects
|
||||||
inputs.self.modules.nixos.user
|
user
|
||||||
inputs.self.modules.nixos.root
|
root
|
||||||
|
|
||||||
# Server aspects
|
# Server aspects
|
||||||
inputs.self.modules.nixos.server-boot
|
server-boot
|
||||||
inputs.self.modules.nixos.server-nix
|
server-nix
|
||||||
inputs.self.modules.nixos.server-tailscale
|
server-tailscale
|
||||||
|
|
||||||
# Other aspects
|
# Other aspects
|
||||||
inputs.self.modules.nixos.fwupd
|
fwupd
|
||||||
inputs.self.modules.nixos.podman
|
]);
|
||||||
|
|
||||||
# Host-specific files (from _alexandria/)
|
|
||||||
./_alexandria/hardware-configuration.nix
|
|
||||||
./_alexandria/jellyfin.nix
|
|
||||||
./_alexandria/nextcloud.nix
|
|
||||||
./_alexandria/nginx.nix
|
|
||||||
./_alexandria/unbound.nix
|
|
||||||
./_alexandria/vaultwarden.nix
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ inputs, self, ... }:
|
{ inputs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations.io = inputs.nixpkgs.lib.nixosSystem {
|
flake.nixosConfigurations.io = inputs.nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
@ -12,48 +13,43 @@
|
||||||
inputs.self.overlays.default
|
inputs.self.overlays.default
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_io)
|
||||||
# Common aspects (always included)
|
|
||||||
inputs.self.modules.nixos.common-boot
|
|
||||||
inputs.self.modules.nixos.common-console
|
|
||||||
inputs.self.modules.nixos.common-firewall
|
|
||||||
inputs.self.modules.nixos.common-locale
|
|
||||||
inputs.self.modules.nixos.common-nix
|
|
||||||
inputs.self.modules.nixos.common-openssh
|
|
||||||
inputs.self.modules.nixos.common-programs
|
|
||||||
inputs.self.modules.nixos.common-security
|
|
||||||
inputs.self.modules.nixos.common-services
|
|
||||||
inputs.self.modules.nixos.common-tailscale
|
|
||||||
|
|
||||||
# User aspects
|
|
||||||
inputs.self.modules.nixos.user
|
|
||||||
inputs.self.modules.nixos.root
|
|
||||||
|
|
||||||
# Desktop aspects
|
|
||||||
inputs.self.modules.nixos.desktop-boot
|
|
||||||
inputs.self.modules.nixos.desktop-desktop
|
|
||||||
inputs.self.modules.nixos.desktop-nix
|
|
||||||
inputs.self.modules.nixos.desktop-services
|
|
||||||
|
|
||||||
# Other aspects based on tags
|
|
||||||
inputs.self.modules.nixos.ai
|
|
||||||
inputs.self.modules.nixos.bluetooth
|
|
||||||
inputs.self.modules.nixos.dev
|
|
||||||
inputs.self.modules.nixos.libvirtd
|
|
||||||
inputs.self.modules.nixos.networkmanager
|
|
||||||
inputs.self.modules.nixos.podman
|
|
||||||
|
|
||||||
# Factory-generated ephemeral module
|
|
||||||
(inputs.self.factory.ephemeral {
|
(inputs.self.factory.ephemeral {
|
||||||
rootDevice = "/dev/mapper/cryptroot";
|
rootDevice = "/dev/mapper/cryptroot";
|
||||||
})
|
})
|
||||||
|
]
|
||||||
|
++ (with inputs.self.modules.nixos; [
|
||||||
|
cli
|
||||||
|
|
||||||
# Host-specific files (from _io/)
|
# Common aspects (always included)
|
||||||
./_io/hardware-configuration.nix
|
common-boot
|
||||||
./_io/disko.nix
|
common-console
|
||||||
./_io/boot.nix
|
common-firewall
|
||||||
./_io/programs.nix
|
common-locale
|
||||||
./_io/services.nix
|
common-nix
|
||||||
];
|
common-openssh
|
||||||
|
common-programs
|
||||||
|
common-security
|
||||||
|
common-services
|
||||||
|
common-tailscale
|
||||||
|
|
||||||
|
# User aspects
|
||||||
|
user
|
||||||
|
root
|
||||||
|
|
||||||
|
# Desktop aspects
|
||||||
|
desktop-boot
|
||||||
|
desktop-desktop
|
||||||
|
desktop-nix
|
||||||
|
desktop-services
|
||||||
|
|
||||||
|
# Other aspects
|
||||||
|
ai
|
||||||
|
bluetooth
|
||||||
|
dev
|
||||||
|
libvirtd
|
||||||
|
networkmanager
|
||||||
|
podman
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ inputs, ... }:
|
{ inputs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations.rotterdam = inputs.nixpkgs.lib.nixosSystem {
|
flake.nixosConfigurations.rotterdam = inputs.nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
@ -12,53 +13,48 @@
|
||||||
inputs.self.overlays.default
|
inputs.self.overlays.default
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_rotterdam)
|
||||||
# Common aspects (always included)
|
|
||||||
inputs.self.modules.nixos.common-boot
|
|
||||||
inputs.self.modules.nixos.common-console
|
|
||||||
inputs.self.modules.nixos.common-firewall
|
|
||||||
inputs.self.modules.nixos.common-locale
|
|
||||||
inputs.self.modules.nixos.common-nix
|
|
||||||
inputs.self.modules.nixos.common-openssh
|
|
||||||
inputs.self.modules.nixos.common-programs
|
|
||||||
inputs.self.modules.nixos.common-security
|
|
||||||
inputs.self.modules.nixos.common-services
|
|
||||||
inputs.self.modules.nixos.common-tailscale
|
|
||||||
|
|
||||||
# User aspects
|
|
||||||
inputs.self.modules.nixos.user
|
|
||||||
inputs.self.modules.nixos.root
|
|
||||||
|
|
||||||
# Desktop aspects
|
|
||||||
inputs.self.modules.nixos.desktop-boot
|
|
||||||
inputs.self.modules.nixos.desktop-desktop
|
|
||||||
inputs.self.modules.nixos.desktop-nix
|
|
||||||
inputs.self.modules.nixos.desktop-services
|
|
||||||
|
|
||||||
# Other aspects based on tags
|
|
||||||
inputs.self.modules.nixos.ai
|
|
||||||
inputs.self.modules.nixos.bluetooth
|
|
||||||
inputs.self.modules.nixos.dev
|
|
||||||
inputs.self.modules.nixos.fwupd
|
|
||||||
inputs.self.modules.nixos.gaming-steam
|
|
||||||
inputs.self.modules.nixos.gaming-hardware
|
|
||||||
inputs.self.modules.nixos.gaming-flatpak
|
|
||||||
inputs.self.modules.nixos.gaming-launchers
|
|
||||||
inputs.self.modules.nixos.libvirtd
|
|
||||||
inputs.self.modules.nixos.networkmanager
|
|
||||||
inputs.self.modules.nixos.podman
|
|
||||||
|
|
||||||
# Factory-generated ephemeral module
|
|
||||||
(inputs.self.factory.ephemeral {
|
(inputs.self.factory.ephemeral {
|
||||||
rootDevice = "/dev/mapper/cryptroot";
|
rootDevice = "/dev/mapper/cryptroot";
|
||||||
})
|
})
|
||||||
|
]
|
||||||
|
++ (with inputs.self.modules.nixos; [
|
||||||
|
cli
|
||||||
|
|
||||||
# Host-specific files (from _rotterdam/)
|
# Common aspects (always included)
|
||||||
./_rotterdam/hardware-configuration.nix
|
common-boot
|
||||||
./_rotterdam/boot.nix
|
common-console
|
||||||
./_rotterdam/hardware.nix
|
common-firewall
|
||||||
./_rotterdam/programs.nix
|
common-locale
|
||||||
./_rotterdam/services.nix
|
common-nix
|
||||||
];
|
common-openssh
|
||||||
|
common-programs
|
||||||
|
common-security
|
||||||
|
common-services
|
||||||
|
common-tailscale
|
||||||
|
|
||||||
|
# User aspects
|
||||||
|
user
|
||||||
|
root
|
||||||
|
|
||||||
|
# Desktop aspects
|
||||||
|
desktop-boot
|
||||||
|
desktop-desktop
|
||||||
|
desktop-nix
|
||||||
|
desktop-services
|
||||||
|
|
||||||
|
# Other aspects based on tags
|
||||||
|
ai
|
||||||
|
bluetooth
|
||||||
|
dev
|
||||||
|
fwupd
|
||||||
|
gaming-steam
|
||||||
|
gaming-hardware
|
||||||
|
gaming-flatpak
|
||||||
|
gaming-launchers
|
||||||
|
libvirtd
|
||||||
|
networkmanager
|
||||||
|
podman
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, self, ... }:
|
{ inputs, lib, ... }:
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations.trantor = inputs.nixpkgs-stable.lib.nixosSystem {
|
flake.nixosConfigurations.trantor = inputs.nixpkgs-stable.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
|
|
@ -13,42 +13,36 @@
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
# Common aspects (always included)
|
|
||||||
inputs.self.modules.nixos.common-boot
|
|
||||||
inputs.self.modules.nixos.common-console
|
|
||||||
inputs.self.modules.nixos.common-firewall
|
|
||||||
inputs.self.modules.nixos.common-locale
|
|
||||||
inputs.self.modules.nixos.common-nix
|
|
||||||
inputs.self.modules.nixos.common-openssh
|
|
||||||
inputs.self.modules.nixos.common-programs
|
|
||||||
inputs.self.modules.nixos.common-security
|
|
||||||
inputs.self.modules.nixos.common-services
|
|
||||||
inputs.self.modules.nixos.common-tailscale
|
|
||||||
|
|
||||||
# User aspects
|
|
||||||
inputs.self.modules.nixos.user
|
|
||||||
inputs.self.modules.nixos.root
|
|
||||||
|
|
||||||
# Server aspects
|
|
||||||
inputs.self.modules.nixos.server-boot
|
|
||||||
inputs.self.modules.nixos.server-nix
|
|
||||||
inputs.self.modules.nixos.server-tailscale
|
|
||||||
|
|
||||||
# Factory-generated ephemeral module
|
# Factory-generated ephemeral module
|
||||||
(inputs.self.factory.ephemeral {
|
(inputs.self.factory.ephemeral {
|
||||||
rootDevice = "/dev/disk/by-id/scsi-360b207ed25d84372a95d1ecf842f8e20-part2";
|
rootDevice = "/dev/disk/by-id/scsi-360b207ed25d84372a95d1ecf842f8e20-part2";
|
||||||
})
|
})
|
||||||
|
|
||||||
# Host-specific files (from _trantor/)
|
((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_trantor)
|
||||||
./_trantor/hardware-configuration.nix
|
]
|
||||||
./_trantor/disko.nix
|
++ (with inputs.self.modules.nixos; [
|
||||||
./_trantor/boot.nix
|
cli
|
||||||
./_trantor/fail2ban.nix
|
|
||||||
./_trantor/forgejo.nix
|
# Common aspects (always included)
|
||||||
./_trantor/networking.nix
|
common-boot
|
||||||
./_trantor/nginx.nix
|
common-console
|
||||||
./_trantor/openssh.nix
|
common-firewall
|
||||||
./_trantor/unbound.nix
|
common-locale
|
||||||
];
|
common-nix
|
||||||
|
common-openssh
|
||||||
|
common-programs
|
||||||
|
common-security
|
||||||
|
common-services
|
||||||
|
common-tailscale
|
||||||
|
|
||||||
|
# User aspects
|
||||||
|
user
|
||||||
|
root
|
||||||
|
|
||||||
|
# Server aspects
|
||||||
|
server-boot
|
||||||
|
server-nix
|
||||||
|
server-tailscale
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue