This commit is contained in:
Dmitriy Kholkin 2023-02-14 07:04:20 +03:00
parent b08c372e25
commit ff1e9de0c5
16 changed files with 146 additions and 34 deletions

74
flake.lock generated
View File

@ -299,6 +299,22 @@
"type": "github"
}
},
"flake-compat_6": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -661,6 +677,22 @@
"type": "github"
}
},
"libnbtplusplus": {
"flake": false,
"locked": {
"lastModified": 1650031308,
"narHash": "sha256-TvVOjkUobYJD9itQYueELJX3wmecvEdCbJ0FinW2mL4=",
"owner": "PrismLauncher",
"repo": "libnbtplusplus",
"rev": "2203af7eeb48c45398139b583615134efd8d407f",
"type": "github"
},
"original": {
"owner": "PrismLauncher",
"repo": "libnbtplusplus",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
@ -1096,6 +1128,22 @@
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1671417167,
"narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1670507980,
"narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=",
@ -1170,6 +1218,27 @@
"type": "github"
}
},
"prism-launcher": {
"inputs": {
"flake-compat": "flake-compat_5",
"libnbtplusplus": "libnbtplusplus",
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1676240862,
"narHash": "sha256-uZLRtlH3w6lisI+P1R8RdBd8mEtzAYfJFS9BE9ouZ1w=",
"owner": "AtaraxiaSjel",
"repo": "PrismLauncher",
"rev": "f401ef3c423d76be4c8f912f1b7f0a502d12937e",
"type": "github"
},
"original": {
"owner": "AtaraxiaSjel",
"ref": "develop",
"repo": "PrismLauncher",
"type": "github"
}
},
"qbittorrent-ee": {
"flake": false,
"locked": {
@ -1231,6 +1300,7 @@
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur",
"prism-launcher": "prism-launcher",
"qbittorrent-ee": "qbittorrent-ee",
"rnix-lsp": "rnix-lsp",
"rycee": "rycee",
@ -1278,7 +1348,7 @@
"simple-nixos-mailserver": {
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat_5",
"flake-compat": "flake-compat_6",
"nixpkgs": [
"nixpkgs"
],
@ -1382,7 +1452,7 @@
"webcord": {
"inputs": {
"dream2nix": "dream2nix",
"nixpkgs": "nixpkgs_8",
"nixpkgs": "nixpkgs_9",
"webcord": "webcord_2"
},
"locked": {

View File

@ -56,6 +56,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
prism-launcher.url = "github:AtaraxiaSjel/PrismLauncher/develop";
qbittorrent-ee = {
url = "github:c0re100/qBittorrent-Enhanced-Edition";
flake = false;
@ -197,9 +198,19 @@
format = "vm";
};
Flakes-ISO = nixos-generators.nixosGenerate {
system = builtins.readFile (./machines/Flakes-ISO/system);
system = "x86_64-linux";
modules = [
(import (./machines/Flakes-ISO)) { device = "Flakes-ISO"; mainuser = "alukard"; }
./machines/Home-Hypervisor/autoinstall.nix
];
specialArgs = { inherit inputs; };
format = "install-iso";
};
Flakes-ISO-Aarch64 = nixos-generators.nixosGenerate {
system = "aarch64-linux";
modules = [
(import (./machines/Flakes-ISO)) { device = "Flakes-ISO"; mainuser = "alukard"; }
./machines/Arch-Builder-VM/autoinstall.nix
];
specialArgs = { inherit inputs; };
format = "install-iso";

View File

@ -34,6 +34,8 @@
deviceSpecific.enableVirtualisation = true;
deviceSpecific.vpn.mullvad.enable = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.zfs.forceImportAll = lib.mkForce false;
hardware.video.hidpi.enable = lib.mkForce false;
@ -71,7 +73,7 @@
};
boot.tmpOnTmpfs = true;
boot.tmpOnTmpfsSize = "2G";
boot.tmpOnTmpfsSize = "32G";
boot.supportedFilesystems = [ "btrfs" ];
services.openssh.settings.PermitRootLogin = lib.mkForce "without-password";
@ -81,8 +83,11 @@
home-manager.users.${config.mainuser} = {
home.packages = lib.mkIf config.deviceSpecific.enableVirtualisation [
inputs.nixos-generators.packages.${pkgs.hostPlatform.system}.nixos-generate
inputs.prism-launcher.packages.${pkgs.hostPlatform.system}.default
# pkgs.looking-glass-client
pkgs.piper
pkgs.osu-lazer-bin
pkgs.nixpkgs-review
];
home.stateVersion = "21.11";
};

View File

@ -2,7 +2,6 @@
imports = with inputs.self; [
"${toString modulesPath}/installer/cd-dvd/installation-cd-graphical-plasma5.nix"
../../modules/autoinstall/default.nix
../Home-Hypervisor/autoinstall.nix
];
options = {

View File

@ -50,7 +50,10 @@
enable = true;
qemu = {
ovmf.enable = true;
ovmf.packages = [ pkgs.OVMFFull.fd ];
ovmf.packages = [
pkgs.OVMFFull.fd
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
];
runAsRoot = false;
};
onBoot = "ignore";

View File

@ -1,7 +1,12 @@
{ pkgs, lib, config, ... }:
with config.deviceSpecific; {
config = lib.mkIf (devInfo.gpu.vendor == "amd") {
programs.corectrl.enable = true;
programs.corectrl = {
enable = true;
gpuOverclock.enable = true;
gpuOverclock.ppfeaturemask = "0xffffffff";
};
startupApplications = [ "${pkgs.corectrl}/bin/corectrl" ];
};
}

View File

@ -94,6 +94,7 @@ in {
# "pdfjs.disabled" = true;
"media.eme.enabled" = true;
"media.ffmpeg.vaapi.enabled" = true;
"experiments.activeExperiment" = false;
"experiments.enabled" = false;

View File

@ -70,6 +70,7 @@ with config.deviceSpecific; {
] ++ lib.optionals (!(isVM || isISO)) [
audacity
blueman
cachix
libreoffice
nodePackages.peerflix
samba
@ -78,13 +79,12 @@ with config.deviceSpecific; {
] ++ lib.optionals isGaming [
ceserver
gamescope
goverlay
# goverlay
lutris
moonlight-qt
obs-studio
prismlauncher
reshade-shaders
(retroarch.override { cores = [ libretro.genesis-plus-gx libretro.dosbox ]; })
# reshade-shaders
# (retroarch.override { cores = [ libretro.genesis-plus-gx libretro.dosbox ]; })
# parsec
protonhax
protontricks

View File

@ -1,6 +1,14 @@
{ pkgs, lib, config, ... }: {
programs.steam.enable = true;
hardware.steam-hardware.enable = true;
hardware.steam-hardware.enable = false;
programs.java.enable = true;
programs.java.package = pkgs.jre8;
# programs.firejail.wrappedBinaries.steam = {
# executable = "${lib.getBin pkgs.steam}/bin/steam";
# profile = "${pkgs.firejail}/etc/firejail/steam.profile";
# };
startupApplications = [
"${pkgs.steam}/bin/steam"
@ -10,15 +18,13 @@
".local/share/Steam"
];
# systemd.user.services.x11-ownership = rec {
# # serviceConfig.Type = "oneshot";
# script = ''
# chown ${config.mainuser} /tmp/.X11-unix
# '';
# after = [ "graphical-session.target" ];
# wants = after;
# wantedBy = [ "graphical-session-pre.target" ];
# };
systemd.user.services.x11-ownership = rec {
script = ''
doas chown ${config.mainuser} /tmp/.X11-unix
'';
after = [ "hyprland-session.target" ];
wantedBy = [ "hyprland-session.target" ];
};
# Start Steam only after the network is up
# home-manager.users.${config.mainuser}.systemd.user.services.steam-startup = {
@ -27,14 +33,13 @@
# Type = "oneshot";
# };
# Unit = rec {
# # After = if config.deviceSpecific.vpn.mullvad.enable then [
# # "mullvad-daemon.service"
# # ] else [
# # "network-online.target"
# # ];
# After = [ "network-online.target" ];
# After = if config.deviceSpecific.vpn.mullvad.enable then [
# "mullvad-daemon.service"
# ] else [
# "network-online.target"
# ];
# Wants = After;
# };
# Install.WantedBy = [ "graphical-session-pre.target" ];
# Install.WantedBy = [ "hyprland-session.target" ];
# };
}

View File

@ -23,6 +23,7 @@ with config.deviceSpecific; {
"https://nix-community.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://hyprland.cachix.org"
"https://ataraxiadev-foss.cachix.org"
# "https://nixos-rocm.cachix.org"
# "https://webcord.cachix.org"
];
@ -31,6 +32,7 @@ with config.deviceSpecific; {
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"ataraxiadev-foss.cachix.org-1:ws/jmPRUF5R8TkirnV1b525lP9F/uTBsz2KraV61058="
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
# "webcord.cachix.org-1:l555jqOZGHd2C9+vS8ccdh8FhqnGe8L78QrHNn+EFEs="
];

View File

@ -46,6 +46,7 @@ with lib; {
youtube-to-mpv = pkgs.callPackage ./packages/youtube-to-mpv.nix { term = config.defaultApplications.term.cmd; };
vivaldi = master.vivaldi;
steam = prev.steam.override {
withJava = true;
extraPkgs = pkgs: with pkgs; [ mono libkrb5 keyutils ];
};
waybar = inputs.nixpkgs-wayland.packages.${system}.waybar.overrideAttrs (old: {

View File

@ -49,6 +49,12 @@ with config.deviceSpecific; {
} {
command = "/run/current-system/sw/bin/nix-shell";
options = [ "SETENV" "NOPASSWD" ];
} {
command = "/run/current-system/sw/bin/extra-container";
options = [ "SETENV" "NOPASSWD" ];
} {
command = "/run/current-system/sw/bin/chown ${config.mainuser} /tmp/.X11-unix";
options = [ "SETENV" "NOPASSWD" ];
}
# {
# command = "/run/current-system/sw/bin/deploy";

View File

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
with config.deviceSpecific; {
config = lib.mkIf enableVirtualisation {
programs.extra-container.enable = true;
virtualisation.docker = {
enable = true;
daemon.settings = {
@ -35,7 +36,10 @@ with config.deviceSpecific; {
enable = true;
qemu = {
ovmf.enable = true;
ovmf.packages = [ pkgs.OVMFFull.fd ];
ovmf.packages = [
pkgs.OVMFFull.fd
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
];
runAsRoot = false;
};
onBoot = "ignore";

View File

@ -269,11 +269,7 @@ in with config.deviceSpecific; with lib; {
windowrule=opaque,mpv
windowrule=float,Waydroid
${if config.device == "AMD-Workstation" then ''
windowrule=size 2400 1080,Waydroid
'' else ''
windowrule=size 1600 900,Waydroid
''}
windowrule=size 1600 900,Waydroid
windowrule=center,Waydroid
windowrule=opaque,Waydroid
windowrule=opaque,qemu

View File

@ -55,6 +55,9 @@
shellAliases = {
"_" = "doas";
"clr" = "clear";
"rcp" = "${pkgs.rsync}/bin/rsync -ah --partial --no-whole-file --info=progress2";
"ncg" = "doas nix-collect-garbage";
"ncgd" = "doas nix-collect-garbage -d";
"weather" = "curl wttr.in/Volzhskiy";
"rede" = "systemctl --user start gammastep.service &";
"redd" = "systemctl --user stop gammastep.service &";

View File

@ -5,6 +5,7 @@
* use theme engine from https://github.com/SenchoPens/senixos
* update waybar
* FIX Seadrive
* Firejail all the things
## Tips: