first
This commit is contained in:
18
nixos/standard/hosts/common/default.nix
Normal file
18
nixos/standard/hosts/common/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
# Common configuration for all hosts
|
||||
|
||||
{ config, lib, inputs, ... }: {
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
trusted-users = [ "root" "m3tam3re" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
optimise.automatic = true;
|
||||
registry = (lib.mapAttrs (_: flake: { inherit flake; }))
|
||||
((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||
nixPath = [ "/etc/nix/path" ];
|
||||
};
|
||||
}
|
35
nixos/standard/hosts/your-host/default.nix
Normal file
35
nixos/standard/hosts/your-host/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
# A staring point is the basic NIXOS configuration generated by the ISO installer.
|
||||
# On an existing NIXOS install you can use the following command in your flakes basedir:
|
||||
# sudo nixos-generate-config --dir ./hosts/your-host
|
||||
#
|
||||
# Please make sure to change the first couple of lines in your configuration.nix:
|
||||
|
||||
# { config, inputs, lib, pkgs, ... }:
|
||||
#
|
||||
# {
|
||||
# imports = [ # Include the results of the hardware scan.
|
||||
# ./hardware-configuration.nix
|
||||
# inputs.home-manager.nixosModules.home-manager
|
||||
# ];
|
||||
# ...
|
||||
#
|
||||
# Moreover please update the packages option in your user configuration and add the home-manager options:
|
||||
|
||||
# users.users = {
|
||||
# your-name = {
|
||||
# isNormalUser = true;
|
||||
# initialPassword = "12345";
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# packages = [ inputs.home-manager.packages.${pkgs.system}.default ];
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# home-manager = {
|
||||
# useUserPackages = true;
|
||||
# users.your-name =
|
||||
# import ../../home/your-name/${config.networking.hostName}.nix;
|
||||
# };
|
||||
|
||||
{
|
||||
imports = [ ../common ./configuration.nix ];
|
||||
}
|
Reference in New Issue
Block a user