Created
April 8, 2024 11:23
-
-
Save csmr/a68f567d92caa652dd392af4813db94f to your computer and use it in GitHub Desktop.
Debian desktop NixOS conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
imports = [ | |
# Import the default NixOS configuration | |
<nixpkgs/nixos/modules/installer/cd-dvd/x86_64-linux.nix> | |
]; | |
# Set the system timezone | |
time.timeZone = "America/Los_Angeles"; | |
# Configure the system locale | |
i18n.extraLocaleSettings = { | |
LC_ALL = "en_US.UTF-8"; | |
}; | |
# Create a user account with sudo privileges | |
users.users.user = { | |
isNormalUser = true; | |
extraGroups = [ "wheel" ]; | |
password = "$6$rounds=4096$..."; | |
}; | |
# Install the Xfce desktop environment and some common applications | |
environment.systemPackages = with pkgs; [ | |
xfce4 | |
firefox | |
thunderbird | |
libreoffice | |
gimp | |
]; | |
# Copy the user's SSH authorized keys to the new system | |
environment.etc."ssh/sshd_config".text = '' | |
... | |
AuthorizedKeysFile .ssh/authorized_keys | |
... | |
''; | |
services.openssh.extraConfig = '' | |
PermitRootLogin no | |
''; | |
# Set the default command to start the Xfce desktop environment | |
system.defaultRunLevel = "5"; | |
services.xserver.displayManager.startx.enable = true; | |
services.xserver.desktopManager.xfce.enable = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment