Compare commits
5 Commits
1d62744fce
...
189e5983cd
Author | SHA1 | Date | |
---|---|---|---|
189e5983cd | |||
81c9ac88a2 | |||
ae88738a96 | |||
a5c4c7c7f4 | |||
034c1a3868 |
20
flake.nix
20
flake.nix
@ -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
|
||||
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -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" ];
|
||||
};
|
||||
}
|
16
system/programs/android.nix
Normal file
16
system/programs/android.nix
Normal 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" ];
|
||||
};
|
||||
}
|
@ -2,5 +2,6 @@
|
||||
{
|
||||
imports = [
|
||||
./syncthing.nix
|
||||
./android.nix
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user