"Add xps15, a bunch of other stuff"

This commit is contained in:
SeanOMik 2023-01-31 22:19:31 -05:00
parent 6b03795db0
commit 96651f9f6d
Signed by: SeanOMik
GPG Key ID: 568F326C7EB33ACB
19 changed files with 343 additions and 347 deletions

View File

@ -1,6 +1,10 @@
{ pkgs, home-manager, unstable, ... }:
{
system.stateVersion = "22.05";
system.stateVersion = "22.11";
system.autoUpgrade.enable = true;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
time = {
timeZone = "America/New_York";
@ -13,4 +17,16 @@
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
age.identityPaths = [
"/root/.ssh/secrets_sshkey"
];
age.secrets.serverwg-priv.file = ./secrets/serverwg-priv.age;
age.secrets.vpnboxwg-priv.file = ./secrets/vpnboxwg-priv.age;
nixpkgs.overlays = [
(import "${builtins.fetchTarball { url="https://github.com/vlaci/openconnect-sso/archive/master.tar.gz"; sha256="sha256:04kwar7cxz7399bwlka6raqwq5jd27khkjdxk11k08846bkjckx5"; } }/overlay.nix")
];
}

View File

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1652712410,
"narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=",
"lastModified": 1673301561,
"narHash": "sha256-gRUWHbBAtMuPDJQXotoI8u6+3DGBIUZHkyQWpIv7WpM=",
"owner": "ryantm",
"repo": "agenix",
"rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b",
"rev": "42d371d861a227149dc9a7e03350c9ab8b8ddd68",
"type": "github"
},
"original": {
@ -18,255 +18,75 @@
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1659421644,
"narHash": "sha256-b7M9YxF2C1CClvbS5NMjheiyLF8KzX03eiVfYtXbVEw=",
"owner": "nix-community",
"repo": "fenix",
"rev": "862c23b3607d13166ef7493c7dc0995b1771a583",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flatpak": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1662408312,
"narHash": "sha256-H1kmMTmXLud5duk6O+wR0zWU7TPh37y1uDB7SAfpW/w=",
"owner": "yawnt",
"repo": "declarative-nix-flatpak",
"rev": "a82b3b135f79b78c379c4f1b0c52957cd7ccf50c",
"type": "github"
},
"original": {
"owner": "yawnt",
"ref": "main",
"repo": "declarative-nix-flatpak",
"type": "github"
}
},
"git-crypt-agessh": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1651509804,
"narHash": "sha256-cHZ+90dcvL7Um7vUROiRD90L+d9I2curZ0tTuw9NIq4=",
"owner": "mtoohey31",
"repo": "git-crypt-agessh",
"rev": "9965d84ea97ad2eb0e3f8afd00001316c53a5603",
"type": "github"
},
"original": {
"owner": "mtoohey31",
"repo": "git-crypt-agessh",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
],
"utils": "utils"
},
"locked": {
"lastModified": 1656169755,
"narHash": "sha256-Nlnm4jeQWEGjYrE6hxi/7HYHjBSZ/E0RtjCYifnNsWk=",
"lastModified": 1672244468,
"narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4a3d01fb53f52ac83194081272795aa4612c2381",
"rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-22.05",
"ref": "release-22.11",
"repo": "home-manager",
"type": "github"
}
},
"libnbtplusplus": {
"flake": false,
"locked": {
"lastModified": 1650031308,
"narHash": "sha256-TvVOjkUobYJD9itQYueELJX3wmecvEdCbJ0FinW2mL4=",
"owner": "PolyMC",
"repo": "libnbtplusplus",
"rev": "2203af7eeb48c45398139b583615134efd8d407f",
"type": "github"
},
"original": {
"owner": "PolyMC",
"repo": "libnbtplusplus",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1638587357,
"narHash": "sha256-2ySMW3QARG8BsRPmwe7clTbdCuaObromOKewykP+UJc=",
"owner": "nixos",
"lastModified": 1665732960,
"narHash": "sha256-WBZ+uSHKFyjvd0w4inbm0cNExYTn8lpYFcHEes8tmec=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e34c5379866833f41e2a36f309912fa675d687c7",
"rev": "4428e23312933a196724da2df7ab78eb5e67a88e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-21.11",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1664904529,
"narHash": "sha256-mGlB/SQR4E9jb7fOOxCTJlwL6Mk1Dpyvi4UrOXL6C18=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b7a47253e0c8cb04c0a3f8ed3149e90229e62884",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1658912196,
"narHash": "sha256-GTP5XCLPU2Hg2bQC5dVqSBF9ef5C/J6pD4qM09Ba4Gk=",
"lastModified": 1673704454,
"narHash": "sha256-5Wdj1MgdOgn3+dMFIBtg+IAYZApjF8JzwLWDPieg0C4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d9536b9b1e33377fb520e115bc8588d093ed97be",
"rev": "a83ed85c14fcf242653df6f4b0974b7e1c73c6c6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-22.05",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1658119717,
"narHash": "sha256-4upOZIQQ7Bc4CprqnHsKnqYfw+arJeAuU+QcpjYBXW0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9eb60f25aff0d2218c848dd4574a0ab5e296cabe",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"polymc": {
"inputs": {
"flake-compat": "flake-compat",
"libnbtplusplus": "libnbtplusplus",
"nixpkgs": "nixpkgs_4",
"tomlplusplus": "tomlplusplus"
},
"locked": {
"lastModified": 1664716139,
"narHash": "sha256-oq1Th8mRjGbOgF9PNpPjGyOQv/y51G0jMARBXn0VH/Y=",
"owner": "PolyMC",
"repo": "PolyMC",
"rev": "e3e9e394985e0327efe882d7b4e4c1d6a6cb6491",
"type": "github"
},
"original": {
"owner": "PolyMC",
"repo": "PolyMC",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
"fenix": "fenix",
"flatpak": "flatpak",
"git-crypt-agessh": "git-crypt-agessh",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_3",
"polymc": "polymc",
"nixpkgs": "nixpkgs_2",
"unstable": "unstable"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1659363473,
"narHash": "sha256-uamnlKqr5eReaefkoo7/ki05ZvIlJFwdFNM4znNhUqY=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "8e38833c3674c1be7d81c6069c62e6ed52b18b27",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"tomlplusplus": {
"flake": false,
"locked": {
"lastModified": 1664034574,
"narHash": "sha256-EFMAl6tsTvkgK0DWC/pZfOIq06b2e5SnxJa1ngGRIQA=",
"owner": "marzer",
"repo": "tomlplusplus",
"rev": "8aa5c8b2a4ff2c440d4630addf64fa4f62146170",
"type": "github"
},
"original": {
"owner": "marzer",
"repo": "tomlplusplus",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1659131907,
"narHash": "sha256-8bz4k18M/FuVC+EVcI4aREN2PsEKT7LGmU2orfjnpCg=",
"lastModified": 1673631141,
"narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8d435fca5c561da8168abb30270788d2da2a7951",
"rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
"type": "github"
},
"original": {
@ -278,11 +98,11 @@
},
"utils": {
"locked": {
"lastModified": 1649676176,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {

114
flake.nix
View File

@ -2,110 +2,64 @@
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-22.05";
home-manager.url = "github:nix-community/home-manager/release-22.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
git-crypt-agessh.url = "github:mtoohey31/git-crypt-agessh";
git-crypt-agessh.inputs.nixpkgs.follows = "nixpkgs"; # idk if this is needed
polymc.url = "github:PolyMC/PolyMC";
flatpak.url = "github:yawnt/declarative-nix-flatpak/main";
};
# nixpkgs.overlays = [ inputs.polymc.overlay ];
outputs = inputs@{ nixpkgs, unstable, home-manager, agenix, flatpak, git-crypt-agessh, polymc, ... }:
outputs = inputs@{ nixpkgs, unstable, home-manager, agenix, ... }:
let
system = "x86_64-linux";
# nixpkgs.overlays = [ polymc.overlay ];
in
{
# nixpkgs.overlays = [
# (self: super: {
# discord = super.discord.overrideAttrs (_: {
# src = builtins.fetchTarball "https://dl.discordapp.net/apps/linux/0.0.19/discord-0.0.19.tar.gz";
# });
# })
# ];
nixosConfigurations = {
smallinux = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
# nixpkgs.overlays = [ polymc.overlay ];
modules =
let
# Inject unstable for inputs for modules
defaults = { pkgs, ... }: {
_module.args.unstable = import inputs.unstable {
inherit (pkgs.stdenv.targetPlatform) system;
config.allowUnfree = true;
};
# _module.args.flatpak = import inputs.flatpak {
# inherit (pkgs.stdenv.targetPlatform) system;
# };
};
in [
{
nixpkgs.overlays = [ polymc.overlay ];
}
# {
# nixpkgs.overlays =
# let
# discordOpenASAR = self: super: {
# discord = super.discord.override { withOpenASAR = true; };
# };
# in [
# discordOpenASAR
# ];
# }
{
nixosConfigurations =
let
# Inject unstable for inputs for modules
defaults = { pkgs, ... }: {
_module.args.unstable = import inputs.unstable {
inherit (pkgs.stdenv.targetPlatform) system;
config.allowUnfree = true;
};
};
in {
smallinux = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
defaults
home-manager.nixosModules.home-manager
agenix.nixosModule
{
# Install git-crypt-agessh for sensitives (public ips)
# https://github.com/mtoohey31/git-crypt-agessh
environment.systemPackages = [
inputs.git-crypt-agessh.packages.x86_64-linux.default
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
networking.hostName = "smallinux";
age.identityPaths = [
#"/etc/ssh/ssh_host_ed25519_key"
#"/root/.ssh/id_rsa"
"/root/.ssh/secrets_sshkey"
];
age.secrets.serverwg-priv.file = ./secrets/serverwg-priv.age;
age.secrets.vpnboxwg-priv.file = ./secrets/vpnboxwg-priv.age;
# packageOverrides = pkgs: with pkgs; rec {
# ftb-app = callPackage modules/pkgs/ftb-app.nix { };
# };
}
./common.nix
./hosts/smallinux.nix
];
};
xps15 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
defaults
home-manager.nixosModules.home-manager
agenix.nixosModule
{
networking.hostName = "xps15";
}
./common.nix
./hosts/xps15.nix
];
};
};
};
};
}

View File

@ -1,4 +0,0 @@
{ pkgs, ... }:
pkgs.discord.override {
nss = pkgs.nss_latest; #_3_81;
}

View File

@ -23,6 +23,8 @@
};
home-manager.users.seanomik = { pkgs, ... }: {
home.stateVersion = "22.11";
imports = [
./gnome-dconf.nix
../omz-zsh.nix # oh-my-zsh zsh config
@ -35,7 +37,7 @@
# Add open-in-vscode button to nemo
home = {
file.".local/share/nemo/actions/vscodium.nemo_action".source = ../vscodium.nemo_action;
file.".local/share/nemo/actions/vscode.nemo_action".source = ../vscode.nemo_action;
};
# home.programs.git = {
@ -44,14 +46,30 @@
# userEmail = "seanomik@gmail.com";
# };
home.packages = with pkgs; [
# pkgs.overlays = [
# (import "${builtins.fetchTarball { url="https://github.com/vlaci/openconnect-sso/archive/master.tar.gz"; sha256="sha256:04kwar7cxz7399bwlka6raqwq5jd27khkjdxk11k08846bkjckx5"; } }/overlay.nix")
# ];
home.packages = let
# pkgs.overlays = [
# (import "${builtins.fetchTarball { url="https://github.com/vlaci/openconnect-sso/archive/master.tar.gz"; sha256="sha256:04kwar7cxz7399bwlka6raqwq5jd27khkjdxk11k08846bkjckx5"; } }/overlay.nix")
# ];
# openconnectOverlay = import "${builtins.fetchTarball https://github.com/vlaci/openconnect-sso/archive/master.tar.gz}/overlay.nix";
# pkgss = import <nixpkgs> { overlays = [ openconnectOverlay ]; };
in with pkgs; [
# with pkgss; [
(callPackage ../../modules/applications/discord.nix { })
retroarch
openconnect-sso
vlc
lutris
valgrind
protontricks
# unstable.polymc
# (callPackage ../../modules/pkgs/polymc.nix { })
polymc
# polymc
prismlauncher
minecraft
zoom-us
mullvad-vpn
@ -75,6 +93,8 @@
virt-manager
hexchat
kdenlive
aria2
openconnect
];
};
}

View File

@ -12,7 +12,7 @@
peers = [
{
publicKey = "L4IDVkAyYdGjaSS6fGImV+F4xPK1YtVTdbVElwhRAHs=";
publicKey = "KDjqaXNcaWxLvNbOp+pu7TmxjML/uS8pXS5Z+fv7LjM=";
allowedIPs = [ "10.0.0.1/32" ];
endpoint = homeip + ":2751";
persistentKeepalive = 25;

11
home/vscode.nemo_action Normal file
View File

@ -0,0 +1,11 @@
[Nemo Action]
Active=true
Name=Open in vscode
Comment=Open current folder on vscode
Exec=code %P
Icon-Name=com.visualstudio.code
Selection=none
Extensions=any;
Quote=double
Dependencies=code;

View File

@ -2,7 +2,7 @@
{
programs.vscode = {
enable = true;
package = pkgs.vscodium;
package = pkgs.vscode;
# userSettings = {
# "workbench.colorTheme" = "Material Theme Ocean High Contrast";
# "tabnine.experimentalAutoImports" = "true";
@ -33,7 +33,14 @@
gruntfuggly.todo-tree
tabnine.tabnine-vscode
github.github-vscode-theme
ms-vscode-remote.remote-ssh
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
# {
# name = "open-remote-ssh";
# publisher = "jeanp413";
# version = "0.0.25";
# sha256 = "sha256-CbFZsoRiiwSWL7zJdnBcfrxuhE7E9Au2AlQjqauk+Nc=";
# }
{
name = "github-vscode-theme";
publisher = "GitHub";
@ -44,7 +51,7 @@
name = "vsc-material-theme";
publisher = "Equinusocio";
version = "33.5.0";
sha256 = "sha256-Lls979mJuKE0+oIPAuDyl60dRzJM3WsqlShKeHpFKd8=";
sha256 = "sha256-Lls979mJuKE0+oIPAuDyl60dRzJM3WsqlShKe\HpFKd8=";
}
{
name = "clang-tidy";
@ -145,8 +152,38 @@
{
name = "vscode-java-pack";
publisher = "vscjava";
version = "0.25.1";
sha256 = "sha256-hUE6k7R57TzizYYMhygAfiW+s0jCNu8hdSjHrm1kPV0=";
version = "0.25.2022092912";
sha256 = "sha256-JQ4y4Ug5z85SRQ06IBWROoKROdAiqFs7PbkZqdr6Kig=";
}
{
name = "java";
publisher = "redhat";
version = "1.12.2022102404";
sha256 = "sha256-Bz5bQrTS5TIRm1PjbvTTeLdvb2olv1qYW80uTMWla1s=";
}
{
name = "vscode-java-debug";
publisher = "vscjava";
version = "0.45.2022101323";
sha256 = "sha256-CtT3axuoLrGWdZyI68HRFfAhFMGj6dCQ8XX6ettdE1I=";
}
{
name = "vscode-java-test";
publisher = "vscjava";
version = "0.37.2022090902";
sha256 = "sha256-RJKzjZ0smb8dX4T9Mf6+h+T6P4vbWvNaQLdLebmTKZ4=";
}
{
name = "vscode-maven";
publisher = "vscjava";
version = "0.39.2022101303";
sha256 = "sha256-kD6ykdylP61eg50He8R8zoudlK+jANTfUICl4DrIK78=";
}
{
name = "vscode-java-dependency";
publisher = "vscjava";
version = "0.21.2022101300";
sha256 = "sha256-iZLeVLdOy0XiC5UwKmfBIfM01uMHH0AIxr4X7EFKdBo=";
}
{
name = "doxdocgen";

View File

@ -28,6 +28,7 @@
../modules/desktop_manager/gdm.nix
../modules/virtualisation
../modules/flatpak
# Applications
../modules/cli-tools.nix
@ -35,6 +36,7 @@
# Development
../modules/development
../modules/switch-udev.nix
# ssh
../modules/ssh/yubikey.nix

44
hosts/xps15.nix Executable file
View File

@ -0,0 +1,44 @@
{ pkgs, nixpkgs-unstable, home-manager, ... }:
{
# fileSystems."/mnt/data_drive" = {
# device = "/dev/disk/by-uuid/93861f2f-b63c-4201-8ae2-a533edd1c064";
# fsType = "btrfs";
# };
# Other modules
imports = [
../hardware-configuration.nix
../modules/boot/plymouth.nix
../modules/boot/efi-grub.nix
../modules/kernel/lqx.nix
# Hardware stuff
../modules/hardware/nvidia-prime.nix
# ../modules/hardware/xone.nix
# ../modules/hardware/razer.nix
../modules/audio/pipewire.nix
# Desktop stuff
../modules/fonts
../modules/desktop/gnome.nix
../modules/desktop_manager/gdm.nix
../modules/virtualisation
../modules/flatpak
# Applications
../modules/cli-tools.nix
../modules/applications
# Development
../modules/development
# ssh
../modules/ssh/yubikey.nix
# Per-user stuff
../home/seanomik
];
}

View File

@ -1,8 +1,8 @@
{ pkgs, ... }:
((pkgs.discord.overrideAttrs (_: {
src = builtins.fetchTarball {
url = "https://dl.discordapp.net/apps/linux/0.0.21/discord-0.0.21.tar.gz";
sha256 = "sha256:1pw9q4290yn62xisbkc7a7ckb1sa5acp91plp2mfpg7gp7v60zvz";
url = "https://dl.discordapp.net/apps/linux/0.0.24/discord-0.0.24.tar.gz";
sha256 = "sha256:087p8z538cyfa9phd4nvzjrvx4s9952jz1azb2k8g6pggh1vxwm8";
};
})).override {
nss = pkgs.nss_latest;

View File

@ -5,7 +5,8 @@
lldb
clang-tools
(callPackage ../pkgs/lldb-mi.nix { })
(callPackage ./lldb-mi/default.nix { })
# (callPackage ../pkgs/lldb-mi.nix { })
];
imports = [

View File

@ -0,0 +1,46 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, lldb
, clang
, llvm
, pkgs
}:
let
stdenv = pkgs.clangStdenv;
# stdenv = pkgs.llvmPackages_5.stdenv;
in stdenv.mkDerivation rec {
version = "2388bd74133bc21eac59b2e2bf97f2a30770a315";
pname = "lldb-mi";
src = fetchFromGitHub {
owner = "lldb-tools";
repo = pname;
rev = version;
sha256 = "sha256-qBumOWNYZvoJNgqb1GMlxKZO0KKdq2cH/L7D8tpu56k=";
};
nativeBuildInputs = [ cmake pkgs.lldb_9 clang llvm ];
# stdenv = pkgs.clangStdenv;
patches = [ ./fix-long-env-pr87.patch ];
installPhase = ''
runHook preInstall
cmake --build . --target install --config Release
runHook postInstall
'';
meta = with lib; {
description = "LLDB's machine interface driver.";
homepage = "https://github.com/lldb-tools/lldb-mi";
license = licenses.llvm-exception;
platforms = platforms.unix;
maintainers = with maintainers; [ seanomik ];
};
}

View File

@ -0,0 +1,12 @@
diff --git a/src/MICmnStreamStdin.h b/src/MICmnStreamStdin.h
index b193757..e1b8a55 100644
--- a/src/MICmnStreamStdin.h
+++ b/src/MICmnStreamStdin.h
@@ -55,6 +55,6 @@ private:
CMIUtilString m_strPromptCurrent; // Command line prompt as shown to the user
bool m_bShowPrompt; // True = Yes prompt is shown/output to the user (stdout),
// false = no prompt
- static const int m_constBufferSize = 2048;
+ static const int m_constBufferSize = 50000;
char *m_pCmdBuffer;
};

View File

@ -1,21 +1,4 @@
{pkgs, flatpak, ... }:
let
runtime = flatpak.lib.flatpak.fetchRuntimeFromFlatHub {
name = "org.freedesktop.Platform";
branch = "21.08";
commit = "c7252386179c4c1ecf5d93bdaec6ca82852dddfdae7112b5c3177f7424c4a928";
sha256 = "sha256-wuFiB2+x+Mj6F9idkrknvD9Su6bWr5QVhgcB8/4uBQc=";
};
jmp = flatpak.lib.flatpak.fetchAppFromFlatHub {
name = "com.github.iwalton3.jellyfin-media-player";
commit = "f26193386f3552bc7d6849078ef073d1ca94629d";
sha256 = "sha256-yxnsiou/ujd9fdP4D7J7i00uNGm0TjHgrIp0TTwUq3o=";
inherit runtime;
};
in {
{
services.flatpak.enable = true;
environment.systemPackages = [
flatpak.lib.flatpak.wrapFlatpakLauncher "com.github.iwalton3.jellyfin-media-player" jmp runtime
];
}

View File

@ -0,0 +1,37 @@
{ pkgs, ... }:
let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
'';
in
{
imports = [
./nvidia.nix
];
environment.systemPackages = [ nvidia-offload ];
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.prime = {
offload.enable = true;
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
intelBusId = "PCI:0:2:0";
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
nvidiaBusId = "PCI:1:0:0";
};
specialisation = {
external-display.configuration = {
system.nixos.tags = [ "external-display" ];
hardware.nvidia.prime.offload.enable = lib.mkForce false;
hardware.nvidia.powerManagement.enable = lib.mkForce false;
};
};
}

View File

@ -3,37 +3,37 @@
nixpkgs.config.allowUnfree = true;
services.xserver.videoDrivers = [ "nvidia" ];
# hardware.opengl.enable = true;
# hardware.
hardware = {
opengl =
let
fn = oa: {
nativeBuildInputs = oa.nativeBuildInputs ++ [ pkgs.glslang ];
mesonFlags = oa.mesonFlags ++ [ "-Dvulkan-layers=device-select,overlay" ];
patches = oa.patches ++ [ ./mesa-vulkan-layer-nvidia.patch ];
postInstall = oa.postInstall + ''
mv $out/lib/libVkLayer* $drivers/lib
# This enables vulkan layers
# hardware = {
# opengl =
# let
# fn = oa: {
# nativeBuildInputs = oa.nativeBuildInputs ++ [ pkgs.glslang ];
# mesonFlags = oa.mesonFlags ++ [ "-Dvulkan-layers=device-select,overlay" ];
# patches = oa.patches ++ [ ./mesa-vulkan-layer-nvidia.patch ];
# postInstall = oa.postInstall + ''
# mv $out/lib/libVkLayer* $drivers/lib
#Device Select layer
layer=VkLayer_MESA_device_select
substituteInPlace $drivers/share/vulkan/implicit_layer.d/''${layer}.json \
--replace "lib''${layer}" "$drivers/lib/lib''${layer}"
# layer=VkLayer_MESA_device_select
# substituteInPlace $drivers/share/vulkan/implicit_layer.d/''${layer}.json \
# --replace "lib''${layer}" "$drivers/lib/lib''${layer}"
#Overlay layer
layer=VkLayer_MESA_overlay
substituteInPlace $drivers/share/vulkan/explicit_layer.d/''${layer}.json \
--replace "lib''${layer}" "$drivers/lib/lib''${layer}"
'';
};
in
with pkgs; {
enable = true;
driSupport32Bit = true;
package = (mesa.overrideAttrs fn).drivers;
package32 = (pkgsi686Linux.mesa.overrideAttrs fn).drivers;
};
};
# layer=VkLayer_MESA_overlay
# substituteInPlace $drivers/share/vulkan/explicit_layer.d/''${layer}.json \
# --replace "lib''${layer}" "$drivers/lib/lib''${layer}"
# '';
# };
# in
# with pkgs; {
# enable = true;
# driSupport32Bit = true;
# package = (mesa.overrideAttrs fn).drivers;
# package32 = (pkgsi686Linux.mesa.overrideAttrs fn).drivers;
# };
# };
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
}

View File

@ -6,4 +6,15 @@
pkgs.openrazer-daemon
unstable.polychromatic
];
# Don't wake from sleep via keyboard
systemd.services.nowake-razer = {
script = ''
echo XHC0 > /proc/acpi/wakeup
'';
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "oneshot";
};
};
}

6
modules/switch-udev.nix Executable file
View File

@ -0,0 +1,6 @@
{pkgs, ... }:
{
services.udev.extraRules = ''
SUBSYSTEMS=="usb", ATTRS{manufacturer}=="NVIDIA Corp.", ATTRS{product}=="APX", GROUP="nintendo_switch"
'';
}