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

@ -0,0 +1,79 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
../../pkgs/zsh.nix
];
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;
};
time.timeZone = "Europe/Amsterdam";
services.tailscale.enable = true;
services.mullvad-vpn.enable = true;
services.mullvad-vpn.package = pkgs.mullvad-vpn;
networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
services.resolved = {
enable = true;
dnssec = "true";
domains = [ "~." ];
fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
};
users.users = {
horseman = {
initialPassword = "1234";
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDIyYdfDp/ciSN6CWXPFF+RI17owPGWamKTO9vBEF4vronq/0JwtTRieMFest4JzI3sgO8mJqJ1E1efrTdsr0RtSVQNdGMtFAm/frHRh0WYi3gaJ26od0bxAcJpIZag8uASOnH+BSzmioxBd+RNGQbJVEplKlkf6SX7BgaXMsMCc7yuv7MLtgOe5pjW4w8sZucv8M7Z3SSDVfxHVZ0cAJbAHPPsOj8DjxnV6stSJNeRAqjuUS9dyUb1ZLyEFJQe/J+S53QWvUffmW1grExSKN4pIkU9L6dj72sM4CtSGOW9L4o97N8jAXrWGxK6x0dhm9S+7G8paUXXN13CiWiCtavK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NRpQQ= horseman@solis"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCmYI+jn1B69r4GUEeVE1/q+HSNcLzT+qG0nEpIjyO3VCsocLIJqT6cJtPKTh/j9RPySvz1lo2ZFemCeKBfsdHy95JoYqbAcoJ9jacH3X8LixIiGin6ew/h6QJONU1UAuxcEDoEyeHfmNBRdgaahNTWtgvFd1YhB4WQwN9THZ/axGdnWLi/y0y98aqERw98fGOhAzxqZyeGkWK5ByRiiGmfrmU7IsX916z5s9OPFYeIGvI3UPKL5awpQMrD/+VhtQjAy8guWbBKbN+7cVU/JQjhaPAeVC18iON++Ux6pGq1/yA+IFDb/fFofXD70vRYemg7zSVbf2ceBg8iSR2OdcZVPfhIKq7mx62TcYVY7aDlz7fFedl7tVhxRd5Ze7T/kbRQtbqL++3UQaZwnx6HoXGMvdIbKV/KHcmqjQQClzWZyk8oI+VbkF/nfTgShW/X0UQYzBSdsCb4XywzfnLRH4Ops/v7ZOc2zBApl7j1Oj+nW7dJ5/P6FgMw553tNXnEVXqGvdvalmDl/hjR3UVedm18ZKwu+6+1mcHsDGKCi5C79zVksr9IbFNICosA23xfrnKQYmncBzobbY4N39SToI9ulcukOJj26ooAG3RhHqSyOkcM3nTUbHwKb/19J+NAm2iT9ipNGurwwPO4VcJY36237es7MEkmQHfD1ZOo6biafw= horseman@terra"
];
extraGroups = [
"wheel"
"networkmanager"
];
};
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
system.stateVersion = "23.11";
}

View file

@ -10,7 +10,7 @@
inputs.home-manager.nixosModules.home-manager
./hardware-configuration.nix
../../pkgs/firefox.nix
../../pkgs/zsh.nix
../common/configuration.nix
];
home-manager = {
@ -20,69 +20,33 @@
};
};
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 = "luna";
time.timeZone = "Europe/Amsterdam";
services.xserver.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.sddm.autoNumlock = true;
boot.loader.systemd-boot.enable = true;
boot.kernelModules = [ "snd-seq" "snd-rawmidi" ];
hardware.pulseaudio.enable = true;
services.tailscale.enable = true;
services.acpid.enable = true;
networking.networkmanager.enable = true;
users.users = {
horseman = {
initialPassword = "1234";
isNormalUser = true;
openssh.authorizedKeys.keys = [];
extraGroups = [
"wheel"
"networkmanager"
];
services.jack = {
jackd.enable = true;
# support ALSA only programs via ALSA JACK PCM plugin
alsa.enable = false;
# support ALSA only programs via loopback device (supports programs like Steam)
loopback = {
enable = true;
# buffering parameters for dmix device to work with ALSA only semi-professional sound programs
#dmixConfig = ''
# period_size 2048
#'';
};
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11";
users.extraUsers.horseman.extraGroups = [ "jackaudio" ];
}

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

View file

@ -11,7 +11,7 @@
./hardware-configuration.nix
./refind.nix
../../pkgs/firefox.nix
../../pkgs/zsh.nix
../common/configuration.nix
];
# NVIDIA Drivers
@ -39,79 +39,30 @@
};
};
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 = "terra";
time.timeZone = "Europe/Amsterdam";
services.xserver.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.sddm.autoNumlock = true;
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.enable = true;
services.tailscale.enable = true;
virtualisation.docker.enable = true;
hardware.pulseaudio.enable = true;
environment.shells = with pkgs; [ zsh ];
services.mullvad-vpn.enable = true;
services.mullvad-vpn.package = pkgs.mullvad-vpn;
networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
services.resolved = {
enable = true;
dnssec = "true";
domains = [ "~." ];
fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
};
users.users = {
horseman = {
initialPassword = "1234";
isNormalUser = true;
openssh.authorizedKeys.keys = [];
extraGroups = [
"wheel"
"networkmanager"
];
services.jack = {
jackd.enable = true;
# support ALSA only programs via ALSA JACK PCM plugin
alsa.enable = false;
# support ALSA only programs via loopback device (supports programs like Steam)
loopback = {
enable = true;
# buffering parameters for dmix device to work with ALSA only semi-professional sound programs
#dmixConfig = ''
# period_size 2048
#'';
};
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11";
users.extraUsers.horseman.extraGroups = [ "jackaudio" ];
}