Summary Files Commits Branches @commit @diff @stats
path: root / configuration.nix
diff options
context:
space:
mode:
Commitd0caf89ffc06104cb9c077c299a96b778d5db79b (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-11-29 19:44:57 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-11-29 19:44:57 +0200
Files1f4850021bc37dd9a0531206e60fcf795b343461 /configuration.nix
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.tar
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.tar.gz
nix-d0caf89ffc06104cb9c077c299a96b778d5db79b.zip
Parent3c2f7173c7620e14ef349ab36df14bf07f109d66 (diff)
(all) Overhaul, moved all package and their configs into packages/default.nix, reordered configuration.nix
1 files changed, 113 insertions, 67 deletions
-rw-r--r--configuration.nix180
diff --git a/configuration.nix b/configuration.nix
index 458c62d..2263b61 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -1,18 +1,46 @@
-# Edit this configuration file to define what should be installed on
-# your system. Help is available in the configuration.nix(5) man page
-# and in the NixOS manual (accessible by running `nixos-help`).
-
-{ config, pkgs, ... }:
-
-let
- sysidentity = { name="juno"; type="laptop"; };
-in {
+{ config, pkgs, ... }: {
imports =
[ # Include the results of the hardware scan.
- ./packages.nix
./services.nix
];
+ # This value determines the NixOS release from which the default
+ # settings for stateful data, like file locations and database versions
+ # on your system were taken. It's perfectly fine and recommended to leave
+ # this value at the release version of the first install of this system.
+ # Before changing this value read the documentation for this option
+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
+ system.stateVersion = "23.05"; # Did you read the comment?
+
+ # Copy the NixOS configuration file and link it from the resulting system
+ # (/run/current-system/configuration.nix). This is useful in case you
+ # accidentally delete configuration.nix.
+ # Not available with flakes
+ # system.copySystemConfiguration = true;
+
+ nix.settings.experimental-features = [ "nix-command" "flakes" ];
+
+ environment.systemPackages = with pkgs; [
+ pipewire networkmanager
+ ];
+
+ #
+ # Kernel
+ #
+
+ boot.kernelModules = [ "kvm-intel" ];
+
+ # Is this for kernel?
+ # console = {
+ # font = "Lat2-Terminus16";
+ # keyMap = "us";
+ # useXkbConfig = true; # use xkbOptions in tty.
+ # };
+
+ #
+ # Bootloader
+ #
+
# Use the systemd-boot EFI boot loader.
# boot.loader.systemd-boot.enable = true;
# boot.loader.efi.canTouchEfiVariables = true;
@@ -28,35 +56,18 @@ in {
device = "nodev"; # or "nodev" for efi only
};
- networking.hostName = sysidentity.name; # Define your hostname.
- # Pick only one of the below networking options.
- # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
- networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
- networking.extraHosts = ''
- 127.0.0.1 synd.local
- '';
+ #
+ # Timezone and locale
+ #
# Set your time zone.
time.timeZone = "Europe/Sofia";
-
- # Configure network proxy if necessary
- # networking.proxy.default = "http://user:password@proxy:port/";
- # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
-
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
- # console = {
- # font = "Lat2-Terminus16";
- # keyMap = "us";
- # useXkbConfig = true; # use xkbOptions in tty.
- # };
-
- # Enable CUPS to print documents.
- services.printing.enable = true;
- # Enable sound.
- sound.enable = true;
- # hardware.pulseaudio.enable = true;
+ #
+ # Users
+ #
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.kamen = {
@@ -66,53 +77,88 @@ in {
shell = pkgs.zsh;
homeMode = "711"; # mostly done for httpd access
};
-programs.zsh.enable = true;
-
- environment.shells = with pkgs; [ zsh ];
+ # TODO
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
+ #
+ # Graphics
+ #
+
+ # https://nixos.wiki/wiki/Accelerated_Video_Playback
+ nixpkgs.config.packageOverrides = pkgs: {
+ vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
+ };
+ hardware.opengl = {
+ enable = true;
+ extraPackages = with pkgs; [
+ intel-media-driver # LIBVA_DRIVER_NAME=iHD
+ vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
+ vaapiVdpau
+ libvdpau-va-gl
+ ];
+ };
+
+
+ #
+ # Sound
+ #
+
+ sound.enable = true;
+ # hardware.pulseaudio.enable = true;
+
+ services.pipewire = {
+ enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ };
+
+ #
+ # Networking
+ #
+
+ # Pick only one of the below networking options.
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+ networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
+ networking.extraHosts = ''
+ 127.0.0.1 synd.local
+ '';
+
+ # Configure network proxy if necessary
+ # networking.proxy.default = "http://user:password@proxy:port/";
+ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
- # Copy the NixOS configuration file and link it from the resulting system
- # (/run/current-system/configuration.nix). This is useful in case you
- # accidentally delete configuration.nix.
- # system.copySystemConfiguration = true;
+ # zeroconf networking
+ services.avahi = {
+ enable = true;
+ nssmdns = true;
+ openFirewall = true;
+ };
- # This value determines the NixOS release from which the default
- # settings for stateful data, like file locations and database versions
- # on your system were taken. It's perfectly fine and recommended to leave
- # this value at the release version of the first install of this system.
- # Before changing this value read the documentation for this option
- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
- system.stateVersion = "23.05"; # Did you read the comment?
+ #
+ # Bluetooth
+ #
+
+ hardware.bluetooth.enable = true;
- # hardware.bluetooth.enable = true;
- # hardware.sane.enable = true;
- # hardware.rtl-sdr.enable = true;
- # virtualisation.docker.enable = true;
#
- # security.polkit.enable = true;
- # boot.kernelModules = [ "kvm-intel" ];
+ # Printers and scanners
+ #
- # https://nixos.wiki/wiki/Accelerated_Video_Playback
- # nixpkgs.config.packageOverrides = pkgs: {
- # vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
- # };
- # hardware.opengl = {
- # enable = true;
- # extraPackages = with pkgs; [
- # intel-media-driver # LIBVA_DRIVER_NAME=iHD
- # vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
- # vaapiVdpau
- # libvdpau-va-gl
- # ];
- # };
+ # Enable CUPS to print documents.
+ services.printing.enable = true;
+ hardware.sane.enable = true;
- nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ #
+ # Other hardware
+ #
+
+ hardware.rtl-sdr.enable = true;
}