mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 03:27:45 +00:00
chore: migrate nine host
This commit is contained in:
parent
f67d2760f7
commit
bf396257de
34 changed files with 400 additions and 177 deletions
|
@ -95,8 +95,6 @@ in {
|
|||
'';
|
||||
|
||||
programs.git = enabled {
|
||||
package = pkgs.gitFull;
|
||||
|
||||
userName = homeConfig.programs.jujutsu.settings.user.name;
|
||||
userEmail = homeConfig.programs.jujutsu.settings.user.email;
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ in {
|
|||
|
||||
# RUST
|
||||
pkgs.rust-analyzer-nightly
|
||||
pkgs.lldb_20
|
||||
pkgs.lldb
|
||||
|
||||
# TYPESCRIPT & OTHERS
|
||||
pkgs.deno
|
||||
|
|
8
modules/common/ip.nix
Normal file
8
modules/common/ip.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ lib, ... }: let
|
||||
inherit (lib) mkValue;
|
||||
in {
|
||||
options.networking = {
|
||||
ipv4 = mkValue null;
|
||||
ipv6 = mkValue null;
|
||||
};
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{ self, config, inputs, lib, pkgs, ... }: let
|
||||
inherit (lib) concatStringsSep const disabled filterAttrs flip isType mapAttrs mapAttrsToList merge mkAfter optionalAttrs;
|
||||
inherit (lib) concatStringsSep const disabled filterAttrs flip id isType mapAttrs mapAttrsToList merge mkAfter optionalAttrs;
|
||||
inherit (lib.strings) toJSON;
|
||||
|
||||
registryMap = inputs
|
||||
|
@ -11,7 +11,7 @@ in {
|
|||
|
||||
nix.nixPath = registryMap
|
||||
|> mapAttrsToList (name: value: "${name}=${value}")
|
||||
|> concatStringsSep ":";
|
||||
|> (if config.isDarwin then concatStringsSep ":" else id);
|
||||
|
||||
nix.registry = registryMap // { default = inputs.nixpkgs; }
|
||||
|> mapAttrs (_: flake: { inherit flake; });
|
||||
|
|
|
@ -1,31 +1,33 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) enabled filter first foldl' getExe last match mkIf nameValuePair optionalAttrs readFile removeAttrs splitString;
|
||||
in {
|
||||
users = optionalAttrs config.isLinux { defaultUserShell = pkgs.nushell; };
|
||||
environment = optionalAttrs config.isLinux {
|
||||
sessionVariables.SHELLS = getExe pkgs.nushell;
|
||||
} // {
|
||||
shells = mkIf config.isDarwin [ pkgs.nushell ];
|
||||
|
||||
environment.shells = mkIf config.isDarwin [ pkgs.nushell ];
|
||||
shellAliases = {
|
||||
la = "ls --all";
|
||||
lla = "ls --long --all";
|
||||
sl = "ls";
|
||||
|
||||
environment.shellAliases = {
|
||||
la = "ls --all";
|
||||
lla = "ls --long --all";
|
||||
sl = "ls";
|
||||
cp = "cp --recursive --verbose --progress";
|
||||
mk = "mkdir";
|
||||
mv = "mv --verbose";
|
||||
rm = "rm --recursive --verbose";
|
||||
|
||||
cp = "cp --recursive --verbose --progress";
|
||||
mk = "mkdir";
|
||||
mv = "mv --verbose";
|
||||
rm = "rm --recursive --verbose";
|
||||
pstree = "pstree -g 2";
|
||||
tree = "tree -CF --dirsfirst";
|
||||
};
|
||||
|
||||
pstree = "pstree -g 2";
|
||||
tree = "tree -CF --dirsfirst";
|
||||
systemPackages = [
|
||||
pkgs.fish # For completions.
|
||||
pkgs.zoxide # For completions and better cd.
|
||||
];
|
||||
|
||||
variables.STARSHIP_LOG = "error";
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.fish # For completions.
|
||||
pkgs.zoxide # For completions and better cd.
|
||||
];
|
||||
|
||||
environment.variables.STARSHIP_LOG = "error";
|
||||
|
||||
nixpkgs.overlays = [(self: super: {
|
||||
zoxide = super.zoxide.overrideAttrs (old: {
|
||||
src = self.fetchFromGitHub {
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = [
|
||||
(pkgs.python311.withPackages (pkgs: [
|
||||
pkgs.pip
|
||||
pkgs.requests
|
||||
]))
|
||||
|
||||
pkgs.python314
|
||||
pkgs.uv
|
||||
];
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -46,11 +46,11 @@ in {
|
|||
# port = 2222;
|
||||
# };
|
||||
|
||||
# nine = {
|
||||
# hostname = self.nine.networking.ipv4;
|
||||
# user = "seven";
|
||||
# port = 2222;
|
||||
# };
|
||||
nine = {
|
||||
hostname = self.nine.networking.ipv4;
|
||||
user = "seven";
|
||||
port = 2222;
|
||||
};
|
||||
};
|
||||
};
|
||||
}];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (lib) any elem getAttr last mapAttrsToList mkConst splitString;
|
||||
inherit (lib) last mkConst mkValue splitString;
|
||||
in {
|
||||
options = {
|
||||
os = mkConst <| last <| splitString "-" config.nixpkgs.hostPlatform.system;
|
||||
|
@ -7,7 +7,9 @@ in {
|
|||
isLinux = mkConst <| config.os == "linux";
|
||||
isDarwin = mkConst <| config.os == "darwin";
|
||||
|
||||
isDesktop = mkConst <| config.isDarwin || false; # (any (elem "graphical") <| mapAttrsToList (_: getAttr "extraGroups") config.users.users);
|
||||
isServer = mkConst <| !config.isDesktop;
|
||||
type = mkValue "server";
|
||||
|
||||
isDesktop = mkConst <| config.type == "desktop";
|
||||
isServer = mkConst <| config.type == "server";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue