From 3f96357a8b0a84b69883724ebed6ec09c69fb7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Krop=C3=A1=C4=8Dek?= Date: Wed, 2 Oct 2024 21:32:58 +0200 Subject: [PATCH] removed rpi and tried to fix login bug --- flake.nix | 29 +++++++------------------- hosts/lenar/default.nix | 7 ++++++- hosts/rpi-kodi/default.nix | 25 ---------------------- hosts/rpi-kodi/disko.nix | 37 --------------------------------- nixosModules/system/default.nix | 0 5 files changed, 13 insertions(+), 85 deletions(-) delete mode 100644 hosts/rpi-kodi/default.nix delete mode 100644 hosts/rpi-kodi/disko.nix create mode 100644 nixosModules/system/default.nix diff --git a/flake.nix b/flake.nix index cbcfd9c..c883d4e 100644 --- a/flake.nix +++ b/flake.nix @@ -17,36 +17,21 @@ outputs = inputs@{ self, nixpkgs, ... }: - { + let + hosts = ["work-ntb" "lenar"]; + in { # Please replace my-nixos with your hostname - nixosConfigurations = { - work-ntb = nixpkgs.lib.nixosSystem { + nixosConfigurations = nixpkgs.lib.genAttrs hosts (host: nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./hosts/work-ntb + ./hosts/${host} ./hosts/base ]; specialArgs = { inherit inputs; }; - }; - lenar = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./hosts/lenar - ./hosts/base - ]; - specialArgs = { - inherit inputs; - }; - }; - rpi-kodi = nixpkgs.lib.nixosSystem { - system = "aarch64-linux"; - modules = [ - ./hosts/rpi-kodi - ]; - }; - }; + } + ); formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style; }; } diff --git a/hosts/lenar/default.nix b/hosts/lenar/default.nix index 50d0e64..6092c5e 100644 --- a/hosts/lenar/default.nix +++ b/hosts/lenar/default.nix @@ -14,7 +14,12 @@ boot.kernelPackages = pkgs.linuxPackages_latest; services.power-profiles-daemon.enable = false; - services.tlp.enable = true; + services.tlp = { + enable = true; + settings = { + DEVICES_TO_DISABLE_ON_STARTUP = "bluetooth"; + }; + }; networking.hostName = "lenar"; # Define your hostname. diff --git a/hosts/rpi-kodi/default.nix b/hosts/rpi-kodi/default.nix deleted file mode 100644 index 7307fc5..0000000 --- a/hosts/rpi-kodi/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - config, - pkgs, - inputs, - ... -}: -{ - imports = [ - # Include the results of the hardware scan. - # ./hardware-configuration.nix - inputs.disko.nixosModules.disko - ./disko.nix - ]; - - networking.hostName = "rpi-kodi"; # Define your hostname. - - # home-manager = { - # extraSpecialArgs = { - # inherit inputs; - # }; - # users = { - # "krop" = import ../../users/krop; - # }; - # }; -} diff --git a/hosts/rpi-kodi/disko.nix b/hosts/rpi-kodi/disko.nix deleted file mode 100644 index d4c5ce6..0000000 --- a/hosts/rpi-kodi/disko.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - disko.devices = { - disk = { - main = { - type = "disk"; - device = "/dev/mmcblk0"; # Internal SD card for Raspberry Pi - content = { - type = "MBR"; # MBR partitioning for Raspberry Pi - partitions = { - # Boot partition (FAT32 for bootloader files) - boot = { - priority = 1; - name = "boot"; - start = "1M"; - end = "256M"; # 256MB FAT32 partition for boot files - type = "0C"; # FAT32 partition type - content = { - type = "filesystem"; - format = "vfat"; # FAT32 for the boot partition - mountpoint = "/boot"; # Mounted as /boot - }; - }; - # Root partition (ext4 for the main system) - root = { - size = "100%"; # Use the remaining space for the root filesystem - content = { - type = "filesystem"; # Basic filesystem (ext4) - format = "ext4"; # Use ext4 for the root filesystem - mountpoint = "/"; # Root of the system - }; - }; - }; - }; - }; - }; - }; -} diff --git a/nixosModules/system/default.nix b/nixosModules/system/default.nix new file mode 100644 index 0000000..e69de29