[NixOS] Add bootstrap file for starting new configs

This commit is contained in:
Ivan Malison 2023-10-02 13:15:34 -06:00
parent 93e8d7e8ab
commit 802cf428d3

65
nixos/bootstrap.nix Normal file
View File

@ -0,0 +1,65 @@
{ pkgs, config, lib, ... }:
{
imports = [
./essential.nix
];
environment.systemPackages = with pkgs; [
emacs
];
programs.zsh.enable = true;
networking.firewall.enable = false;
networking.networkmanager = {
enable = true;
extraConfig = ''
[main]
rc-manager=resolvconf
'';
};
nixpkgs.config.allowUnfree = true;
services.xserver = {
exportConfiguration = true;
enable = true;
layout = "us";
desktopManager = {
plasma5.enable = true;
};
displayManager = {
sddm = {
enable = true;
};
sessionCommands = ''
systemctl --user import-environment GDK_PIXBUF_MODULE_FILE DBUS_SESSION_BUS_ADDRESS PATH
'';
setupCommands = ''
autorandr -c
systemctl restart autorandr.service
'';
};
};
nix = rec {
extraOptions = ''
experimental-features = nix-command flakes
'';
};
users.users = {
imalison = {
extraGroups = [
"audio"
"adbusers"
"disk"
"docker"
"networkmanager"
"openrazer"
"plugdev"
"syncthing"
"systemd-journal"
"video"
"wheel"
];
group = "users";
isNormalUser = true;
createHome = true;
shell = pkgs.zsh;
};
};
}