reformat boilerplate
This commit is contained in:
parent
286f58b614
commit
0324cf1994
5 changed files with 85 additions and 42 deletions
88
flake.nix
88
flake.nix
|
|
@ -4,40 +4,60 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
||||||
# Nixpkgs version - https://github.com/NixOS/nixpkgs
|
# nix hardware - https://github.com/NixOS/nixos-hardware
|
||||||
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
|
hardware = {
|
||||||
|
url = "github:nixos/nixos-hardware";
|
||||||
|
};
|
||||||
|
|
||||||
# NixOS hardware - https://github.com/NixOS/nixos-hardware
|
# nixpkgs version - https://github.com/NixOS/nixpkgs
|
||||||
hardware = { url = "github:nixos/nixos-hardware"; };
|
nixpkgs = {
|
||||||
|
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
# Dendritic stuff - https://www.vimjoyer.com/vid79-parts-wrapped
|
# dendritic stuff - https://www.vimjoyer.com/vid79-parts-wrapped
|
||||||
flake-parts = { url = "github:hercules-ci/flake-parts"; };
|
den = {
|
||||||
flake-utils = { url = "github:numtide/flake-utils"; };
|
url = "github:vic/den/v0.17.0";
|
||||||
import-tree = { url = "github:vic/import-tree"; };
|
};
|
||||||
wrapper-modules = { url = "github:BirdeeHub/nix-wrapper-modules";};
|
flake-parts = {
|
||||||
den = { url = "github:vic/den/v0.17.0"; };
|
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"; };
|
#sops-nix = { url = "github:Mic92/sops-nix"; };
|
||||||
|
|
||||||
# Zoomer text editor - https://github.com/notashelf/nvf
|
# declarative dots - https://github.com/nix-community/home-manager
|
||||||
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
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Niri window manager - https://github.com/YaLTeR/niri
|
# easy theming - https://github.com/nix-community/stylix
|
||||||
niri = { # - https://github.com/sodiboo/niri-flake/
|
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";
|
url = "github:sodiboo/niri-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
#inputs.niri-unstable.follows = "";
|
#inputs.niri-unstable.follows = "";
|
||||||
|
|
@ -46,19 +66,23 @@
|
||||||
#inputs.xwayland-satellite-stable.follows = "";
|
#inputs.xwayland-satellite-stable.follows = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hassle free desktop shell - https://docs.noctalia.dev/getting-started/nixos/
|
# hassle free desktop shell - https://docs.noctalia.dev/getting-started/nixos/
|
||||||
noctalia = {
|
noctalia = {
|
||||||
url = "github:noctalia-dev/noctalia-shell";
|
url = "github:noctalia-dev/noctalia-shell";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Easy theming - https://github.com/nix-community/stylix
|
|
||||||
stylix = { url = "github:danth/stylix"; };
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: inputs.flake-parts.lib.mkFlake
|
# flake entry point
|
||||||
{inherit inputs; }
|
outputs =
|
||||||
(inputs.import-tree ./modules);
|
inputs:
|
||||||
}
|
inputs.flake-parts.lib.mkFlake
|
||||||
|
|
||||||
|
# pass inputs to modules
|
||||||
|
{ inherit inputs; }
|
||||||
|
|
||||||
|
# where to find modules?
|
||||||
|
(inputs.import-tree ./modules);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,28 @@
|
||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
|
|
||||||
|
# let bindings
|
||||||
let
|
let
|
||||||
|
|
||||||
#foo = bar
|
#foo = bar
|
||||||
|
#
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
# Try `$ nix run .#boilerplate`
|
# try `$ nix run .#boilerplate`
|
||||||
flake = {
|
flake = {
|
||||||
|
|
||||||
|
# modules declaration
|
||||||
nixosConfigurations.main = inputs.nixpkgs.lib.nixosSystem {
|
nixosConfigurations.main = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
|
# list of modules to import
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
|
|
||||||
|
# module declaration
|
||||||
flake.nixosModules.myFirstModule = { pkgs, ... }: {
|
flake.nixosModules.myFirstModule = { pkgs, ... }: {
|
||||||
|
|
||||||
|
# options declarations
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
|
# packages to include
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
helix
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
|
|
||||||
|
# module declaration
|
||||||
flake.nixosConfigurations.myMachine = inputs.nixpkgs.lib.nixosSystem {
|
flake.nixosConfigurations.myMachine = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
|
# modules to import
|
||||||
modules = with self; [
|
modules = with self; [
|
||||||
nixosModules.myMachineModule
|
nixosModules.myMachineModule
|
||||||
nixosModules.myFirstModule
|
nixosModules.myFirstModule
|
||||||
|
|
@ -10,16 +11,17 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# module declaration
|
||||||
flake.nixosModules.myMachineModule = { pkgs, ... }: {
|
flake.nixosModules.myMachineModule = { pkgs, ... }: {
|
||||||
|
|
||||||
|
# options declarations
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
|
|
||||||
|
# packages to import
|
||||||
environment.systemPackages = with self; [
|
environment.systemPackages = with self; [
|
||||||
packages.${pkgs.system}.myPackage
|
packages.${pkgs.system}.myPackage
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,17 @@
|
||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
|
|
||||||
|
# packages declaration
|
||||||
perSystem = { pkgs, ... }: {
|
perSystem = { pkgs, ... }: {
|
||||||
|
|
||||||
|
#package declaration
|
||||||
packages.myPackage = pkgs.stdenv.mkDerivation {
|
packages.myPackage = pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
|
# package options
|
||||||
pname = "myPackage";
|
pname = "myPackage";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue