Diskussion:Install-Party/NixOS: Unterschied zwischen den Versionen

Aus Wiki StuRa HTW Dresden
Zur Navigation springen Zur Suche springen
(Neuer Abschnitt →‎SnowflakeOS)
Zeile 7: Zeile 7:
* https://florianfranke.dev/posts/2020/03/installing-nixos-with-encrypted-zfs-on-a-netcup.de-root-server/
* https://florianfranke.dev/posts/2020/03/installing-nixos-with-encrypted-zfs-on-a-netcup.de-root-server/
* https://nixos.wiki/wiki/ZFS
* https://nixos.wiki/wiki/ZFS
== SnowflakeOS ==
2023-02-13:
: <code>less /etc/nixos/configuration.nix</code>
<pre></pre>
<pre>
{ config, pkgs, ... }:
{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];
</pre>
<pre>
  system.stateVersion = "23.05"; # Did you read the comment?
</pre>
<pre>
  nix.extraOptions = ''
    experimental-features = nix-command flakes
  '';
</pre>
<pre>
  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
  boot.loader.efi.efiSysMountPoint = "/boot/efi";
</pre>
<pre>
  # Define your hostname.
  networking.hostName = "snowflakeos";
</pre>
<pre>
  # Enable networking
  networking.networkmanager.enable = true;
</pre>
<pre>
  # Set your time zone.
  time.timeZone = "Europe/Berlin";
</pre>
<pre>
  # Select internationalisation properties.
  i18n.defaultLocale = "en_US.UTF-8";
</pre>
<pre>
  # Set the keyboard layout.
  services.xserver.layout = "de";
  console.useXkbConfig = true;
</pre>
<pre>
  # Enable the X11 windowing system.
  services.xserver.enable = true;
</pre>
<pre>
  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;
</pre>
<pre>
  # Enable CUPS to print documents.
  services.printing.enable = true;
</pre>
<pre>
  # Enable sound with pipewire.
  sound.enable = true;
  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
  };
</pre>
<pre>
  # Enable automatic login for the user.
  services.xserver.displayManager.autoLogin.enable = true;
  services.xserver.displayManager.autoLogin.user = "k";
  # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
  systemd.services."getty@tty1".enable = false;
  systemd.services."autovt@tty1".enable = false;
</pre>
<pre>
  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;
  environment.sessionVariables.NIXPKGS_ALLOW_UNFREE = "1";
  environment.enableAllTerminfo = true;
</pre>
<pre>
  # List packages installed in system profile.
  environment.systemPackages = with pkgs; [
    ddate
  ];
</pre>
<pre>
  powerManagement.enable = true;
</pre>
<pre>
  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users."k" = {
    isNormalUser = true;
    description = "k-ot";
    extraGroups = [ "wheel" "networkmanager" "dialout" ];
  };
</pre>
<pre>
}
</pre>
<!--
<pre>
</pre>
<pre>
</pre>
<pre>
</pre>
<pre>
</pre>
<pre>
</pre>
<pre>
</pre>
-->

Version vom 13. Februar 2023, 01:02 Uhr

deklarative Erstellungen von Partitionierung von Geräten für Massenspeicher

https://github.com/nix-community/disko

NixOS meets ZFS

SnowflakeOS

2023-02-13:

less /etc/nixos/configuration.nix

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];
  system.stateVersion = "23.05"; # Did you read the comment?
  nix.extraOptions = ''
    experimental-features = nix-command flakes
  '';
  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
  boot.loader.efi.efiSysMountPoint = "/boot/efi";
  # Define your hostname.
  networking.hostName = "snowflakeos";
  # Enable networking
  networking.networkmanager.enable = true;
  # Set your time zone.
  time.timeZone = "Europe/Berlin";
  # Select internationalisation properties.
  i18n.defaultLocale = "en_US.UTF-8";
  # Set the keyboard layout.
  services.xserver.layout = "de";
  console.useXkbConfig = true;
  # Enable the X11 windowing system.
  services.xserver.enable = true;
  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;
  # Enable CUPS to print documents.
  services.printing.enable = true;
  # Enable sound with pipewire.
  sound.enable = true;
  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
  };
  # Enable automatic login for the user.
  services.xserver.displayManager.autoLogin.enable = true;
  services.xserver.displayManager.autoLogin.user = "k";
  # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
  systemd.services."getty@tty1".enable = false;
  systemd.services."autovt@tty1".enable = false;
  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;
  environment.sessionVariables.NIXPKGS_ALLOW_UNFREE = "1";
  environment.enableAllTerminfo = true;
  # List packages installed in system profile.
  environment.systemPackages = with pkgs; [
    ddate
  ];
  powerManagement.enable = true;
  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users."k" = {
    isNormalUser = true;
    description = "k-ot";
    extraGroups = [ "wheel" "networkmanager" "dialout" ];
  };
}