feat: Rename device

This commit is contained in:
uttarayan21
2025-06-24 23:02:43 +05:30
parent de0dc86f88
commit ee39546c04
4 changed files with 55 additions and 5 deletions

View File

@@ -0,0 +1,48 @@
{
config,
pkgs,
lib,
...
}: {
nix = {
settings = {
auto-optimise-store = true;
extra-experimental-features = "nix-command flakes auto-allocate-uids";
trusted-users = ["root" "fs0c131y" "remotebuilder"];
substituters = [
"https://nix-community.cachix.org"
# "https://sh.darksailor.dev"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "mirai:bcVPoFGBZ0i7JAKMXIqLj2GY3CulLC4kP7rQyqes1RM="
];
};
extraOptions = ''
build-users-group = nixbld
extra-nix-path = nixpkgs=flake:nixpkgs
builders-use-substitutes = true
secret-key-files = ${config.sops.secrets."builder/mirai/cache/private".path}
'';
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 5d";
};
package = pkgs.nixVersions.latest;
distributedBuilds = true;
buildMachines = [
../../builders/mirai.nix
../../builders/shiro.nix
../../builders/tsuba.nix
];
};
users.users.servius = {
isNormalUser = true;
extraGroups = ["wheel"];
openssh.authorizedKeys.keyFiles = [
../../secrets/id_ed25519.pub
../../secrets/id_ios.pub
];
};
}

45
nixos/tsuba/default.nix Normal file
View File

@@ -0,0 +1,45 @@
{
nixpkgs,
devices,
inputs,
overlays,
home-manager,
nur,
nixos-rpi,
...
}: (builtins.mapAttrs (
name: device:
nixos-rpi.lib.nixosSystemFull {
inherit nixpkgs;
system = device.system;
specialArgs = {
inherit device;
stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system};
};
modules = [
{
imports = with nixos-rpi.nixosModules; [
nixos-raspberrypi.lib.inject-overlays
raspberry-pi-5.base
raspberry-pi-5.display-vc4
raspberry-pi-5.bluetooth
trusted-nix-caches
nixpkgs-rpi
nixos-raspberrypi.lib.inject-overlays-global
];
networking.hostName = name;
}
./configuration.nix
./${name}.nix
{nixpkgs.overlays = overlays;}
nur.modules.nixos.default
inputs.sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
inputs.arion.nixosModules.arion
{
nixpkgs.config.allowUnfree = true;
}
];
}
)
devices)

33
nixos/tsuba/tsuba.nix Normal file
View File

@@ -0,0 +1,33 @@
{
config,
pkgs,
lib,
...
}: {
# networking.hostName = "tsuba";
networking.filrewall.logRefusedConnections = lib.mkDefault false;
networking.useNetworkd = true;
systemd.services.NetworkManager-wait-online.enable = false;
systemd.network.wait-online.enable = false;
system.nixos.tags = let
cfg = config.boot.loader.raspberryPi;
in [
"raspberry-pi-${cfg.variant}"
cfg.bootloader
config.boot.kernelPackages.kernel.version
];
hardware.raspberry-pi.config = {
dtparam = "audio=on";
camera_auto_detect = 0;
display_auto_detect = 0;
auto_initramfs = 1;
disable_fw_kms_setup = 1;
arm_boost = 1;
arm_64bit = 1;
all = {
usb_max_current_enable = 1;
};
};
}