templates: add templates for some use cases

This commit is contained in:
Tobias Happ 2022-09-25 17:35:43 +02:00
parent 8b33a28370
commit f4edb7be86
8 changed files with 271 additions and 0 deletions

View file

@ -0,0 +1,27 @@
{
description = "Minimal example of nix-on-droid system config with home-manager.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
home-manager = {
url = "github:nix-community/home-manager/release-22.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-on-droid = {
url = "github:t184256/nix-on-droid/release-22.05";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs = { self, nixpkgs, home-manager, nix-on-droid }: {
nixOnDroidConfigurations.deviceName = nix-on-droid.lib.nixOnDroidConfiguration {
system = "aarch64-linux";
config = ./nix-on-droid.nix;
};
};
}

View file

@ -0,0 +1,55 @@
{ config, lib, pkgs, ... }:
{
# Simply install just the packages
environment.packages = with pkgs; [
# User-facing stuff that you really really want to have
vim # or some other editor, e.g. nano or neovim
# Some common stuff that people expect to have
#diffutils
#findutils
#utillinux
#tzdata
#hostname
#man
#gnugrep
#gnupg
#gnused
#gnutar
#bzip2
#gzip
#xz
#zip
#unzip
];
# Backup etc files instead of failing to activate generation if a file already exists in /etc
environment.etcBackupExtension = ".bak";
# Read the changelog before changing this value
system.stateVersion = "22.05";
# Set up nix for flakes
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
# Set your time zone
#time.timeZone = "Europe/Berlin";
# Configure home-manager
home-manager = {
backupFileExtension = "hm-bak";
useGlobalPkgs = true;
config =
{ config, lib, pkgs, ... }:
{
# Read the changelog before changing this value
home.stateVersion = "22.05";
# insert home-manager config
};
};
}