reformat boilerplate

This commit is contained in:
serenity-F 2026-08-30 22:27:33 +10:00
parent 286f58b614
commit 0324cf1994
No known key found for this signature in database
5 changed files with 85 additions and 42 deletions

View file

@ -4,40 +4,60 @@
inputs = {
# Nixpkgs version - https://github.com/NixOS/nixpkgs
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
# nix hardware - https://github.com/NixOS/nixos-hardware
hardware = {
url = "github:nixos/nixos-hardware";
};
# NixOS hardware - https://github.com/NixOS/nixos-hardware
hardware = { url = "github:nixos/nixos-hardware"; };
# nixpkgs version - https://github.com/NixOS/nixpkgs
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
# Dendritic stuff - https://www.vimjoyer.com/vid79-parts-wrapped
flake-parts = { url = "github:hercules-ci/flake-parts"; };
flake-utils = { url = "github:numtide/flake-utils"; };
import-tree = { url = "github:vic/import-tree"; };
wrapper-modules = { url = "github:BirdeeHub/nix-wrapper-modules";};
den = { url = "github:vic/den/v0.17.0"; };
# dendritic stuff - https://www.vimjoyer.com/vid79-parts-wrapped
den = {
url = "github:vic/den/v0.17.0";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
import-tree = {
url = "github:vic/import-tree";
};
wrapper-modules = {
url = "github:BirdeeHub/nix-wrapper-modules";
};
# Secrets management - https://github.com/Mic92/sops-nix
# sound driver optimisations - https://github.com/musnix/musnix
musnix = {
url = "github:musnix/musnix";
};
# nice-to-haves for gaming - https://github.com/fufexan/nix-gaming
nix-gaming = {
url = "github:fufexan/nix-gaming";
};
# secrets management - https://github.com/Mic92/sops-nix
#sops-nix = { url = "github:Mic92/sops-nix"; };
# Zoomer text editor - https://github.com/notashelf/nvf
nvf = { url = "github:notashelf/nvf"; };
# Sound driver optimisations - https://github.com/musnix/musnix
musnix = { url = "github:musnix/musnix"; };
# Nice-to-haves for gaming - https://github.com/fufexan/nix-gaming
nix-gaming = { url = "github:fufexan/nix-gaming"; };
# Declarative dots - https://github.com/nix-community/home-manager
# declarative dots - https://github.com/nix-community/home-manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Niri window manager - https://github.com/YaLTeR/niri
niri = { # - https://github.com/sodiboo/niri-flake/
# easy theming - https://github.com/nix-community/stylix
stylix = {
url = "github:danth/stylix";
};
# niri window manager - https://github.com/YaLTeR/niri
# niri flake docs - https://github.com/sodiboo/niri-flake/
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
#inputs.niri-unstable.follows = "";
@ -46,19 +66,23 @@
#inputs.xwayland-satellite-stable.follows = "";
};
# Hassle free desktop shell - https://docs.noctalia.dev/getting-started/nixos/
noctalia = {
# hassle free desktop shell - https://docs.noctalia.dev/getting-started/nixos/
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
# Easy theming - https://github.com/nix-community/stylix
stylix = { url = "github:danth/stylix"; };
};
outputs = inputs: inputs.flake-parts.lib.mkFlake
{inherit inputs; }
(inputs.import-tree ./modules);
}
# flake entry point
outputs =
inputs:
inputs.flake-parts.lib.mkFlake
# pass inputs to modules
{ inherit inputs; }
# where to find modules?
(inputs.import-tree ./modules);
}

View file

@ -1,19 +1,28 @@
{ inputs, ... }:
{ inputs, ... }:
# let bindings
let
#foo = bar
in
#
in
{
# Try `$ nix run .#boilerplate`
# try `$ nix run .#boilerplate`
flake = {
# modules declaration
nixosConfigurations.main = inputs.nixpkgs.lib.nixosSystem {
# list of modules to import
modules = [
./configuration.nix
];
};
};
}

View file

@ -1,11 +1,14 @@
{inputs, ... }: {
{ inputs, ... }: {
# module declaration
flake.nixosModules.myFirstModule = { pkgs, ... }: {
# options declarations
programs.firefox.enable = true;
# packages to include
environment.systemPackages = with pkgs; [
vim
helix
];
};

View file

@ -1,25 +1,27 @@
{ inputs, self, ... }: {
# module declaration
flake.nixosConfigurations.myMachine = inputs.nixpkgs.lib.nixosSystem {
# modules to import
modules = with self; [
nixosModules.myMachineModule
nixosModules.myMachineModule
nixosModules.myFirstModule
];
};
# module declaration
flake.nixosModules.myMachineModule = { pkgs, ... }: {
# options declarations
boot.loader.grub.enable = true;
# packages to import
environment.systemPackages = with self; [
packages.${pkgs.system}.myPackage
];
};
}

View file

@ -1,12 +1,17 @@
{ inputs, ... }: {
# packages declaration
perSystem = { pkgs, ... }: {
#package declaration
packages.myPackage = pkgs.stdenv.mkDerivation {
# package options
pname = "myPackage";
version = "0.0.1";
};
};
}