Factor out non-linux-specific utilities
This commit is contained in:
parent
9536d51651
commit
87ed166256
42
flake.lock
42
flake.lock
|
@ -283,6 +283,21 @@
|
|||
"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": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -483,6 +498,30 @@
|
|||
"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": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -780,6 +819,7 @@
|
|||
"java": "java",
|
||||
"mozilla": "mozilla",
|
||||
"nix-doom-emacs": "nix-doom-emacs",
|
||||
"nix-on-droid": "nix-on-droid",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable_2",
|
||||
|
@ -939,7 +979,7 @@
|
|||
"wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
|
|
15
flake.nix
15
flake.nix
|
@ -57,6 +57,13 @@
|
|||
url = "github:nathans-flakes/gamescope";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-on-droid = {
|
||||
url = "github:t184256/nix-on-droid";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
@ -76,6 +83,7 @@
|
|||
, nixos-generators
|
||||
, wsl
|
||||
, gamescope
|
||||
, nix-on-droid
|
||||
}@inputs:
|
||||
let
|
||||
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 = {
|
||||
x86_64-linux = {
|
||||
# Hyper-V image
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
}
|
|
@ -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
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
|
@ -4,6 +4,9 @@ let
|
|||
in
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
../../common/programs/utils.nix
|
||||
];
|
||||
config = mkMerge [
|
||||
(mkIf nathan.programs.utils.core
|
||||
{
|
||||
|
@ -23,11 +26,6 @@ with lib;
|
|||
pv
|
||||
];
|
||||
})
|
||||
(mkIf nathan.programs.utils.binfmt {
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"aarch64-linux"
|
||||
];
|
||||
})
|
||||
(mkIf nathan.programs.utils.devel {
|
||||
environment.systemPackages = with pkgs; [
|
||||
gcc
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (import ../lib.nix { inherit lib; inherit pkgs; }) nLib;
|
||||
in
|
||||
{ }
|
Loading…
Reference in New Issue