mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-21 21:04:41 +01:00
what am i doing with my life
This commit is contained in:
parent
5bf4a00b13
commit
c92fcd06f8
|
@ -96,7 +96,7 @@ with builtins;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim wget git neofetch pciutils pavucontrol font-manager zip unzip gnutar
|
neovim wget git neofetch pciutils pavucontrol font-manager zip unzip gnutar
|
||||||
iw btop xdotool xorg.xwininfo nodejs gparted networkmanagerapplet
|
iw btop xdotool xorg.xwininfo nodejs gparted networkmanagerapplet
|
||||||
mailspring betterdiscordctl fluffychat pulseaudioFull speedtest-cli
|
mailspring betterdiscordctl pulseaudioFull speedtest-cli
|
||||||
librewolf polymc jdk8 jdk11 jdk vlc xfce.thunar xfce.tumbler
|
librewolf polymc jdk8 jdk11 jdk vlc xfce.thunar xfce.tumbler
|
||||||
xfce.thunar-archive-plugin gnome.file-roller uhk-agent spotify spotify-tray
|
xfce.thunar-archive-plugin gnome.file-roller uhk-agent spotify spotify-tray
|
||||||
spotify-tui cool-retro-term lutris libsecret gh xorg.xhost helvum
|
spotify-tui cool-retro-term lutris libsecret gh xorg.xhost helvum
|
||||||
|
@ -107,6 +107,7 @@ with builtins;
|
||||||
# python39Packages.pip python39Packages.setuptools python39Packages.ipykernel
|
# python39Packages.pip python39Packages.setuptools python39Packages.ipykernel
|
||||||
fzf openrgb krita gimp inkscape blender virglrenderer ddccontrol-db
|
fzf openrgb krita gimp inkscape blender virglrenderer ddccontrol-db
|
||||||
glab firebird-emu
|
glab firebird-emu
|
||||||
|
discord
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.pathsToLink = [
|
environment.pathsToLink = [
|
||||||
|
@ -141,7 +142,8 @@ with builtins;
|
||||||
# accidentally delete configuration.nix.
|
# accidentally delete configuration.nix.
|
||||||
# system.copySystemConfiguration = true;
|
# system.copySystemConfiguration = true;
|
||||||
|
|
||||||
# networking.firewall.allowedTCPPorts = [ 4713 ];
|
networking.firewall.allowedTCPPorts = [ 8384 22000 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 8080 22000 21027 ];
|
||||||
systemd.services."NetworkManager-wait-online".enable = false;
|
systemd.services."NetworkManager-wait-online".enable = false;
|
||||||
|
|
||||||
# release channel
|
# release channel
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660252108,
|
"lastModified": 1660574517,
|
||||||
"narHash": "sha256-fpY8X+eJmClJyVnMQJ7bpsNgn/CxPE9+UkkJ0FRIKQ8=",
|
"narHash": "sha256-Lp5D2pAPrM3iAc1eeR0iGwz5rM+SYOWzVxI3p17nlrU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "324fedcf9f1c475e2f522d03af029528e65969bc",
|
"rev": "688e5c85b7537f308b82167c8eb4ecfb70a49861",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -37,11 +37,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660275424,
|
"lastModified": 1660540332,
|
||||||
"narHash": "sha256-OVjapp+VIt3a/qQm5oSwNuoDbvIRbMk8tbbzWJb2zVc=",
|
"narHash": "sha256-ZlTlrculh/qAzeZOq4laTRGZ7Da8pMyncHTOVVt3M1M=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d977d658816cb84d3a38065846e3f2d7e96dccb2",
|
"rev": "29136a94b92f2c0959abcb099d40cc87869b8a1f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
|
@ -7,6 +7,7 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpks.follows = "nixpkgs";
|
inputs.nixpks.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nixos-hardware.url = github:kekrby/nixos-hardware;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }: {
|
outputs = { self, nixpkgs, home-manager, ... }: {
|
||||||
|
@ -14,8 +15,7 @@
|
||||||
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
|
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
# ./host/myhost/configuration.nix
|
./monosodium-glutamate-g/configuration.nix
|
||||||
./configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
@ -26,6 +26,21 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
potatobook-g = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./potatobook-g/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.jade = { nixosConfig, pkgs, ... }: {
|
||||||
|
home.sessionVariables.TZ = nixosConfig.time.timeZone;
|
||||||
|
home.stateVersion = "${nixosConfig.system.stateVersion}";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
nixos-hardware.nixosModules.apple-t2
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -188,7 +188,7 @@ in with lib; {
|
||||||
gaps = {
|
gaps = {
|
||||||
inner = 15;
|
inner = 15;
|
||||||
outer = 0;
|
outer = 0;
|
||||||
smartGaps = true;
|
smartGaps = false;
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
background = "#1d2021";
|
background = "#1d2021";
|
||||||
|
|
|
@ -40,6 +40,13 @@
|
||||||
"/share/nix-direnv"
|
"/share/nix-direnv"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.syncthing = rec {
|
||||||
|
enable = true;
|
||||||
|
user = "jade";
|
||||||
|
dataDir = "/home/${user}/Documents";
|
||||||
|
configDir = "/home/${user}/Documents/.config/syncthing";
|
||||||
|
};
|
||||||
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
61
potatobook-g/configuration.nix
Normal file
61
potatobook-g/configuration.nix
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
|
||||||
|
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
|
||||||
|
# ./t2.nix
|
||||||
|
../common.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# boot.supportedFilesystems = pkgs.lib.mkForce [ "ext4" "btrfs" "squashfs" ];
|
||||||
|
# networking.wireless.enable = pkgs.lib.mkForce false;
|
||||||
|
|
||||||
|
# services.xserver.displayManager.autoLogin.user = pkgs.lib.mkForce "jade";
|
||||||
|
# users.users.jade = pkgs.lib.mkForce {
|
||||||
|
# isNormalUser = true;
|
||||||
|
# extraGroups = [ "wheel" "input" "uinput" "libvirtd" ];
|
||||||
|
# packages = with pkgs; [
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
jade = {
|
||||||
|
desktop.enable = true;
|
||||||
|
desktop.compositing = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
networking.hostName = "potatobook-g";
|
||||||
|
|
||||||
|
services.xserver.layout = "us";
|
||||||
|
services.xserver.xkbVariant = "altgr-intl";
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.keyboard.uhk.enable = true;
|
||||||
|
|
||||||
|
# missing: menu-qalc picom-jonaburg
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# TODO: clean up.
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.pathsToLink = [
|
||||||
|
"/share/nix-direnv"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.blueman.enable = true;
|
||||||
|
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
programs.seahorse.enable = true;
|
||||||
|
security.pam.services.jade.enableGnomeKeyring = true;
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
|
||||||
|
# networking.firewall.allowedTCPPorts = [ 4713 ];
|
||||||
|
systemd.services."NetworkManager-wait-online".enable = false;
|
||||||
|
|
||||||
|
# release channel
|
||||||
|
system.stateVersion = "22.05"; # Did you read the comment?
|
||||||
|
}
|
||||||
|
|
BIN
potatobook-g/firmware-source.tar
Normal file
BIN
potatobook-g/firmware-source.tar
Normal file
Binary file not shown.
9
potatobook-g/iso.nix
Normal file
9
potatobook-g/iso.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{config, pkgs, ...}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
|
||||||
|
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
23
potatobook-g/packages/apple-bce/default.nix
Normal file
23
potatobook-g/packages/apple-bce/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{ stdenv, lib, fetchFromGitHub, kernel, kmod }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "apple-bce-${version}-${kernel.version}";
|
||||||
|
gitCommit = "f93c6566f98b3c95677de8010f7445fa19f75091";
|
||||||
|
version = "${gitCommit}";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "t2linux";
|
||||||
|
repo = "apple-bce-drv";
|
||||||
|
rev = "${gitCommit}";
|
||||||
|
sha256 = "sha256-5jvfDSa7tHp6z+E+RKIalNiLpsku1RNnKoJV2Ps8288=";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardeningDisable = [ "pic" "format" ];
|
||||||
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"KERNELRELEASE=${kernel.modDirVersion}"
|
||||||
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
"INSTALL_MOD_PATH=$(out)"
|
||||||
|
];
|
||||||
|
}
|
23
potatobook-g/packages/apple-ib-drv/default.nix
Normal file
23
potatobook-g/packages/apple-ib-drv/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{ stdenv, lib, fetchFromGitHub, kernel, kmod }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "apple-ib-drv-${version}-${kernel.version}";
|
||||||
|
gitCommit = "d8411ad1d87db8491e53887e36c3d37f445203eb";
|
||||||
|
version = "${gitCommit}";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "t2linux";
|
||||||
|
repo = "apple-ib-drv";
|
||||||
|
rev = "${gitCommit}";
|
||||||
|
sha256 = "sha256-mPx9Y4488pcxnJ5iyeNRuWvnyluHXmOOBnRNw+GAC2k=";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardeningDisable = [ "pic" "format" ];
|
||||||
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"KERNELRELEASE=${kernel.modDirVersion}"
|
||||||
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
"INSTALL_MOD_PATH=$(out)"
|
||||||
|
];
|
||||||
|
}
|
42
potatobook-g/packages/linux-mbp/default.nix
Normal file
42
potatobook-g/packages/linux-mbp/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ pkgs, stdenv, lib, buildLinux, ... } @ args:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
kernelVersion = "5.18.16";
|
||||||
|
patches = pkgs.fetchFromGitHub {
|
||||||
|
owner = "Redecorating";
|
||||||
|
repo = "linux-t2-arch";
|
||||||
|
rev = "2222222222222222222222222222222222222222222222222222";
|
||||||
|
sha256 = "sha256-/gxnq0Gz/N1u6m/oes7a6NlJQ7CoMwnFNxztQhDt46Q=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
buildLinux (args // rec {
|
||||||
|
version = "${kernelVersion}-mbp";
|
||||||
|
modDirVersion = kernelVersion;
|
||||||
|
extraMeta.branch = versions.majorMinor version;
|
||||||
|
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "mirror://kernel/linux/kernel/v5.x/linux-${kernelVersion}.tar.xz";
|
||||||
|
sha256 = "sha256-8fWGJR5j3hTIbl+VuWvrFaBDTx5uId94jRI1ZK8NEc4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
kernelPatches = [
|
||||||
|
#rec { name = "0001-arch-additions"; patch = "${patches}/${name}.patch"; }
|
||||||
|
#rec { name = "1001-Put-apple-bce-and-apple-ibridge-in-drivers-staging"; patch = "${patches}/${name}.patch"; }
|
||||||
|
#rec { name = "1002-add-modalias-to-apple-bce"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "2001-fix-acpica-for-zero-arguments-acpi-calls"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "2002-efi-Correct-Macmini-capitalisation-in-uefi-cert-quir"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "3001-applesmc-convert-static-structures-to-drvdata"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "3002-applesmc-make-io-port-base-addr-dynamic"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "3003-applesmc-switch-to-acpi_device-from-platform"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "3004-applesmc-key-interface-wrappers"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "3005-applesmc-basic-mmio-interface-implementation"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "3006-applesmc-fan-support-on-T2-Macs"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "3007-applesmc-Add-iMacPro-to-applesmc_whitelist"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "4001-Input-bcm5974-Add-support-for-the-T2-Macs"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "5001-Fix-for-touchbar"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "8001-asahilinux-wifi-patchset"; patch = "${patches}/${name}.patch"; }
|
||||||
|
rec { name = "8002-asahilinux-hci_bcm4377-patchset"; patch = "${patches}/${name}.patch"; }
|
||||||
|
];
|
||||||
|
} // (args.argsOverride or { }))
|
33
potatobook-g/t2.nix
Normal file
33
potatobook-g/t2.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
in {
|
||||||
|
# from https://github.com/tpwrules/nixos-m1/blob/main/nix/m1-support/firmware/default.nix
|
||||||
|
nixpkgs.overlays = [ (self: super: {
|
||||||
|
linux-mbp = super.callPackage ./packages/linux-mbp { };
|
||||||
|
apple-bce = super.callPackage ./packages/apple-bce { kernel = self.linux-mbp; };
|
||||||
|
apple-ib-drv = super.callPackage ./packages/apple-ib-drv { kernel = self.linux-mbp; };
|
||||||
|
}) ];
|
||||||
|
|
||||||
|
hardware.firmware = [
|
||||||
|
(pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = "firmware";
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out/lib/firmware
|
||||||
|
FIRMWARE=`echo ${./.}/*firmware*.tar`
|
||||||
|
if [ -e "$FIRMWARE" ]; then
|
||||||
|
tar xf "$FIRMWARE" -C $out/lib/firmware
|
||||||
|
# move firmware for my specific device
|
||||||
|
mv $out/lib/firmware/C-4377__s-B3/* $out/lib/firmware
|
||||||
|
find $out/lib/firmware -depth -type d -empty -delete
|
||||||
|
else
|
||||||
|
# stop nixos infra from breaking when it doesn't have any firmware
|
||||||
|
touch $out/lib/firmware/.dummy
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-mbp;
|
||||||
|
boot.extraModulePackages = [ pkgs.apple-bce pkgs.apple-ib-drv ];
|
||||||
|
boot.initrd.kernelModules = [ "apple_bce" "apple-ibridge" "apple-ib-tb" ];
|
||||||
|
}
|
1
scripts/desktop/window_screenshot.nix
Normal file
1
scripts/desktop/window_screenshot.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
with import <nixpkgs> {};
|
Loading…
Reference in a new issue