add h002 starter files
This commit is contained in:
parent
1064ac1a49
commit
aa3653e8c2
3 changed files with 161 additions and 18 deletions
61
flake.nix
61
flake.nix
|
@ -16,8 +16,7 @@
|
|||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows =
|
||||
"nixpkgs"; # Use system packages list where available
|
||||
inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list where available
|
||||
};
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
@ -28,7 +27,14 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nypkgs, nixpkgs, home-manager, ... } @ inputs:
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nypkgs,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
user = {
|
||||
username = "josh";
|
||||
|
@ -56,6 +62,21 @@
|
|||
inherit user;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "h002";
|
||||
opts = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
settings = {
|
||||
user = {
|
||||
username = "luser";
|
||||
git = {
|
||||
email = "ringofstorms@gmail.com";
|
||||
name = "RingOfStorms (Joshua Bell)";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
directories = {
|
||||
|
@ -68,24 +89,28 @@
|
|||
in
|
||||
{
|
||||
# foldl' is "reduce" where { } is the accumulator and myHosts is the array to reduce on.
|
||||
nixosConfigurations = builtins.foldl'
|
||||
(acc: nixConfig:
|
||||
acc // {
|
||||
"${nixConfig.name}" = nixpkgs.lib.nixosSystem
|
||||
{
|
||||
# module = nixConfig.overrides.modules or [...]
|
||||
modules = [ ./hosts/_common/configuration.nix ];
|
||||
specialArgs = inputs // {
|
||||
ylib = nypkgs.legacyPackages.${nixConfig.opts.system}.lib;
|
||||
settings = directories // nixConfig.settings // {
|
||||
nixosConfigurations = builtins.foldl' (
|
||||
acc: nixConfig:
|
||||
acc
|
||||
// {
|
||||
"${nixConfig.name}" =
|
||||
nixpkgs.lib.nixosSystem {
|
||||
# module = nixConfig.overrides.modules or [...]
|
||||
modules = [ ./hosts/_common/configuration.nix ];
|
||||
specialArgs = inputs // {
|
||||
ylib = nypkgs.legacyPackages.${nixConfig.opts.system}.lib;
|
||||
settings =
|
||||
directories
|
||||
// nixConfig.settings
|
||||
// {
|
||||
system = nixConfig.opts // {
|
||||
hostname = nixConfig.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
} // nixConfig.opts;
|
||||
})
|
||||
{ }
|
||||
myHosts;
|
||||
};
|
||||
}
|
||||
// nixConfig.opts;
|
||||
}
|
||||
) { } myHosts;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue