new host pog

This commit is contained in:
dusk 2022-07-18 19:34:54 +03:00
parent 93a99aa202
commit a6d2cbad1a
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
7 changed files with 214 additions and 5 deletions

View File

@ -110,6 +110,22 @@
"type": "github" "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": { "helix": {
"inputs": { "inputs": {
"nixCargoIntegration": "nixCargoIntegration", "nixCargoIntegration": "nixCargoIntegration",
@ -265,6 +281,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"fufexan": "fufexan",
"helix": "helix", "helix": "helix",
"home": "home", "home": "home",
"hyprland": "hyprland", "hyprland": "hyprland",

View File

@ -18,6 +18,8 @@
helix.inputs.nixpkgs.follows = "nixpkgs"; helix.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
hyprland.inputs.nixpkgs.follows = "nixpkgs"; hyprland.inputs.nixpkgs.follows = "nixpkgs";
fufexan.url = "github:fufexan/dotfiles";
fufexan.flake = false;
}; };
outputs = inputs: let outputs = inputs: let

View File

@ -28,6 +28,7 @@
systems = { systems = {
lungmen = "x86_64-linux"; lungmen = "x86_64-linux";
tkaronto = "x86_64-linux";
}; };
in in
lib.mapAttrs mkSystem systems lib.mapAttrs mkSystem systems

170
hosts/tkaronto/default.nix Normal file
View 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";
}

View 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"
];
};
}

View File

@ -28,8 +28,8 @@
''; '';
in '' in ''
# should be configured per-profile # should be configured per-profile
monitor=HDMI-A-1,1920x1080@60,0x0,1 monitor=,2560x1600@120,0x0,1.6
workspace=HDMI-A-1,1 workspace=,1
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY HYPRLAND_INSTANCE_SIGNATURE 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-pre.target
exec-once=systemctl --user start graphical-session.target exec-once=systemctl --user start graphical-session.target

View File

@ -175,9 +175,7 @@ in {
# polymc # polymc
cloudflared cloudflared
lutris lutris
(pkgs.discord.override { discord-open-asar
withOpenASAR = true;
})
]; ];
shellAliases = shellAliases =
nixosConfig.environment.shellAliases nixosConfig.environment.shellAliases