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"); hostPlatform = import (configurationDirectory + "/platform.nix");
in { in {
nixosConfigurations.${hostName} = nixosSystem { 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 { pkgs = import nixpkgs {
system = hostPlatform; system = hostPlatform;

View file

@ -1,14 +1,12 @@
{ pkgs, systemConfiguration, systemPackages, ... }: { lib, pkgs, systemConfiguration, systemPackages, ... }: lib.recursiveUpdate
(with pkgs; systemPackages [ (with pkgs; systemPackages [
bat bat
]) ])
//
(systemConfiguration { (systemConfiguration {
environment.variables = { environment.sessionVariables = {
PAGER = "bat --plain"; 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 { (systemConfiguration {
system.stateVersion = "22.11"; system.stateVersion = "22.11";
}) })
//
(homeConfiguration "nixos" { (homeConfiguration "nixos" {
home.stateVersion = "22.11"; home.stateVersion = "22.11";
}) })
//
(imports [ (imports [
./bat ./bat
./discord ./discord

View file

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

View file

@ -1,11 +1,9 @@
{ pkgs, systemPackages, homeConfiguration, imports, enabled, ... }: { lib, pkgs, systemPackages, homeConfiguration, homePackages, enabled, ... }: lib.recursiveUpdate3
(with pkgs; systemPackages [ (with pkgs; systemPackages [
xclip xclip
]) ])
//
(homeConfiguration "nixos" { (homeConfiguration "nixos" {
programs.nushell.environmentVariables = { programs.nushell.environmentVariables = {
EDITOR = "hx"; EDITOR = "hx";
@ -50,8 +48,31 @@
}; };
}) })
// (with pkgs; homePackages "nixos" [
# CMAKE
cmake-language-server
(imports [ # GO
./languageServers.nix 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 { (systemConfiguration {
users.users.nixos.shell = pkgs.nushell; users.users.nixos.shell = pkgs.nushell;
}) })
//
(homeConfiguration "nixos" { (homeConfiguration "nixos" {
programs.starship = enabled { programs.starship = enabled {
settings.character = { settings.character = {

View file

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

View file

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