feat(nixos): add multi-arch support and refactor system configs
- add aarch64-linux to supported systems (flake + pkgs) - refactor host definitions into tty/desktop/laptop configurations - introduce sharedModules to reduce duplication - split system modules into base, gui, and laptop groups - add headless (tty) configuration feat(fish): add Ctrl+Delete and Alt+Delete bindings - Ctrl+Delete → kill-word - Alt+Delete → kill-token chore(hosts): remove explicit hostname from aesthetic chore(services): remove forced disable of speechd
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
outputs = inputs:
|
||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux"];
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
|
||||
imports = [./hosts ./pkgs];
|
||||
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
# Custom bindings
|
||||
for mode in insert default
|
||||
bind -M $mode ctrl-backspace backward-kill-word
|
||||
bind -M $mode ctrl-delete kill-word
|
||||
bind -M $mode alt-backspace backward-kill-token
|
||||
bind -M $mode alt-delete kill-token
|
||||
bind -M $mode ctrl-z undo
|
||||
end
|
||||
bind -M insert \cx\ce edit_command_buffer
|
||||
@@ -173,8 +175,6 @@ end
|
||||
alias cleanram="sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'"
|
||||
alias trimall="sudo fstrim -va"
|
||||
alias c="clear"
|
||||
alias test-build="sudo nixos-rebuild test --flake /etc/nixos#aesthetic"
|
||||
alias switch-build="sudo nixos-rebuild switch --flake /etc/nixos#aesthetic"
|
||||
alias add="git add ."
|
||||
alias commit="git commit"
|
||||
alias push="git push"
|
||||
|
||||
@@ -132,8 +132,6 @@
|
||||
'';
|
||||
};
|
||||
|
||||
networking.hostName = "aesthetic";
|
||||
|
||||
security.tpm2.enable = true;
|
||||
|
||||
# Additional security hardening for HSI compliance
|
||||
|
||||
+23
-11
@@ -2,32 +2,44 @@
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake.nixosConfigurations = let
|
||||
}: let
|
||||
# shorten paths
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
mod = "${self}/system";
|
||||
home = "${self}/home";
|
||||
|
||||
# get the basic config to build on top of
|
||||
inherit (import "${self}/system") desktop laptop;
|
||||
inherit (import "${self}/system") tty desktop laptop;
|
||||
|
||||
# get these into the module system
|
||||
specialArgs = {inherit inputs self;};
|
||||
in {
|
||||
aesthetic = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules =
|
||||
desktop
|
||||
++ laptop
|
||||
++ [
|
||||
|
||||
# shared modules for all configurations
|
||||
sharedModules = [
|
||||
./aesthetic
|
||||
"${mod}/services/gnome-services.nix"
|
||||
"${mod}/core/limine.nix"
|
||||
"${home}"
|
||||
|
||||
inputs.agenix.nixosModules.default
|
||||
];
|
||||
in {
|
||||
flake.nixosConfigurations = {
|
||||
# TTY: desktop headless (no GUI)
|
||||
tty = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = tty ++ sharedModules;
|
||||
};
|
||||
|
||||
# Desktop: desktop with GUI
|
||||
desktop = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = desktop ++ sharedModules;
|
||||
};
|
||||
|
||||
# Laptop: laptop with GUI + battery + bluetooth
|
||||
laptop = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = laptop ++ sharedModules;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+3490
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
systems = ["x86_64-linux"];
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
|
||||
perSystem = {pkgs, ...}: {
|
||||
packages = {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
let
|
||||
host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICL0B9moxOPY4XYim8826M+Tf0sWErwWljz1gkDZPwuF root@aesthetic";
|
||||
host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICL0B9moxOPY4XYim8826M+Tf0sWErwWljz1gkDZPwuF";
|
||||
in {
|
||||
"gitea_laptop.age".publicKeys = [
|
||||
host
|
||||
|
||||
+20
-11
@@ -1,28 +1,37 @@
|
||||
let
|
||||
desktop = [
|
||||
./core/boot.nix
|
||||
# Base system - common for all configurations
|
||||
base = [
|
||||
./core/default.nix
|
||||
|
||||
./hardware/graphics.nix
|
||||
./hardware/fwupd.nix
|
||||
|
||||
./network/default.nix
|
||||
|
||||
./programs
|
||||
|
||||
./services
|
||||
./services/docker.nix
|
||||
./services/greetd.nix
|
||||
./services/pipewire.nix
|
||||
./services/xdg-portal-fix.nix
|
||||
];
|
||||
|
||||
laptop =
|
||||
desktop
|
||||
++ [
|
||||
# GUI-specific modules (display manager, GPU, pipewire)
|
||||
gui = [
|
||||
./core/boot.nix # plymouth boot splash
|
||||
./hardware/graphics.nix # GPU drivers
|
||||
./services/greetd.nix # display manager
|
||||
./services/pipewire.nix # audio
|
||||
];
|
||||
|
||||
# Laptop-specific modules (battery, bluetooth)
|
||||
laptop = [
|
||||
./hardware/bluetooth.nix
|
||||
./services/power.nix
|
||||
];
|
||||
in {
|
||||
inherit desktop laptop;
|
||||
# TTY: desktop headless (no GUI)
|
||||
tty = base;
|
||||
|
||||
# Desktop: desktop with GUI
|
||||
desktop = base ++ gui;
|
||||
|
||||
# Laptop: laptop with GUI + battery + bluetooth
|
||||
laptop = base ++ gui ++ laptop;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
irqbalance.enable = true;
|
||||
thermald.enable = true;
|
||||
speechd.enable = lib.mkForce false;
|
||||
};
|
||||
|
||||
# Use in place of hypridle's before_sleep_cmd, since systemd does not wait for
|
||||
|
||||
Reference in New Issue
Block a user