1
0
Fork 0

Move common NixOS configuration to another module

This commit is contained in:
Avery 2024-03-19 19:41:47 +01:00
parent 0ebff98838
commit 07833fcdd4
Signed by: Avery
GPG key ID: B684FD451B692E04
4 changed files with 97 additions and 56 deletions

46
common/nixos.nix Normal file
View file

@ -0,0 +1,46 @@
{ config, lib, pkgs, ... }: {
nix.settings.experimental-features = [ "nix-command" "flakes" ];
console = {
keyMap = lib.mkForce "dvorak-es";
useXkbConfig = true;
};
hardware = {
enableRedistributableFirmware = true;
cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
users = {
defaultUserShell = pkgs.zsh;
users.avery = {
extraGroups = [ "wheel" ];
isNormalUser = true;
};
};
environment = {
shells = with pkgs; [ zsh ];
systemPackages = with pkgs; [ git htop neovim ];
};
programs.zsh.enable = true;
security = {
doas = {
enable = true;
extraRules = [{
users = [ "avery" ];
keepEnv = true;
persist = true;
}];
};
rtkit.enable = true;
sudo.enable = false;
};
services.openssh.enable = true;
}