feat!(flake): convert to fs-defined configurations

Place all configurations in `machines/${manager}/${system}/${hostname}/...`:
    - `${manager}` - One of `nixos`, `nix-on-droid`, `nix-darwin` or `home-manager`
    - `${system}` - A system's architecture (can be many)
    - `${hostname}` - A system's hostname (can be many)

The flake now automatically generates the needed configurations based on the above structure.

It only generates configurations for valid directory structures:
    - It wouldn't generate a NixOS config if there isn't a `configuration.nix` file
    - ...
This commit is contained in:
reo101 2022-11-27 02:12:21 +02:00
parent b0110b3e64
commit dd2391d905
9 changed files with 176 additions and 66 deletions

View file

@ -0,0 +1,42 @@
{ inputs, outputs, lib, config, pkgs, ... }:
{
environment.packages = with pkgs; [];
# Backup etc files instead of failing to activate generation if a file already exists in /etc
environment.etcBackupExtension = ".bak";
# Remove motd
environment.motd = null;
# # Set $EDITOR
# environment.variables.EDITOR = "nvim";
user.shell = "${pkgs.zsh}/bin/zsh";
# Read the changelog before changing this value
system.stateVersion = "22.05";
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
time.timeZone = "Europe/Sofia";
terminal.font =
let
firacode = pkgs.nerdfonts.override {
fonts = [ "FiraCode" ];
};
fontPath = "share/fonts/truetype/NerdFonts/Fira Code Regular Nerd Font Complete Mono.ttf";
in
"${firacode}/${fontPath}";
home-manager = {
config = ./home.nix;
backupFileExtension = "hm-bak";
# useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs; };
};
}