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" "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": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@ -661,6 +677,22 @@
"type": "github" "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": { "lowdown-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1096,6 +1128,22 @@
} }
}, },
"nixpkgs_8": { "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": { "locked": {
"lastModified": 1670507980, "lastModified": 1670507980,
"narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=", "narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=",
@ -1170,6 +1218,27 @@
"type": "github" "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": { "qbittorrent-ee": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1231,6 +1300,7 @@
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur", "nur": "nur",
"prism-launcher": "prism-launcher",
"qbittorrent-ee": "qbittorrent-ee", "qbittorrent-ee": "qbittorrent-ee",
"rnix-lsp": "rnix-lsp", "rnix-lsp": "rnix-lsp",
"rycee": "rycee", "rycee": "rycee",
@ -1278,7 +1348,7 @@
"simple-nixos-mailserver": { "simple-nixos-mailserver": {
"inputs": { "inputs": {
"blobs": "blobs", "blobs": "blobs",
"flake-compat": "flake-compat_5", "flake-compat": "flake-compat_6",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
@ -1382,7 +1452,7 @@
"webcord": { "webcord": {
"inputs": { "inputs": {
"dream2nix": "dream2nix", "dream2nix": "dream2nix",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_9",
"webcord": "webcord_2" "webcord": "webcord_2"
}, },
"locked": { "locked": {

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,12 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
with config.deviceSpecific; { with config.deviceSpecific; {
config = lib.mkIf (devInfo.gpu.vendor == "amd") { 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" ]; startupApplications = [ "${pkgs.corectrl}/bin/corectrl" ];
}; };
} }

View File

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

View File

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

View File

@ -1,6 +1,14 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
programs.steam.enable = true; 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 = [ startupApplications = [
"${pkgs.steam}/bin/steam" "${pkgs.steam}/bin/steam"
@ -10,15 +18,13 @@
".local/share/Steam" ".local/share/Steam"
]; ];
# systemd.user.services.x11-ownership = rec { systemd.user.services.x11-ownership = rec {
# # serviceConfig.Type = "oneshot"; script = ''
# script = '' doas chown ${config.mainuser} /tmp/.X11-unix
# chown ${config.mainuser} /tmp/.X11-unix '';
# ''; after = [ "hyprland-session.target" ];
# after = [ "graphical-session.target" ]; wantedBy = [ "hyprland-session.target" ];
# wants = after; };
# wantedBy = [ "graphical-session-pre.target" ];
# };
# Start Steam only after the network is up # Start Steam only after the network is up
# home-manager.users.${config.mainuser}.systemd.user.services.steam-startup = { # home-manager.users.${config.mainuser}.systemd.user.services.steam-startup = {
@ -27,14 +33,13 @@
# Type = "oneshot"; # Type = "oneshot";
# }; # };
# Unit = rec { # Unit = rec {
# # After = if config.deviceSpecific.vpn.mullvad.enable then [ # After = if config.deviceSpecific.vpn.mullvad.enable then [
# # "mullvad-daemon.service" # "mullvad-daemon.service"
# # ] else [ # ] else [
# # "network-online.target" # "network-online.target"
# # ]; # ];
# After = [ "network-online.target" ];
# Wants = After; # 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://nix-community.cachix.org"
"https://nixpkgs-wayland.cachix.org" "https://nixpkgs-wayland.cachix.org"
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
"https://ataraxiadev-foss.cachix.org"
# "https://nixos-rocm.cachix.org" # "https://nixos-rocm.cachix.org"
# "https://webcord.cachix.org" # "https://webcord.cachix.org"
]; ];
@ -31,6 +32,7 @@ with config.deviceSpecific; {
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"ataraxiadev-foss.cachix.org-1:ws/jmPRUF5R8TkirnV1b525lP9F/uTBsz2KraV61058="
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE=" # "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
# "webcord.cachix.org-1:l555jqOZGHd2C9+vS8ccdh8FhqnGe8L78QrHNn+EFEs=" # "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; }; youtube-to-mpv = pkgs.callPackage ./packages/youtube-to-mpv.nix { term = config.defaultApplications.term.cmd; };
vivaldi = master.vivaldi; vivaldi = master.vivaldi;
steam = prev.steam.override { steam = prev.steam.override {
withJava = true;
extraPkgs = pkgs: with pkgs; [ mono libkrb5 keyutils ]; extraPkgs = pkgs: with pkgs; [ mono libkrb5 keyutils ];
}; };
waybar = inputs.nixpkgs-wayland.packages.${system}.waybar.overrideAttrs (old: { 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"; command = "/run/current-system/sw/bin/nix-shell";
options = [ "SETENV" "NOPASSWD" ]; 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"; # command = "/run/current-system/sw/bin/deploy";

View File

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

View File

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

View File

@ -55,6 +55,9 @@
shellAliases = { shellAliases = {
"_" = "doas"; "_" = "doas";
"clr" = "clear"; "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"; "weather" = "curl wttr.in/Volzhskiy";
"rede" = "systemctl --user start gammastep.service &"; "rede" = "systemctl --user start gammastep.service &";
"redd" = "systemctl --user stop gammastep.service &"; "redd" = "systemctl --user stop gammastep.service &";

View File

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