use imports and split programs into their own files for organization

This commit is contained in:
= 2024-03-11 03:30:34 -05:00
parent 88107ecd41
commit a442323649
25 changed files with 850 additions and 357 deletions

View file

@ -2,11 +2,20 @@
description = "My systems flake";
inputs = {
# Nix utility methods
nypkgs = {
url = "github:yunfachi/nypkgs/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# Pinned nix version
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11-small";
# TODO
# home-manager = { };
};
outputs = { self, nixpkgs, ... } @ args:
outputs = { self, nypkgs, nixpkgs, ... } @ args:
let
nixosSystem = nixpkgs.lib.nixosSystem;
mkMerge = nixpkgs.lib.mkMerge;
@ -19,18 +28,25 @@
};
user = {
username = "josh";
git = {
email = "ringofstorms@gmail.com";
name = "RingOfStorms (Joshua Bell)";
};
};
usersDir = ./users;
systemsDir = ./systems;
commonDir = ./_common;
flakeDir = ./.;
};
ypkgs = nypkgs.legacyPackages.${settings.system.architecture};
ylib = ypkgs.lib;
in
{
nixosConfigurations.${settings.system.hostname} = nixosSystem {
system = settings.system.architecture;
modules = [ ./systems/_common/configuration.nix ./systems/${settings.system.hostname}/configuration.nix ];
specialArgs = args // { inherit settings; };
specialArgs = args // { inherit settings; inherit ylib; };
};
# homeConfigurations = { };
};