Formatting + update
This commit is contained in:
parent
93de64c64e
commit
9c895e9cc0
61 changed files with 2350 additions and 2100 deletions
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = true;
|
||||
{...}: {
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ...}:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,49 +1,54 @@
|
|||
{ pkgs, inputs, hwconfig, unstable-pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.qtwayland
|
||||
kdePackages.qtsvg
|
||||
kdePackages.kio-fuse #to mount remote filesystems via FUSE
|
||||
kdePackages.kio-extras #extra protocols support (sftp, fish and more)
|
||||
kdePackages.kio-admin
|
||||
libheif #https://github.com/NixOS/nixpkgs/issues/164021
|
||||
libheif.out
|
||||
|
||||
#kde
|
||||
kdePackages.breeze-icons
|
||||
kdePackages.breeze
|
||||
kdePackages.kdesdk-thumbnailers
|
||||
kdePackages.kdegraphics-thumbnailers
|
||||
kdePackages.kservice
|
||||
kdePackages.kdbusaddons
|
||||
kdePackages.kfilemetadata
|
||||
kdePackages.kconfig
|
||||
kdePackages.kcoreaddons
|
||||
kdePackages.kcrash
|
||||
kdePackages.kguiaddons
|
||||
kdePackages.ki18n
|
||||
kdePackages.kitemviews
|
||||
kdePackages.kwidgetsaddons
|
||||
kdePackages.kwindowsystem
|
||||
shared-mime-info
|
||||
pkgs,
|
||||
inputs,
|
||||
hwconfig,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.qtwayland
|
||||
kdePackages.qtsvg
|
||||
kdePackages.kio-fuse #to mount remote filesystems via FUSE
|
||||
kdePackages.kio-extras #extra protocols support (sftp, fish and more)
|
||||
kdePackages.kio-admin
|
||||
libheif #https://github.com/NixOS/nixpkgs/issues/164021
|
||||
libheif.out
|
||||
|
||||
#kde support tools
|
||||
#libsForQt5.qt5ct
|
||||
#qt6ct
|
||||
kdePackages.kimageformats
|
||||
kdePackages.dolphin
|
||||
kdePackages.dolphin-plugins
|
||||
];
|
||||
xdg = {
|
||||
menus.enable = true;
|
||||
mime.enable = true;
|
||||
};
|
||||
#kde
|
||||
kdePackages.breeze-icons
|
||||
kdePackages.breeze
|
||||
kdePackages.kdesdk-thumbnailers
|
||||
kdePackages.kdegraphics-thumbnailers
|
||||
kdePackages.kservice
|
||||
kdePackages.kdbusaddons
|
||||
kdePackages.kfilemetadata
|
||||
kdePackages.kconfig
|
||||
kdePackages.kcoreaddons
|
||||
kdePackages.kcrash
|
||||
kdePackages.kguiaddons
|
||||
kdePackages.ki18n
|
||||
kdePackages.kitemviews
|
||||
kdePackages.kwidgetsaddons
|
||||
kdePackages.kwindowsystem
|
||||
shared-mime-info
|
||||
|
||||
#https://discourse.nixos.org/t/dolphin-does-not-have-mime-associations/48985/3
|
||||
# This fixes the unpopulated MIME menus
|
||||
environment.etc."/xdg/menus/plasma-applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
environment.etc."/xdg/menus/applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
#environment.pathsToLink = [
|
||||
# "share/thumbnailers"
|
||||
#];
|
||||
#kde support tools
|
||||
#libsForQt5.qt5ct
|
||||
#qt6ct
|
||||
kdePackages.kimageformats
|
||||
kdePackages.dolphin
|
||||
kdePackages.dolphin-plugins
|
||||
];
|
||||
xdg = {
|
||||
menus.enable = true;
|
||||
mime.enable = true;
|
||||
};
|
||||
|
||||
#https://discourse.nixos.org/t/dolphin-does-not-have-mime-associations/48985/3
|
||||
# This fixes the unpopulated MIME menus
|
||||
environment.etc."/xdg/menus/plasma-applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
environment.etc."/xdg/menus/applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
#environment.pathsToLink = [
|
||||
# "share/thumbnailers"
|
||||
#];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
emacs,
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
packages = with pkgs; [
|
||||
git
|
||||
gzip
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{ hwconfig, first-nixos-install, ... }:
|
||||
{
|
||||
hwconfig,
|
||||
first-nixos-install,
|
||||
...
|
||||
}: {
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -23,91 +26,96 @@
|
|||
};
|
||||
|
||||
modules = [
|
||||
"break"
|
||||
{
|
||||
type = "custom";
|
||||
format = "┌──────────────────────Hardware──────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
key = "│ ";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
key = "│ ";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = "│ ";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "└────────────────────────────────────────────────────┘";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "custom";
|
||||
format = "┌──────────────────────Software──────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = " OS -> NixOS btw";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = "│ ├ ";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = "│ ├ ";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = "└ └ ";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "wm";
|
||||
key = " WM";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = "│ ├ ";
|
||||
}
|
||||
{
|
||||
type = "terminal";
|
||||
key = "└ └ ";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "└────────────────────────────────────────────────────┘";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "custom";
|
||||
format = "┌────────────────────Age / Uptime────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "command";
|
||||
key = "│ ";
|
||||
text = #bash
|
||||
''
|
||||
birth_install=${if hwconfig.useImpermanence then "${first-nixos-install}" else "$(stat -c %W /)"}
|
||||
current=$(date +%s)
|
||||
delta=$((current - birth_install))
|
||||
delta_days=$((delta / 86400))
|
||||
echo $delta_days days
|
||||
'';
|
||||
}
|
||||
{
|
||||
type = "uptime";
|
||||
key = "│ ";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "└────────────────────────────────────────────────────┘";
|
||||
}
|
||||
"break"
|
||||
"break"
|
||||
{
|
||||
type = "custom";
|
||||
format = "┌──────────────────────Hardware──────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
key = "│ ";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
key = "│ ";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = "│ ";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "└────────────────────────────────────────────────────┘";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "custom";
|
||||
format = "┌──────────────────────Software──────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = " OS -> NixOS btw";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = "│ ├ ";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = "│ ├ ";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = "└ └ ";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "wm";
|
||||
key = " WM";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = "│ ├ ";
|
||||
}
|
||||
{
|
||||
type = "terminal";
|
||||
key = "└ └ ";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "└────────────────────────────────────────────────────┘";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "custom";
|
||||
format = "┌────────────────────Age / Uptime────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "command";
|
||||
key = "│ ";
|
||||
text =
|
||||
#bash
|
||||
''
|
||||
birth_install=${
|
||||
if hwconfig.useImpermanence
|
||||
then "${first-nixos-install}"
|
||||
else "$(stat -c %W /)"
|
||||
}
|
||||
current=$(date +%s)
|
||||
delta=$((current - birth_install))
|
||||
delta_days=$((delta / 86400))
|
||||
echo $delta_days days
|
||||
'';
|
||||
}
|
||||
{
|
||||
type = "uptime";
|
||||
key = "│ ";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "└────────────────────────────────────────────────────┘";
|
||||
}
|
||||
"break"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs = {
|
||||
{pkgs, ...}: {
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
firefox = prev.firefox.overrideAttrs (old: {
|
||||
|
|
@ -14,7 +13,7 @@
|
|||
--set MOZ_GMP_PATH "$out/gmp-widevinecdm/system-installed"
|
||||
'';
|
||||
});
|
||||
librewolf = prev.librewolf.overrideAttrs (old: {
|
||||
librewolf = prev.librewolf.overrideAttrs (old: {
|
||||
buildCommand =
|
||||
old.buildCommand
|
||||
+ ''
|
||||
|
|
@ -25,6 +24,7 @@
|
|||
--set MOZ_GMP_PATH "$out/gmp-widevinecdm/system-installed"
|
||||
'';
|
||||
});
|
||||
})];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,35 @@
|
|||
{ lib, config, pkgs, hwconfig, ... }:
|
||||
|
||||
let
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
lock-true = {
|
||||
Value = true;
|
||||
Status = "locked";
|
||||
};
|
||||
in
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
lock-true = {
|
||||
Value = true;
|
||||
Status = "locked";
|
||||
};
|
||||
in {
|
||||
imports = [] ++ lib.optional (hwconfig.system == "aarch64-linux") ./aarch64-linux.nix;
|
||||
programs = {
|
||||
firefox = {
|
||||
package = pkgs.librewolf;
|
||||
enable = true;
|
||||
languagePacks = [ "de" "en-US" "ru"];
|
||||
languagePacks = ["de" "en-US" "ru"];
|
||||
|
||||
/* ---- POLICIES ---- */
|
||||
/*
|
||||
---- POLICIES ----
|
||||
*/
|
||||
# Check about:policies#documentation for options.
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value= true;
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
|
|
@ -39,19 +44,21 @@
|
|||
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
|
||||
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||
SearchBar = "unified"; # alternative: "separate"
|
||||
OfferToSaveLogins = false;
|
||||
OffertosaveloginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
NoDefaultBookmarks = true;
|
||||
OfferToSaveLogins = false;
|
||||
OffertosaveloginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
NoDefaultBookmarks = true;
|
||||
|
||||
/* ---- EXTENSIONS ---- */
|
||||
/*
|
||||
---- EXTENSIONS ----
|
||||
*/
|
||||
# Check about:support for extension/add-on ID strings.
|
||||
# Valid strings for installation_mode are "allowed", "blocked",
|
||||
# "force_installed" and "normal_installed".
|
||||
#https://mozilla.github.io/policy-templates/#extensionsettings
|
||||
ExtensionSettings = {
|
||||
"*".installation_mode = "allowed"; # blocks all addons except the ones specified below
|
||||
# uBlock Origin
|
||||
#https://mozilla.github.io/policy-templates/#extensionsettings
|
||||
ExtensionSettings = {
|
||||
"*".installation_mode = "allowed"; # blocks all addons except the ones specified below
|
||||
# uBlock Origin
|
||||
"uBlock0@raymondhill.net" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
|
|
@ -62,41 +69,45 @@
|
|||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
# Dark Reader
|
||||
"addon@darkreader.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
#auto tab discard
|
||||
"{c2c003ee-bd69-42a2-b0e9-6f34222cb046}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/auto-tab-discard/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# global speed
|
||||
"{f4961478-ac79-4a18-87e9-d2fb8c0442c4}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/global-speed/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# sponsorblock
|
||||
"sponsorBlocker@ajay.app" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
# Adguard adblocker
|
||||
"adguardadblocker@adguard.com" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/adguard-adblocker/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# Dark Reader
|
||||
"addon@darkreader.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
#auto tab discard
|
||||
"{c2c003ee-bd69-42a2-b0e9-6f34222cb046}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/auto-tab-discard/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# global speed
|
||||
"{f4961478-ac79-4a18-87e9-d2fb8c0442c4}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/global-speed/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
# sponsorblock
|
||||
"sponsorBlocker@ajay.app" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
};
|
||||
/* ---- PREFERENCES ---- */
|
||||
# Adguard adblocker
|
||||
"adguardadblocker@adguard.com" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/adguard-adblocker/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
/*
|
||||
---- PREFERENCES ----
|
||||
*/
|
||||
# Check about:config for options.
|
||||
Preferences = {
|
||||
"browser.contentblocking.category" = { Value = "strict"; Status = "locked"; };
|
||||
Preferences = {
|
||||
"browser.contentblocking.category" = {
|
||||
Value = "strict";
|
||||
Status = "locked";
|
||||
};
|
||||
"extensions.pocket.enabled" = lock-false;
|
||||
"extensions.screenshots.disabled" = lock-true;
|
||||
"browser.startup.page" = 3; # restore session on startup
|
||||
"browser.startup.page" = 3; # restore session on startup
|
||||
"browser.topsites.contile.enabled" = lock-false;
|
||||
"browser.formfill.enable" = lock-false;
|
||||
"browser.search.suggest.enabled" = lock-false;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,19 @@
|
|||
{ pkgs, lib,... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
settings = {
|
||||
pinentry-program = lib.mkForce "${pkgs.pinentry-curses}/bin/pinentry-curses";
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs;[
|
||||
(pass.withExtensions (exts: with exts;[
|
||||
pass-otp
|
||||
pass-import
|
||||
]))
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pass.withExtensions (exts:
|
||||
with exts; [
|
||||
pass-otp
|
||||
pass-import
|
||||
]))
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,83 +1,89 @@
|
|||
{pkgs, hwconfig, ...}:
|
||||
let
|
||||
battery-path = "/sys/class/power_supply/${if hwconfig.hostname == "kylekrein-mac" then "macsmc-battery" else "BAT0"}";
|
||||
get-battery-level = "${pkgs.writeShellScriptBin "get-battery-level" ''
|
||||
cat ${battery-path}/capacity 2>/dev/null || echo "N/A"
|
||||
''}/bin/get-battery-level";
|
||||
get-status = "${pkgs.writeShellScriptBin "get-status" ''
|
||||
cat ${battery-path}/status 2>/dev/null || echo "Unknown"
|
||||
''}/bin/get-status";
|
||||
get-icon = "${pkgs.writeShellScriptBin "get-icon" ''
|
||||
BATTERY_LEVEL=$(${get-battery-level})
|
||||
STATUS=$(${get-status})
|
||||
if [[ "$BATTERY_LEVEL" == "N/A" ]]; then
|
||||
ICON=" "
|
||||
elif [[ "$STATUS" == "Charging" ]]; then
|
||||
if [[ $BATTERY_LEVEL -ge 90 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 80 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 70 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 60 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 50 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 40 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 30 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 20 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 10 ]]; then
|
||||
ICON=" "
|
||||
else
|
||||
ICON=" "
|
||||
fi
|
||||
else
|
||||
if [[ $BATTERY_LEVEL -ge 90 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 70 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 50 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 30 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 10 ]]; then
|
||||
ICON=" "
|
||||
else
|
||||
ICON=" "
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$ICON"
|
||||
''}/bin/get-icon";
|
||||
get-remaining-time = "${pkgs.writeShellScriptBin "get-remaining-time" ''
|
||||
REMAINING_ENERGY=$(cat ${battery-path}/energy_now)
|
||||
POWER_USAGE=$(cat ${battery-path}/power_now)
|
||||
if [[ -n "$REMAINING_ENERGY" && -n "$POWER_USAGE" && "$POWER_USAGE" -ne 0 ]]; then
|
||||
TIME_LEFT=$((0 - (REMAINING_ENERGY / POWER_USAGE)))
|
||||
MINUTES_LEFT=$(((0 - ( (REMAINING_ENERGY * 60) / POWER_USAGE )) - (TIME_LEFT * 60)))
|
||||
echo "$TIME_LEFT h $MINUTES_LEFT min"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
''}/bin/get-remaining-time";
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
battery-path = "/sys/class/power_supply/${
|
||||
if hwconfig.hostname == "kylekrein-mac"
|
||||
then "macsmc-battery"
|
||||
else "BAT0"
|
||||
}";
|
||||
get-battery-level = "${pkgs.writeShellScriptBin "get-battery-level" ''
|
||||
cat ${battery-path}/capacity 2>/dev/null || echo "N/A"
|
||||
''}/bin/get-battery-level";
|
||||
get-status = "${pkgs.writeShellScriptBin "get-status" ''
|
||||
cat ${battery-path}/status 2>/dev/null || echo "Unknown"
|
||||
''}/bin/get-status";
|
||||
get-icon = "${pkgs.writeShellScriptBin "get-icon" ''
|
||||
BATTERY_LEVEL=$(${get-battery-level})
|
||||
STATUS=$(${get-status})
|
||||
if [[ "$BATTERY_LEVEL" == "N/A" ]]; then
|
||||
ICON=" "
|
||||
elif [[ "$STATUS" == "Charging" ]]; then
|
||||
if [[ $BATTERY_LEVEL -ge 90 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 80 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 70 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 60 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 50 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 40 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 30 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 20 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 10 ]]; then
|
||||
ICON=" "
|
||||
else
|
||||
ICON=" "
|
||||
fi
|
||||
else
|
||||
if [[ $BATTERY_LEVEL -ge 90 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 70 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 50 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 30 ]]; then
|
||||
ICON=" "
|
||||
elif [[ $BATTERY_LEVEL -ge 10 ]]; then
|
||||
ICON=" "
|
||||
else
|
||||
ICON=" "
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$ICON"
|
||||
''}/bin/get-icon";
|
||||
get-remaining-time = "${pkgs.writeShellScriptBin "get-remaining-time" ''
|
||||
REMAINING_ENERGY=$(cat ${battery-path}/energy_now)
|
||||
POWER_USAGE=$(cat ${battery-path}/power_now)
|
||||
if [[ -n "$REMAINING_ENERGY" && -n "$POWER_USAGE" && "$POWER_USAGE" -ne 0 ]]; then
|
||||
TIME_LEFT=$((0 - (REMAINING_ENERGY / POWER_USAGE)))
|
||||
MINUTES_LEFT=$(((0 - ( (REMAINING_ENERGY * 60) / POWER_USAGE )) - (TIME_LEFT * 60)))
|
||||
echo "$TIME_LEFT h $MINUTES_LEFT min"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
''}/bin/get-remaining-time";
|
||||
in {
|
||||
available = hwconfig.isLaptop;
|
||||
icon = get-icon;
|
||||
status = get-status;
|
||||
time = get-remaining-time;
|
||||
level = get-battery-level;
|
||||
labelAdaptive = "${pkgs.writeShellScriptBin "labelAdaptive" ''
|
||||
if [[ "$(${get-status})" == "Charging" ]]; then
|
||||
echo "$(${get-battery-level})% $(${get-icon})"
|
||||
else
|
||||
echo "$(${get-remaining-time}) $(${get-icon})"
|
||||
fi
|
||||
if [[ "$(${get-status})" == "Charging" ]]; then
|
||||
echo "$(${get-battery-level})% $(${get-icon})"
|
||||
else
|
||||
echo "$(${get-remaining-time}) $(${get-icon})"
|
||||
fi
|
||||
''}/bin/labelAdaptive";
|
||||
labelPercent = "${pkgs.writeShellScriptBin "labelPercent" ''
|
||||
echo "$(${get-battery-level})% $(${get-icon})"
|
||||
echo "$(${get-battery-level})% $(${get-icon})"
|
||||
''}/bin/labelPercent";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,134 +1,137 @@
|
|||
{ pkgs, inputs, hwconfig, unstable-pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
hwconfig,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}: {
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = "${./wallpaper.jpg}";
|
||||
autoEnable = true;
|
||||
opacity = {
|
||||
desktop = 0.0;#0.5;
|
||||
};
|
||||
targets = {
|
||||
gtk.enable = true;
|
||||
plymouth = {
|
||||
enable = false;
|
||||
#logo = ./fastfetch/nixos.png;
|
||||
logoAnimated = false;
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
applications = 14;
|
||||
desktop = 12;
|
||||
popups = 12;
|
||||
terminal = 16;
|
||||
};
|
||||
};
|
||||
polarity = "dark";
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
enable = true;
|
||||
image = "${./wallpaper.jpg}";
|
||||
autoEnable = true;
|
||||
opacity = {
|
||||
desktop = 0.0; #0.5;
|
||||
};
|
||||
targets = {
|
||||
gtk.enable = true;
|
||||
plymouth = {
|
||||
enable = false;
|
||||
#logo = ./fastfetch/nixos.png;
|
||||
logoAnimated = false;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
#kando
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
applications = 14;
|
||||
desktop = 12;
|
||||
popups = 12;
|
||||
terminal = 16;
|
||||
};
|
||||
};
|
||||
polarity = "dark";
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
#kando
|
||||
|
||||
kdePackages.qtwayland
|
||||
#libsForQt5.qt5.qtwayland
|
||||
#libsForQt5.qt5.qtsvg
|
||||
kdePackages.qtsvg
|
||||
#kio-fuse #to mount remote filesystems via FUSE
|
||||
#libsForQt5.kio-extras #extra protocols support (sftp, fish and more)
|
||||
kdePackages.kio-fuse #to mount remote filesystems via FUSE
|
||||
kdePackages.kio-extras #extra protocols support (sftp, fish and more)
|
||||
kdePackages.kio-admin
|
||||
waybar
|
||||
swaynotificationcenter
|
||||
libnotify
|
||||
swww
|
||||
hyprpicker
|
||||
networkmanagerapplet
|
||||
hyprlock
|
||||
wlogout
|
||||
hypridle
|
||||
qpwgraph
|
||||
pwvucontrol
|
||||
brightnessctl
|
||||
unstable-pkgs.satty #fixes crash in 0.18.0
|
||||
grim
|
||||
slurp
|
||||
clipse
|
||||
libheif #https://github.com/NixOS/nixpkgs/issues/164021
|
||||
libheif.out
|
||||
|
||||
#kde
|
||||
kdePackages.breeze-icons
|
||||
kdePackages.breeze
|
||||
kdePackages.polkit-kde-agent-1
|
||||
kdePackages.kdesdk-thumbnailers
|
||||
kdePackages.kdegraphics-thumbnailers
|
||||
kdePackages.kservice
|
||||
kdePackages.kdbusaddons
|
||||
kdePackages.kfilemetadata
|
||||
kdePackages.kconfig
|
||||
kdePackages.kcoreaddons
|
||||
kdePackages.kcrash
|
||||
kdePackages.kguiaddons
|
||||
kdePackages.ki18n
|
||||
kdePackages.kitemviews
|
||||
kdePackages.kwidgetsaddons
|
||||
kdePackages.kwindowsystem
|
||||
shared-mime-info
|
||||
#kdePackages.plasma-workspace
|
||||
kdePackages.qtwayland
|
||||
#libsForQt5.qt5.qtwayland
|
||||
#libsForQt5.qt5.qtsvg
|
||||
kdePackages.qtsvg
|
||||
#kio-fuse #to mount remote filesystems via FUSE
|
||||
#libsForQt5.kio-extras #extra protocols support (sftp, fish and more)
|
||||
kdePackages.kio-fuse #to mount remote filesystems via FUSE
|
||||
kdePackages.kio-extras #extra protocols support (sftp, fish and more)
|
||||
kdePackages.kio-admin
|
||||
waybar
|
||||
swaynotificationcenter
|
||||
libnotify
|
||||
swww
|
||||
hyprpicker
|
||||
networkmanagerapplet
|
||||
hyprlock
|
||||
wlogout
|
||||
hypridle
|
||||
qpwgraph
|
||||
pwvucontrol
|
||||
brightnessctl
|
||||
unstable-pkgs.satty #fixes crash in 0.18.0
|
||||
grim
|
||||
slurp
|
||||
clipse
|
||||
libheif #https://github.com/NixOS/nixpkgs/issues/164021
|
||||
libheif.out
|
||||
|
||||
#kde support tools
|
||||
libsForQt5.qt5ct
|
||||
qt6ct
|
||||
kdePackages.kimageformats
|
||||
kdePackages.dolphin
|
||||
kdePackages.dolphin-plugins
|
||||
#kde
|
||||
kdePackages.breeze-icons
|
||||
kdePackages.breeze
|
||||
kdePackages.polkit-kde-agent-1
|
||||
kdePackages.kdesdk-thumbnailers
|
||||
kdePackages.kdegraphics-thumbnailers
|
||||
kdePackages.kservice
|
||||
kdePackages.kdbusaddons
|
||||
kdePackages.kfilemetadata
|
||||
kdePackages.kconfig
|
||||
kdePackages.kcoreaddons
|
||||
kdePackages.kcrash
|
||||
kdePackages.kguiaddons
|
||||
kdePackages.ki18n
|
||||
kdePackages.kitemviews
|
||||
kdePackages.kwidgetsaddons
|
||||
kdePackages.kwindowsystem
|
||||
shared-mime-info
|
||||
#kdePackages.plasma-workspace
|
||||
|
||||
#kde support tools
|
||||
libsForQt5.qt5ct
|
||||
qt6ct
|
||||
kdePackages.kimageformats
|
||||
kdePackages.dolphin
|
||||
kdePackages.dolphin-plugins
|
||||
];
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.kdeconnect.package = pkgs.kdePackages.kdeconnect-kde;
|
||||
programs.hyprlock.enable = true;
|
||||
|
||||
xdg = {
|
||||
menus.enable = true;
|
||||
mime.enable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config = {
|
||||
hyprland = {
|
||||
default = [
|
||||
"hyprland"
|
||||
"kde"
|
||||
];
|
||||
};
|
||||
};
|
||||
configPackages = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
kdePackages.xdg-desktop-portal-kde
|
||||
];
|
||||
};
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.kdeconnect.package = pkgs.kdePackages.kdeconnect-kde;
|
||||
programs.hyprlock.enable = true;
|
||||
|
||||
xdg = {
|
||||
menus.enable = true;
|
||||
mime.enable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config = {
|
||||
hyprland = {
|
||||
default = [
|
||||
"hyprland"
|
||||
"kde"
|
||||
];
|
||||
};
|
||||
};
|
||||
configPackages = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
kdePackages.xdg-desktop-portal-kde
|
||||
];
|
||||
};
|
||||
|
||||
#https://discourse.nixos.org/t/dolphin-does-not-have-mime-associations/48985/3
|
||||
# This fixes the unpopulated MIME menus
|
||||
environment.etc."/xdg/menus/plasma-applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
environment.etc."/xdg/menus/applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
#environment.pathsToLink = [
|
||||
# "share/thumbnailers"
|
||||
#];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
systemd.setPath.enable = true;
|
||||
};
|
||||
services.hypridle.enable = true;
|
||||
|
||||
# qt = {
|
||||
#enable = true;
|
||||
#platformTheme = "qt5ct";
|
||||
#style = "kvantum";
|
||||
# };
|
||||
#https://discourse.nixos.org/t/dolphin-does-not-have-mime-associations/48985/3
|
||||
# This fixes the unpopulated MIME menus
|
||||
environment.etc."/xdg/menus/plasma-applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
environment.etc."/xdg/menus/applications.menu".text = builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
#environment.pathsToLink = [
|
||||
# "share/thumbnailers"
|
||||
#];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
systemd.setPath.enable = true;
|
||||
};
|
||||
services.hypridle.enable = true;
|
||||
|
||||
# qt = {
|
||||
#enable = true;
|
||||
#platformTheme = "qt5ct";
|
||||
#style = "kvantum";
|
||||
# };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
imports = [
|
||||
(import ./hyprland.nix {
|
||||
inherit pkgs;
|
||||
|
|
|
|||
|
|
@ -1,65 +1,66 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
suspendScript = pkgs.writeShellScript "suspend-script" ''
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
suspendScript = pkgs.writeShellScript "suspend-script" ''
|
||||
# check if any player has status "Playing"
|
||||
${lib.getExe pkgs.playerctl} -a status | ${lib.getExe pkgs.ripgrep} Playing -q
|
||||
# only suspend if nothing is playing
|
||||
if [ $? == 1 ]; then
|
||||
${if hwconfig.isLaptop then "${pkgs.systemd}/bin/systemctl suspend" else "loginctl lock-session"}
|
||||
${
|
||||
if hwconfig.isLaptop
|
||||
then "${pkgs.systemd}/bin/systemctl suspend"
|
||||
else "loginctl lock-session"
|
||||
}
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
general = {
|
||||
lock_cmd="pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "pidof hyprlock || loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
ignore_dbus_inhibit = false;
|
||||
};
|
||||
|
||||
listener = [
|
||||
|
||||
#{
|
||||
# on-resume="brightnessctl -r"; # monitor backlight restore.
|
||||
# on-timeout="brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
# timeout=240;
|
||||
#}
|
||||
#{
|
||||
# on-resume="brightnessctl -rd rgb:kbd_backlight";
|
||||
# on-timeout="brightnessctl -sd rgb:kbd_backlight set 0";
|
||||
# timeout=300;
|
||||
#}
|
||||
{
|
||||
on-timeout="notify-send \"You're idle. Locking in 30 seconds.\"";
|
||||
timeout=830;
|
||||
}
|
||||
{
|
||||
on-timeout = "pidof hyprlock && systemctl suspend";
|
||||
timeout = 120;
|
||||
}
|
||||
#{
|
||||
# on-timeout="loginctl lock-session";
|
||||
# timeout=360;
|
||||
#}
|
||||
{
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
on-timeout = suspendScript.outPath;
|
||||
timeout = 900;
|
||||
}
|
||||
#{
|
||||
# on-resume="hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||
# on-timeout="hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||
# timeout=420;
|
||||
#}
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
in {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "pidof hyprlock || loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
ignore_dbus_inhibit = false;
|
||||
};
|
||||
|
||||
listener = [
|
||||
#{
|
||||
# on-resume="brightnessctl -r"; # monitor backlight restore.
|
||||
# on-timeout="brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
# timeout=240;
|
||||
#}
|
||||
#{
|
||||
# on-resume="brightnessctl -rd rgb:kbd_backlight";
|
||||
# on-timeout="brightnessctl -sd rgb:kbd_backlight set 0";
|
||||
# timeout=300;
|
||||
#}
|
||||
{
|
||||
on-timeout = "notify-send \"You're idle. Locking in 30 seconds.\"";
|
||||
timeout = 830;
|
||||
}
|
||||
{
|
||||
on-timeout = "pidof hyprlock && systemctl suspend";
|
||||
timeout = 120;
|
||||
}
|
||||
#{
|
||||
# on-timeout="loginctl lock-session";
|
||||
# timeout=360;
|
||||
#}
|
||||
{
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
on-timeout = suspendScript.outPath;
|
||||
timeout = 900;
|
||||
}
|
||||
#{
|
||||
# on-resume="hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||
# on-timeout="hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||
# timeout=420;
|
||||
#}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ in {
|
|||
"$mainMod ALT, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
|
||||
''$mainMod, E, exec, $emacs''
|
||||
#''$mainMod SHIFT, E, exec, emacsclient -e "(emacs-everywhere)"''
|
||||
#''$mainMod SHIFT, E, exec, emacsclient -e "(emacs-everywhere)"''
|
||||
];
|
||||
|
||||
bindm = [
|
||||
|
|
@ -126,17 +126,23 @@ in {
|
|||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
misc = {
|
||||
vfr = true; #lowers the amount of frames when nothing happens
|
||||
allow_session_lock_restore = true; # hope that it fixes the crash of hyprlock
|
||||
disable_hyprland_logo = true;# disables the random Hyprland logo / anime girl background. :(
|
||||
vfr = true; #lowers the amount of frames when nothing happens
|
||||
allow_session_lock_restore = true; # hope that it fixes the crash of hyprlock
|
||||
disable_hyprland_logo = true; # disables the random Hyprland logo / anime girl background. :(
|
||||
};
|
||||
input = {
|
||||
kb_layout = "us, ru";
|
||||
kb_options = "grp:lctrl_toggle, ctrl:nocaps" + (if hwconfig.hostname == "kylekrein-mac" then ", altwin:swap_alt_win" else ""); # "ctrl:nocaps, grp:toggle"
|
||||
kb_options =
|
||||
"grp:lctrl_toggle, ctrl:nocaps"
|
||||
+ (
|
||||
if hwconfig.hostname == "kylekrein-mac"
|
||||
then ", altwin:swap_alt_win"
|
||||
else ""
|
||||
); # "ctrl:nocaps, grp:toggle"
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = false; #for games
|
||||
disable_while_typing = false; #for games
|
||||
};
|
||||
};
|
||||
env = [
|
||||
|
|
@ -159,7 +165,7 @@ in {
|
|||
|
||||
cursor = {
|
||||
no_hardware_cursors = true;
|
||||
inactive_timeout = 10;
|
||||
inactive_timeout = 10;
|
||||
};
|
||||
|
||||
general = {
|
||||
|
|
@ -173,8 +179,9 @@ in {
|
|||
allow_tearing = false;
|
||||
layout = "dwindle";
|
||||
};
|
||||
render = lib.mkIf (hwconfig.system == "aarch64-linux") { # Explicit sync breaks asahi driver https://github.com/hyprwm/Hyprland/issues/8158
|
||||
explicit_sync = 0;
|
||||
render = lib.mkIf (hwconfig.system == "aarch64-linux") {
|
||||
# Explicit sync breaks asahi driver https://github.com/hyprwm/Hyprland/issues/8158
|
||||
explicit_sync = 0;
|
||||
};
|
||||
|
||||
windowrule = [
|
||||
|
|
@ -212,9 +219,9 @@ in {
|
|||
#emacs run launcher
|
||||
"float, title:emacs-run-launcher"
|
||||
"pin, title:emacs-run-launcher"
|
||||
|
||||
#emacs
|
||||
"opaque, class:emacs"
|
||||
|
||||
#emacs
|
||||
"opaque, class:emacs"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,25 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
profile-image = ./profile-image.png;
|
||||
battery-level = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;}).labelPercent;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
profile-image = ./profile-image.png;
|
||||
battery-level =
|
||||
(import ./battery-status.nix {
|
||||
inherit pkgs;
|
||||
inherit hwconfig;
|
||||
}).labelPercent;
|
||||
in {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
#enable_fingerprint = true;
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
grace = 10;
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
grace = 10;
|
||||
};
|
||||
background = {
|
||||
blur_passes = 1;
|
||||
|
|
@ -24,14 +31,14 @@ in
|
|||
vibrancy_darkness = 0.0;
|
||||
};
|
||||
image = {
|
||||
path = "${profile-image}";
|
||||
size = 150;
|
||||
border_size = 4;
|
||||
#border_color = "rgb(0C96F9)";
|
||||
rounding = -1; # Negative means circle
|
||||
position = "0, 220";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
path = "${profile-image}";
|
||||
size = 150;
|
||||
border_size = 4;
|
||||
#border_color = "rgb(0C96F9)";
|
||||
rounding = -1; # Negative means circle
|
||||
position = "0, 220";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
input-field = {
|
||||
size = "600, 100";
|
||||
|
|
@ -51,41 +58,41 @@ in
|
|||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
label = [
|
||||
{
|
||||
text = "$USER";
|
||||
font_family = "Fira Code";
|
||||
font_size = 56;
|
||||
position = "0, 100";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
text = "$TIME";
|
||||
font_family = "Roboto";
|
||||
font_size = 72;
|
||||
position = "-40, -40";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
text = "$LAYOUT";
|
||||
font_family = "JetBrains Mono";
|
||||
font_size = 28;
|
||||
position = "-20, 20";
|
||||
halign = "right";
|
||||
valign = "bottom";
|
||||
}
|
||||
] ++ lib.optional (hwconfig.isLaptop) (
|
||||
{
|
||||
label =
|
||||
[
|
||||
{
|
||||
text = "$USER";
|
||||
font_family = "Fira Code";
|
||||
font_size = 56;
|
||||
position = "0, 100";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
text = "$TIME";
|
||||
font_family = "Roboto";
|
||||
font_size = 72;
|
||||
position = "-40, -40";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
text = "$LAYOUT";
|
||||
font_family = "JetBrains Mono";
|
||||
font_size = 28;
|
||||
position = "-20, 20";
|
||||
halign = "right";
|
||||
valign = "bottom";
|
||||
}
|
||||
]
|
||||
++ lib.optional (hwconfig.isLaptop) {
|
||||
text = ''cmd[update:10000] ${battery-level}'';
|
||||
font_family = "JetBrains Mono";
|
||||
font_size = 28;
|
||||
position = "20, 20";
|
||||
halign = "left";
|
||||
valign = "bottom";
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,70 +1,79 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
battery = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;});
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
battery = import ./battery-status.nix {
|
||||
inherit pkgs;
|
||||
inherit hwconfig;
|
||||
};
|
||||
in {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
#systemd.enable = true;
|
||||
|
||||
#window#waybar {
|
||||
# background: transparent;
|
||||
#border-bottom: none;
|
||||
#}
|
||||
#${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"}
|
||||
style = ''
|
||||
${builtins.readFile ./waybarstyle.css}
|
||||
|
||||
* {
|
||||
font-size: 15px;
|
||||
}
|
||||
'';
|
||||
settings = [{
|
||||
# background: transparent;
|
||||
#border-bottom: none;
|
||||
#}
|
||||
#${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"}
|
||||
style = ''
|
||||
${builtins.readFile ./waybarstyle.css}
|
||||
|
||||
* {
|
||||
font-size: 15px;
|
||||
}
|
||||
'';
|
||||
settings = [
|
||||
{
|
||||
height = 36;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
tray = { spacing = 3; };
|
||||
modules-center = [
|
||||
#"hyprland/window"
|
||||
"clock"
|
||||
];
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
# "hyprland/window"
|
||||
tray = {spacing = 3;};
|
||||
modules-center = [
|
||||
#"hyprland/window"
|
||||
"clock"
|
||||
];
|
||||
modules-right = lib.optional hwconfig.isLaptop "backlight"
|
||||
++ [
|
||||
"pulseaudio"
|
||||
#"network"
|
||||
#"cpu"
|
||||
"memory"
|
||||
#"temperature"
|
||||
"hyprland/language"
|
||||
] ++ lib.optional battery.available "custom/battery"
|
||||
++ [
|
||||
"tray"
|
||||
"custom/notification"
|
||||
#"custom/disablehypridle"
|
||||
"custom/power"
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
# "hyprland/window"
|
||||
];
|
||||
modules-right =
|
||||
lib.optional hwconfig.isLaptop "backlight"
|
||||
++ [
|
||||
"pulseaudio"
|
||||
#"network"
|
||||
#"cpu"
|
||||
"memory"
|
||||
#"temperature"
|
||||
"hyprland/language"
|
||||
]
|
||||
++ lib.optional battery.available "custom/battery"
|
||||
++ [
|
||||
"tray"
|
||||
"custom/notification"
|
||||
#"custom/disablehypridle"
|
||||
"custom/power"
|
||||
];
|
||||
battery = {
|
||||
format = " {time} {icon} ";
|
||||
format-alt = " {capacity}% {icon} ";
|
||||
format-charging = " {capacity}% ";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-icons = ["" "" "" "" ""];
|
||||
format-plugged = " {capacity}% ";
|
||||
states = {
|
||||
critical = 10;
|
||||
warning = 20;
|
||||
};
|
||||
};
|
||||
backlight = {
|
||||
format = "{percent}% ";
|
||||
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
|
||||
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
|
||||
};
|
||||
backlight = {
|
||||
format = "{percent}% ";
|
||||
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
|
||||
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
|
||||
};
|
||||
"custom/battery" = {
|
||||
exec ="${pkgs.writeShellScriptBin "battery-widget" ''
|
||||
exec = "${pkgs.writeShellScriptBin "battery-widget" ''
|
||||
${battery.labelAdaptive}
|
||||
${battery.labelPercent}
|
||||
''}/bin/battery-widget";
|
||||
|
|
@ -80,12 +89,12 @@ in
|
|||
tooltip = false;
|
||||
};
|
||||
"hyprland/language" = {
|
||||
format = " {}";
|
||||
format = " {}";
|
||||
};
|
||||
memory = {
|
||||
interval = 1;
|
||||
format = "{used}/{total}Gb ";
|
||||
};
|
||||
memory = {
|
||||
interval = 1;
|
||||
format = "{used}/{total}Gb ";
|
||||
};
|
||||
network = {
|
||||
interval = 1;
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
|
|
@ -102,7 +111,7 @@ in
|
|||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-icons = {
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
default = ["" "" ""];
|
||||
handsfree = "";
|
||||
headphones = "";
|
||||
headset = "";
|
||||
|
|
@ -114,57 +123,57 @@ in
|
|||
format-source-muted = "";
|
||||
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
|
||||
};
|
||||
"hyprland/submap" = { format = ''<span style="italic">{}</span>''; };
|
||||
"hyprland/submap" = {format = ''<span style="italic">{}</span>'';};
|
||||
temperature = {
|
||||
critical-threshold = 80;
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = [ "" "" "" ];
|
||||
format-icons = ["" "" ""];
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = false;
|
||||
warp-on-scroll = true;
|
||||
format = "{name}{icon} ";
|
||||
format-icons = {
|
||||
urgent = "";
|
||||
active = "";
|
||||
default = "";
|
||||
};
|
||||
#persistent-workspaces = {
|
||||
# "*" = 3;
|
||||
#};
|
||||
disable-scroll = true;
|
||||
all-outputs = false;
|
||||
warp-on-scroll = true;
|
||||
format = "{name}{icon} ";
|
||||
format-icons = {
|
||||
urgent = "";
|
||||
active = "";
|
||||
default = "";
|
||||
};
|
||||
#persistent-workspaces = {
|
||||
# "*" = 3;
|
||||
#};
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
format = "⏻ ";
|
||||
tooltip = false;
|
||||
#menu = "on-click";
|
||||
#menu-file = ./power_menu.xml;
|
||||
#menu-actions = {
|
||||
# shutdown = "shutdown -h now";
|
||||
# reboot = "reboot";
|
||||
# suspend = "systemctl suspend";
|
||||
# hibernate = "systemctl hibernate";
|
||||
#};
|
||||
on-click = "wlogout";
|
||||
format = "⏻ ";
|
||||
tooltip = false;
|
||||
#menu = "on-click";
|
||||
#menu-file = ./power_menu.xml;
|
||||
#menu-actions = {
|
||||
# shutdown = "shutdown -h now";
|
||||
# reboot = "reboot";
|
||||
# suspend = "systemctl suspend";
|
||||
# hibernate = "systemctl hibernate";
|
||||
#};
|
||||
on-click = "wlogout";
|
||||
};
|
||||
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
notification = " <span foreground='red'><small><sup>⬤</sup></small></span>";
|
||||
none = " ";
|
||||
dnd-notification = " <span foreground='red'><small><sup>⬤</sup></small></span>";
|
||||
dnd-none = " ";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && swaync-client -t -sw";
|
||||
on-click-right = "sleep 0.1 && swaync-client -d -sw";
|
||||
escape = true;
|
||||
tooltip = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
notification = " <span foreground='red'><small><sup>⬤</sup></small></span>";
|
||||
none = " ";
|
||||
dnd-notification = " <span foreground='red'><small><sup>⬤</sup></small></span>";
|
||||
dnd-none = " ";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && swaync-client -t -sw";
|
||||
on-click-right = "sleep 0.1 && swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
|
||||
"custom/disablehypridle" = {
|
||||
|
|
@ -184,6 +193,7 @@ in
|
|||
fi
|
||||
'';
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
{ ... }:
|
||||
let folder = ".config/kando";
|
||||
in
|
||||
{
|
||||
home.file = {
|
||||
#"${folder}/config.json".source = ./config.json;
|
||||
"${folder}/menus.json".source = ./menus.json;
|
||||
};
|
||||
{...}: let
|
||||
folder = ".config/kando";
|
||||
in {
|
||||
home.file = {
|
||||
#"${folder}/config.json".source = ./config.json;
|
||||
"${folder}/menus.json".source = ./menus.json;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.xserver.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
{...}: {
|
||||
services.xserver.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
programs.dconf.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
#stylix.targets.qt.platform = "qtct";
|
||||
#stylix.targets.qt.platform = "qtct";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
|
|
@ -7,7 +6,7 @@
|
|||
package = pkgs.qemu_kvm;
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
ovmf.packages = [pkgs.OVMFFull.fd];
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
{ username, ... }:
|
||||
{
|
||||
users.users.${username}.extraGroups = [ "libvirtd" ];
|
||||
home-manager.users.${username} = {
|
||||
{username, ...}: {
|
||||
users.users.${username}.extraGroups = ["libvirtd"];
|
||||
home-manager.users.${username} = {
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = [ "qemu:///system" ];
|
||||
uris = [ "qemu:///system" ];
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{ pkgs, inputs, ...}:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.overlays = [
|
||||
inputs.niri-flake.overlays.niri
|
||||
];
|
||||
|
|
@ -12,7 +15,7 @@
|
|||
package = pkgs.niri-unstable;
|
||||
};
|
||||
niri-flake.cache.enable = true;
|
||||
environment.systemPackages = with pkgs;[
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
wayland-utils
|
||||
libsecret
|
||||
|
|
|
|||
|
|
@ -3,13 +3,10 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
cfg = config.kylekrein.services.autoUpgrade;
|
||||
script = ./nixos-upgrade-script.sh;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
kylekrein.services.autoUpgrade = {
|
||||
enable = lib.mkEnableOption "Enables automatic system updates.";
|
||||
|
|
@ -69,15 +66,31 @@ in
|
|||
unitConfig.RequiresMountsFor = cfg.configDir;
|
||||
script =
|
||||
"${script} --operation ${cfg.operation} "
|
||||
+ (if (cfg.configDir != "") then "--flake ${cfg.configDir} " else "")
|
||||
+ (if (cfg.user != "") then "--user ${cfg.user} " else "")
|
||||
+ (if (cfg.pushUpdates) then "--update " else "")
|
||||
+ (if (cfg.extraFlags != "") then cfg.extraFlags else "");
|
||||
+ (
|
||||
if (cfg.configDir != "")
|
||||
then "--flake ${cfg.configDir} "
|
||||
else ""
|
||||
)
|
||||
+ (
|
||||
if (cfg.user != "")
|
||||
then "--user ${cfg.user} "
|
||||
else ""
|
||||
)
|
||||
+ (
|
||||
if (cfg.pushUpdates)
|
||||
then "--update "
|
||||
else ""
|
||||
)
|
||||
+ (
|
||||
if (cfg.extraFlags != "")
|
||||
then cfg.extraFlags
|
||||
else ""
|
||||
);
|
||||
};
|
||||
timers."nixos-upgrade" = {
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = [ "timers.target" ];
|
||||
wants = ["network-online.target"];
|
||||
after = ["network-online.target"];
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnCalendar = cfg.onCalendar;
|
||||
Persistent = cfg.persistent;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,20 @@
|
|||
{ config, pkgs, inputs, lib, hwconfig, ... }:
|
||||
let
|
||||
keyPath = (if hwconfig.useImpermanence then "/persist/sops/age/keys.txt" else "/var/lib/sops/age/keys.txt");
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [sops];
|
||||
sops.defaultSopsFile = ./secrets/secrets.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
sops.age.keyFile = keyPath;
|
||||
# This will generate a new key if the key specified above does not exist
|
||||
sops.age.generateKey = true;
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
keyPath =
|
||||
if hwconfig.useImpermanence
|
||||
then "/persist/sops/age/keys.txt"
|
||||
else "/var/lib/sops/age/keys.txt";
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [sops];
|
||||
sops.defaultSopsFile = ./secrets/secrets.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
sops.age.keyFile = keyPath;
|
||||
# This will generate a new key if the key specified above does not exist
|
||||
sops.age.generateKey = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@
|
|||
...
|
||||
}: let
|
||||
cfg = config.kk.steam;
|
||||
containerPath = if hwconfig.useImpermanence then "/persist/home/containers/steam" else "/var/containers/steam";
|
||||
containerPath =
|
||||
if hwconfig.useImpermanence
|
||||
then "/persist/home/containers/steam"
|
||||
else "/var/containers/steam";
|
||||
containerName = "fedora-steam";
|
||||
in {
|
||||
options.kk.steam = {
|
||||
|
|
@ -15,92 +18,91 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
if hwconfig.system == "aarch64-linux"
|
||||
then {
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs;[
|
||||
distrobox
|
||||
(pkgs.writeShellScriptBin "steam-install" ''
|
||||
set -e
|
||||
echo "Проверяем контейнер Steam..."
|
||||
|
||||
if [ ! -d "${containerPath}" ]; then
|
||||
echo "Контейнер не найден, создаем новый с Fedora..."
|
||||
|
||||
# Создаём контейнер с Fedora
|
||||
export PATH=${pkgs.podman}/bin:$PATH
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-create --name "${containerName}" --image registry.fedoraproject.org/fedora:latest --home ${containerPath} --hostname ${containerName} --yes
|
||||
|
||||
echo "Контейнер ${containerName} создан, устанавливаем Steam..."
|
||||
|
||||
# Устанавливаем Steam внутри контейнера
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf upgrade --refresh -y
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/steam
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/fedora-remix-branding
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/fedora-remix-scripts
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/kernel
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/mesa
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/kernel-edge
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/packit-builds
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/u-boot
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/rawhide-rebuilds
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/mesa
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/mesa
|
||||
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf upgrade --refresh -y
|
||||
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf install --best --setopt=allow_vendor_change=true asahi-repos -y
|
||||
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf install --best --setopt=allow_vendor_change=true steam -y
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf remove dhcpcd -y
|
||||
fi
|
||||
|
||||
echo "Экспортируем Steam..."
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox enter "${containerName}" -- distrobox-export --app steam
|
||||
'')
|
||||
];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if hwconfig.system == "aarch64-linux"
|
||||
then {
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
unzip
|
||||
wget
|
||||
xdotool
|
||||
xorg.xprop
|
||||
xorg.xrandr
|
||||
unixtools.xxd
|
||||
xorg.xwininfo
|
||||
yad
|
||||
protonup-qt
|
||||
protontricks
|
||||
bottles
|
||||
distrobox
|
||||
(pkgs.writeShellScriptBin "steam-install" ''
|
||||
set -e
|
||||
echo "Проверяем контейнер Steam..."
|
||||
|
||||
if [ ! -d "${containerPath}" ]; then
|
||||
echo "Контейнер не найден, создаем новый с Fedora..."
|
||||
|
||||
# Создаём контейнер с Fedora
|
||||
export PATH=${pkgs.podman}/bin:$PATH
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-create --name "${containerName}" --image registry.fedoraproject.org/fedora:latest --home ${containerPath} --hostname ${containerName} --yes
|
||||
|
||||
echo "Контейнер ${containerName} создан, устанавливаем Steam..."
|
||||
|
||||
# Устанавливаем Steam внутри контейнера
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf upgrade --refresh -y
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/steam
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/fedora-remix-branding
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/fedora-remix-scripts
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/kernel
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/mesa
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/kernel-edge
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/packit-builds
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/u-boot
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/rawhide-rebuilds
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/mesa
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf copr enable -y @asahi/mesa
|
||||
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf upgrade --refresh -y
|
||||
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf install --best --setopt=allow_vendor_change=true asahi-repos -y
|
||||
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf install --best --setopt=allow_vendor_change=true steam -y
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sudo dnf remove dhcpcd -y
|
||||
fi
|
||||
|
||||
echo "Экспортируем Steam..."
|
||||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox enter "${containerName}" -- distrobox-export --app steam
|
||||
'')
|
||||
];
|
||||
}
|
||||
else {
|
||||
environment.systemPackages = with pkgs; [
|
||||
unzip
|
||||
wget
|
||||
xdotool
|
||||
xorg.xprop
|
||||
xorg.xrandr
|
||||
unixtools.xxd
|
||||
xorg.xwininfo
|
||||
yad
|
||||
protonup-qt
|
||||
protontricks
|
||||
bottles
|
||||
];
|
||||
programs.steam = {
|
||||
enable = true;#!hwconfig.useImpermanence;
|
||||
enable = true; #!hwconfig.useImpermanence;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs = pkgs: with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
sdl3
|
||||
SDL2
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
gamescope
|
||||
];
|
||||
};
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
sdl3
|
||||
SDL2
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
gamescope
|
||||
];
|
||||
};
|
||||
};
|
||||
programs.gamemode.enable = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue