This commit is contained in:
dusk 2023-09-10 21:40:39 +03:00
parent b236928e2b
commit e32d7813b9
Signed by: dusk
SSH Key Fingerprint: SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw
18 changed files with 223 additions and 116 deletions

View File

@ -604,6 +604,24 @@
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1688466019,
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_4"
},
"locked": {
"lastModified": 1685662779,
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
@ -691,21 +709,6 @@
}
},
"flake-utils_5": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_6": {
"inputs": {
"systems": "systems_6"
},
@ -971,9 +974,46 @@
"type": "github"
}
},
"nixd": {
"nh": {
"inputs": {
"flake-parts": "flake-parts",
"nix-filter": "nix-filter",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1691768450,
"narHash": "sha256-NbHI+0WrHxGj34AAzS6V3bj5EJK/YBKlmvbrkwkCxhs=",
"owner": "viperML",
"repo": "nh",
"rev": "6dcca8fc2a8873161ad60300d8ecad13326176d8",
"type": "github"
},
"original": {
"owner": "viperML",
"repo": "nh",
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1687178632,
"narHash": "sha256-HS7YR5erss0JCaUijPeyg2XrisEb959FIct3n2TMGbE=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "d90c75e8319d0dd9be67d933d8eb9d0894ec9174",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nixd": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
]
@ -1095,6 +1135,24 @@
}
},
"nixpkgs-lib_3": {
"locked": {
"dir": "lib",
"lastModified": 1688049487,
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_4": {
"locked": {
"dir": "lib",
"lastModified": 1685564631,
@ -1354,6 +1412,7 @@
"limbusart": "limbusart",
"musikquad": "musikquad",
"musikspider": "musikspider",
"nh": "nh",
"nixd": "nixd",
"nixinate": "nixinate",
"nixos-hardware": "nixos-hardware",
@ -1362,7 +1421,6 @@
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur",
"steam-tui": "steam-tui",
"stylix": "stylix",
"vscode-extensions": "vscode-extensions"
}
@ -1495,27 +1553,6 @@
"type": "github"
}
},
"steam-tui": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1690992836,
"narHash": "sha256-KLf8gMbgt4UstiNGbMW7BnyQJPqP2uL2+0gIdwRYV3w=",
"owner": "dmadisetti",
"repo": "steam-tui",
"rev": "48bcd094b5b77336e20cc357d9172825475537e4",
"type": "github"
},
"original": {
"owner": "dmadisetti",
"repo": "steam-tui",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
@ -1679,7 +1716,7 @@
"vscode-extensions": {
"inputs": {
"flake-compat": "flake-compat_7",
"flake-utils": "flake-utils_6",
"flake-utils": "flake-utils_5",
"nixpkgs": [
"nixpkgs"
]

View File

@ -53,8 +53,8 @@
limbusart.url = "git+https://git.gaze.systems/dusk/limbusart.git";
limbusart.inputs.nixpkgs.follows = "nixpkgs";
steam-tui.url = "github:dmadisetti/steam-tui";
steam-tui.inputs.nixpkgs.follows = "nixpkgs";
nh.url = "github:viperML/nh";
nh.inputs.nixpkgs.follows = "nixpkgs";
# needed for hyprland setup
# hyprland.url = "github:hyprwm/Hyprland";
@ -99,9 +99,7 @@
generate-firefox-addons =
toString
"${pkgs.generate-firefox-addons}/bin/generate-firefox-addons";
# buildHost = {
# type = "app";
# };
nh = toString "${inputs.nh.packages.${pkgs.system}.default}/bin/nh";
}
)
allPkgs

View File

@ -17,6 +17,7 @@
common-gpu-nvidia
common-gpu-amd
common-cpu-amd
common-cpu-amd-pstate
../../users/root
../../users/patriot
]
@ -93,12 +94,13 @@
programs.light.enable = true;
fonts = {
enableDefaultFonts = true;
enableDefaultPackages = true;
fontconfig.enable = true;
fonts = [pkgs.dejavu_fonts];
packages = [pkgs.dejavu_fonts];
};
environment = {
sessionVariables.FLAKE = "/etc/nixos";
systemPackages = [pkgs.ntfs3g];
pathsToLink = ["/share/zsh"];
persistence."${config.system.persistDir}" = {
@ -114,8 +116,9 @@
};
};
networking.firewall.allowedUDPPorts = [49152];
networking.firewall.allowedTCPPorts = [7905 7906];
networking.firewall.allowedUDPPorts = [4990 4995];
# musikcube
networking.firewall.allowedTCPPorts = [7905 7906] ++ [6695 6696 6697 6698 6699];
# for tailscale
networking.firewall.checkReversePath = "loose";

