Factor out non-linux-specific utilities

This commit is contained in:
Nathan McCarty 2022-09-04 02:32:49 -04:00
parent 9536d51651
commit 87ed166256
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
6 changed files with 102 additions and 6 deletions

View File

@ -283,6 +283,21 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": {
"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"
}
},
"format-all": { "format-all": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -483,6 +498,30 @@
"type": "github" "type": "github"
} }
}, },
"nix-on-droid": {
"inputs": {
"flake-utils": "flake-utils_3",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1658777837,
"narHash": "sha256-12rIm639nXldGgyc1uPbF/oz2jTrpgl8zvqxrIq+Jek=",
"owner": "t184256",
"repo": "nix-on-droid",
"rev": "d49fd3a0c874d34a3c3f33fa73cd7a364a1332e3",
"type": "github"
},
"original": {
"owner": "t184256",
"repo": "nix-on-droid",
"type": "github"
}
},
"nix-straight": { "nix-straight": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -780,6 +819,7 @@
"java": "java", "java": "java",
"mozilla": "mozilla", "mozilla": "mozilla",
"nix-doom-emacs": "nix-doom-emacs", "nix-doom-emacs": "nix-doom-emacs",
"nix-on-droid": "nix-on-droid",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable_2", "nixpkgs-unstable": "nixpkgs-unstable_2",
@ -939,7 +979,7 @@
"wsl": { "wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_4",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]

View File

@ -57,6 +57,13 @@
url = "github:nathans-flakes/gamescope"; url = "github:nathans-flakes/gamescope";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-on-droid = {
url = "github:t184256/nix-on-droid";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
}; };
outputs = outputs =
@ -76,6 +83,7 @@
, nixos-generators , nixos-generators
, wsl , wsl
, gamescope , gamescope
, nix-on-droid
}@inputs: }@inputs:
let let
makeNixosSystem = { system, hostName, extraModules ? [ ], ourNixpkgs ? nixpkgs }: ourNixpkgs.lib.nixosSystem { makeNixosSystem = { system, hostName, extraModules ? [ ], ourNixpkgs ? nixpkgs }: ourNixpkgs.lib.nixosSystem {
@ -156,6 +164,13 @@
]; ];
}; };
}; };
# Android systems
nixOnDroidConfigurations = {
tablet = nix-on-droid.lib.nixOnDroidConfiguration {
config = ./machines/tablet/configuration.nix;
system = "aarch64-linux";
};
};
packages = { packages = {
x86_64-linux = { x86_64-linux = {
# Hyper-V image # Hyper-V image

View File

@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
{
}

View File

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
let
nathan = config.nathan;
in
with lib;
{
config = mkMerge [
(mkIf nathan.programs.utils.core
{
environment.systemPackages = with pkgs; [
# Basic command line utilities
wget
tmux
nano
unzip
any-nix-shell
htop
# For nslookup
dnsutils
# Mosh for better high-latency ssh
mosh
# PV for viewing pipes
pv
];
})
(mkIf nathan.programs.utils.devel {
environment.systemPackages = with pkgs; [
gcc
binutils
];
})
];
}

View File

@ -4,6 +4,9 @@ let
in in
with lib; with lib;
{ {
imports = [
../../common/programs/utils.nix
];
config = mkMerge [ config = mkMerge [
(mkIf nathan.programs.utils.core (mkIf nathan.programs.utils.core
{ {
@ -23,11 +26,6 @@ with lib;
pv pv
]; ];
}) })
(mkIf nathan.programs.utils.binfmt {
boot.binfmt.emulatedSystems = [
"aarch64-linux"
];
})
(mkIf nathan.programs.utils.devel { (mkIf nathan.programs.utils.devel {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gcc gcc

View File

@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
let
inherit (import ../lib.nix { inherit lib; inherit pkgs; }) nLib;
in
{ }