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

Use recursive update instead of //

This commit is contained in:
RGBCube 2023-05-24 20:23:33 +03:00
parent c09259d4c7
commit 7360237ab8
No known key found for this signature in database
9 changed files with 38 additions and 59 deletions

View file

@ -40,7 +40,9 @@
hostPlatform = import (configurationDirectory + "/platform.nix");
in {
nixosConfigurations.${hostName} = nixosSystem {
lib = nixpkgs.lib;
lib = nixpkgs.lib // {
recursiveUpdate3 = x: y: z: nixpkgs.lib.recursiveUpdate x (nixpkgs.lib.recursiveUpdate y z);
};
pkgs = import nixpkgs {
system = hostPlatform;

View file

@ -1,14 +1,12 @@
{ pkgs, systemConfiguration, systemPackages, ... }:
{ lib, pkgs, systemConfiguration, systemPackages, ... }: lib.recursiveUpdate
(with pkgs; systemPackages [
bat
])
//
(systemConfiguration {
environment.variables = {
environment.sessionVariables = {
PAGER = "bat --plain";
MANPAGER = "col --spaces --no-backspaces | bat --plain --language man";
MANPAGER = "sh -c 'col --spaces --no-backspaces | bat --plain --language man'";
};
})

View file

@ -1,17 +1,13 @@
{ systemConfiguration, homeConfiguration, imports, ... }:
{ lib, systemConfiguration, homeConfiguration, imports, ... }: lib.recursiveUpdate3
(systemConfiguration {
system.stateVersion = "22.11";
})
//
(homeConfiguration "nixos" {
home.stateVersion = "22.11";
})
//
(imports [
./bat
./discord

View file

@ -1,4 +1,4 @@
{ pkgs, systemConfiguration, systemFonts, ... }:
{ lib, pkgs, systemConfiguration, systemFonts, ... }: lib.recursiveUpdate
(systemConfiguration {
console = {
@ -10,8 +10,6 @@
};
})
//
(with pkgs; systemFonts [
(nerdfonts.override {
fonts = [

View file

@ -1,11 +1,9 @@
{ pkgs, systemPackages, homeConfiguration, imports, enabled, ... }:
{ lib, pkgs, systemPackages, homeConfiguration, homePackages, enabled, ... }: lib.recursiveUpdate3
(with pkgs; systemPackages [
xclip
])
//
(homeConfiguration "nixos" {
programs.nushell.environmentVariables = {
EDITOR = "hx";
@ -50,8 +48,31 @@
};
})
//
(with pkgs; homePackages "nixos" [
# CMAKE
cmake-language-server
(imports [
./languageServers.nix
# GO
gopls
# KOTLIN
kotlin-language-server
# LATEX
texlab
# LUA
lua-language-server
# MARKDOWN
marksman
# NIX
nil
# RUST
rust-analyzer
# ZIG
zls
])

View file

@ -1,30 +0,0 @@
{ pkgs, homePackages, ... }:
with pkgs; homePackages "nixos" [
# CMAKE
cmake-language-server
# GO
gopls
# KOTLIN
kotlin-language-server
# LATEX
texlab
# LUA
lua-language-server
# MARKDOWN
marksman
# NIX
nil
# RUST
rust-analyzer
# ZIG
zls
]

View file

@ -1,11 +1,9 @@
{ pkgs, systemConfiguration, homeConfiguration, enabled, ... }:
{ lib, pkgs, systemConfiguration, homeConfiguration, enabled, ... }: lib.recursiveUpdate
(systemConfiguration {
users.users.nixos.shell = pkgs.nushell;
})
//
(homeConfiguration "nixos" {
programs.starship = enabled {
settings.character = {

View file

@ -1,4 +1,4 @@
{ pkgs, systemPackages, homePackages, ... }:
{ lib, pkgs, systemPackages, homePackages, ... }: lib.recursiveUpdate
(with pkgs; systemPackages [
fd
@ -29,8 +29,6 @@
lightly-qt
])
//
(with pkgs; homePackages "nixos" [
heroic
jetbrains.idea-ultimate

View file

@ -1,4 +1,4 @@
{ pkgs, systemPackages, homeConfiguration, enabled, ... }:
{ lib, pkgs, systemPackages, homeConfiguration, enabled, ... }: lib.recursiveUpdate
(with pkgs; systemPackages [
(python311.withPackages (pkgs: with pkgs; [
@ -9,8 +9,6 @@
poetry
])
//
(homeConfiguration "nixos" {
programs.nushell.shellAliases = {
venv = "virtualenv venv";