refactor: complete overhaul

This commit is contained in:
Nick 2024-11-10 01:29:37 -06:00
parent fb3e6fed86
commit 0541b3d61f
154 changed files with 936 additions and 904 deletions

View file

@ -4,7 +4,7 @@
...
}: let
inherit (flake.config.people) user0 user1;
inherit (flake.config.machines.devices) desktop server nas;
inherit (flake.config.machines.devices) desktop server synology;
inherit (flake.config.services.instances) samba;
synologySecrets = config.sops.secrets."network/synology".path;
@ -27,12 +27,12 @@ in {
];
synologyMounts = synologyDrive: {
name = "${nas.${synologyDrive}.mount}";
name = "${synology.${synologyDrive}.mount}";
value = {
device = nas.${synologyDrive}.device;
device = synology.${synologyDrive}.device;
fsType = "cifs";
options =
nas.${synologyDrive}.options
synology.${synologyDrive}.options
++ ["credentials=${synologySecrets}"];
};
};

View file

@ -1,15 +1,14 @@
{lib, ...}: {
imports =
{lib, ...}: let
configPath = ./config;
desktopImports = let
files = builtins.attrNames (builtins.readDir configPath);
in
map
(file: ./${file}.nix)
[
"boot"
"filesystem"
"graphics"
"hardware"
"networking"
"sops"
];
(name: configPath + "/${name}")
(builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
in {
imports = desktopImports;
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
system.stateVersion = lib.mkForce "24.05";
}