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;
|
lib = nixpkgs.lib;
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
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
|
### Configuration
|
||||||
# My username
|
# My username
|
||||||
username = "nullbite";
|
username = "nullbite";
|
||||||
@ -93,8 +100,8 @@
|
|||||||
|
|
||||||
# This function produces a nixosSystem which imports configuration.nix and
|
# This function produces a nixosSystem which imports configuration.nix and
|
||||||
# a Home Manager home.nix for the given user from ./hosts/${hostname}/
|
# a Home Manager home.nix for the given user from ./hosts/${hostname}/
|
||||||
mkSystem = let _username=username;
|
mkSystem = let _username=username; _overlays=overlays;
|
||||||
in {system, hostname, username ? _username, stateVersion, extraModules ? [] }:
|
in {system, overlays ? _overlays, hostname, username ? _username, stateVersion, extraModules ? [] }:
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
@ -104,8 +111,13 @@
|
|||||||
# Values for every single system that would not conceivably need
|
# Values for every single system that would not conceivably need
|
||||||
# to be made modular
|
# to be made modular
|
||||||
system.stateVersion = stateVersion;
|
system.stateVersion = stateVersion;
|
||||||
# not having the freedom to install unfree programs is unfree
|
nixpkgs = {
|
||||||
nixpkgs.config.allowUnfree = true;
|
inherit overlays;
|
||||||
|
config = {
|
||||||
|
# not having the freedom to install unfree programs is unfree
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes" ];
|
nix.settings.experimental-features = ["nix-command" "flakes" ];
|
||||||
})
|
})
|
||||||
./hosts/${hostname}/configuration.nix
|
./hosts/${hostname}/configuration.nix
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
../../system # nixfiles modules
|
../../system # nixfiles modules
|
||||||
./nvidia-optimus.nix
|
./nvidia-optimus.nix
|
||||||
../../system/fragments/android.nix
|
|
||||||
];
|
];
|
||||||
nixfiles = {
|
nixfiles = {
|
||||||
common.remoteAccess.enable = true;
|
common.remoteAccess.enable = true;
|
||||||
@ -30,6 +29,9 @@
|
|||||||
};
|
};
|
||||||
sessions.hyprland.enable = true;
|
sessions.hyprland.enable = true;
|
||||||
sessions.plasma.enable = lib.mkDefault false;
|
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 = [
|
imports = [
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
|
./android.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user