Adds snowfall nix template.

This commit is contained in:
Bailey 2023-12-01 03:17:15 -05:00
parent 7fc0f6b4b4
commit 5f45d48079
4 changed files with 76 additions and 0 deletions

20
flake.nix Normal file
View file

@ -0,0 +1,20 @@
{
description = "My NixOS / nix-darwin / nixos-generators systems";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
};
}

View file

@ -0,0 +1,17 @@
{
lib,
config,
...
}: let
cfg = config.snowfallorg.example;
in {
options.snowfallorg.example = {
enable = lib.mkEnableOption "Snowfall Example";
};
config = lib.mkIf cfg.enable {
environment.variables = {
SNOWFALLORG_EXAMPLE = "enabled";
};
};
}

View file

@ -0,0 +1,18 @@
{pkgs, ...}: {
imports = [./hardware.nix];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
users.users.example = {
isNormalUser = true;
extraGroups = ["wheel"];
};
environment.systemPackages = with pkgs; [
neovim
firefox
];
system.stateVersion = "22.05";
}

View file

@ -0,0 +1,21 @@
{modulesPath, ...}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/nixos";
fsType = "vfat";
};
swapDevices = [
{device = "/dev/disk/by-label/swap";}
];
networking.useDHCP = true;
}