From e5e845e20ff3fc3e687bf2cab16d013ff2605a33 Mon Sep 17 00:00:00 2001 From: Alexander Kobjolke Date: Tue, 28 Mar 2023 02:10:29 +0200 Subject: [PATCH] redmi: Add nix-on-droid config --- flake.lock | 152 +++++++++++++++++++++++++++++++++++++++- flake.nix | 12 ++++ hosts/redmi/default.nix | 45 ++++++++++++ 3 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 hosts/redmi/default.nix diff --git a/flake.lock b/flake.lock index 11a8f76..24ce5ed 100644 --- a/flake.lock +++ b/flake.lock @@ -116,6 +116,76 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nix-on-droid", + "nixpkgs" + ], + "utils": "utils_2" + }, + "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" + } + }, + "nix-formatter-pack": { + "inputs": { + "nixpkgs": [ + "nix-on-droid", + "nixpkgs" + ], + "nmd": "nmd", + "nmt": "nmt" + }, + "locked": { + "lastModified": 1666720474, + "narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=", + "owner": "Gerschtli", + "repo": "nix-formatter-pack", + "rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5", + "type": "github" + }, + "original": { + "owner": "Gerschtli", + "repo": "nix-formatter-pack", + "type": "github" + } + }, + "nix-on-droid": { + "inputs": { + "home-manager": "home-manager_2", + "nix-formatter-pack": "nix-formatter-pack", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap", + "nmd": "nmd_2" + }, + "locked": { + "lastModified": 1670198918, + "narHash": "sha256-oNlUhAM0/a3pDdCMmBWA+CLrDAIYJqAAMyrDp8fNSM4=", + "owner": "t184256", + "repo": "nix-on-droid", + "rev": "b00cb5e7e2a47d85a019119069b153cda4002d0a", + "type": "github" + }, + "original": { + "owner": "t184256", + "ref": "release-22.11", + "repo": "nix-on-droid", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1678703398, @@ -132,6 +202,22 @@ "type": "github" } }, + "nixpkgs-for-bootstrap": { + "locked": { + "lastModified": 1669834992, + "narHash": "sha256-YnhZGHgb4C3Q7DSGisO/stc50jFb9F/MzHeKS4giotg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "596a8e828c5dfa504f91918d0fa4152db3ab5502", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "596a8e828c5dfa504f91918d0fa4152db3ab5502", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { "lastModified": 1678654296, @@ -163,11 +249,60 @@ "type": "indirect" } }, + "nmd": { + "flake": false, + "locked": { + "lastModified": 1666190571, + "narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=", + "owner": "rycee", + "repo": "nmd", + "rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169", + "type": "gitlab" + }, + "original": { + "owner": "rycee", + "repo": "nmd", + "type": "gitlab" + } + }, + "nmd_2": { + "flake": false, + "locked": { + "lastModified": 1666190571, + "narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=", + "owner": "rycee", + "repo": "nmd", + "rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169", + "type": "gitlab" + }, + "original": { + "owner": "rycee", + "repo": "nmd", + "type": "gitlab" + } + }, + "nmt": { + "flake": false, + "locked": { + "lastModified": 1648075362, + "narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=", + "owner": "rycee", + "repo": "nmt", + "rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae", + "type": "gitlab" + }, + "original": { + "owner": "rycee", + "repo": "nmt", + "type": "gitlab" + } + }, "root": { "inputs": { "agenix": "agenix", "emacs": "emacs", "home-manager": "home-manager", + "nix-on-droid": "nix-on-droid", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "snm": "snm" @@ -180,7 +315,7 @@ "nixpkgs-22_11": [ "nixpkgs" ], - "utils": "utils_2" + "utils": "utils_3" }, "locked": { "lastModified": 1671659164, @@ -213,6 +348,21 @@ } }, "utils_2": { + "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" + } + }, + "utils_3": { "locked": { "lastModified": 1605370193, "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", diff --git a/flake.nix b/flake.nix index 6faf123..8a5a182 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,11 @@ inputs.nixpkgs-22_11.follows = "nixpkgs"; }; + nix-on-droid = { + url = "github:t184256/nix-on-droid/release-22.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + emacs = { url = "github:nix-community/emacs-overlay"; inputs.nixpkgs.follows = "nixpkgs"; @@ -56,5 +61,12 @@ nixosConfigurations."dregil" = import ./hosts/dregil { inherit inputs; }; homeConfigurations = import ./outputs/homeConfigurations inputs; + + nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration { + modules = [ + ./hosts/redmi + { nix.registry.nixpkgs.flake = nixpkgs; } { nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; } + ]; + }; }; } diff --git a/hosts/redmi/default.nix b/hosts/redmi/default.nix new file mode 100644 index 0000000..9f607a0 --- /dev/null +++ b/hosts/redmi/default.nix @@ -0,0 +1,45 @@ +{ config, lib, pkgs, ... }: + +{ + # Simply install just the packages + environment.packages = with pkgs; [ + # User-facing stuff that you really really want to have + vim # or some other editor, e.g. nano or neovim + + git + mosh + openssh + wget + + # Some common stuff that people expect to have + #diffutils + #findutils + #utillinux + #tzdata + #hostname + #man + #gnugrep + #gnupg + #gnused + gnutar + #bzip2 + gzip + #xz + #zip + #unzip + ]; + + # Backup etc files instead of failing to activate generation if a file already exists in /etc + environment.etcBackupExtension = ".bak"; + + # Read the changelog before changing this value + system.stateVersion = "22.11"; + + # Set up nix for flakes + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # Set your time zone + time.timeZone = "Europe/Berlin"; +}