From 890d6008c6dfd413e3b9dfeff39294fcca19ea27 Mon Sep 17 00:00:00 2001 From: iFargle Date: Sat, 16 Sep 2023 21:21:45 +0900 Subject: [PATCH] test --- flake.nix | 38 +++++++++++++++----------------------- lib/default.nix | 4 ++-- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index 3e325f9a..a76eaf55 100644 --- a/flake.nix +++ b/flake.nix @@ -19,31 +19,23 @@ libx = import ./lib { inherit inputs outputs stateVersion hmStateVersion; }; in { nixosConfigurations = { - nixos-laptop = libx.mkHost - { hostname = "nixos-laptop"; username = "albert"; desktop = "hyprland"; gpu = "intel"; theme = "gruvbox"; }; - nixos-framework = libx.mkHost - { hostname = "nixos-framework"; username = "albert"; desktop = "hyprland"; gpu = "amd"; theme = "gruvbox"; }; - nixos-rpi4-01 = libx.mkHost - { hostname = "nixos-rpi4-01"; username = "albert"; platform = "aarch64-linux"; }; - nixos-rpi4-02 = libx.mkHost - { hostname = "nixos-rpi4-02"; username = "albert"; platform = "aarch64-linux"; }; - nixos-rpi4-03 = libx.mkHost - { hostname = "nixos-rpi4-03"; username = "albert"; platform = "aarch64-linux"; }; + nixos-laptop = libx.mkHost { hostname = "nixos-laptop"; desktop = "hyprland"; gpu = "intel"; theme = "gruvbox"; }; + nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amd"; theme = "gruvbox"; }; + nixos-rpi4-01 = libx.mkHost { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; }; + nixos-rpi4-02 = libx.mkHost { hostname = "nixos-rpi4-02"; platform = "aarch64-linux"; }; + nixos-rpi4-03 = libx.mkHost { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; }; }; homeConfigurations = { - "albert@nixos-laptop" = libx.mkHome - { hostname = "nixos-laptop"; username = "albert"; desktop = "hyprland"; theme = "gruvbox"; }; - "albert@nixos-framework" = libx.mkHome - { hostname = "nixos-framework"; username = "albert"; desktop = "hyprland"; theme = "gruvbox"; }; - "albert@nixos-rpi4-01" = libx.mkHome - { hostname = "nixos-rpi4-01"; username = "albert"; platform = "aarch64-linux"; }; - "albert@nixos-rpi4-02" = libx.mkHome - { hostname = "nixos-rpi4-01"; username = "albert"; platform = "aarch64-linux"; }; - "albert@nixos-rpi4-03" = libx.mkHome - { hostname = "nixos-rpi4-01"; username = "albert"; platform = "aarch64-linux"; }; + "albert@nixos-laptop" = libx.mkHome { hostname = "nixos-laptop"; desktop = "hyprland"; theme = "gruvbox"; }; + "albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "gruvbox"; }; + "albert@nixos-rpi4-01" = libx.mkHome { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; }; + "albert@nixos-rpi4-02" = libx.mkHome { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; }; + "albert@nixos-rpi4-03" = libx.mkHome { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; }; + }; + images = { + nixos-rpi4-01 = nixosConfigurations.nixos-rpi4-01.config.system.build.sdImage; + nixos-rpi4-02 = nixosConfigurations.nixos-rpi4-02.config.system.build.sdImage; + nixos-rpi4-03 = nixosConfigurations.nixos-rpi4-03.config.system.build.sdImage; }; - images.nixos-rpi4-01 = nixosConfigurations.nixos-rpi4-01.config.system.build.sdImage; - images.nixos-rpi4-02 = nixosConfigurations.nixos-rpi4-02.config.system.build.sdImage; - images.nixos-rpi4-03 = nixosConfigurations.nixos-rpi4-03.config.system.build.sdImage; }; } \ No newline at end of file diff --git a/lib/default.nix b/lib/default.nix index be8d75d9..89c99e5e 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -3,7 +3,7 @@ # Helper function for generating home-manager configs mkHome = { hostname, - username, + username ? "albert", desktop ? null, platform ? "x86_64-linux", theme ? "default" @@ -19,7 +19,7 @@ # Helper function for generating host configs mkHost = { hostname, - username, + username ? "albert", desktop ? null, installer ? null, gpu ? null,