pi4 argononed

This commit is contained in:
2025-05-19 15:47:39 -05:00
parent 0d1cdfd82d
commit 8b5124aed4
5 changed files with 75 additions and 23 deletions

13
flake.lock generated
View File

@@ -1239,18 +1239,6 @@
"type": "github" "type": "github"
} }
}, },
"pi4-argononed": {
"flake": false,
"locked": {
"path": "gitlab:/DarkElvenAngel/argononed/-/tree/master/OS/nixos",
"type": "path"
},
"original": {
"path": "gitlab:/DarkElvenAngel/argononed/-/tree/master/OS/nixos",
"type": "path"
},
"parent": []
},
"pi4-disko": { "pi4-disko": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1621,7 +1609,6 @@
"nixos-raspberrypi": "nixos-raspberrypi", "nixos-raspberrypi": "nixos-raspberrypi",
"nixpkgs-stable": "nixpkgs-stable_4", "nixpkgs-stable": "nixpkgs-stable_4",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"pi4-argononed": "pi4-argononed",
"pi4-disko": "pi4-disko", "pi4-disko": "pi4-disko",
"pi4-home-manager": "pi4-home-manager", "pi4-home-manager": "pi4-home-manager",
"pi4-impermanence": "pi4-impermanence", "pi4-impermanence": "pi4-impermanence",

View File

@@ -186,11 +186,6 @@
inputs.nixpkgs.follows = "pi4-nixpkgs"; inputs.nixpkgs.follows = "pi4-nixpkgs";
}; };
pi4-argononed = {
url = "gitlab:/DarkElvenAngel/argononed/-/tree/master/OS/nixos";
flake = false;
};
##################################################### #####################################################
# Steamdeck # # Steamdeck #
##################################################### #####################################################
@@ -311,7 +306,6 @@
pi4-nixos-hardware, pi4-nixos-hardware,
pi4-nixos-raspberrypi, pi4-nixos-raspberrypi,
pi4-disko, pi4-disko,
pi4-argononed,
# Steamdeck # Steamdeck
steamdeck-nixpkgs, steamdeck-nixpkgs,

View File

@@ -1,6 +1,19 @@
{ argononed, ...}: #{ pkgs, ... }:
#let
# argononed = pkgs.callPackage ./pkg.nix {};
#in
#{
# environment.systemPackages = [ argononed ];
#}
{ lib, stdenv, pkgs, config, ...}:
{ {
imports = [ "${argononed}/OS/nixos" ]; imports = let
argononed = fetchGit {
url = "https://github.com/mjallen18/argononed.git";
ref = "dev"; # Or any other branches deemed suitable
};
in
[ "${argononed}/OS/nixos" ];
services.argonone = { services.argonone = {
enable = true; enable = true;
@@ -12,4 +25,4 @@
hysteresis = 4; hysteresis = 4;
}; };
}; };
} }

58
hosts/pi4/pkg.nix Normal file
View File

@@ -0,0 +1,58 @@
{ lib, stdenv, fetchFromGitHub, nix-gitignore, dtc, installShellFiles, logLevel ? 5, ... }:
let
rawSrc = fetchFromGitHub {
owner = "mjallen18";
repo = "argononed";
rev = "master"; # replace with actual commit or tag
sha256 = "sha256-PpFR+6Aa4Pz9EmxOayMSsSTKFzUR6sYIAkGZ8+SUK18="; # fill this in with actual hash
};
ignores = ''
/*
!/version
!/makefile
!/configure
!/src
!/OS
/OS/*
!/OS/_common/
!/OS/nixos/
'';
cleanSrc = nix-gitignore.gitignoreSourcePure ignores rawSrc;
in
stdenv.mkDerivation {
pname = "argononed";
version = lib.strings.fileContents "${cleanSrc}/version";
src = cleanSrc;
nativeBuildInputs = [ dtc installShellFiles ];
preConfigure = ''
patchShebangs --build ./configure
export TARGET_DISTRO=nixos
'';
patches = [
"${cleanSrc}/OS/nixos/patches/nixos.patch"
"${cleanSrc}/OS/nixos/patches/shutdown.patch"
];
buildFlags = [ "LOGLEVEL=${toString logLevel}" ];
installFlags = [ "NIX_DRVOUT=$(out)" ];
postInstall = ''
installShellCompletion --bash --name argonone-cli OS/_common/argonone-cli-complete.bash
'';
meta = {
description = "A replacement daemon for the Argon One Raspberry Pi case";
homepage = "https://gitlab.com/DarkElvenAngel/argononed";
license = lib.licenses.mit;
platforms = [ "aarch64-linux" ];
};
}

View File

@@ -5,7 +5,7 @@ in
{ {
sops = { sops = {
defaultSopsFile = ../../secrets/secrets.yaml; defaultSopsFile = ../../secrets/secrets.yaml;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; age.keyFile = /home/matt/.config/sops/age/keys.txt;
# ------------------------------ # ------------------------------
# Secrets # Secrets