Skip to content

Instantly share code, notes, and snippets.

@csmr
Created April 8, 2024 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csmr/a68f567d92caa652dd392af4813db94f to your computer and use it in GitHub Desktop.
Save csmr/a68f567d92caa652dd392af4813db94f to your computer and use it in GitHub Desktop.
Debian desktop NixOS conf
{ 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