prep main darwin config
This commit is contained in:
parent
50da7ffff8
commit
523aaff701
32 changed files with 423 additions and 142 deletions
|
|
@ -5,28 +5,24 @@
|
|||
{ self, config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
inputs.agenix.darwinModules.default
|
||||
# inputs.home-manager.darwinModules.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 = {
|
||||
name = "thegeneralist";
|
||||
home = "/Users/thegeneralist";
|
||||
shell = pkgs.nushell;
|
||||
shell = pkgs.zsh;
|
||||
# openssh.authorizedKeys.keys = let
|
||||
# inherit (import ../../keys.nix) thegeneralist;
|
||||
# in [ thegeneralist ];
|
||||
};
|
||||
|
||||
# home-manager = {
|
||||
# extraSpecialArgs = { inherit inputs; };
|
||||
# users = {
|
||||
# thegeneralist = import (self + /modules/home);
|
||||
# };
|
||||
# };
|
||||
|
||||
# home-manager.users.thegeneralist.home = {
|
||||
# stateVersion = "24.11";
|
||||
# homeDirectory = "/Users/thegeneralist";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,22 @@
|
|||
lib: inputs: self: lib.nixosSystem {
|
||||
lib: inputs: self: lib.darwinSystem {
|
||||
specialArgs = inputs // { inherit inputs; inherit self; };
|
||||
modules = [
|
||||
# Extensions: nixosModules, darwinModules, overlays
|
||||
({ pkgs, lib, inputs, ... }: let
|
||||
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
|
||||
|
||||
collect = packagePath: (attrValues inputs)
|
||||
|> filter (hasAttrByPath packagePath)
|
||||
|> map (getAttrFromPath packagePath);
|
||||
|
||||
modules = collect [ "darwinModules" "default" ];
|
||||
# todo
|
||||
extensions = {
|
||||
nixpkgs.overlays = collect [ "overlays" "default" ];
|
||||
imports = modules;
|
||||
};
|
||||
in extensions)
|
||||
|
||||
./configuration.nix
|
||||
|
||||
# Modules
|
||||
|
|
@ -11,16 +27,5 @@ lib: inputs: self: lib.nixosSystem {
|
|||
in {
|
||||
imports = commonModules ++ darwinModules;
|
||||
})
|
||||
|
||||
# Overlays
|
||||
({ pkgs, lib, ... }: let
|
||||
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
|
||||
packagePath = [ "overlays" "default" ];
|
||||
overlays = (attrValues inputs)
|
||||
|> filter (hasAttrByPath packagePath)
|
||||
|> map (getAttrFromPath packagePath);
|
||||
in {
|
||||
nixpkgs.overlays = overlays;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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