This commit is contained in:
m3tam3re
2024-04-01 14:21:20 +02:00
commit ac881e7a4a
8 changed files with 252 additions and 0 deletions

View 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" ];
};
}

View 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 ];
}