fmt
This commit is contained in:
@@ -4,9 +4,10 @@
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: lib.mkMerge [
|
||||
}:
|
||||
lib.mkMerge [
|
||||
(lib.mkIf (!config.vacu.minimal) {
|
||||
vacu.packages =
|
||||
vacu.packages =
|
||||
(with pkgs; [
|
||||
home-manager
|
||||
nix-index
|
||||
@@ -21,59 +22,59 @@
|
||||
inputs.nix-search-cli.packages.${pkgs.system}.default
|
||||
inputs.nix-inspect.packages.${pkgs.system}.default
|
||||
];
|
||||
}) {
|
||||
vacu.packages =
|
||||
with pkgs; [
|
||||
nixos-rebuild
|
||||
which
|
||||
nano
|
||||
vim
|
||||
wget
|
||||
screen
|
||||
tmux
|
||||
lsof
|
||||
htop
|
||||
mosh
|
||||
dnsutils
|
||||
iperf3
|
||||
rsync
|
||||
ethtool
|
||||
sshfs
|
||||
ddrescue
|
||||
pciutils
|
||||
ncdu
|
||||
pv
|
||||
unzip
|
||||
file
|
||||
ripgrep
|
||||
jq
|
||||
units
|
||||
tree
|
||||
iputils
|
||||
ssh-to-age
|
||||
sops
|
||||
inetutils
|
||||
diffutils
|
||||
findutils
|
||||
utillinux
|
||||
tzdata
|
||||
hostname
|
||||
gnugrep
|
||||
gnused
|
||||
gnutar
|
||||
bzip2
|
||||
gzip
|
||||
xz
|
||||
zip
|
||||
unzip
|
||||
openssh
|
||||
dig
|
||||
bash
|
||||
usbutils
|
||||
psutils
|
||||
killall
|
||||
git
|
||||
curl
|
||||
];
|
||||
}
|
||||
})
|
||||
{
|
||||
vacu.packages = with pkgs; [
|
||||
nixos-rebuild
|
||||
which
|
||||
nano
|
||||
vim
|
||||
wget
|
||||
screen
|
||||
tmux
|
||||
lsof
|
||||
htop
|
||||
mosh
|
||||
dnsutils
|
||||
iperf3
|
||||
rsync
|
||||
ethtool
|
||||
sshfs
|
||||
ddrescue
|
||||
pciutils
|
||||
ncdu
|
||||
pv
|
||||
unzip
|
||||
file
|
||||
ripgrep
|
||||
jq
|
||||
units
|
||||
tree
|
||||
iputils
|
||||
ssh-to-age
|
||||
sops
|
||||
inetutils
|
||||
diffutils
|
||||
findutils
|
||||
utillinux
|
||||
tzdata
|
||||
hostname
|
||||
gnugrep
|
||||
gnused
|
||||
gnutar
|
||||
bzip2
|
||||
gzip
|
||||
xz
|
||||
zip
|
||||
unzip
|
||||
openssh
|
||||
dig
|
||||
bash
|
||||
usbutils
|
||||
psutils
|
||||
killall
|
||||
git
|
||||
curl
|
||||
];
|
||||
}
|
||||
]
|
||||
|
@@ -3,7 +3,8 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkDefault;
|
||||
in
|
||||
{
|
||||
|
@@ -40,7 +40,7 @@ in
|
||||
id = self.rev or self.dirtyRev;
|
||||
flakePath = self.outPath;
|
||||
inherit inputs;
|
||||
} // (if config.nixpkgs ? flake then { nixpkgs = config.nixpkgs.flake.source; } else {});
|
||||
} // (if config.nixpkgs ? flake then { nixpkgs = config.nixpkgs.flake.source; } else { });
|
||||
|
||||
vacu.nix.caches.nixcache-shelvacu = {
|
||||
url = "https://nixcache.shelvacu.com/";
|
||||
@@ -212,11 +212,17 @@ in
|
||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA6lX25mCy35tf1NpcHMAdeRgvT7l0Dw0FWBH3eX4TE2";
|
||||
};
|
||||
legtop = {
|
||||
extraHostNames = [ "lt" "legtop.t2d.lan" ];
|
||||
extraHostNames = [
|
||||
"lt"
|
||||
"legtop.t2d.lan"
|
||||
];
|
||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKvunOGsmHg8igMGo0FpoXaegYI20wZylG8nsMFY4+JL";
|
||||
};
|
||||
mmm = {
|
||||
extraHostNames = [ "mmm.t2d.lan" "10.78.79.11" ];
|
||||
extraHostNames = [
|
||||
"mmm.t2d.lan"
|
||||
"10.78.79.11"
|
||||
];
|
||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFsorkZ3rIZ2lLigwQWfA64xZRlt5lk6QPzypg55eLlD";
|
||||
};
|
||||
};
|
||||
|
@@ -115,7 +115,10 @@
|
||||
security.pki.certificates = config.vacu.rootCAs;
|
||||
|
||||
# commands.nix
|
||||
environment.pathsToLink = [ "/share/vacufuncs" "/etc/chromium" ];
|
||||
environment.pathsToLink = [
|
||||
"/share/vacufuncs"
|
||||
"/etc/chromium"
|
||||
];
|
||||
vacu.shell.functionsDir = "/run/current-system/sw/share/vacufuncs";
|
||||
programs.bash.interactiveShellInit = config.vacu.shell.interactiveLines;
|
||||
programs.bash.promptInit = lib.mkForce "";
|
||||
|
@@ -11,10 +11,7 @@ let
|
||||
enabledPkgs = builtins.map (o: o.package) enabledOptions;
|
||||
packagesSetType = types.attrsOf (
|
||||
types.submodule (
|
||||
{
|
||||
name,
|
||||
...
|
||||
}:
|
||||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
enable = mkOption {
|
||||
|
@@ -1,4 +1,3 @@
|
||||
|
||||
{
|
||||
# callPackage,
|
||||
fetchFromGitHub,
|
||||
@@ -49,7 +48,7 @@ stdenv.mkDerivation {
|
||||
rev = "v${version}";
|
||||
hash = "sha256-cIH3escLFMcHgtFxeSKIo5nZXvaknti+EVt72uB4XXc=";
|
||||
};
|
||||
|
||||
|
||||
buildInputs = [
|
||||
python3
|
||||
zlib
|
||||
@@ -58,7 +57,7 @@ stdenv.mkDerivation {
|
||||
SDL2
|
||||
hexdump
|
||||
];
|
||||
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# Normally there's no need to set TARGET_ARCH, but if we don't it adds -march=native which is impure
|
||||
|
77
flake.nix
77
flake.nix
@@ -101,21 +101,32 @@
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
mkNixosConfig = {
|
||||
unstable ? false,
|
||||
module,
|
||||
system ? "x86_64-linux",
|
||||
inp ? [],
|
||||
}: let
|
||||
suffix = if unstable then "-unstable" else "";
|
||||
nixpkgs = inputs.${"nixpkgs" + suffix};
|
||||
inp' = inp ++ [ "nix-search-cli" "nix-inspect" "nixvim" ];
|
||||
thisInputs = builtins.listToAttrs (map (name: lib.nameValuePair name inputs.${name + suffix}) inp');
|
||||
in nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inputs = thisInputs // {inherit (inputs) self;}; };
|
||||
inherit system;
|
||||
modules = [ module ];
|
||||
};
|
||||
mkNixosConfig =
|
||||
{
|
||||
unstable ? false,
|
||||
module,
|
||||
system ? "x86_64-linux",
|
||||
inp ? [ ],
|
||||
}:
|
||||
let
|
||||
suffix = if unstable then "-unstable" else "";
|
||||
nixpkgs = inputs.${"nixpkgs" + suffix};
|
||||
inp' = inp ++ [
|
||||
"nix-search-cli"
|
||||
"nix-inspect"
|
||||
"nixvim"
|
||||
];
|
||||
thisInputs = builtins.listToAttrs (map (name: lib.nameValuePair name inputs.${name + suffix}) inp');
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = thisInputs // {
|
||||
inherit (inputs) self;
|
||||
};
|
||||
};
|
||||
inherit system;
|
||||
modules = [ module ];
|
||||
};
|
||||
in
|
||||
{
|
||||
debug.isoDeriv = (
|
||||
@@ -123,9 +134,9 @@
|
||||
nixpkgs = ({ revCount = 0; } // inputs.nixpkgs);
|
||||
}
|
||||
);
|
||||
overlays.requireFileSub = (curr: prev: {
|
||||
requireFile = { ... }@args: (prev args).overrideAttrs { allowSubstitutes = true; };
|
||||
});
|
||||
overlays.requireFileSub = (
|
||||
curr: prev: { requireFile = { ... }@args: (prev args).overrideAttrs { allowSubstitutes = true; }; }
|
||||
);
|
||||
overlays.default = self.overlays.requireFileSub;
|
||||
nixosConfigurations = {
|
||||
triple-dezert = mkNixosConfig {
|
||||
@@ -147,12 +158,8 @@
|
||||
module = ./liam;
|
||||
inp = [ "sops-nix" ];
|
||||
};
|
||||
lp0 = mkNixosConfig {
|
||||
module = ./lp0;
|
||||
};
|
||||
shel-installer = mkNixosConfig {
|
||||
module = ./installer.nix;
|
||||
};
|
||||
lp0 = mkNixosConfig { module = ./lp0; };
|
||||
shel-installer = mkNixosConfig { module = ./installer.nix; };
|
||||
fw = mkNixosConfig {
|
||||
module = ./fw;
|
||||
inp = [ "nixos-hardware" ];
|
||||
@@ -173,7 +180,13 @@
|
||||
modules = [ ./nix-on-droid ];
|
||||
extraSpecialArgs = {
|
||||
inputs = {
|
||||
inherit (inputs) nixpkgs self nixvim nix-search-cli nix-inspect;
|
||||
inherit (inputs)
|
||||
nixpkgs
|
||||
self
|
||||
nixvim
|
||||
nix-search-cli
|
||||
nix-inspect
|
||||
;
|
||||
};
|
||||
};
|
||||
pkgs = import nixpkgs { system = "aarch64-linux"; };
|
||||
@@ -257,12 +270,20 @@
|
||||
sm64 = packages.sm64coopdx;
|
||||
ak = packages.authorizedKeys;
|
||||
|
||||
inherit (inputs.nixos-apple-silicon-unstable.packages.aarch64-linux) m1n1 uboot-asahi installer-bootstrap;
|
||||
installer-bootstrap-cross = inputs.nixos-apple-silicon-unstable.packages.x86_64-linux.installer-bootstrap;
|
||||
inherit (inputs.nixos-apple-silicon-unstable.packages.aarch64-linux)
|
||||
m1n1
|
||||
uboot-asahi
|
||||
installer-bootstrap
|
||||
;
|
||||
installer-bootstrap-cross =
|
||||
inputs.nixos-apple-silicon-unstable.packages.x86_64-linux.installer-bootstrap;
|
||||
}
|
||||
// packages;
|
||||
|
||||
brokenBuilds = [ "sm64coopdx-aarch64" "installer-bootstrap" ];
|
||||
brokenBuilds = [
|
||||
"sm64coopdx-aarch64"
|
||||
"installer-bootstrap"
|
||||
];
|
||||
|
||||
all =
|
||||
pkgs.runCommand "nix-stuff-all"
|
||||
|
@@ -3,7 +3,8 @@
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
version = "6.10.4";
|
||||
hash = "sha256:1y2m2pqrvsgr9ng72nnh4yvsprkvkznhnmn4p8g78350bzyrvip2";
|
||||
customKernel = pkgs.linux_6_10.override {
|
||||
@@ -15,8 +16,12 @@
|
||||
modDirVersion = lib.versions.pad 3 version;
|
||||
};
|
||||
customKernelPackages = pkgs.linuxPackagesFor customKernel;
|
||||
in {
|
||||
system.nixos.tags = ["EXPERIMENT" "kernel-${config.boot.kernelPackages.kernel.version}"];
|
||||
in
|
||||
{
|
||||
system.nixos.tags = [
|
||||
"EXPERIMENT"
|
||||
"kernel-${config.boot.kernelPackages.kernel.version}"
|
||||
];
|
||||
|
||||
boot.kernelPackages = lib.mkForce customKernelPackages;
|
||||
# boot.zfs.extraPools = lib.mkForce [];
|
||||
|
@@ -3,14 +3,15 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
in
|
||||
# latestCompatibleLinuxPackages = lib.pipe pkgs.linuxKernel.packages [
|
||||
# builtins.attrValues
|
||||
# (builtins.filter (kPkgs: (builtins.tryEval kPkgs).success && kPkgs ? kernel && kPkgs.kernel.pname == "linux" && kernelCompatible kPkgs.kernel))
|
||||
# (builtins.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)))
|
||||
# lib.last
|
||||
# ];
|
||||
in
|
||||
{
|
||||
boot.zfs.extraPools = [ "fw" ];
|
||||
# config.boot.zfs.package.latestCompatibleLinuxPackages is fucked, if there are multiple compatible linuxes of the same version, it picks effectively an arbitrary one
|
||||
|
@@ -1,8 +1,5 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../common/nixos.nix
|
||||
inputs.nixos-hardware.nixosModules.gpd-micropc
|
||||
|
@@ -1,25 +1,32 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e3aebf24-be76-4064-a9f5-3930c8cd1382";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/e3aebf24-be76-4064-a9f5-3930c8cd1382";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/7fd2ca2d-7faf-4d40-8cde-ce531fa679b5";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/4C47-D9A3";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/4C47-D9A3";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,5 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../common/nixos.nix
|
||||
inputs.nixos-apple-silicon.nixosModules.default
|
||||
@@ -12,6 +10,7 @@
|
||||
vacu.hostName = "mmm";
|
||||
vacu.shell.color = "red";
|
||||
vacu.verifySystem.enable = false;
|
||||
vacu.verifySystem.expectedMac = "14:98:77:3f:b8:2e";
|
||||
|
||||
# asahi recommends systemd-boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
@@ -1,37 +1,55 @@
|
||||
{ config, lib, pkgs, ... }: let
|
||||
btrfsopts = [ "noatime" "compress=zstd" ];
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
btrfsopts = [
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
];
|
||||
in
|
||||
{
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/2f8b5094-94ab-4634-b11b-d4bcd2dc3f24";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ] ++ btrfsopts;
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/2f8b5094-94ab-4634-b11b-d4bcd2dc3f24";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ] ++ btrfsopts;
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/4e75b9ed-ac4f-48a2-b38c-c5026723171f";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/4407-1EF3";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/4407-1EF3";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
fileSystems."/nix/store" =
|
||||
{ device = "/dev/disk/by-uuid/2f8b5094-94ab-4634-b11b-d4bcd2dc3f24";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix-store" ] ++ btrfsopts;
|
||||
};
|
||||
fileSystems."/nix/store" = {
|
||||
device = "/dev/disk/by-uuid/2f8b5094-94ab-4634-b11b-d4bcd2dc3f24";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix-store" ] ++ btrfsopts;
|
||||
};
|
||||
|
||||
fileSystems."/btrfs-root" = {
|
||||
device = "/dev/disk/by-uuid/2f8b5094-94ab-4634-b11b-d4bcd2dc3f24";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=/" "noauto" ] ++ btrfsopts;
|
||||
options = [
|
||||
"subvol=/"
|
||||
"noauto"
|
||||
] ++ btrfsopts;
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot.initrd.systemd.enable = true; #for tpm unlock
|
||||
boot.initrd.systemd.enable = true; # for tpm unlock
|
||||
vacu.packages = [ pkgs.tpm2-tss ];
|
||||
}
|
||||
|
Reference in New Issue
Block a user