feat(flake): add initial nix-on-droid configuration

This commit is contained in:
ooks-io 2024-04-20 19:26:41 +12:00
parent e07a71f46b
commit efd944cfef
2 changed files with 62 additions and 1 deletions

View file

@ -6,6 +6,12 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-on-droid = {
url = "github:nix-community/nix-on-droid/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
hardware.url = "github:nixos/nixos-hardware"; hardware.url = "github:nixos/nixos-hardware";
nix-colors.url = "github:misterio77/nix-colors"; nix-colors.url = "github:misterio77/nix-colors";
@ -83,7 +89,7 @@
}; };
outputs = { self, nixpkgs, home-manager, ... }@inputs: outputs = { self, nixpkgs, home-manager, nix-on-droid, ... }@inputs:
let let
inherit (self) outputs; inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib; lib = nixpkgs.lib // home-manager.lib;
@ -151,5 +157,14 @@
extraSpecialArgs = { inherit inputs outputs; }; extraSpecialArgs = { inherit inputs outputs; };
}; };
}; };
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [ ./system/hosts/ooksphone ];
extraSpecialArgs = { inherit inputs outputs; };
pkgs = import nixpkgs {
system = "aarch64-linux";
overlays = [ nix-on-droid.overlays.default ];
};
home-manager-path = home-manager.outPath;
};
}; };
} }

View file

@ -0,0 +1,46 @@
{ config, lib, pkgs, ... }:
{
# Simply install just the packages
environment.packages = with pkgs; [
# User-facing stuff that you really really want to have
helix # or some other editor, e.g. nano or neovim
git
killall
hostname
man
coreutils
];
environment.etcBackupExtension = ".bak";
system.stateVersion = "23.11";
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
time.timeZone = "Pacific/Auckland";
user = {
userName = "ooks";
home = "/data/data/com.termux.nix/files/ooks/home";
shell = "${pkgs.fish}/bin/fish";
};
# Configure home-manager
home-manager = {
backupFileExtension = "hm-bak";
useGlobalPkgs = true;
config =
{ config, lib, pkgs, ... }:
{
imports = [ ../../../home/modules/console/editor ];
homeModules.home.console.editor.helix.enable = true;
home.stateVersion = "23.11";
};
};
}