Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # configuration.nix:
- { config, pkgs, lib, ... }:
- {
- imports =
- [ # Include the results of the hardware scan.
- ./zfs-master.nix
- ./hardware-configuration.nix
- ];
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
- boot.loader.efi.efiSysMountPoint = "/boot";
- # networking.hostName = "nixos"; # Define your hostname.
- networking.hostId = "197d521a";
- networking.bridges.br0.interfaces = [ "enp5s0" ];
- networking.firewall.enable = false;
- i18n = {
- consoleFont = "Lat2-Terminus16";
- consoleKeyMap = "de";
- defaultLocale = "en_US.UTF-8";
- };
- time.timeZone = "Europe/Amsterdam";
- services = {
- pcscd = {
- enable = true;
- plugins = with pkgs; [ pcsc-cyberjack ];
- };
- printing.enable = true;
- openssh.enable = true;
- xserver = {
- enable = true;
- layout = "de";
- xkbOptions = "eurosign:e";
- };
- };
- sound.enable = true;
- hardware.pulseaudio.enable = true;
- # for steam
- hardware.opengl.driSupport32Bit = true;
- hardware.pulseaudio.support32Bit = true;
- users.extraUsers.weber = {
- isNormalUser = true;
- uid = 1000;
- extraGroups = ["wheel" "audio" "cdrom" "docker" ];
- shell = pkgs.zsh;
- };
- system.copySystemConfiguration = true;
- system.stateVersion = "18.03"; # Did you read the comment?
- # TODO: zfs base
- virtualisation.docker.enable = true;
- nixpkgs.config.allowUnfree = true;
- nix.useSandbox = true;
- }
- #hardware-configuration.nix
- { config, lib, pkgs, ... }:
- {
- imports =
- [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
- ];
- boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
- boot.kernelModules = [ "kvm-intel" ];
- boot.extraModulePackages = [ ];
- boot.supportedFilesystems = [ "zfs" ];
- boot.zfs.enableUnstable = true;
- fileSystems."/" =
- { device = "zroot/crypt/root";
- fsType = "zfs";
- };
- fileSystems."/var/lib" =
- { device = "zroot/crypt/var-lib";
- fsType = "zfs";
- };
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/C211-257C";
- fsType = "vfat";
- };
- fileSystems."/tmp" =
- { device = "zroot/crypt/tmp";
- fsType = "zfs";
- };
- fileSystems."/home" =
- { device = "zroot/crypt/home";
- fsType = "zfs";
- };
- swapDevices = [ ];
- nix.maxJobs = lib.mkDefault 4;
- powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
- boot.extraModprobeConfig = ''
- options usbcore old_scheme_first=1
- options zfs zfs_arc_max=1073741824
- '';
- boot.kernelParams = [
- "zfs.zfs_arc_max=1073741824"
- ];
- }
- #./zfs-master.nix
- { pkgs, options, lib, config, ... }:
- with pkgs;
- {
- boot.kernelPackages = lib.traceVal (lib.filterAttrs ( n: v: n != "zfsUnstable" && n != "zfs" && n != "zfsStable" && n != "zfsLegacyCrypto" ) ( pkgs.linuxPackages ));
- }
- % sudo nixos-rebuild build
- building Nix...
- building the system configuration...
- trace: { __unfix__ = <CODE>; acpi_call = <CODE>; amdgpu-pro = <CODE>; ati_drivers_x11 = <CODE>; batman_adv = <CODE>; bbswitch = <CODE>; bcc = <CODE>; beegfs-module = <CODE>; blcr = <CODE>; broadcom_sta = <CODE>; callPackage = <CODE>; cpupower = <CODE>; cryptodev = <CODE>; dpdk = <CODE>; e1000e = <CODE>; ena = <CODE>; evdi = <CODE>; exfat-nofuse = <CODE>; extend = <CODE>; facetimehd = <CODE>; fusionio-vsl = <CODE>; hyperv-daemons = <CODE>; ixgbevf = <CODE>; jool = <CODE>; kernel = <CODE>; lttng-modules = <CODE>; mba6x_bl = <CODE>; mwprocapture = <CODE>; mxu11x0 = <CODE>; ndiswrapper = <CODE>; netatop = <CODE>; nvidiaPackages = <CODE>; nvidia_x11 = <CODE>; nvidia_x11_beta = <CODE>; nvidia_x11_legacy304 = <CODE>; nvidia_x11_legacy340 = <CODE>; nvidiabl = <CODE>; odp-dpdk = <CODE>; ofp = <CODE>; openafs = <CODE>; perf = <CODE>; phc-intel = <CODE>; pktgen = <CODE>; ply = <CODE>; prl-tools = <CODE>; recurseForDerivations = <CODE>; rtl8192eu = <CODE>; rtl8723bs = <CODE>; rtl8812au = <CODE>; rtl8814au = <CODE>; rtlwifi_new = <CODE>; sch_cake = <CODE>; spl = <CODE>; splLegacyCrypto = <CODE>; splStable = <CODE>; splUnstable = <CODE>; stdenv = <CODE>; sysdig = <CODE>; systemtap = <CODE>; tp_smapi = <CODE>; usbip = <CODE>; v4l2loopback = <CODE>; v86d = <CODE>; vhba = <CODE>; virtualbox = <CODE>; virtualboxGuestAdditions = <CODE>; wireguard = <CODE>; x86_energy_perf_policy = <CODE>; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement