1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Rename packages to systemPackages and add homePackages for better handling of packages

This commit is contained in:
RGBCube 2023-05-14 13:18:37 +03:00
parent 397570c99d
commit 6f0bf969a8
6 changed files with 27 additions and 21 deletions

View file

@ -51,25 +51,31 @@
];
};
# Helper functions for readability & DRY.
# SYSTEM
systemConfiguration = attributes: attributes;
homeConfiguration = userName: attributes: {
home-manager.users.${userName} = attributes;
};
imports = importPaths: {
imports = importPaths;
};
packages = packages: {
systemPackages = packages: systemConfiguration {
environment.systemPackages = packages;
};
fonts = fonts: {
systemFonts = fonts: systemConfiguration {
fonts.fonts = fonts;
};
# HOME
homeConfiguration = userName: attributes: systemConfiguration {
home-manager.users.${userName} = attributes;
};
homePackages = userName: packages: homeConfiguration userName {
home.packages = packages;
};
# GENERAL
imports = importPaths: {
imports = importPaths;
};
enabled = attributes: attributes // {
enable = true;
};

View file

@ -1,5 +1,5 @@
{ pkgs, packages, ... }:
{ pkgs, systemPackages, ... }:
with pkgs; packages [
with pkgs; systemPackages [
discord
]

View file

@ -1,6 +1,6 @@
{ pkgs, fonts, ... }:
{ pkgs, systemFonts, ... }:
with pkgs; fonts [
with pkgs; systemFonts [
(nerdfonts.override {
fonts = [
"JetBrainsMono"

View file

@ -1,5 +1,5 @@
{ pkgs, packages, ... }:
{ pkgs, systemPackages, ... }:
with pkgs; packages [
with pkgs; systemPackages [
openttd
]

View file

@ -1,6 +1,6 @@
{ pkgs, packages, ... }:
{ pkgs, systemPackages, ... }:
with pkgs; packages [
with pkgs; systemPackages [
bat
htop
neofetch

View file

@ -1,6 +1,6 @@
{ pkgs, homeConfiguration, packages, enabled, ... }:
{ pkgs, homeConfiguration, systemPackages, enabled, ... }:
(with pkgs; packages [
(with pkgs; systemPackages [
(python311.withPackages (pkgs: with pkgs; [
pip
requests