View File

@ -1,5 +1,19 @@
{
services.auto-cpufreq.enable = true;
services.auto-cpufreq.settings = {
charger = {
governor = "powersave";
scaling_min_freq = 1500000;
scaling_max_freq = 3000000;
turbo = "auto";
};
battery = {
governor = "powersave";
scaling_min_freq = 900000;
scaling_max_freq = 1800000;
turbo = "auto";
};
};
services.tlp.settings = {
CPU_ENERGY_PERF_POLICY_ON_AC = "";
CPU_ENERGY_PERF_POLICY_ON_BAT = "";

View File

@ -1,12 +1,12 @@
{pkgs, ...}: {
boot = {
tmpOnTmpfs = true;
tmp.useTmpfs = true;
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
systemd-boot.configurationLimit = 10;
};
kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_zen;
supportedFilesystems = ["f2fs"];
initrd = {
availableKernelModules = [

View File

@ -4,8 +4,12 @@
settings = {
RADEON_DPM_PERF_LEVEL_ON_AC = "auto";
RADEON_DPM_PERF_LEVEL_ON_BAT = "low";
RADEON_DPM_STATE_ON_AC = "performance";
RADEON_DPM_STATE_ON_AC = "balanced";
RADEON_DPM_STATE_ON_BAT = "battery";
PCIE_ASPM_ON_AC = "powersave";
PCIE_ASPM_ON_BAT = "powersupersave";
PLATFORM_PROFILE_ON_AC = "balanced";
PLATFORM_PROFILE_ON_BAT = "low-power";
NMI_WATCHDOG = 0;
};
};

View File

@ -0,0 +1,18 @@
{config, ...}: {
services.couchdb = {
enable = true;
port = 5999;
configFile = "/var/lib/couchdb/config";
};
services.nginx.virtualHosts."couchdb.gaze.systems" = {
useACMEHost = "gaze.systems";
forceSSL = true;
locations."/".proxyPass = "http://localhost:${toString config.services.couchdb.port}";
# locations."/".extraConfig = ''
# add_header 'Access-Control-Allow-Credentials' 'true';
# add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, HEAD, DELETE';
# add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Content-Type,Origin,Referer';
# add_header 'Access-Control-Max-Age' 3600;
# '';
};
}

View File

@ -19,6 +19,7 @@
"matrix.gaze.systems"
"ms.gaze.systems"
"mq.gaze.systems"
"couchdb.gaze.systems"
];
};
certs."limbus.company" = {

View File

@ -1,10 +1,25 @@
{pkgs, ...}: {
{pkgs, ...}: let
run-sway = pkgs.writeText "run-sway.sh" ''
export _JAVA_AWT_WM_NONREPARENTING=1
export XDG_CURRENT_DESKTOP=sway
export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export GDK_BACKEND=wayland
export WLR_DRM_DEVICES=/dev/dri/card0
export WL_DRM_DEVICES=/dev/dri/card0
sway --unsupported-gpu
'';
in {
services.greetd = {
enable = true;
settings = {
terminal.vt = 1;
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --issue --time --cmd 'sway --unsupported-gpu'";
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --issue --time --cmd 'bash --login ${run-sway}'";
user = "greeter";
};
};

View File

@ -0,0 +1,16 @@
final: prev: {
abaddon = prev.abaddon.overrideAttrs (old: rec {
version = "0.1.12";
src = final.fetchFromGitHub {
owner = "uowuo";
repo = "abaddon";
rev = "v${version}";
sha256 = "sha256-Rz3c6RMZUiKQ0YKKQkCEkelfIGUq+xVmgNskj7uEjGI=";
fetchSubmodules = true;
};
buildInputs = old.buildInputs ++ (with final; [
miniaudio libsodium libopus spdlog pcre2
rnnoise qrcodegen openssl
]);
});
}

View File

@ -1,14 +0,0 @@
final: prev: {
spotify =
final.runCommand prev.spotify.name {
inherit (prev.spotify) meta;
nativeBuildInputs = [final.makeWrapper];
} ''
shopt -s extglob
mkdir -p $out/bin
ln -sf ${prev.spotify}/!(bin) $out/
ln -sf ${prev.spotify}/bin/* $out/bin/
wrapProgram $out/bin/spotify \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
'';
}

View File

@ -5,6 +5,7 @@ pkgs: (
"comic-mono"
"chromium"
"discordo"
"abaddon"
]
pkgs
)

View File

@ -9,13 +9,21 @@
"--ozone-platform-hint=auto"
"--flag-switches-begin"
"--enable-webrtc-pipewire-capturer"
# "--force-dark-mode"
# "--enable-gpu-rasterization"
# "--enable-zero-copy"
# "--ignore-gpu-blocklist"
# "--disable-gpu-driver-bug-workarounds"
"--disable-software-rasterizer"
"--disable-gpu-driver-workarounds"
"--enable-accelerated-video-decode"
"--enable-accelerated-mjpeg-decode"
"--enable-gpu-compositing"
"--enable-oop-rasterization"
"--canvas-oop-rasterization"
"--enable-raw-draw"
"--enable-zero-copy"
"--enable-gpu-rasterization"
"--enable-zero-copy"
"--ignore-gpu-blocklist"
"--disable-gpu-driver-bug-workarounds"
"--ozone-platform-hint=wayland"
"--enable-features=SystemNotifications,WaylandWindowDecorations,WebRTCPipeWireCapturer"
"--enable-features=SystemNotifications,WaylandWindowDecorations,WebRTCPipeWireCapturer,EnableDrDc,CanvasOopRasterization,RawDraw,VaapiVideoDecoder,UseSkiaRenderer"
"--flag-switches-end"
"--disk-cache-dir=\"$XDG_RUNTIME_DIR/chromium-cache\""
];

View File

@ -6,44 +6,45 @@
...
}: {
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
".config/discordcanary"
".config/ArmCord"
];
xdg.configFile."discordcanary/settings.json".text = builtins.toJSON {
# openasar = {
# setup = true;
# noTyping = true;
# quickstart = true;
# # theme = builtins.readFile inputs.catppuccin-discord;
# };
SKIP_HOST_UPDATE = true;
IS_MAXIMIZED = true;
IS_MINIMIZED = false;
trayBalloonShown = true;
};
home.packages = let
flags = [
"--flag-switches-begin"
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
"--flag-switches-end"
"--ozone-platform=wayland"
"--enable-webrtc-pipewire-capturer"
"--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"
# "--flag-switches-begin"
# "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
# "--flag-switches-end"
# "--ozone-platform=wayland"
# "--enable-webrtc-pipewire-capturer"
# "--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"
];
pkg =
(pkgs.discord-canary.override {
(pkgs.armcord.override {
nss = pkgs.nss_latest;
# withOpenASAR = true;
})
.overrideAttrs (old: {
preInstall = ''
gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}")
'';
# preInstall = ''
# gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}")
# '';
});
in [pkg];
systemd.user.services.premid = {
Install = {
WantedBy = ["default.target"];
};
Unit = {
Description = "premid";
After = "network.target";
};
Service = {
ExecStart = "${pkgs.premid}/bin/premid";
Restart = "on-failure";
RestartSec = 5;
};
};
}

View File

@ -21,9 +21,9 @@ in {
};
config = lib.mkIf cfg.enable {
systemd.user.services.musikcubed = {
Install = {
WantedBy = ["multi-user.target"];
};
# Install = {
# WantedBy = ["default.target"];
# };
Unit = {
Description = "musikcubed";
After = "network.target";

View File

@ -32,7 +32,10 @@
config = {
bars = [];
gaps.smartBorders = "on";
menu = mkRofiCmd ["-show" "drun"];
menu = mkRofiCmd [
"-show"
"drun"
];
modifier = "Mod4";
terminal = config.settings.terminal.binary;
keybindings = let

View File

@ -66,7 +66,7 @@ in {
dconf.enable = true;
weylus.users = ["patriot"];
java = {
enable = true;
enable = false;
package = pkgs.jre8;
};
};
@ -108,7 +108,7 @@ in {
["sway" "foot"]
# desktop stuff
["wayland"]
["chromium"]
["obsidian" "chromium"]
# cli stuff
["zoxide" "zsh" "fzf" "starship" "direnv"]
# dev stuff
@ -143,9 +143,9 @@ in {
"direnv"
"zsh"
"keyrings"
# "lutris"
"Terraria"
"PrismLauncher"
"lutris"
# "Terraria"
# "PrismLauncher"
]
++ mkPaths ".config" [
# "lutris"
@ -153,7 +153,7 @@ in {
"musikcube"
];
files = l.flatten [
".config/gnome-initial-setup-done"
# ".config/gnome-initial-setup-done"
(lib.removePrefix "~/" config.programs.ssh.userKnownHostsFile)
];
allowOther = true;
@ -190,16 +190,18 @@ in {
ffmpeg
mupdf
xdg-utils
# lutris
lutris
protontricks
# fractal-next
# obs-studio
libreoffice-fresh
helvum
nix-output-monitor
inputs.nh.packages.${pkgs.system}.default
# prismlauncher
steamPackages.steamcmd
steam-tui
# steamPackages.steamcmd
# steam-tui
abaddon
];
};
programs = {