227 lines
5.9 KiB
Nix
227 lines
5.9 KiB
Nix
# 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, lib, inputs, ... }:
|
||
|
||
{
|
||
imports =
|
||
[ # Include the results of the hardware scan.
|
||
./hardware-configuration.nix
|
||
];
|
||
|
||
programs.nh = {
|
||
enable = true;
|
||
clean.enable = true;
|
||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||
flake = "/home/alyx/.config/nixos";
|
||
};
|
||
|
||
programs.firejail = {
|
||
enable = true;
|
||
wrappedBinaries = {
|
||
packettracer9 = {
|
||
executable = lib.getExe pkgs.ciscoPacketTracer9;
|
||
|
||
# Will still want a .desktop entry as the package is not directly added
|
||
desktop = "${pkgs.ciscoPacketTracer9}/share/applications/cisco-packet-tracer-9.desktop";
|
||
|
||
extraArgs = [
|
||
# This should make it run in isolated netns, preventing internet access
|
||
"--net=none"
|
||
|
||
# firejail is only needed for network isolation so no futher profile is needed
|
||
"--noprofile"
|
||
|
||
# Packet tracer doesn't play nice with dark QT themes so this
|
||
# should unset the theme. Uncomment if you have this issue.
|
||
''--env=QT_STYLE_OVERRIDE=""''
|
||
];
|
||
};
|
||
};
|
||
};
|
||
|
||
programs.bash.shellAliases = {
|
||
nano = "nvim";
|
||
};
|
||
|
||
nixpkgs.config.rocmSupport = true;
|
||
|
||
services = {
|
||
asusd = {
|
||
enable = true;
|
||
enableUserService = true;
|
||
};
|
||
};
|
||
|
||
|
||
nix.package = pkgs.lix;
|
||
|
||
nix.settings.auto-optimise-store = true;
|
||
|
||
services.desktopManager.plasma6.enable = true;
|
||
services.displayManager.sddm.enable = true;
|
||
|
||
environment.pathsToLink = [ "/share/xdg-desktop-portal" ];
|
||
|
||
programs = {
|
||
#niri = {
|
||
# enable = true;
|
||
# package = inputs.niri.packages.${pkgs.stdenv.hostPlatform.system}.niri-unstable;
|
||
#};
|
||
flashrom.enable = true;
|
||
mango.enable = true;
|
||
nix-ld.enable = true;
|
||
nix-ld.libraries = with pkgs; [xorg.libxcb libao xorg.libX11 libusb1 cargo rustc pkg-config cacert];
|
||
};
|
||
|
||
services.journald.extraConfig = ''
|
||
SystemMaxUse=2G
|
||
'';
|
||
|
||
services.tailscale = {
|
||
enable = true;
|
||
useRoutingFeatures = "both";
|
||
};
|
||
|
||
boot.supportedFilesystems = ["exfat" "ntfs" "xfs"];
|
||
boot.loader.limine.enable = true;
|
||
boot.loader.limine.style.wallpapers = [];
|
||
boot.loader.limine.additionalFiles = {
|
||
"efi/memtest86.efi" = "${pkgs.memtest86-efi}/BOOTX64.efi";
|
||
"efi/shell.efi" = "${pkgs.edk2-uefi-shell}/shell.efi";
|
||
};
|
||
boot.loader.limine.extraEntries = ''
|
||
/memtest86
|
||
protocol: efi
|
||
path: boot():/limine/efi/memtest86/memtest86.efi
|
||
/shell
|
||
protocol: efi
|
||
path: boot():/limine/efi/shell.efi
|
||
'';
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
boot.initrd.systemd.enable = true;
|
||
boot.loader.efi.efiSysMountPoint = "/boot/";
|
||
boot.kernelParams = [ "i915.force_probe=!7d51" "xe.force_probe=7d51" ];
|
||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
|
||
|
||
boot.initrd.luks.devices = {
|
||
crypted = {
|
||
device = "/dev/disk/by-partuuid/766fb1bb-e9a0-4b72-b261-83edab61c560";
|
||
allowDiscards = true; # Used if primary device is a SSD
|
||
preLVM = true;
|
||
};
|
||
};
|
||
|
||
networking.hostName = "calufrax"; # Define your hostname.
|
||
|
||
powerManagement.cpuFreqGovernor = "performance";
|
||
|
||
# Configure network proxy if necessary
|
||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||
|
||
# Enable networking
|
||
hardware.graphics = {
|
||
enable = true;
|
||
enable32Bit = true;
|
||
extraPackages = with pkgs; [vpl-gpu-rt mesa.opencl libvdpau-va-gl intel-media-driver intel-vaapi-driver libva-vdpau-driver vulkan-validation-layers];
|
||
extraPackages32 = with pkgs; [driversi686Linux.mesa.opencl];
|
||
};
|
||
|
||
hardware.bluetooth.enable = true;
|
||
services.blueman.enable = true;
|
||
|
||
networking.networkmanager = {
|
||
enable = true;
|
||
# wifi.backend = "iwd";
|
||
};
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "Europe/London";
|
||
|
||
# Select internationalisation properties.
|
||
i18n.defaultLocale = "en_GB.UTF-8";
|
||
|
||
services.udisks2.enable = true;
|
||
|
||
i18n.extraLocaleSettings = {
|
||
LC_ADDRESS = "en_GB.UTF-8";
|
||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||
LC_MONETARY = "en_GB.UTF-8";
|
||
LC_NAME = "en_GB.UTF-8";
|
||
LC_NUMERIC = "en_GB.UTF-8";
|
||
LC_PAPER = "en_GB.UTF-8";
|
||
LC_TELEPHONE = "en_GB.UTF-8";
|
||
LC_TIME = "en_GB.UTF-8";
|
||
};
|
||
|
||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||
|
||
# Enable the X11 windowing system.
|
||
programs.dconf.enable = true;
|
||
|
||
# Configure keymap in X11
|
||
services.xserver.xkb = {
|
||
layout = "gb";
|
||
variant = "colemak";
|
||
};
|
||
|
||
console.useXkbConfig = true;
|
||
console.earlySetup = true;
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
services.printing.drivers = [pkgs.gutenprint];
|
||
|
||
security = {
|
||
rtkit.enable = true;
|
||
};
|
||
|
||
# Enable sound with pipewire.
|
||
services.pulseaudio.enable = false;
|
||
services.pipewire = {
|
||
enable = true;
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
# If you want to use JACK applications, uncomment this
|
||
jack.enable = true;
|
||
};
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
|
||
users.users.alyx = {
|
||
isNormalUser = true;
|
||
description = "Alyx";
|
||
extraGroups = [ "networkmanager" "wheel" "camera" "pipewire" ];
|
||
packages = with pkgs; [
|
||
];
|
||
};
|
||
|
||
services.libinput.enable = true;
|
||
|
||
# Allow unfree packages
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
environment.systemPackages = with pkgs; [
|
||
wget
|
||
ciscoPacketTracer9
|
||
neovim
|
||
cbfstool
|
||
git
|
||
#inputs.niri.packages.${pkgs.stdenv.hostPlatform.system}.xwayland-satellite-stable
|
||
pulseaudio
|
||
winetricks
|
||
p7zip
|
||
cabextract
|
||
unzip
|
||
wineWowPackages.stable
|
||
(pkgs.python3.withPackages (ps: with ps; [tkinter]))
|
||
];
|
||
|
||
system.stateVersion = "24.11"; # Did you read the comment?
|
||
|
||
}
|
||
|