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:
parent
397570c99d
commit
6f0bf969a8
6 changed files with 27 additions and 21 deletions
28
flake.nix
28
flake.nix
|
@ -51,25 +51,31 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Helper functions for readability & DRY.
|
# SYSTEM
|
||||||
systemConfiguration = attributes: attributes;
|
systemConfiguration = attributes: attributes;
|
||||||
|
|
||||||
homeConfiguration = userName: attributes: {
|
systemPackages = packages: systemConfiguration {
|
||||||
home-manager.users.${userName} = attributes;
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = importPaths: {
|
|
||||||
imports = importPaths;
|
|
||||||
};
|
|
||||||
|
|
||||||
packages = packages: {
|
|
||||||
environment.systemPackages = packages;
|
environment.systemPackages = packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = fonts: {
|
systemFonts = fonts: systemConfiguration {
|
||||||
fonts.fonts = fonts;
|
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 // {
|
enabled = attributes: attributes // {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, packages, ... }:
|
{ pkgs, systemPackages, ... }:
|
||||||
|
|
||||||
with pkgs; packages [
|
with pkgs; systemPackages [
|
||||||
discord
|
discord
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, fonts, ... }:
|
{ pkgs, systemFonts, ... }:
|
||||||
|
|
||||||
with pkgs; fonts [
|
with pkgs; systemFonts [
|
||||||
(nerdfonts.override {
|
(nerdfonts.override {
|
||||||
fonts = [
|
fonts = [
|
||||||
"JetBrainsMono"
|
"JetBrainsMono"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, packages, ... }:
|
{ pkgs, systemPackages, ... }:
|
||||||
|
|
||||||
with pkgs; packages [
|
with pkgs; systemPackages [
|
||||||
openttd
|
openttd
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, packages, ... }:
|
{ pkgs, systemPackages, ... }:
|
||||||
|
|
||||||
with pkgs; packages [
|
with pkgs; systemPackages [
|
||||||
bat
|
bat
|
||||||
htop
|
htop
|
||||||
neofetch
|
neofetch
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, homeConfiguration, packages, enabled, ... }:
|
{ pkgs, homeConfiguration, systemPackages, enabled, ... }:
|
||||||
|
|
||||||
(with pkgs; packages [
|
(with pkgs; systemPackages [
|
||||||
(python311.withPackages (pkgs: with pkgs; [
|
(python311.withPackages (pkgs: with pkgs; [
|
||||||
pip
|
pip
|
||||||
requests
|
requests
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue