Compare commits

..

1 Commits

Author SHA1 Message Date
h7x4
20f9a8a582 WIP: cross compile skrott 2026-01-26 02:41:36 +09:00
9 changed files with 34 additions and 42 deletions

View File

@@ -13,9 +13,6 @@
# Debug and find files # Debug and find files
file file
# Process json data
jq
# Check computer specs # Check computer specs
lshw lshw
@@ -57,8 +54,6 @@
programs.nano.enable = true; programs.nano.enable = true;
# Same reasoning as nano # Same reasoning as nano
programs.vim.enable = true; programs.vim.enable = true;
# Same reasoning as vim
programs.neovim.enable = true;
# Some people like this shell for some reason # Some people like this shell for some reason
programs.zsh.enable = true; programs.zsh.enable = true;

8
flake.lock generated
View File

@@ -8,11 +8,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1769395643, "lastModified": 1769362210,
"narHash": "sha256-41eMQ9nbkHNYuZnGAlyGNc8K717pfnGKiADuiSOW29E=", "narHash": "sha256-QCQD7Ofin5UYL0i5Sv34gfJ0p5pv1hwZspE/Ufe84L8=",
"ref": "main", "ref": "main",
"rev": "a0a89c22a24f55b6b6738c95e361e1551895be29", "rev": "1d01e1b2cb8fb2adee96c0b4f065c43c45eae290",
"revCount": 230, "revCount": 229,
"type": "git", "type": "git",
"url": "https://git.pvv.ntnu.no/Projects/dibbler.git" "url": "https://git.pvv.ntnu.no/Projects/dibbler.git"
}, },

View File

@@ -225,36 +225,17 @@
inputs.gergle.overlays.default inputs.gergle.overlays.default
]; ];
}; };
} skrott = stableNixosConfig "skrott" {
// crossSystem = "aarch64-linux";
(let
skrottConfig = {
modules = [ modules = [
(nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix") (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix")
inputs.dibbler.nixosModules.default inputs.dibbler.nixosModules.default
]; ];
overlays = [ overlays = [
inputs.dibbler.overlays.default inputs.dibbler.overlays.default
(final: prev: {
atool = prev.emptyDirectory;
micro = prev.vim;
})
]; ];
}; };
in { }
skrott = stableNixosConfig "skrott" (skrottConfig // {
localSystem = "x86_64-linux";
crossSystem = "aarch64-linux";
});
skrott-x86_64 = stableNixosConfig "skrott" (skrottConfig // {
localSystem = "x86_64-linux";
crossSystem = "x86_64-linux";
});
skrott-native = stableNixosConfig "skrott" (skrottConfig // {
localSystem = "aarch64-linux";
crossSystem = "aarch64-linux";
});
})
// //
(let (let
machineNames = map (i: "lupine-${toString i}") (lib.range 1 5); machineNames = map (i: "lupine-${toString i}") (lib.range 1 5);
@@ -318,7 +299,6 @@
# Skrott is exception # Skrott is exception
{ {
skrott = self.nixosConfigurations.skrott.config.system.build.sdImage; skrott = self.nixosConfigurations.skrott.config.system.build.sdImage;
skrott-native = self.nixosConfigurations.skrott-native.config.system.build.sdImage;
} }
// //
# Nix-topology # Nix-topology

View File

@@ -1,13 +1,10 @@
{ config, pkgs, lib, modulesPath, fp, values, ... }: { { config, pkgs, lib, fp, values, ... }: {
imports = [ imports = [
(modulesPath + "/profiles/perlless.nix") # ./hardware-configuration.nix
(fp /base) (fp /base)
]; ];
# Disable import of a bunch of tools we don't need from nixpkgs.
disabledModules = [ "profiles/base.nix" ];
sops.defaultSopsFile = fp /secrets/skrott/skrott.yaml; sops.defaultSopsFile = fp /secrets/skrott/skrott.yaml;
boot = { boot = {
@@ -19,8 +16,6 @@
}; };
# Now turn off a bunch of stuff lol # Now turn off a bunch of stuff lol
# TODO: can we reduce further?
# See also https://nixcademy.com/posts/minimizing-nixos-images/
system.autoUpgrade.enable = lib.mkForce false; system.autoUpgrade.enable = lib.mkForce false;
services.irqbalance.enable = lib.mkForce false; services.irqbalance.enable = lib.mkForce false;
services.logrotate.enable = lib.mkForce false; services.logrotate.enable = lib.mkForce false;
@@ -30,11 +25,10 @@
services.udisks2.enable = lib.mkForce false; services.udisks2.enable = lib.mkForce false;
services.thermald.enable = lib.mkForce false; services.thermald.enable = lib.mkForce false;
services.promtail.enable = lib.mkForce false; services.promtail.enable = lib.mkForce false;
boot.supportedFilesystems.zfs = lib.mkForce false;
documentation.enable = lib.mkForce false; documentation.enable = lib.mkForce false;
programs.neovim.enable = lib.mkForce false; # TODO: can we reduce further?
programs.git.package = pkgs.gitMinimal;
sops.secrets = { sops.secrets = {
"dibbler/postgresql/password" = { "dibbler/postgresql/password" = {

View File

@@ -9,6 +9,14 @@
"nix-builder-users" "nix-builder-users"
]; ];
packages = with pkgs; [
neovim
htop
ripgrep
vim
foot.terminfo
];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFa5y7KyLn2tjxed1czMbyM5scnEpo9v/GfnhL/28ckM legolas" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFa5y7KyLn2tjxed1czMbyM5scnEpo9v/GfnhL/28ckM legolas"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICf7SlyHR6KgP7+IeFr/Iuiu2lL5vaSlzqPonaO8XU0J gunalx@aragon" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICf7SlyHR6KgP7+IeFr/Iuiu2lL5vaSlzqPonaO8XU0J gunalx@aragon"

View File

@@ -5,7 +5,11 @@
extraGroups = [ "wheel" "drift" "nix-builder-users" ]; extraGroups = [ "wheel" "drift" "nix-builder-users" ];
packages = with pkgs; [ packages = with pkgs; [
htop
neovim
ripgrep
fd fd
tmux
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;

View File

@@ -12,6 +12,9 @@
packages = with pkgs; [ packages = with pkgs; [
bottom bottom
eza eza
neovim
ripgrep
tmux
]; ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [

View File

@@ -14,9 +14,14 @@
bat bat
edir edir
fd fd
htop
jq
micro micro
ncdu ncdu
ripgrep
sd sd
tmux
wget
xe xe
yq yq
]; ];

View File

@@ -11,6 +11,9 @@
packages = with pkgs; [ packages = with pkgs; [
btop btop
eza eza
neovim
ripgrep
tmux
]; ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDVA3HqEx3je6L1AC+bP8sTxu3ZTKvTCR0npCyOVAYK5 vbm@arch-xeon" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDVA3HqEx3je6L1AC+bP8sTxu3ZTKvTCR0npCyOVAYK5 vbm@arch-xeon"