From d51c120bc846383cf7a8f7f95446f5f58488ea75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Mon, 24 Jul 2023 06:29:51 +0000 Subject: [PATCH] feat(moto): tmux, hledger --- flake.lock | 41 +++------------------------------- flake.nix | 5 +++++ systems/moto/configuration.nix | 41 +++++++++++++++++++++++++--------- 3 files changed, 39 insertions(+), 48 deletions(-) diff --git a/flake.lock b/flake.lock index a4f789c..6ddc2f3 100644 --- a/flake.lock +++ b/flake.lock @@ -116,28 +116,6 @@ "type": "github" } }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nix-on-droid", - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1663932797, - "narHash": "sha256-IH8ZBW99W2k7wKLS+Sat9HiKX1TPZjFTnsPizK5crok=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "de3758e31a3a1bc79d569f5deb5dac39791bf9b6", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "menstruation-backend": { "inputs": { "flake-utils": [ @@ -215,7 +193,9 @@ }, "nix-on-droid": { "inputs": { - "home-manager": "home-manager_2", + "home-manager": [ + "home-manager" + ], "nix-formatter-pack": "nix-formatter-pack", "nixpkgs": [ "nixpkgs" @@ -595,21 +575,6 @@ "type": "github" } }, - "utils": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "voidrice": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 3cca5fa..ba35494 100644 --- a/flake.nix +++ b/flake.nix @@ -113,6 +113,11 @@ system = "aarch64-linux"; overlays = [nix-on-droid.overlays.default]; }; + extraSpecialArgs = { + niveumPackages = inputs.self.packages.aarch64-linux; + niveumLib = inputs.self.lib; + inherit inputs; + }; home-manager-path = home-manager.outPath; }; }; diff --git a/systems/moto/configuration.nix b/systems/moto/configuration.nix index e92ce38..3b8d382 100644 --- a/systems/moto/configuration.nix +++ b/systems/moto/configuration.nix @@ -1,25 +1,41 @@ { - config, - lib, pkgs, + niveumPackages, inputs, + ... }: let sshPort = 8022; in { environment.packages = with pkgs; [ - vim - openssh - curl - findutils + nil + bzip2 coreutils - utillinux + curl + diffutils + findutils + git gnugrep + gnupg gnused gnutar + gzip + hostname iproute2 - git - which + man + openssh procps + tzdata + unzip + utillinux + vim + which + xz + zip + hledger + hledger-ui + niveumPackages.vim + gitAndTools.gh + ripgrep (pkgs.writers.writeDashBin "start-ssh" '' ${pkgs.openssh}/bin/sshd -f ${pkgs.writeText "sshd_config" '' HostKey /data/data/com.termux.nix/files/home/.ssh/ssh_host_rsa_key @@ -28,16 +44,21 @@ in { '') ]; - nixPath = ["nixpkgs=${inputs.nixpkgs}"]; + nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"]; home-manager = { useGlobalPkgs = true; backupFileExtension = "hm-bak"; config = {pkgs, ...}: { home.stateVersion = "23.05"; + programs.tmux.enable = true; }; }; + environment.sessionVariables = { + LEDGER_FILE = "/data/data/com.termux.nix/files/home/src/ledger/privat.journal"; + }; + user.shell = "${pkgs.fish}/bin/fish"; environment.etcBackupExtension = ".bak";