mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-23 13:44:42 +01:00
203 lines
5 KiB
Nix
203 lines
5 KiB
Nix
{ pkgs, ... }:
|
|
let
|
|
evremap = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "evremap";
|
|
version = "0.1.0";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "wez";
|
|
repo = "evremap";
|
|
rev = "4480c4eda223b98899b0fbd926bc34f7bd0e1a18";
|
|
sha256 = "sha256-BxSrphgW1n465FX6bKVkq6O0XE2JqanfSYlsGwWUWkQ=";
|
|
};
|
|
cargoHash = "";
|
|
cargoLock.lockFile = ../../other/evremap.Cargo.lock;
|
|
postPatch = ''
|
|
cp ${../../other/evremap.Cargo.lock} Cargo.lock
|
|
'';
|
|
nativeBuildInputs = [ pkgs.pkg-config ];
|
|
buildInputs = [ pkgs.libevdev ];
|
|
};
|
|
in {
|
|
nix.settings = {
|
|
trusted-substituters = [
|
|
"https://t2linux.cachix.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"t2linux.cachix.org-1:P733c5Gt1qTcxsm+Bae0renWnT8OLs0u9+yfaK2Bejw="
|
|
];
|
|
};
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
../../common.nix
|
|
../../modules
|
|
#inputs.mms.module
|
|
];
|
|
|
|
#nixpkgs = {
|
|
#overlays = [
|
|
#(self: super: {
|
|
#linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override {
|
|
#structuredExtraConfig = with lib.kernel; {
|
|
##"FB" = yes;
|
|
##"FRAMEBUFFER_CONSOLE" = yes;
|
|
##"VGA_CONSOLE" = yes;
|
|
##"VIDEO_SELECT" = yes;
|
|
#LOGO = lib.mkForce yes;
|
|
#LOGO_LINUX_CLUT224 = yes;
|
|
#};
|
|
#ignoreConfigErrors = true;
|
|
#});
|
|
#})
|
|
#];
|
|
#};
|
|
#boot.kernelPatches = [
|
|
#{
|
|
#name = "fomx";
|
|
#patch = ../other/0001-fomx.patch;
|
|
#}
|
|
#];
|
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
|
|
jade = {
|
|
flatpak.enable = true;
|
|
desktop = {
|
|
compositing.enable = true;
|
|
syncthing.enable = true;
|
|
kdeconnect.enable = true;
|
|
cloud.enable = true;
|
|
social.enable = true;
|
|
mail.enable = true;
|
|
};
|
|
helix.enable = true;
|
|
zellij.enable = true;
|
|
terminal.enable = true;
|
|
zsh.enable = true;
|
|
};
|
|
|
|
fileSystems = {
|
|
"/".options = [ "compress=zstd:3" ];
|
|
"/home".options = [ "compress=zstd:3" ];
|
|
"/nix".options = [ "compress=zstd:3" "noatime" ];
|
|
#"/swap".options = [ "noatime" ];
|
|
};
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
networking.hostName = "potatobook-g";
|
|
|
|
|
|
services.xserver = {
|
|
resolutions = [ { x = 1920; y = 1200; } ];
|
|
# dpi = 180;
|
|
layout = "us";
|
|
xkbVariant = "altgr-intl";
|
|
};
|
|
|
|
services.autorandr = {
|
|
enable = true;
|
|
profiles = {
|
|
"default" = {
|
|
config = {
|
|
"eDP-1" = {
|
|
enable = true;
|
|
mode = "1920x1200";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
hardware.keyboard.uhk.enable = true;
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
android-tools evremap
|
|
];
|
|
|
|
environment.pathsToLink = [
|
|
"/share/nix-direnv"
|
|
];
|
|
|
|
services.blueman.enable = true;
|
|
|
|
programs.adb.enable = true;
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
|
programs.seahorse.enable = true;
|
|
security.pam.services.jade.enableGnomeKeyring = true;
|
|
|
|
systemd.services."NetworkManager-wait-online".enable = false;
|
|
|
|
# services.pixiecore =
|
|
# let
|
|
# nixpkgs = builtins.getFlake "nixpkgs/nixos-unstable";
|
|
# sys = nixpkgs.lib.nixosSystem {
|
|
# system = "x86_64-linux";
|
|
# modules = [
|
|
# ({config, pkgs, lib, modulesPath, ...}: {
|
|
# imports = [
|
|
# (modulesPath + "/installer/netboot/netboot-base.nix")
|
|
# ];
|
|
|
|
# services.getty.autologinUser = lib.mkForce "root";
|
|
# console.keyMap = "de";
|
|
|
|
# system.stateVersion = config.system.nixos.release;
|
|
# environment.systemPackages = with pkgs; [
|
|
# helix nil git neofetch
|
|
# ];
|
|
|
|
# programs = {
|
|
# zsh = {
|
|
# enable = true;
|
|
# enableCompletion = true;
|
|
# };
|
|
# };
|
|
# })
|
|
# ];
|
|
# };
|
|
# build = sys.config.system.build;
|
|
# in {
|
|
# enable = true;
|
|
# openFirewall = true;
|
|
# kernel = "${build.kernel}/bzImage";
|
|
# initrd = "${build.netbootRamdisk}/initrd";
|
|
# cmdLine = "init=${build.toplevel}/init loglevel=4";
|
|
# };
|
|
|
|
systemd.services = {
|
|
create-swapfile = {
|
|
serviceConfig.Type = "oneshot";
|
|
wantedBy = [ "swap-swapfile.swap" ];
|
|
script = ''
|
|
swapfile="/swap/swapfile"
|
|
if [[ -f "$swapfile" ]]; then
|
|
echo "Swap file $swapfile already exists, taking no action"
|
|
else
|
|
echo "Setting up swap file $swapfile"
|
|
${pkgs.coreutils}/bin/truncate -s 0 "$swapfile"
|
|
${pkgs.e2fsprogs}/bin/chattr +C "$swapfile"
|
|
fi
|
|
'';
|
|
};
|
|
evremap = {
|
|
script = "${evremap}/bin/evremap remap ${../../other/remaps.toml}";
|
|
wantedBy = ["multi-user.target"];
|
|
};
|
|
};
|
|
|
|
services.logind.extraConfig = ''
|
|
RuntimeDirectorySize=12G
|
|
'';
|
|
|
|
# i rly should put that important big comment back here
|
|
system.stateVersion = "22.11"; # Did you read the comment?
|
|
}
|
|
|
|
|