refactore directory structure
This commit is contained in:
parent
3830eef1f4
commit
e87bfb7c39
485 changed files with 66 additions and 1696 deletions
13
systems/syl/cachix.nix
Normal file
13
systems/syl/cachix.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
# WARN: this file will get overwritten by $ cachix use <name>
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
folder = ./cachix;
|
||||
toImport = name: value: folder + ("/" + name);
|
||||
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
|
||||
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
|
||||
in {
|
||||
inherit imports;
|
||||
nix.settings.substituters = ["https://cache.nixos.org/"];
|
||||
}
|
11
systems/syl/cachix/nix-community.nix
Normal file
11
systems/syl/cachix/nix-community.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
{
|
||||
nix = {
|
||||
settings.substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
settings.trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
}
|
115
systems/syl/configuration.nix
Normal file
115
systems/syl/configuration.nix
Normal file
|
@ -0,0 +1,115 @@
|
|||
{ lib, config, pkgs, callPackage, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../../cachix/default.nix
|
||||
../../pkgs/base-packages.nix
|
||||
../../pkgs/desktop-packages.nix
|
||||
../../modules/base.nix
|
||||
../../modules/emacs.nix
|
||||
../../modules/desktop.nix
|
||||
];
|
||||
networking.hostName = "syl"; # Define your hostname.
|
||||
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
hardware.acpilight.enable = lib.mkDefault true;
|
||||
networking.interfaces.wlp170s0.useDHCP = true;
|
||||
|
||||
hardware.uinput.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["intel"];
|
||||
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)
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.display-manager = {
|
||||
wants = [ "systemd-user-sessions.service" "multi-user.target" "network-online.target" ];
|
||||
after = [ "systemd-user-sessions.service" "multi-user.target" "network-online.target" ];
|
||||
};
|
||||
|
||||
# Enable fingerprint
|
||||
services.fprintd.enable = true;
|
||||
|
||||
# Some other things
|
||||
services.thermald.enable = true;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC="performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT="powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT="power";
|
||||
PCIE_ASPM_ON_AC="default";
|
||||
PCIE_ASPM_ON_BAT="powersupersave";
|
||||
SCHED_POWERSAVE_ON_AC=0;
|
||||
SCHED_POWERSAVE_ON_BAT=1;
|
||||
START_CHARGE_THRESH_BAT1=70;
|
||||
STOP_CHARGE_THRESH_BAT1=80;
|
||||
USB_ALLOWLIST="32ac:0002";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.xserver.libinput.enable = true;
|
||||
services.xserver.dpi = 144;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.chris = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "adbusers" "wheel" "networkmanager" "input" "uinput" ];
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
services.locate = {
|
||||
enable = true;
|
||||
locate = pkgs.plocate;
|
||||
localuser = null;
|
||||
interval = "hourly";
|
||||
prunePaths = [ "/tmp" "/nix/store" "/nix/var/log/nix" "/etc" "/bin" "/boot" "/usr" "/var" "/run" "/srv" "/sys" "/root" "/proc" "/opt" "/dev" "/home/chris/.emacs.d" "/home/chris/.config" "/home/chris/.nix-profile" "/home/chris/.profile" "/home/chris/dev/nixpkgs" "/home/chris/.cache" "/home/chris/.local" "/home/chris/.dotemacs" "/home/chris/.cargo" "/home/chris/.mozilla" "/home/chris/.var" "/home/chris/.dotfiles" "/home/chris/.dbus" "/home/chris/.android" "/var/lib"];
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# 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 = "21.11"; # Did you read the comment?
|
||||
|
||||
}
|
41
systems/syl/hardware-configuration.nix
Normal file
41
systems/syl/hardware-configuration.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" "acpi_call" ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
||||
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/db28ba7c-a15d-4c81-8373-99f2f171cac5";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{ device = "/dev/disk/by-uuid/BA76-3723";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# high-resolution display
|
||||
# hardware.video.hidpi.enable = lib.mkDefault true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue