From e49f5d5455e047b3f58aaa181c06b30cef8ec199 Mon Sep 17 00:00:00 2001 From: osbm Date: Tue, 14 Jan 2025 23:58:39 +0300 Subject: [PATCH] damn rpi --- flake.nix | 34 +++++++--- hosts/pochita/configuration.nix | 117 ++++---------------------------- 2 files changed, 36 insertions(+), 115 deletions(-) diff --git a/flake.nix b/flake.nix index d88776d..42b6ae3 100644 --- a/flake.nix +++ b/flake.nix @@ -95,16 +95,30 @@ } ]; }; - # pochita = nixpkgs.lib.nixosSystem rec { - # system = "aarch64-linux"; - # modules = [ - # ./hosts/pochita/configuration.nix - # agenix.nixosModules.default - # raspberry-pi-nix.nixosModules.raspberry-pi - # nixos-hardware.nixosModules.raspberry-pi-5 - # vscode-server.nixosModules.default - # ]; - # }; + pochita = nixpkgs.lib.nixosSystem rec { + system = "aarch64-linux"; + modules = [ + ./hosts/pochita/configuration.nix + raspberry-pi-nix.nixosModules.raspberry-pi + vscode-server.nixosModules.default + agenix.nixosModules.default + home-manager.nixosModules.home-manager + { + environment.systemPackages = [ + agenix.packages.${system}.default + osbm-nvim.packages.${system}.default + ]; + } + ]; + }; + pochita-sd = nixpkgs.lib.nixosSystem rec { + system = "aarch64-linux"; + modules = [ + ./hosts/pochita-sd/configuration.nix + raspberry-pi-nix.nixosModules.raspberry-pi + raspberry-pi-nix.nixosModules.sd-image + ]; + }; }; homeConfigurations = { # doesnt work because my different systems have different stateVersions diff --git a/hosts/pochita/configuration.nix b/hosts/pochita/configuration.nix index ed588c1..4bd79be 100644 --- a/hosts/pochita/configuration.nix +++ b/hosts/pochita/configuration.nix @@ -16,26 +16,6 @@ in { blockYoutube = false; blockTwitter = false; - # Comment this line if you want a recent kernel, but - # if it's not in the community cache the builder will compile it - # boot.kernelPackages = lib.mkForce pkgs.linuxKernel.packages.linux_rpi4; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = lib.mkForce "fr"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - - security.sudo.wheelNeedsPassword = false; - - # # Initial network configuration - # networking = { - # hostName = "pixos"; - # useDHCP = false; - # interfaces = { - # wlan0.useDHCP = false; - # eth0.useDHCP = true; - # }; - # }; networking.networkmanager.ensureProfiles = { environmentFiles = [ config.age.secrets.nm-secrets.path @@ -103,91 +83,6 @@ in { # keep-derivations = true; # }; - # The board and wanted kernel version - raspberry-pi-nix = { - board = "bcm2712"; - #kernel-version = "v6_10_12"; - }; - - # PI Hardware configuration - hardware = { - bluetooth.enable = true; - raspberry-pi = { - config = { - all = { - base-dt-params = { - BOOT_UART = { - enable = false; - value = 1; - }; - uart_2ndstage = { - enable = false; - value = 1; - }; - audio = { - enable = true; - value = "off"; - }; - sd_poll_once = { - enable = true; - }; - - # NVME disk access - #pciex1 = { - # enable = true; - #}; - #pciex1_gen = { - # enable = true; - # value = 3; - #}; - #nvme = { - # enable = true; - #}; - }; - dt-overlays = { - vc4-kms-v3d-pi5 = { - enable = true; - params = {}; - }; - }; - options = { - hdmi_blanking = { - enable = true; - value = 1; - }; - disable_overscan = { - enable = true; - value = 1; - }; - gpu_mem_256 = { - enable = true; - value = 76; - }; - gpu_mem_512 = { - enable = true; - value = 76; - }; - gpu_mem_1024 = { - enable = true; - value = 76; - }; - disable_splash = { - enable = true; - value = 1; - }; - temp_limit = { - enable = true; - value = 75; - }; - initial_turbo = { - enable = true; - value = 20; - }; - }; - }; - }; - }; - }; # You can put another features here, for example: #security.rtkit.enable = true; @@ -197,7 +92,19 @@ in { # alsa.support32Bit = true; # pulse.enable = true; #}; + security.sudo = { + enable = true; + wheelNeedsPassword = false; + }; + + services.getty.autologinUser = "osbm"; + networking.hostname = "pochita"; + # The board and wanted kernel version + raspberry-pi-nix = { + board = "bcm2712"; + #kernel-version = "v6_10_12"; + }; # DO NOT TOUCH THIS system.stateVersion = stateVersion;