mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Clean: Reformat
This commit is contained in:
parent
7251c6cb7d
commit
812b7b53a1
4 changed files with 32 additions and 32 deletions
36
flake.nix
36
flake.nix
|
@ -6,6 +6,7 @@
|
||||||
nix-command
|
nix-command
|
||||||
flakes
|
flakes
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extra-substituters = "https://nix-community.cachix.org";
|
extra-substituters = "https://nix-community.cachix.org";
|
||||||
extra-trusted-public-keys = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
|
extra-trusted-public-keys = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
|
||||||
};
|
};
|
||||||
|
@ -24,21 +25,16 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = { nixpkgs, home-manager, fenix, ... }:
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
with {
|
||||||
fenix,
|
importConfiguration = configDirectory:
|
||||||
...
|
with {
|
||||||
}:
|
hostName = builtins.baseNameOf configDirectory;
|
||||||
|
hostPlatform = import (configDirectory + "/platform.nix");
|
||||||
|
userName = import (configDirectory + "/username.nix");
|
||||||
|
};
|
||||||
|
|
||||||
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
|
|
||||||
{
|
{
|
||||||
nixosConfigurations.${hostName} = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.${hostName} = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
@ -46,9 +42,7 @@
|
||||||
system = hostPlatform;
|
system = hostPlatform;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
|
||||||
overlays = [
|
overlays = [fenix.overlays.default];
|
||||||
fenix.overlays.default
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Helper function for DRY.
|
# Helper function for DRY.
|
||||||
|
@ -58,7 +52,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
directory
|
configDirectory
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -67,7 +61,7 @@
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = builtins.baseNameOf directory;
|
networking.hostName = hostName;
|
||||||
nixpkgs.hostPlatform = hostPlatform;
|
nixpkgs.hostPlatform = hostPlatform;
|
||||||
|
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
@ -76,8 +70,8 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
};
|
||||||
# Basically imports all machines in ./machines/.
|
|
||||||
builtins.foldl' nixpkgs.lib.recursiveUpdate {} (builtins.map importConfiguration [
|
builtins.foldl' nixpkgs.lib.recursiveUpdate {} (builtins.map importConfiguration [
|
||||||
./machines/asus # HACK: Use a function to list the directory.
|
./machines/asus # HACK: Use a function to list the directory.
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
pkgs: with pkgs; []
|
pkgs: with pkgs; []
|
||||||
|
|
||||||
++ [ (nerdfonts.override { fonts = [ # NERD FONTS
|
++ [ # NERD FONTS
|
||||||
"JetBrainsMono"
|
(nerdfonts.override {
|
||||||
]; }) ]
|
fonts = [
|
||||||
|
"JetBrainsMono"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
]
|
||||||
|
|
|
@ -53,13 +53,15 @@ pkgs: with pkgs; []
|
||||||
poetry
|
poetry
|
||||||
]
|
]
|
||||||
|
|
||||||
++ [ (fenix.complete.withComponents [ # RUST
|
++ [ # RUST
|
||||||
"rustc"
|
(fenix.complete.withComponents [
|
||||||
"rust-src"
|
"rustc"
|
||||||
"cargo"
|
"rust-src"
|
||||||
"rustfmt"
|
"cargo"
|
||||||
"clippy"
|
"rustfmt"
|
||||||
]) ]
|
"clippy"
|
||||||
|
])
|
||||||
|
]
|
||||||
|
|
||||||
++ [ # SHELLS
|
++ [ # SHELLS
|
||||||
# nushell # Declared in nushell/.
|
# nushell # Declared in nushell/.
|
||||||
|
|
|
@ -7,7 +7,7 @@ homeManagerConfiguration {
|
||||||
envFile.source = ./env.nu;
|
envFile.source = ./env.nu;
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
g = "git";
|
g = "git";
|
||||||
ga = "git add";
|
ga = "git add";
|
||||||
gb = "git branch";
|
gb = "git branch";
|
||||||
gc = "git commit -m";
|
gc = "git commit -m";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue