Compare commits
2 commits
019781e6c6
...
b6117d062b
| Author | SHA1 | Date | |
|---|---|---|---|
| b6117d062b | |||
| ad5107997b |
4 changed files with 162 additions and 9 deletions
103
flake.lock
generated
103
flake.lock
generated
|
|
@ -33,6 +33,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"argononed": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1729566243,
|
||||
"narHash": "sha256-DPNI0Dpk5aym3Baf5UbEe5GENDrSmmXVdriRSWE+rgk=",
|
||||
"owner": "nvmd",
|
||||
"repo": "argononed",
|
||||
"rev": "16dbee54d49b66d5654d228d1061246b440ef7cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvmd",
|
||||
"repo": "argononed",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"brew-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
@ -66,6 +82,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"locked": {
|
||||
"lastModified": 1767039857,
|
||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
|
|
@ -594,6 +625,76 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1791721963,
|
||||
"narHash": "sha256-BYhx89XJltnRyQeuDKHVL5eSqbbfAcOKuDts7QRsrxQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "60a624466c08787ee8303393b7d4752d1826f14f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-images": {
|
||||
"inputs": {
|
||||
"nixos-stable": [
|
||||
"nixos-raspberrypi",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixos-unstable": [
|
||||
"nixos-raspberrypi",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747747741,
|
||||
"narHash": "sha256-LUOH27unNWbGTvZFitHonraNx0JF/55h30r9WxqrznM=",
|
||||
"owner": "nvmd",
|
||||
"repo": "nixos-images",
|
||||
"rev": "cbbd6db325775096680b65e2a32fb6187c09bbb4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvmd",
|
||||
"ref": "sdimage-installer",
|
||||
"repo": "nixos-images",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-raspberrypi": {
|
||||
"inputs": {
|
||||
"argononed": "argononed",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixos-images": "nixos-images",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1785596452,
|
||||
"narHash": "sha256-KT/OleUMpSKsWgi0eTuqS/0GD4ucPQcvLgmvlw8ZuCM=",
|
||||
"owner": "nvmd",
|
||||
"repo": "nixos-raspberrypi",
|
||||
"rev": "7e39508bcf9c1da82cf11c1e22f74f9d9fd0fe10",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvmd",
|
||||
"ref": "main",
|
||||
"repo": "nixos-raspberrypi",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1790822859,
|
||||
|
|
@ -679,6 +780,8 @@
|
|||
"hyprland-plugins": "hyprland-plugins",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-homebrew": "nix-homebrew",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixos-raspberrypi": "nixos-raspberrypi",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nur": "nur",
|
||||
"secrets": "secrets",
|
||||
|
|
|
|||
15
flake.nix
15
flake.nix
|
|
@ -3,7 +3,11 @@
|
|||
|
||||
inputs = {
|
||||
# Nix main stuff
|
||||
nixpkgs = { url = "github:nixos/nixpkgs/nixos-26.05"; };
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nixos-hardware = {
|
||||
url = "github:NixOS/nixos-hardware";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nur = {
|
||||
url = "github:nix-community/NUR";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -48,6 +52,10 @@
|
|||
url = "github:zjeffer/split-monitor-workspaces";
|
||||
flake = false;
|
||||
};
|
||||
nixos-raspberrypi = {
|
||||
url = "github:nvmd/nixos-raspberrypi/main";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# secrets
|
||||
sops-nix = {
|
||||
|
|
@ -60,7 +68,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nix-darwin, home-manager, ... } @ inputs:
|
||||
outputs = { self, nixpkgs, nix-darwin, nixos-raspberrypi, home-manager, ... } @ inputs:
|
||||
let
|
||||
blades = import ./hosts/servers/blades/systems.nix { inherit inputs; };
|
||||
in
|
||||
|
|
@ -75,10 +83,11 @@
|
|||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
iris = nixpkgs.lib.nixosSystem {
|
||||
iris = nixos-raspberrypi.lib.nixosSystem {
|
||||
modules = [
|
||||
./hosts/base.nix
|
||||
./hosts/servers/iris
|
||||
nixos-raspberrypi.nixosModules.raspberry-pi-3.base
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
cores = 6;
|
||||
};
|
||||
};
|
||||
systems = [ "aarch64-linux" ];
|
||||
};
|
||||
|
||||
# Necessary for using flakes on this system.
|
||||
|
|
|
|||
|
|
@ -8,24 +8,64 @@
|
|||
|
||||
networking.hostName = "iris";
|
||||
|
||||
system.nixos.tags = let
|
||||
cfg = config.boot.loader.raspberry-pi;
|
||||
in [
|
||||
"raspberry-pi-${cfg.variant}"
|
||||
cfg.bootloader
|
||||
config.boot.kernelPackages.kernel.version
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.loader.raspberry-pi.bootloader = "kernel";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
swiftpm
|
||||
(python3.withPackages (ps: with ps; [ gpiozero rpi-gpio ]))
|
||||
];
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP="gpio", MODE="0660"
|
||||
SUBSYSTEM=="gpiomem", GROUP="gpio", MODE="0660"
|
||||
'';
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nixos-raspberrypi.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI="
|
||||
];
|
||||
};
|
||||
|
||||
users.groups.gpio = {};
|
||||
users.users.nyxerinys.extraGroups = [ "gpio" ];
|
||||
|
||||
boot.supportedFilesystems.zfs = false;
|
||||
boot.initrd.availableKernelModules = [ "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
fileSystems."/boot/firmware" = {
|
||||
device = "/dev/disk/by-label/FIRMWARE";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"nofail"
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
"flush"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/swapfile";
|
||||
size = 8 * 1024; # Adjust size in MiB as needed
|
||||
}];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue