mirror of
https://github.com/thegeneralist01/config.git
synced 2026-03-10 02:30:29 +01:00
prep main darwin config
This commit is contained in:
parent
50da7ffff8
commit
523aaff701
32 changed files with 423 additions and 142 deletions
|
|
@ -5,18 +5,7 @@
|
|||
{ self, config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
inputs.agenix.nixosModules.default
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
age.secrets.hostkey.file = ./hostkey.age;
|
||||
services.openssh.hostKeys = [{
|
||||
type = "ed25519";
|
||||
path = config.age.secrets.hostkey.path;
|
||||
}];
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
users.users.thegeneralist = {
|
||||
isNormalUser = true;
|
||||
|
|
@ -36,6 +25,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
age.secrets.hostkey.file = ./hostkey.age;
|
||||
services.openssh.hostKeys = [{
|
||||
type = "ed25519";
|
||||
path = config.age.secrets.hostkey.path;
|
||||
}];
|
||||
|
||||
# Some programs
|
||||
services.libinput.enable = true;
|
||||
programs.firefox.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,30 @@
|
|||
lib: inputs: self: lib.nixosSystem {
|
||||
specialArgs = inputs // { inherit inputs; inherit self; };
|
||||
modules = [
|
||||
./configuration.nix
|
||||
({ pkgs, ... }: let
|
||||
inherit (lib) filter hasSuffix;
|
||||
modules = lib.filesystem.listFilesRecursive ../../modules/linux |> filter (hasSuffix ".nix");
|
||||
in {
|
||||
imports = modules;
|
||||
})
|
||||
# Extensions: nixosModules, darwinModules, overlays
|
||||
({ pkgs, lib, ... }: let
|
||||
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
|
||||
packagePath = [ "overlays" "default" ];
|
||||
overlays = (attrValues inputs)
|
||||
|
||||
collect = packagePath: (attrValues inputs)
|
||||
|> filter (hasAttrByPath packagePath)
|
||||
|> map (getAttrFromPath packagePath);
|
||||
|
||||
modules = collect [ "nixosModules" "default" ];
|
||||
extensions = modules // {
|
||||
nixpkgs.overlays = collect [ "overlays" "default" ];
|
||||
imports = modules;
|
||||
};
|
||||
in extensions)
|
||||
|
||||
./configuration.nix
|
||||
|
||||
# Modules
|
||||
({ pkgs, ... }: let
|
||||
inherit (lib) filter hasSuffix;
|
||||
commonModules = lib.filesystem.listFilesRecursive ../../modules/common |> filter (hasSuffix ".nix");
|
||||
linuxModules = lib.filesystem.listFilesRecursive ../../modules/linux |> filter (hasSuffix ".nix");
|
||||
in {
|
||||
nixpkgs.overlays = overlays;
|
||||
imports = commonModules ++ linuxModules;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue