tidying and such
This commit is contained in:
parent
42e502ec78
commit
45b2ab13bc
12 changed files with 0 additions and 0 deletions
28
resources/boilerplate/boilerplate.nix
Normal file
28
resources/boilerplate/boilerplate.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
# let bindings
|
||||
let
|
||||
|
||||
#foo = bar
|
||||
#
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
# try `$ nix run .#boilerplate`
|
||||
flake = {
|
||||
|
||||
# modules declaration
|
||||
nixosConfigurations.main = inputs.nixpkgs.lib.nixosSystem {
|
||||
|
||||
# list of modules to import
|
||||
modules = [
|
||||
./configuration.nix
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
16
resources/boilerplate/myFirstModule.nix
Normal file
16
resources/boilerplate/myFirstModule.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ inputs, ... }: {
|
||||
|
||||
# module declaration
|
||||
flake.nixosModules.myFirstModule = { pkgs, ... }: {
|
||||
|
||||
# options declarations
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# packages to include
|
||||
environment.systemPackages = with pkgs; [
|
||||
helix
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
27
resources/boilerplate/myMachine.nix
Normal file
27
resources/boilerplate/myMachine.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ inputs, self, ... }: {
|
||||
|
||||
# module declaration
|
||||
flake.nixosConfigurations.myMachine = inputs.nixpkgs.lib.nixosSystem {
|
||||
|
||||
# modules to import
|
||||
modules = with self; [
|
||||
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
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
17
resources/boilerplate/myPackage.nix
Normal file
17
resources/boilerplate/myPackage.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ inputs, ... }: {
|
||||
|
||||
# packages declaration
|
||||
perSystem = { pkgs, ... }: {
|
||||
|
||||
#package declaration
|
||||
packages.myPackage = pkgs.stdenv.mkDerivation {
|
||||
|
||||
# package options
|
||||
pname = "myPackage";
|
||||
version = "0.0.1";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue