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

Packages: Add go, fix formatting, make packages.nix and fonts.nix take attrsets as args

This commit is contained in:
RGBCube 2023-05-06 15:11:16 +03:00
parent 9a0e849632
commit 469c42c165
5 changed files with 24 additions and 20 deletions

10
flake.lock generated
View file

@ -1,17 +1,17 @@
{
"nodes": {
"home-manager": {
"homeManager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1682977601,
"narHash": "sha256-F1Va/Uiw2tVNn27FLqWyBkiqDyIm/eCamw9wA/GK8Fw=",
"lastModified": 1683276747,
"narHash": "sha256-T3st1VBg3wmhHyBQb0z12sTSGsQgiu3mxkS61nLO8Xs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0e4c33d76006c9080d2f228ba1c2308e3e4d7be6",
"rev": "669669fcb403e3137dfe599bbcc26e60502c3543",
"type": "github"
},
"original": {
@ -38,7 +38,7 @@
},
"root": {
"inputs": {
"home-manager": "home-manager",
"homeManager": "homeManager",
"nixpkgs": "nixpkgs"
}
}

View file

@ -13,7 +13,7 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
homeManager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -21,20 +21,20 @@
outputs = {
nixpkgs,
home-manager,
homeManager,
...
}:
let
importConfiguration = directory:
let
hostPlatform = import (directory + "/platform.nix");
# The folder name is the host name of the machine.
hostName = builtins.baseNameOf directory;
userName = import (directory + "/username.nix");
in
let
hostPlatform = import (directory + "/platform.nix");
# The folder name is the host name of the machine.
hostName = builtins.baseNameOf directory;
userName = import (directory + "/username.nix");
in
{
{
nixosConfigurations.${hostName} = nixpkgs.lib.nixosSystem {
specialArgs = {
lib = nixpkgs.lib;
@ -52,7 +52,7 @@
modules = [
directory
home-manager.nixosModules.home-manager
homeManager.nixosModules.home-manager
# Extra configuration derived from the metadata.
{

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
{ pkgs, ... } @ args:
{
environment.systemPackages = import ./packages.nix pkgs;
fonts.fonts = import ./fonts.nix pkgs;
environment.systemPackages = import ./packages.nix args;
fonts.fonts = import ./fonts.nix args;
}

View file

@ -1,4 +1,4 @@
pkgs: with pkgs; []
{ pkgs, ... }: with pkgs; []
++ [ (nerdfonts.override { fonts = [ # NERD FONTS
"JetBrainsMono"

View file

@ -1,4 +1,4 @@
pkgs: with pkgs; []
{ pkgs, ... }: with pkgs; []
++ [ # APPLICATIONS
firefox
@ -40,6 +40,10 @@ pkgs: with pkgs; []
lightly-qt
]
++ [ # PROGRAMMING LANGUAGES
go
]
++ [ # PYTHON
(python311.withPackages (pkgs: with pkgs; [
pip