mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 19:17:45 +00:00
Configure CLI tools for all users, including root
This commit is contained in:
parent
2aacc688f2
commit
9e6687400b
8 changed files with 19 additions and 16 deletions
17
flake.nix
17
flake.nix
|
@ -19,21 +19,22 @@
|
|||
};
|
||||
|
||||
inputs = {
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { fenix, home-manager, nixpkgs, ... } @ inputs: let
|
||||
outputs = { nixpkgs, home-manager, fenix, ... } @ inputs: let
|
||||
machines = [
|
||||
./machines/enka
|
||||
];
|
||||
|
@ -74,7 +75,9 @@
|
|||
|
||||
# HOME
|
||||
homeConfiguration = userName: attributes: systemConfiguration {
|
||||
home-manager.users.${userName} = attributes;
|
||||
home-manager.users = builtins.foldl' lib.recursiveUpdate {} (builtins.map (userName: {
|
||||
${userName} = attributes;
|
||||
}) (if builtins.isList userName then userName else [ userName ]));
|
||||
};
|
||||
|
||||
homePackages = userName: packages: homeConfiguration userName {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
bat
|
||||
])
|
||||
|
||||
(homeConfiguration "nixos" {
|
||||
(homeConfiguration [ "nixos" "root" ] {
|
||||
programs.nushell.environmentVariables = {
|
||||
MANPAGER = ''"bat --plain --language man"'';
|
||||
PAGER = ''"bat --plain"'';
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
system.stateVersion = "23.05";
|
||||
})
|
||||
|
||||
(homeConfiguration "nixos" {
|
||||
(homeConfiguration [ "nixos" "root" ] {
|
||||
home.stateVersion = "23.05";
|
||||
})
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ homeConfiguration, enabled, ... }:
|
||||
|
||||
homeConfiguration "nixos" {
|
||||
homeConfiguration [ "nixos" "root" ] {
|
||||
programs.nushell.shellAliases = {
|
||||
g = "git";
|
||||
ga = "git add";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, pkgs, homeConfiguration, homePackages, enabled, ... }: lib.recursiveUpdate
|
||||
|
||||
(homeConfiguration "nixos" {
|
||||
(homeConfiguration [ "nixos" "root" ] {
|
||||
programs.nushell.environmentVariables.EDITOR = "hx";
|
||||
|
||||
programs.helix = enabled {
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
settings.keys = lib.recursiveUpdate
|
||||
|
||||
(builtins.foldl' (x: y: lib.recursiveUpdate x y) {} (builtins.map (mode: { ${mode} = {
|
||||
(builtins.foldl' lib.recursiveUpdate {} (builtins.map (mode: { ${mode} = {
|
||||
C-h = "move_prev_word_start";
|
||||
C-l = "move_next_word_end";
|
||||
C-k = "move_visual_line_up";
|
||||
|
@ -50,7 +50,7 @@
|
|||
C-down = "move_visual_line_down";
|
||||
}; }) [ "insert" "normal" "select" ]))
|
||||
|
||||
(builtins.foldl' (x: y: lib.recursiveUpdate x y) {} (builtins.map (mode: {
|
||||
(builtins.foldl' lib.recursiveUpdate {} (builtins.map (mode: {
|
||||
${mode}.D = "extend_to_line_end";
|
||||
}) [ "normal" "select" ]));
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
users.users.nixos.shell = pkgs.nushell;
|
||||
})
|
||||
|
||||
(homeConfiguration "nixos" {
|
||||
(homeConfiguration [ "nixos" "root" ] {
|
||||
programs.starship = enabled {};
|
||||
|
||||
programs.nushell = enabled {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
poetry
|
||||
])
|
||||
|
||||
(homeConfiguration "nixos" {
|
||||
(homeConfiguration [ "nixos" "root" ] {
|
||||
programs.nushell.shellAliases = {
|
||||
venv = "virtualenv venv";
|
||||
};
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
steck
|
||||
])
|
||||
|
||||
(homeConfiguration "nixos" {
|
||||
(homeConfiguration [ "nixos" "root" ] {
|
||||
programs.nushell.shellAliases.share = "steck paste";
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue