diff --git a/.gitignore b/.gitignore index 25e28f3..8147659 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ asahi* +.key diff --git a/common/base.nix b/common/base.nix index f19cf81..ed85e62 100644 --- a/common/base.nix +++ b/common/base.nix @@ -9,6 +9,13 @@ settings = { auto-optimise-store = true; trusted-users = [ "root" "@wheel" ]; + substituters = [ + "https://binarycache.ivabus.dev/public" # Yep, only public one here :) + "https://cache.nixos.org" + ]; + trusted-public-keys = [ + "public:9k8+78y5+1rICy+9e4raIiLP/dKDEvm9dyjj27vPS04=" + ]; }; gc = { automatic = true; @@ -39,4 +46,4 @@ ]; boot.tmp.cleanOnBoot = true; -} \ No newline at end of file +} diff --git a/common/user.nix b/common/user.nix index 3e684cd..ee645d6 100644 --- a/common/user.nix +++ b/common/user.nix @@ -16,6 +16,7 @@ in rec { cargo rustc neofetch # I use NixOS BTW + duf htop ]; shell = pkgs.zsh; diff --git a/flake.lock b/flake.lock index 9d78871..4a79430 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1692423274, - "narHash": "sha256-r84qq3YWbDtISIFh9tfNtmqVfBUYrhvIgE/Ivk+1F6Y=", + "lastModified": 1693064156, + "narHash": "sha256-EnZntHnlPqWZIoa593zDV4GSkfbLLAL6VAreMvM6JN4=", "owner": "tpwrules", "repo": "nixos-apple-silicon", - "rev": "5e5a0933387f914f2ad7033f2afbc8a074b9480b", + "rev": "bef25f9cdfd8513a42c175b88a1cb619e3ef5951", "type": "github" }, "original": { @@ -42,11 +42,11 @@ ] }, "locked": { - "lastModified": 1692503956, - "narHash": "sha256-MOA6FKc1YgfGP3ESnjSYfsyJ1BXlwV5pGlY/u5XdJfY=", + "lastModified": 1693399033, + "narHash": "sha256-yXhiMo8MnE86sGtPIHAKaLHhmhe8v9tqGGotlUgKJvY=", "owner": "nix-community", "repo": "home-manager", - "rev": "958c06303f43cf0625694326b7f7e5475b1a2d5c", + "rev": "f5c15668f9842dd4d5430787d6aa8a28a07f7c10", "type": "github" }, "original": { @@ -57,27 +57,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1692264070, - "narHash": "sha256-WepAkIL2UcHOj7JJiaFS/vxrA9lklQHv8p+xGL+7oQ0=", + "lastModified": 1692913444, + "narHash": "sha256-1SvMQm2DwofNxXVtNWWtIcTh7GctEVrS/Xel/mdc6iY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "42c25608aa2ad4e5d3716d8d63c606063513ba33", + "rev": "18324978d632ffc55ef1d928e81630c620f4f447", "type": "github" }, "original": { "owner": "nixos", "repo": "nixpkgs", - "rev": "42c25608aa2ad4e5d3716d8d63c606063513ba33", + "rev": "18324978d632ffc55ef1d928e81630c620f4f447", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1692447944, - "narHash": "sha256-fkJGNjEmTPvqBs215EQU4r9ivecV5Qge5cF/QDLVn3U=", + "lastModified": 1693377291, + "narHash": "sha256-vYGY9bnqEeIncNarDZYhm6KdLKgXMS+HA2mTRaWEc80=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d680ded26da5cf104dd2735a51e88d2d8f487b4d", + "rev": "e7f38be3775bab9659575f192ece011c033655f0", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index aa5b74d..a1c5fde 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,16 @@ ]; }; + # Raspberry Pi 4B 2GB RAM + nixosConfigurations."rubusidaeus" = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" + home-manager.nixosModules.home-manager + ./machines/rubusidaeus + ]; + }; + /* These machines will be configured later. */ /* # Effundam = MacBook Air M1 (server usage). Will not be added to flake.nix until thunderbolt and apfs proper support diff --git a/machines/celerrime/default.nix b/machines/celerrime/default.nix index 8efdd22..89b32d2 100644 --- a/machines/celerrime/default.nix +++ b/machines/celerrime/default.nix @@ -7,7 +7,7 @@ in { ./hardware.nix my.modules ]; - + networking.hostName = "celerrime"; boot.loader.systemd-boot.enable = true; diff --git a/machines/rubusidaeus/default.nix b/machines/rubusidaeus/default.nix new file mode 100644 index 0000000..498a57f --- /dev/null +++ b/machines/rubusidaeus/default.nix @@ -0,0 +1,59 @@ + +{ config, pkgs, lib, ... }: + +let + my = import ../..; + overlay = final: super: { + makeModulesClosure = x: + super.makeModulesClosure (x // { allowMissing = true; }); + }; +in { + imports = [ + # Not using ./hardware.nix as additional hardware file due to generation of images that doesn't change between installations. Maybe I should create dedicated raspberry.nix for all raspberry pies. + my.modules + ]; + + boot = { + kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; + initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ]; + loader = { + grub.enable = false; + generic-extlinux-compatible.enable = true; + }; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + options = [ "noatime" ]; + }; + }; + + sdImage.compressImage = false; + + networking.hostName = "rubusidaeus"; + + my.laptop.enable = false; + my.roles = { + design.enable = false; + devel.enable = false; + gaming.enable = false; + graphical.enable = false; + latex.enable = false; + media-client.enable = false; + torrent.enable = false; + virtualisation.enable = false; + yggdrasil-client.enable = true; + }; + + # Augghhh + + nixpkgs.overlays = [ overlay ]; + + networking.useDHCP = true; + + hardware.enableRedistributableFirmware = true; + system.stateVersion = "23.05"; +} + diff --git a/roles/devel.nix b/roles/devel.nix index 2db5e75..0b63d9e 100644 --- a/roles/devel.nix +++ b/roles/devel.nix @@ -25,6 +25,7 @@ in { } # Architecture-specific packages and configuration (lib.mkIf (!pkgs.stdenv.isAarch64) {boot.binfmt.emulatedSystems = [ "aarch64-linux" ];}) + (lib.mkIf (!pkgs.stdenv.isAarch32) {boot.binfmt.emulatedSystems = [ "armv6l-linux" ];}) (lib.mkIf (!pkgs.stdenv.isx86_64) {boot.binfmt.emulatedSystems = [ "x86_64-linux" "i686-linux" ];}) # Remove CLion from builds while I'm semi-online # Install CLion only if we are on x86_64 @@ -40,4 +41,4 @@ in { ]; }) ]); -} \ No newline at end of file +}