mirror of
				https://github.com/ItsDrike/nixdots
				synced 2025-11-04 03:16:37 +00:00 
			
		
		
		
	Compare commits
	
		
			2 commits
		
	
	
		
			ccf9ececa2
			...
			a38498eef2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| a38498eef2 | |||
| 703ee70a47 | 
					 5 changed files with 25 additions and 7 deletions
				
			
		| 
						 | 
					@ -16,4 +16,5 @@ My NixOS and home-manager flake
 | 
				
			||||||
This configuration was massively inspired by the following amazing projects:
 | 
					This configuration was massively inspired by the following amazing projects:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- <https://git.notashelf.dev/NotAShelf/nyx> (major inspiration)
 | 
					- <https://git.notashelf.dev/NotAShelf/nyx> (major inspiration)
 | 
				
			||||||
 | 
					- <https://github.com/spikespaz/dotfiles>
 | 
				
			||||||
- <https://git.jacekpoz.pl/jacekpoz/niksos>
 | 
					- <https://git.jacekpoz.pl/jacekpoz/niksos>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,6 @@
 | 
				
			||||||
      username = "itsdrike";
 | 
					      username = "itsdrike";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      sound.enable = true;
 | 
					      sound.enable = true;
 | 
				
			||||||
      bluetooth.enable = true;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      impermanence = {
 | 
					      impermanence = {
 | 
				
			||||||
        root = {
 | 
					        root = {
 | 
				
			||||||
| 
						 | 
					@ -61,6 +60,7 @@
 | 
				
			||||||
      cpu.type = "amd";
 | 
					      cpu.type = "amd";
 | 
				
			||||||
      gpu.type = "hybrid-nvidia";
 | 
					      gpu.type = "hybrid-nvidia";
 | 
				
			||||||
      hasTPM = true;
 | 
					      hasTPM = true;
 | 
				
			||||||
 | 
					      bluetooth.enable = true;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    security = {
 | 
					    security = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,7 +35,6 @@
 | 
				
			||||||
      username = "itsdrike";
 | 
					      username = "itsdrike";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      sound.enable = true;
 | 
					      sound.enable = true;
 | 
				
			||||||
      bluetooth.enable = true;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      impermanence = {
 | 
					      impermanence = {
 | 
				
			||||||
        root = {
 | 
					        root = {
 | 
				
			||||||
| 
						 | 
					@ -115,6 +114,7 @@
 | 
				
			||||||
      cpu.type = "amd";
 | 
					      cpu.type = "amd";
 | 
				
			||||||
      gpu.type = "amd";
 | 
					      gpu.type = "amd";
 | 
				
			||||||
      hasTPM = true;
 | 
					      hasTPM = true;
 | 
				
			||||||
 | 
					      bluetooth.enable = true;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    security = {
 | 
					    security = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,5 @@
 | 
				
			||||||
{ lib, ... }: with lib; let
 | 
					{ lib, ... }: let
 | 
				
			||||||
 | 
					  inherit (lib) mkOption mkEnableOption types;
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  options.myOptions.device = {
 | 
					  options.myOptions.device = {
 | 
				
			||||||
| 
						 | 
					@ -34,9 +35,25 @@ in
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    hasTPM = mkOption {
 | 
					    hasTPM = mkOption {
 | 
				
			||||||
      type = lib.types.bool;
 | 
					      type = types.bool;
 | 
				
			||||||
      default = false;
 | 
					      default = false;
 | 
				
			||||||
      description = "Does this device have a TPM (Trusted Platform Module)?";
 | 
					      description = "Does this device have a TPM (Trusted Platform Module)?";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    bluetooth = {
 | 
				
			||||||
 | 
					      enable = mkEnableOption "bluetooth modules, drivers and configuration program(s)";
 | 
				
			||||||
 | 
					      powerOnBoot = mkOption {
 | 
				
			||||||
 | 
					        type = types.bool;
 | 
				
			||||||
 | 
					        default = false;
 | 
				
			||||||
 | 
					        description = ''
 | 
				
			||||||
 | 
					          Should bluetooth be powered on automatically during boot?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          This will worsen the battery life and is not recommended. Instead, you can
 | 
				
			||||||
 | 
					          always turn bluetooth on manually once booted, when you need it. Unless you
 | 
				
			||||||
 | 
					          have constant need for bluetooth / have some devices to connect to automatically
 | 
				
			||||||
 | 
					          you, leave this off.
 | 
				
			||||||
 | 
					        '';
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,14 +6,14 @@
 | 
				
			||||||
}: let
 | 
					}: let
 | 
				
			||||||
  inherit (lib) mkIf;
 | 
					  inherit (lib) mkIf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  sys = config.myOptions.system.bluetooth;
 | 
					  cfg = config.myOptions.device.bluetooth;
 | 
				
			||||||
in {
 | 
					in {
 | 
				
			||||||
  config = mkIf sys.enable {
 | 
					  config = mkIf cfg.enable {
 | 
				
			||||||
    hardware.bluetooth = {
 | 
					    hardware.bluetooth = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      package = pkgs.bluez5-experimental;
 | 
					      package = pkgs.bluez5-experimental;
 | 
				
			||||||
 | 
					      powerOnBoot = cfg.powerOnBoot; 
 | 
				
			||||||
      #hsphfpd.enable = true;
 | 
					      #hsphfpd.enable = true;
 | 
				
			||||||
      powerOnBoot = true;
 | 
					 | 
				
			||||||
      disabledPlugins = ["sap"];
 | 
					      disabledPlugins = ["sap"];
 | 
				
			||||||
      settings = {
 | 
					      settings = {
 | 
				
			||||||
        General = {
 | 
					        General = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue