new host pog
This commit is contained in:
parent
93a99aa202
commit
a6d2cbad1a
17
flake.lock
17
flake.lock
@ -110,6 +110,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fufexan": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1657711492,
|
||||
"narHash": "sha256-t7WLSMPXWs+TR8/ZWvyoUR5h0nrSWQryNmpS/+00DtM=",
|
||||
"owner": "fufexan",
|
||||
"repo": "dotfiles",
|
||||
"rev": "90b4e7452b41aaf18026b5ad46601597e8ec8dcd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "fufexan",
|
||||
"repo": "dotfiles",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"helix": {
|
||||
"inputs": {
|
||||
"nixCargoIntegration": "nixCargoIntegration",
|
||||
@ -265,6 +281,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fufexan": "fufexan",
|
||||
"helix": "helix",
|
||||
"home": "home",
|
||||
"hyprland": "hyprland",
|
||||
|
@ -18,6 +18,8 @@
|
||||
helix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
fufexan.url = "github:fufexan/dotfiles";
|
||||
fufexan.flake = false;
|
||||
};
|
||||
|
||||
outputs = inputs: let
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
systems = {
|
||||
lungmen = "x86_64-linux";
|
||||
tkaronto = "x86_64-linux";
|
||||
};
|
||||
in
|
||||
lib.mapAttrs mkSystem systems
|
||||
|
170
hosts/tkaronto/default.nix
Normal file
170
hosts/tkaronto/default.nix
Normal file
@ -0,0 +1,170 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
byLabel = label: "/dev/disk/by-label/${label}";
|
||||
in
|
||||
{
|
||||
imports = with inputs;
|
||||
with nixos-hardware.nixosModules; [
|
||||
nixpkgs.nixosModules.notDetected
|
||||
nixos-persistence.nixosModule
|
||||
common-pc-ssd
|
||||
common-pc-laptop
|
||||
common-gpu-nvidia
|
||||
common-gpu-amd
|
||||
common-cpu-amd
|
||||
../../modules/persist
|
||||
../../modules/network/iwd.nix
|
||||
#../../modules/develop/nixbuild
|
||||
../../users/root
|
||||
../../users/patriot
|
||||
];
|
||||
|
||||
system.persistDir = "/persist";
|
||||
|
||||
boot = {
|
||||
tmpOnTmpfs = true;
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 10;
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
supportedFilesystems = ["f2fs"];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = ["amdgpu"];
|
||||
};
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;};
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = ["defaults" "size=2G" "mode=755"];
|
||||
};
|
||||
fileSystems."/nix" = {
|
||||
device = byLabel "NIX";
|
||||
fsType = "f2fs";
|
||||
};
|
||||
fileSystems."${config.system.persistDir}" = {
|
||||
device = byLabel "PERSIST";
|
||||
fsType = "f2fs";
|
||||
neededForBoot = true;
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = byLabel "BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
|
||||
nix.settings.max-jobs = lib.mkDefault 8;
|
||||
security = {
|
||||
pam.loginLimits = [
|
||||
{
|
||||
domain = "*";
|
||||
type = "soft";
|
||||
item = "nofile";
|
||||
value = "524288";
|
||||
}
|
||||
{
|
||||
domain = "*";
|
||||
type = "hard";
|
||||
item = "nofile";
|
||||
value = "524288";
|
||||
}
|
||||
];
|
||||
allowSimultaneousMultithreading = true;
|
||||
# Deleting root subvolume makes sudo show lecture every boot
|
||||
sudo.extraConfig = ''
|
||||
Defaults lecture = never
|
||||
'';
|
||||
rtkit.enable = true;
|
||||
};
|
||||
|
||||
sound.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
hardware = {
|
||||
opengl = {
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
libva
|
||||
vulkan-loader
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux;
|
||||
[
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
libva
|
||||
vulkan-loader
|
||||
];
|
||||
};
|
||||
pulseaudio = {
|
||||
enable = false;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableDefaultFonts = true;
|
||||
fontconfig.enable = true;
|
||||
fonts = [pkgs.dejavu_fonts];
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = [pkgs.ntfs3g];
|
||||
pathsToLink = ["/share/zsh"];
|
||||
persistence."${config.system.persistDir}" = {
|
||||
directories = ["/etc/nixos"];
|
||||
files = ["/etc/machine-id"];
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
services = {
|
||||
earlyoom.enable = true;
|
||||
tailscale.enable = false;
|
||||
ipfs = {
|
||||
enable = false;
|
||||
enableGC = true;
|
||||
autoMount = true;
|
||||
};
|
||||
flatpak.enable = false;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
waydroid.enable = false;
|
||||
podman.enable = false;
|
||||
libvirtd.enable = false;
|
||||
};
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
}
|
21
pkgs-set/overlays/discord.nix
Normal file
21
pkgs-set/overlays/discord.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{inputs}: final: prev: {
|
||||
discord-open-asar = final.callPackage "${inputs.fufexan}/pkgs/discord" {
|
||||
inherit (prev.discord) pname version src;
|
||||
|
||||
openasar = prev.callPackage "${inputs.nixpkgs}/pkgs/applications/networking/instant-messengers/discord/openasar.nix" {};
|
||||
binaryName = "Discord";
|
||||
desktopName = "Discord";
|
||||
|
||||
isWayland = false;
|
||||
enableVulkan = false;
|
||||
extraOptions = [
|
||||
"--disable-gpu-memory-buffer-video-frames"
|
||||
"--enable-accelerated-mjpeg-decode"
|
||||
"--enable-accelerated-video"
|
||||
"--enable-gpu-rasterization"
|
||||
"--enable-native-gpu-memory-buffers"
|
||||
"--enable-zero-copy"
|
||||
"--ignore-gpu-blocklist"
|
||||
];
|
||||
};
|
||||
}
|
@ -28,8 +28,8 @@
|
||||
'';
|
||||
in ''
|
||||
# should be configured per-profile
|
||||
monitor=HDMI-A-1,1920x1080@60,0x0,1
|
||||
workspace=HDMI-A-1,1
|
||||
monitor=,2560x1600@120,0x0,1.6
|
||||
workspace=,1
|
||||
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY HYPRLAND_INSTANCE_SIGNATURE
|
||||
exec-once=systemctl --user start graphical-session-pre.target
|
||||
exec-once=systemctl --user start graphical-session.target
|
||||
|
@ -175,9 +175,7 @@ in {
|
||||
# polymc
|
||||
cloudflared
|
||||
lutris
|
||||
(pkgs.discord.override {
|
||||
withOpenASAR = true;
|
||||
})
|
||||
discord-open-asar
|
||||
];
|
||||
shellAliases =
|
||||
nixosConfig.environment.shellAliases
|
||||
|
Loading…
Reference in New Issue
Block a user