Made a common machine configuration where all of my machines are configured.

This commit is contained in:
KoenDR06 2024-05-17 15:04:58 +02:00
parent 6088214224
commit 30dce3155c
4 changed files with 109 additions and 169 deletions

View file

@ -9,10 +9,9 @@
imports = [
inputs.home-manager.nixosModules.home-manager
./hardware-configuration.nix
../../pkgs/zsh.nix
../common/configuration.nix
];
home-manager = {
extraSpecialArgs = { inherit inputs outputs; };
users = {
@ -20,64 +19,11 @@
};
};
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
nix.nixPath = ["/etc/nix/path"];
environment.etc =
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
networking.hostName = "solis";
time.timeZone = "Europe/Amsterdam";
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
environment.shells = with pkgs; [ zsh ];
virtualisation.docker.enable = true;
services.tailscale.enable = true;
users.users = {
horseman = {
initialPassword = "1234";
isNormalUser = true;
openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
];
extraGroups = ["wheel"];
};
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11";
}