Adds snowfall nix template.
This commit is contained in:
parent
7fc0f6b4b4
commit
5f45d48079
20
flake.nix
Normal file
20
flake.nix
Normal 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 = ./.;
|
||||
};
|
||||
}
|
17
modules/snowfall/default.nix
Normal file
17
modules/snowfall/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
18
systems/x86_64-linux/example/default.nix
Normal file
18
systems/x86_64-linux/example/default.nix
Normal 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";
|
||||
}
|
21
systems/x86_64-linux/example/hardware.nix
Normal file
21
systems/x86_64-linux/example/hardware.nix
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue