From 35980671581eaa9abe4a1e1da41faed41a2f4824 Mon Sep 17 00:00:00 2001 From: fleaz Date: Tue, 21 Jun 2022 15:34:34 +0200 Subject: [PATCH] Started role/laptop --- home-manager/default.nix | 3 ++- machines/jimbo/configuration.nix | 3 +-- machines/milhouse/configuration.nix | 5 +++-- roles/all.nix | 3 +++ roles/laptop.nix | 3 +++ 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 roles/laptop.nix diff --git a/home-manager/default.nix b/home-manager/default.nix index bfa6574..756c9c8 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -274,7 +274,8 @@ in }; - services.blueman-applet.enable = config.networking.hostName == "jimbo"; + # Enable blueman-applet when the machine has bluetooth enabled + services.blueman-applet.enable = config.hardware.bluetooth.enable == true; programs.foot = { enable = true; diff --git a/machines/jimbo/configuration.nix b/machines/jimbo/configuration.nix index 9eaae77..6d9849a 100644 --- a/machines/jimbo/configuration.nix +++ b/machines/jimbo/configuration.nix @@ -4,6 +4,7 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ../../roles/all.nix + ../../roles/laptop.nix ../../modules/luks.nix ../../modules/grub.nix ]; @@ -20,8 +21,6 @@ driSupport = true; }; - hardware.bluetooth.enable = true; - services.openssh.enable = true; programs.ssh.startAgent = true; diff --git a/machines/milhouse/configuration.nix b/machines/milhouse/configuration.nix index 1e692a9..d45b3c2 100644 --- a/machines/milhouse/configuration.nix +++ b/machines/milhouse/configuration.nix @@ -4,8 +4,9 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ../../roles/all.nix - ../../modules/luks.nix - ../../modules/grub.nix + ../../roles/laptop.nix + ../../modules/luks.nix + ../../modules/grub.nix ]; networking.hostName = "milhouse"; # Define your hostname. diff --git a/roles/all.nix b/roles/all.nix index 03e0474..d208fc5 100644 --- a/roles/all.nix +++ b/roles/all.nix @@ -32,5 +32,8 @@ # List packages installed in system profile. To search, run: environment.systemPackages = with pkgs; [ vim wget curl git ]; + + networking.extraHosts = '' + ''; } diff --git a/roles/laptop.nix b/roles/laptop.nix new file mode 100644 index 0000000..3dac4a1 --- /dev/null +++ b/roles/laptop.nix @@ -0,0 +1,3 @@ +{ + hardware.bluetooth.enable = true; +}