From 5797f94fa225363fe41fa3ac1f20d4f657a5dc25 Mon Sep 17 00:00:00 2001 From: Bailey Stevens Date: Thu, 27 Jul 2023 15:24:32 -0400 Subject: [PATCH] Adds graphfix application. --- configuration.nix | 12 ++++--- flake.lock | 85 +++++++++++++++++++++++++++++++++++++++++++---- flake.nix | 22 +++++++----- 3 files changed, 100 insertions(+), 19 deletions(-) diff --git a/configuration.nix b/configuration.nix index 472da39..107862a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,15 +1,19 @@ {pkgs, ... }: { - boot.loader.raspberryPi = { - version = 3; - }; - + boot.loader.raspberryPi.version = 3; boot.initrd.kernelModules = [ "vc4" "bcm2835_dma" "i2c_bcm2835" ]; networking.hostName = "orange"; nixpkgs.hostPlatform.system = "aarch64-linux"; system.stateVersion = "23.05"; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + hardware.opengl.enable = true; + environment.systemPackages = with pkgs; [ + graphfix xorg.xauth xorg.xinit + ]; + users.users.root = { openssh.authorizedKeys.keyFiles = [ ./authorized_keys diff --git a/flake.lock b/flake.lock index 11279df..4aec70c 100644 --- a/flake.lock +++ b/flake.lock @@ -53,12 +53,15 @@ } }, "flake-utils_2": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -67,6 +70,45 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "graphfix": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690515455, + "narHash": "sha256-w3/DoZfCyRCIYHg2nmrVr3tCH8t0pJm5rHVQoRb6O/M=", + "ref": "refs/heads/main", + "rev": "01952f288fac16266c6a8e56150d4429d95b4100", + "revCount": 8, + "type": "git", + "url": "https://git.sr.ht/~mtxyz/graphfix" + }, + "original": { + "type": "git", + "url": "https://git.sr.ht/~mtxyz/graphfix" + } + }, "nixpkgs": { "locked": { "lastModified": 1683408522, @@ -85,11 +127,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1689680872, - "narHash": "sha256-brNix2+ihJSzCiKwLafbyejrHJZUP0Fy6z5+xMOC27M=", + "lastModified": 1690370995, + "narHash": "sha256-9z//23jGegLJrf3ITStLwVf715O39dq5u48Kr/XW14U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "08700de174bc6235043cb4263b643b721d936bdb", + "rev": "f3fbbc36b4e179a5985b9ab12624e9dfe7989341", "type": "github" }, "original": { @@ -103,6 +145,7 @@ "inputs": { "colmena": "colmena", "flake-utils": "flake-utils_2", + "graphfix": "graphfix", "nixpkgs": "nixpkgs_2" } }, @@ -121,6 +164,36 @@ "repo": "nixpkgs", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index cc8bdd1..3ea38bd 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,9 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; flake-utils.url = "github:numtide/flake-utils"; colmena.url = "github:zhaofengli/colmena"; + + graphfix.url = "git+https://git.sr.ht/~mtxyz/graphfix"; + graphfix.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs@{self, nixpkgs, flake-utils, ...}: @@ -41,12 +44,15 @@ -serial null \ -serial mon:stdio ''; - }) // rec { + }) // (let + pkgs = import nixpkgs { + system = "aarch64-linux"; + overlays = [ inputs.graphfix.overlay ]; + }; + in rec { colmena = { meta = { - nixpkgs = import nixpkgs { - system = "aarch64-linux"; - }; + nixpkgs = pkgs; }; orange = { imports = [ @@ -60,13 +66,11 @@ ./configuration.nix "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" { - sdImage = { - imageName = "orange.img"; - }; + nixpkgs.overlays = [inputs.graphfix.overlay]; + sdImage.imageName = "orange.img"; } - ]; }; image = nixosConfigurations.orange.config.system.build.sdImage; - }; + }); }