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