From 2c08c0bd118442dfd727b0f31f7b67cf1e6378d7 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 15 Dec 2023 23:02:33 +0100 Subject: [PATCH] moved waydroid to dev --- configuration.nix | 23 +---------------------- dev/default.nix | 3 ++- dev/waydroid.nix | 4 ++++ hardware/common.nix | 12 ++++++++++++ hardware/default.nix | 4 ++-- settings.nix | 5 +++++ 6 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 dev/waydroid.nix create mode 100644 hardware/common.nix diff --git a/configuration.nix b/configuration.nix index 440719b..c8189f8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -28,12 +28,7 @@ in # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.11"; # Did you read the comment? - hardware.bluetooth.enable = true; - hardware.opengl.enable = true; - # for rotation sensors - hardware.sensor.iio.enable = true; - # screen and keybord backlight - hardware.acpilight.enable = true; + hardware.opengl.enable = true; networking.firewall.checkReversePath = false; networking.hostName = "servostar-nixos-flex"; # Define your hostname. @@ -100,22 +95,6 @@ in # Configure console keymap console.keyMap = "de"; - ################################################ - # __ ___ _ _ _ _ _ - # \ \ / (_)_ __| |_ _ _ __ _| (_)___ __ _| |_(_) ___ _ __ - # \ \ / /| | '__| __| | | |/ _` | | / __|/ _` | __| |/ _ \| '_ \ - # \ V / | | | | |_| |_| | (_| | | \__ \ (_| | |_| | (_) | | | | - # \_/ |_|_| \__|\__,_|\__,_|_|_|___/\__,_|\__|_|\___/|_| |_| - # - # This sections enbales host virtualisation for: - # - KVM - # - Waydroid (android based on LineageOS) - # - Docker - ################################################ - - # android container - virtualisation.waydroid.enable = true; - ################################################ # ____ _ _ # | _ \(_)_ __ _____ _(_)_ __ ___ diff --git a/dev/default.nix b/dev/default.nix index 99eb1cc..db23c29 100644 --- a/dev/default.nix +++ b/dev/default.nix @@ -9,5 +9,6 @@ in ++ lib.optionals settings.dev.platformio [ ./platformio.nix ] ++ lib.optionals settings.dev.latex [ ./latex.nix ] ++ lib.optionals settings.dev.dotnet [ ./dotnet.nix ] - ++ lib.optionals settings.dev.python3.enable [ ./python3.nix ]; + ++ lib.optionals settings.dev.python3.enable [ ./python3.nix ] + ++ lib.optionals settings.virtualisation.waydroid [ ./waydroid.nix ]; } diff --git a/dev/waydroid.nix b/dev/waydroid.nix new file mode 100644 index 0000000..9a8b4b2 --- /dev/null +++ b/dev/waydroid.nix @@ -0,0 +1,4 @@ +{ pkgs, config, ... }: { + # android container + virtualisation.waydroid.enable = true; +} diff --git a/hardware/common.nix b/hardware/common.nix new file mode 100644 index 0000000..2e82acf --- /dev/null +++ b/hardware/common.nix @@ -0,0 +1,12 @@ +{ pkgs, lib, ... }: +let + settings = import ./../settings.nix; +in +{ + hardware.bluetooth.enable = settings.hardware.bluetooth; + + # for rotation sensors + hardware.sensor.iio.enable = settings.hardware.iio; + # screen and keybord backlight + hardware.acpilight.enable = settings.hardware.acpilight; +} diff --git a/hardware/default.nix b/hardware/default.nix index 9a266ec..27aa011 100644 --- a/hardware/default.nix +++ b/hardware/default.nix @@ -4,8 +4,8 @@ let in { # Optionally import modules for specific hardware - imports = - lib.optionals settings.hardware.amdgpu [ ./amdgpu.nix ] + imports = [ ./common.nix ] + ++ lib.optionals settings.hardware.amdgpu [ ./amdgpu.nix ] ++ lib.optionals settings.hardware.intelgpu [ ./intelgpu.nix ] ++ lib.optionals settings.hardware.nvidiagpu [ ./nvidiagpu.nix ]; } diff --git a/settings.nix b/settings.nix index 48ab805..f79dc1d 100644 --- a/settings.nix +++ b/settings.nix @@ -5,6 +5,10 @@ with import {}; { intelgpu = false; nvidiagpu = false; + bluetooth = true; + acpilight = false; + iio = true; + # support for yubikey and additional software yubikey = { enable = true; @@ -23,6 +27,7 @@ with import {}; { enable = true; virt-manager = true; }; + waydroid = false; }; dev = { platformio = true;