1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 19:17:45 +00:00

Apply fixes

This commit is contained in:
RGBCube 2023-05-10 23:17:02 +03:00
parent 7e281a3470
commit 9920928a74
3 changed files with 13 additions and 12 deletions

View file

@ -37,7 +37,7 @@
importConfiguration = configurationDirectory: let
hostName = builtins.baseNameOf configurationDirectory;
hostPlatform = import configurationDirectory + "/platform.nix";
hostPlatform = import (configurationDirectory + "/platform.nix");
in {
nixosConfigurations.${hostName} = nixosSystem {
lib = nixpkgs.lib;
@ -54,24 +54,24 @@
# Helper functions for readability & DRY.
systemConfiguration = attributes: attributes;
homeConfiguration = userName: attributes: systemConfiguration {
homeConfiguration = userName: attributes: {
home-manager.users.${userName} = attributes;
};
imports = importPaths: systemConfiguration {
imports = importPaths: {
imports = importPaths;
};
packages = packages: systemConfiguration {
packages = packages: {
environment.systemPackages = packages;
};
fonts = fonts: systemConfiguration {
fonts.fonts = packages;
fonts = fonts: {
fonts.fonts = fonts;
};
enabled = attributes: attributes // {
enabled = true;
enable = true;
};
normalUser = attributes: attributes // {

View file

@ -0,0 +1 @@
"x86_64-linux"

View file

@ -3,13 +3,13 @@
if [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [-h | --help] [-c | --clean-garbage] [machine]"
exit
fi<
fi
if [[ -n $1 ]]; then
if [[ $1 != "" ]]; then
if [[ $1 != "-c" && $1 != "--clean-garbage" ]]; then
machine = $1
elif [[ -n $2 ]]; then
machine = $1
machine=$1
elif [[ $2 != "" ]]; then
machine=$2
else
read -p "What machine would you want to build? [$(ls --format=commas machines)]: " machine
fi