Compare commits

...

5 Commits

5 changed files with 36 additions and 14 deletions

View File

@ -37,6 +37,13 @@
lib = nixpkgs.lib;
systems = [ "x86_64-linux" "aarch64-linux" ];
overlays = [
/* android-tools 33.0.3p2 */ (final: prev: {
inherit (inputs.pkg-android-tools.legacyPackages.${final.system})
android-tools android-udev-rules;
})
];
### Configuration
# My username
username = "nullbite";
@ -93,8 +100,8 @@
# This function produces a nixosSystem which imports configuration.nix and
# a Home Manager home.nix for the given user from ./hosts/${hostname}/
mkSystem = let _username=username;
in {system, hostname, username ? _username, stateVersion, extraModules ? [] }:
mkSystem = let _username=username; _overlays=overlays;
in {system, overlays ? _overlays, hostname, username ? _username, stateVersion, extraModules ? [] }:
lib.nixosSystem {
inherit system;
modules = [
@ -104,8 +111,13 @@
# Values for every single system that would not conceivably need
# to be made modular
system.stateVersion = stateVersion;
# not having the freedom to install unfree programs is unfree
nixpkgs.config.allowUnfree = true;
nixpkgs = {
inherit overlays;
config = {
# not having the freedom to install unfree programs is unfree
allowUnfree = true;
};
};
nix.settings.experimental-features = ["nix-command" "flakes" ];
})
./hosts/${hostname}/configuration.nix

View File

@ -19,7 +19,6 @@
../../system # nixfiles modules
./nvidia-optimus.nix
../../system/fragments/android.nix
];
nixfiles = {
common.remoteAccess.enable = true;
@ -30,6 +29,9 @@
};
sessions.hyprland.enable = true;
sessions.plasma.enable = lib.mkDefault false;
programs = {
adb.enable = true;
};
};

View File

@ -1,9 +0,0 @@
{ config, lib, pkgs, outputs, vars, ...}@args:
{
imports = [ outputs.nixosModules.adb ];
config = {
programs.adb.enable = true;
users.users.${vars.username}.extraGroups = [ "adbusers" ];
};
}

View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, outputs, vars, ...}@args:
let
cfg = config.nixfiles.programs.adb;
in
{
# imports = [ outputs.nixosModules.adb ];
options.nixfiles.programs.adb = {
enable = lib.mkEnableOption "adb configuration";
};
config = lib.mkIf cfg.enable {
programs.adb.enable = true;
users.users.${vars.username}.extraGroups = [ "adbusers" ];
};
}

View File

@ -2,5 +2,6 @@
{
imports = [
./syncthing.nix
./android.nix
];
}