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": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib_3" "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": { "locked": {
"lastModified": 1685662779, "lastModified": 1685662779,
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
@ -691,21 +709,6 @@
} }
}, },
"flake-utils_5": { "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": { "inputs": {
"systems": "systems_6" "systems": "systems_6"
}, },
@ -971,9 +974,46 @@
"type": "github" "type": "github"
} }
}, },
"nixd": { "nh": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "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": [
"nixpkgs" "nixpkgs"
] ]
@ -1095,6 +1135,24 @@
} }
}, },
"nixpkgs-lib_3": { "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": { "locked": {
"dir": "lib", "dir": "lib",
"lastModified": 1685564631, "lastModified": 1685564631,
@ -1354,6 +1412,7 @@
"limbusart": "limbusart", "limbusart": "limbusart",
"musikquad": "musikquad", "musikquad": "musikquad",
"musikspider": "musikspider", "musikspider": "musikspider",
"nh": "nh",
"nixd": "nixd", "nixd": "nixd",
"nixinate": "nixinate", "nixinate": "nixinate",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
@ -1362,7 +1421,6 @@
"nixpkgs-master": "nixpkgs-master", "nixpkgs-master": "nixpkgs-master",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur", "nur": "nur",
"steam-tui": "steam-tui",
"stylix": "stylix", "stylix": "stylix",
"vscode-extensions": "vscode-extensions" "vscode-extensions": "vscode-extensions"
} }
@ -1495,27 +1553,6 @@
"type": "github" "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": { "stylix": {
"inputs": { "inputs": {
"base16": "base16", "base16": "base16",
@ -1679,7 +1716,7 @@
"vscode-extensions": { "vscode-extensions": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_7", "flake-compat": "flake-compat_7",
"flake-utils": "flake-utils_6", "flake-utils": "flake-utils_5",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]

View File

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

View File

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

View File

@ -1,5 +1,19 @@
{ {
services.auto-cpufreq.enable = true; 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 = { services.tlp.settings = {
CPU_ENERGY_PERF_POLICY_ON_AC = ""; CPU_ENERGY_PERF_POLICY_ON_AC = "";
CPU_ENERGY_PERF_POLICY_ON_BAT = ""; CPU_ENERGY_PERF_POLICY_ON_BAT = "";

View File

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

View File

@ -4,8 +4,12 @@
settings = { settings = {
RADEON_DPM_PERF_LEVEL_ON_AC = "auto"; RADEON_DPM_PERF_LEVEL_ON_AC = "auto";
RADEON_DPM_PERF_LEVEL_ON_BAT = "low"; 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"; 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; 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" "matrix.gaze.systems"
"ms.gaze.systems" "ms.gaze.systems"
"mq.gaze.systems" "mq.gaze.systems"
"couchdb.gaze.systems"
]; ];
}; };
certs."limbus.company" = { 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 = { services.greetd = {
enable = true; enable = true;
settings = { settings = {
terminal.vt = 1; terminal.vt = 1;
default_session = { 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"; 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" "comic-mono"
"chromium" "chromium"
"discordo" "discordo"
"abaddon"
] ]
pkgs pkgs
) )

View File

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

View File

@ -6,44 +6,45 @@
... ...
}: { }: {
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ 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 home.packages = let
flags = [ flags = [
"--flag-switches-begin" # "--flag-switches-begin"
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer" # "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
"--flag-switches-end" # "--flag-switches-end"
"--ozone-platform=wayland" # "--ozone-platform=wayland"
"--enable-webrtc-pipewire-capturer" # "--enable-webrtc-pipewire-capturer"
"--disable-gpu-memory-buffer-video-frames" # "--disable-gpu-memory-buffer-video-frames"
"--enable-accelerated-mjpeg-decode" # "--enable-accelerated-mjpeg-decode"
"--enable-accelerated-video" # "--enable-accelerated-video"
"--enable-gpu-rasterization" # "--enable-gpu-rasterization"
"--enable-native-gpu-memory-buffers" # "--enable-native-gpu-memory-buffers"
"--enable-zero-copy" # "--enable-zero-copy"
"--ignore-gpu-blocklist" # "--ignore-gpu-blocklist"
]; ];
pkg = pkg =
(pkgs.discord-canary.override { (pkgs.armcord.override {
nss = pkgs.nss_latest; nss = pkgs.nss_latest;
# withOpenASAR = true;
}) })
.overrideAttrs (old: { .overrideAttrs (old: {
preInstall = '' # preInstall = ''
gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}") # gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}")
''; # '';
}); });
in [pkg]; 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 { config = lib.mkIf cfg.enable {
systemd.user.services.musikcubed = { systemd.user.services.musikcubed = {
Install = { # Install = {
WantedBy = ["multi-user.target"]; # WantedBy = ["default.target"];
}; # };
Unit = { Unit = {
Description = "musikcubed"; Description = "musikcubed";
After = "network.target"; After = "network.target";

View File

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

View File

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