format all
This commit is contained in:
161
flake.nix
161
flake.nix
@@ -59,80 +59,107 @@
|
||||
#};
|
||||
};
|
||||
outputs =
|
||||
{ self
|
||||
, nur
|
||||
, nixpkgs
|
||||
, nixos-hardware
|
||||
, nixpkgs-unstable
|
||||
, agenix
|
||||
, home-manager
|
||||
, home-manager-unstable
|
||||
{
|
||||
self,
|
||||
nur,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
nixpkgs-unstable,
|
||||
agenix,
|
||||
home-manager,
|
||||
home-manager-unstable,
|
||||
#, nixos-cosmic
|
||||
, nixvim
|
||||
, stylix
|
||||
, disko
|
||||
, flake-utils
|
||||
, ...
|
||||
nixvim,
|
||||
stylix,
|
||||
disko,
|
||||
flake-utils,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
overlays = { outputs, ... }: {
|
||||
nixpkgs.overlays = with outputs.overlays; [
|
||||
#unstable-packages
|
||||
stable-packages
|
||||
additions
|
||||
modifications
|
||||
nur.overlays.default
|
||||
];
|
||||
};
|
||||
defaultModules = [ ./modules agenix.nixosModules.default overlays ];
|
||||
overlays =
|
||||
{ outputs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = with outputs.overlays; [
|
||||
#unstable-packages
|
||||
stable-packages
|
||||
additions
|
||||
modifications
|
||||
nur.overlays.default
|
||||
];
|
||||
};
|
||||
defaultModules = [
|
||||
./modules
|
||||
agenix.nixosModules.default
|
||||
overlays
|
||||
];
|
||||
# helper function to create a machine
|
||||
mkHost =
|
||||
{ modules
|
||||
, specialArgs ? {
|
||||
{
|
||||
modules,
|
||||
specialArgs ? {
|
||||
pkgsVersion = nixpkgs-unstable;
|
||||
home-manager-version = home-manager-unstable;
|
||||
}
|
||||
, system ? "x86_64-linux"
|
||||
, minimal ? false
|
||||
, graphical ? true
|
||||
},
|
||||
system ? "x86_64-linux",
|
||||
minimal ? false,
|
||||
graphical ? true,
|
||||
}:
|
||||
let lib = specialArgs.pkgsVersion.lib;
|
||||
in specialArgs.pkgsVersion.lib.nixosSystem {
|
||||
let
|
||||
lib = specialArgs.pkgsVersion.lib;
|
||||
in
|
||||
specialArgs.pkgsVersion.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = modules ++ defaultModules ++ lib.lists.optionals (!minimal)
|
||||
[ specialArgs.home-manager-version.nixosModules.home-manager ]
|
||||
modules =
|
||||
modules
|
||||
++ defaultModules
|
||||
++ lib.lists.optionals (!minimal) [ specialArgs.home-manager-version.nixosModules.home-manager ]
|
||||
++ lib.lists.optionals (!minimal && graphical) [
|
||||
stylix.nixosModules.stylix
|
||||
inputs.nixpkgs-xr.nixosModules.nixpkgs-xr
|
||||
./modules/graphical/stylix.nix
|
||||
#nixos-cosmic.nixosModules.default
|
||||
#./modules/graphical/cosmic.nix
|
||||
({ outputs, ... }: { stylix.image = ./tsukasa.jpg; })
|
||||
];
|
||||
specialArgs = specialArgs // { inherit inputs outputs; };
|
||||
stylix.nixosModules.stylix
|
||||
inputs.nixpkgs-xr.nixosModules.nixpkgs-xr
|
||||
./modules/graphical/stylix.nix
|
||||
#nixos-cosmic.nixosModules.default
|
||||
#./modules/graphical/cosmic.nix
|
||||
(
|
||||
{ outputs, ... }:
|
||||
{
|
||||
stylix.image = ./tsukasa.jpg;
|
||||
}
|
||||
)
|
||||
];
|
||||
specialArgs = specialArgs // {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
};
|
||||
mkStableServer =
|
||||
{ modules
|
||||
, specialArgs ? {
|
||||
{
|
||||
modules,
|
||||
specialArgs ? {
|
||||
pkgsVersion = nixpkgs;
|
||||
home-manager-version = home-manager;
|
||||
}
|
||||
, system ? "x86_64-linux"
|
||||
, minimal ? false
|
||||
},
|
||||
system ? "x86_64-linux",
|
||||
minimal ? false,
|
||||
}:
|
||||
let lib = specialArgs.pkgsVersion.lib;
|
||||
in specialArgs.pkgsVersion.lib.nixosSystem {
|
||||
let
|
||||
lib = specialArgs.pkgsVersion.lib;
|
||||
in
|
||||
specialArgs.pkgsVersion.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = modules
|
||||
++ [ ./modules agenix.nixosModules.default overlays ]
|
||||
++ lib.lists.optionals (!minimal)
|
||||
[ specialArgs.home-manager-version.nixosModules.home-manager ];
|
||||
specialArgs = specialArgs // { inherit inputs outputs; };
|
||||
modules =
|
||||
modules
|
||||
++ [
|
||||
./modules
|
||||
agenix.nixosModules.default
|
||||
overlays
|
||||
]
|
||||
++ lib.lists.optionals (!minimal) [ specialArgs.home-manager-version.nixosModules.home-manager ];
|
||||
specialArgs = specialArgs // {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
};
|
||||
customPackages = flake-utils.lib.eachDefaultSystem (system: {
|
||||
packages =
|
||||
import ./pkgs { pkgs = nixpkgs-unstable.legacyPackages.${system}; };
|
||||
packages = import ./pkgs { pkgs = nixpkgs-unstable.legacyPackages.${system}; };
|
||||
});
|
||||
in
|
||||
{
|
||||
@@ -140,7 +167,10 @@
|
||||
|
||||
nixosConfigurations = {
|
||||
"kop-pc" = mkHost {
|
||||
modules = [ ./users/kopatz ./systems/pc/configuration.nix ];
|
||||
modules = [
|
||||
./users/kopatz
|
||||
./systems/pc/configuration.nix
|
||||
];
|
||||
};
|
||||
"framework" = mkHost {
|
||||
modules = [
|
||||
@@ -159,11 +189,16 @@
|
||||
pkgsVersion = nixpkgs;
|
||||
home-manager-version = home-manager;
|
||||
};
|
||||
modules =
|
||||
[ disko.nixosModules.disko ./systems/adam-site/configuration.nix ];
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./systems/adam-site/configuration.nix
|
||||
];
|
||||
};
|
||||
"amd-server" = mkHost {
|
||||
modules = [ ./users/kopatz ./systems/amd-server/configuration.nix ];
|
||||
modules = [
|
||||
./users/kopatz
|
||||
./systems/amd-server/configuration.nix
|
||||
];
|
||||
};
|
||||
"amd-server-vpn-vm" = mkHost {
|
||||
modules = [
|
||||
@@ -173,8 +208,12 @@
|
||||
];
|
||||
};
|
||||
# build vm -> nixos-rebuild build-vm --flake .#vm
|
||||
"vm" =
|
||||
mkHost { modules = [ ./users/vm ./systems/vm/configuration.nix ]; };
|
||||
"vm" = mkHost {
|
||||
modules = [
|
||||
./users/vm
|
||||
./systems/vm/configuration.nix
|
||||
];
|
||||
};
|
||||
# nixos-rebuild switch --flake .#server-vm --target-host root@192.168.0.21
|
||||
"server-vm" = mkHost {
|
||||
modules = [
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
{ osConfig, config, pkgs, inputs, lib, ... }: {
|
||||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf osConfig.custom.graphical.code.enable rec {
|
||||
#home.activation.makeVSCodeConfigWritable =
|
||||
# let
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
home.file.".config/Vencord/themes/theme.css".source = ./BasicBackground.theme.css;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ lib, osConfig, pkgs, ... }:
|
||||
let enable = osConfig.custom.graphical.i3.enable || osConfig.custom.graphical.hyprland.enable;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
enable = osConfig.custom.graphical.i3.enable || osConfig.custom.graphical.hyprland.enable;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf enable {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
{ lib, pkgs, ... }: {
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
#logo = { source = ../test.sixel; type = "raw"; width = 40; height = 40; };
|
||||
display = { separator = ""; };
|
||||
display = {
|
||||
separator = "";
|
||||
};
|
||||
|
||||
# https://www.nerdfonts.com/cheat-sheet
|
||||
modules = [
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
# Firefox 83 introduced sponsored top sites
|
||||
# (https://support.mozilla.org/en-US/kb/sponsor-privacy), which are sponsored ads
|
||||
# displayed as suggestions in the URL bar.
|
||||
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" =
|
||||
false;
|
||||
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = false;
|
||||
# Disable about:config warning.
|
||||
# No details
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
|
||||
@@ -1,226 +1,231 @@
|
||||
{ pkgs, lib, osConfig, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
base16 = osConfig.stylix.base16Scheme;
|
||||
merge = lib.foldr (a: b: a // b) { };
|
||||
betterfox = ''
|
||||
/****************************************************************************
|
||||
* SECTION: FASTFOX *
|
||||
****************************************************************************/
|
||||
/** GENERAL ***/
|
||||
user_pref("content.notify.interval", 100000);
|
||||
/****************************************************************************
|
||||
* SECTION: FASTFOX *
|
||||
****************************************************************************/
|
||||
/** GENERAL ***/
|
||||
user_pref("content.notify.interval", 100000);
|
||||
|
||||
/** GFX ***/
|
||||
user_pref("gfx.canvas.accelerated.cache-size", 512);
|
||||
user_pref("gfx.content.skia-font-cache-size", 20);
|
||||
/** GFX ***/
|
||||
user_pref("gfx.canvas.accelerated.cache-size", 512);
|
||||
user_pref("gfx.content.skia-font-cache-size", 20);
|
||||
|
||||
/** DISK CACHE ***/
|
||||
user_pref("browser.cache.disk.enable", false);
|
||||
/** DISK CACHE ***/
|
||||
user_pref("browser.cache.disk.enable", false);
|
||||
|
||||
/** MEMORY CACHE ***/
|
||||
user_pref("browser.sessionhistory.max_total_viewers", 4);
|
||||
/** MEMORY CACHE ***/
|
||||
user_pref("browser.sessionhistory.max_total_viewers", 4);
|
||||
|
||||
/** MEDIA CACHE ***/
|
||||
user_pref("media.memory_cache_max_size", 65536);
|
||||
user_pref("media.cache_readahead_limit", 7200);
|
||||
user_pref("media.cache_resume_threshold", 3600);
|
||||
/** MEDIA CACHE ***/
|
||||
user_pref("media.memory_cache_max_size", 65536);
|
||||
user_pref("media.cache_readahead_limit", 7200);
|
||||
user_pref("media.cache_resume_threshold", 3600);
|
||||
|
||||
/** IMAGE CACHE ***/
|
||||
user_pref("image.mem.decode_bytes_at_a_time", 32768);
|
||||
/** IMAGE CACHE ***/
|
||||
user_pref("image.mem.decode_bytes_at_a_time", 32768);
|
||||
|
||||
/** NETWORK ***/
|
||||
user_pref("network.http.max-connections", 1800);
|
||||
user_pref("network.http.max-persistent-connections-per-server", 10);
|
||||
user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5);
|
||||
user_pref("network.http.pacing.requests.enabled", false);
|
||||
user_pref("network.dnsCacheExpiration", 3600);
|
||||
user_pref("network.ssl_tokens_cache_capacity", 10240);
|
||||
/** NETWORK ***/
|
||||
user_pref("network.http.max-connections", 1800);
|
||||
user_pref("network.http.max-persistent-connections-per-server", 10);
|
||||
user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5);
|
||||
user_pref("network.http.pacing.requests.enabled", false);
|
||||
user_pref("network.dnsCacheExpiration", 3600);
|
||||
user_pref("network.ssl_tokens_cache_capacity", 10240);
|
||||
|
||||
/** SPECULATIVE LOADING ***/
|
||||
user_pref("network.http.speculative-parallel-limit", 0);
|
||||
user_pref("network.dns.disablePrefetch", true);
|
||||
user_pref("network.dns.disablePrefetchFromHTTPS", true);
|
||||
user_pref("browser.urlbar.speculativeConnect.enabled", false);
|
||||
user_pref("browser.places.speculativeConnect.enabled", false);
|
||||
user_pref("network.prefetch-next", false);
|
||||
user_pref("network.predictor.enabled", false);
|
||||
/** SPECULATIVE LOADING ***/
|
||||
user_pref("network.http.speculative-parallel-limit", 0);
|
||||
user_pref("network.dns.disablePrefetch", true);
|
||||
user_pref("network.dns.disablePrefetchFromHTTPS", true);
|
||||
user_pref("browser.urlbar.speculativeConnect.enabled", false);
|
||||
user_pref("browser.places.speculativeConnect.enabled", false);
|
||||
user_pref("network.prefetch-next", false);
|
||||
user_pref("network.predictor.enabled", false);
|
||||
|
||||
/** EXPERIMENTAL ***/
|
||||
user_pref("layout.css.grid-template-masonry-value.enabled", true);
|
||||
/** EXPERIMENTAL ***/
|
||||
user_pref("layout.css.grid-template-masonry-value.enabled", true);
|
||||
|
||||
/****************************************************************************
|
||||
* SECTION: SECUREFOX *
|
||||
****************************************************************************/
|
||||
/** TRACKING PROTECTION ***/
|
||||
user_pref("browser.contentblocking.category", "strict");
|
||||
user_pref("privacy.trackingprotection.allow_list.baseline.enabled", true);
|
||||
user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true);
|
||||
user_pref("browser.download.start_downloads_in_tmp_dir", true);
|
||||
user_pref("browser.helperApps.deleteTempFileOnExit", true);
|
||||
user_pref("browser.uitour.enabled", false);
|
||||
user_pref("privacy.globalprivacycontrol.enabled", true);
|
||||
/****************************************************************************
|
||||
* SECTION: SECUREFOX *
|
||||
****************************************************************************/
|
||||
/** TRACKING PROTECTION ***/
|
||||
user_pref("browser.contentblocking.category", "strict");
|
||||
user_pref("privacy.trackingprotection.allow_list.baseline.enabled", true);
|
||||
user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true);
|
||||
user_pref("browser.download.start_downloads_in_tmp_dir", true);
|
||||
user_pref("browser.helperApps.deleteTempFileOnExit", true);
|
||||
user_pref("browser.uitour.enabled", false);
|
||||
user_pref("privacy.globalprivacycontrol.enabled", true);
|
||||
|
||||
/** OCSP & CERTS / HPKP ***/
|
||||
user_pref("security.OCSP.enabled", 0);
|
||||
user_pref("security.pki.crlite_mode", 2);
|
||||
user_pref("security.csp.reporting.enabled", false);
|
||||
/** OCSP & CERTS / HPKP ***/
|
||||
user_pref("security.OCSP.enabled", 0);
|
||||
user_pref("security.pki.crlite_mode", 2);
|
||||
user_pref("security.csp.reporting.enabled", false);
|
||||
|
||||
/** SSL / TLS ***/
|
||||
user_pref("security.ssl.treat_unsafe_negotiation_as_broken", true);
|
||||
user_pref("browser.xul.error_pages.expert_bad_cert", true);
|
||||
user_pref("security.tls.enable_0rtt_data", false);
|
||||
/** SSL / TLS ***/
|
||||
user_pref("security.ssl.treat_unsafe_negotiation_as_broken", true);
|
||||
user_pref("browser.xul.error_pages.expert_bad_cert", true);
|
||||
user_pref("security.tls.enable_0rtt_data", false);
|
||||
|
||||
/** DISK AVOIDANCE ***/
|
||||
user_pref("browser.privatebrowsing.forceMediaMemoryCache", true);
|
||||
user_pref("browser.sessionstore.interval", 60000);
|
||||
/** DISK AVOIDANCE ***/
|
||||
user_pref("browser.privatebrowsing.forceMediaMemoryCache", true);
|
||||
user_pref("browser.sessionstore.interval", 60000);
|
||||
|
||||
/** SHUTDOWN & SANITIZING ***/
|
||||
user_pref("browser.privatebrowsing.resetPBM.enabled", true);
|
||||
user_pref("privacy.history.custom", true);
|
||||
/** SHUTDOWN & SANITIZING ***/
|
||||
user_pref("browser.privatebrowsing.resetPBM.enabled", true);
|
||||
user_pref("privacy.history.custom", true);
|
||||
|
||||
/** SEARCH / URL BAR ***/
|
||||
user_pref("browser.urlbar.trimHttps", true);
|
||||
user_pref("browser.urlbar.untrimOnUserInteraction.featureGate", true);
|
||||
user_pref("browser.search.separatePrivateDefault.ui.enabled", true);
|
||||
user_pref("browser.search.suggest.enabled", false);
|
||||
user_pref("browser.urlbar.quicksuggest.enabled", false);
|
||||
user_pref("browser.urlbar.groupLabels.enabled", false);
|
||||
user_pref("browser.formfill.enable", false);
|
||||
user_pref("network.IDN_show_punycode", true);
|
||||
/** SEARCH / URL BAR ***/
|
||||
user_pref("browser.urlbar.trimHttps", true);
|
||||
user_pref("browser.urlbar.untrimOnUserInteraction.featureGate", true);
|
||||
user_pref("browser.search.separatePrivateDefault.ui.enabled", true);
|
||||
user_pref("browser.search.suggest.enabled", false);
|
||||
user_pref("browser.urlbar.quicksuggest.enabled", false);
|
||||
user_pref("browser.urlbar.groupLabels.enabled", false);
|
||||
user_pref("browser.formfill.enable", false);
|
||||
user_pref("network.IDN_show_punycode", true);
|
||||
|
||||
/** PASSWORDS ***/
|
||||
user_pref("signon.formlessCapture.enabled", false);
|
||||
user_pref("signon.privateBrowsingCapture.enabled", false);
|
||||
user_pref("network.auth.subresource-http-auth-allow", 1);
|
||||
user_pref("editor.truncate_user_pastes", false);
|
||||
/** PASSWORDS ***/
|
||||
user_pref("signon.formlessCapture.enabled", false);
|
||||
user_pref("signon.privateBrowsingCapture.enabled", false);
|
||||
user_pref("network.auth.subresource-http-auth-allow", 1);
|
||||
user_pref("editor.truncate_user_pastes", false);
|
||||
|
||||
/** MIXED CONTENT + CROSS-SITE ***/
|
||||
user_pref("security.mixed_content.block_display_content", true);
|
||||
user_pref("pdfjs.enableScripting", false);
|
||||
/** MIXED CONTENT + CROSS-SITE ***/
|
||||
user_pref("security.mixed_content.block_display_content", true);
|
||||
user_pref("pdfjs.enableScripting", false);
|
||||
|
||||
/** EXTENSIONS ***/
|
||||
user_pref("extensions.enabledScopes", 5);
|
||||
/** EXTENSIONS ***/
|
||||
user_pref("extensions.enabledScopes", 5);
|
||||
|
||||
/** HEADERS / REFERERS ***/
|
||||
user_pref("network.http.referer.XOriginTrimmingPolicy", 2);
|
||||
/** HEADERS / REFERERS ***/
|
||||
user_pref("network.http.referer.XOriginTrimmingPolicy", 2);
|
||||
|
||||
/** CONTAINERS ***/
|
||||
user_pref("privacy.userContext.ui.enabled", true);
|
||||
/** CONTAINERS ***/
|
||||
user_pref("privacy.userContext.ui.enabled", true);
|
||||
|
||||
/** SAFE BROWSING ***/
|
||||
user_pref("browser.safebrowsing.downloads.remote.enabled", false);
|
||||
/** SAFE BROWSING ***/
|
||||
user_pref("browser.safebrowsing.downloads.remote.enabled", false);
|
||||
|
||||
/** MOZILLA ***/
|
||||
user_pref("permissions.default.desktop-notification", 2);
|
||||
user_pref("permissions.default.geo", 2);
|
||||
user_pref("geo.provider.network.url", "https://beacondb.net/v1/geolocate");
|
||||
user_pref("browser.search.update", false);
|
||||
user_pref("permissions.manager.defaultsUrl", "");
|
||||
user_pref("extensions.getAddons.cache.enabled", false);
|
||||
/** MOZILLA ***/
|
||||
user_pref("permissions.default.desktop-notification", 2);
|
||||
user_pref("permissions.default.geo", 2);
|
||||
user_pref("geo.provider.network.url", "https://beacondb.net/v1/geolocate");
|
||||
user_pref("browser.search.update", false);
|
||||
user_pref("permissions.manager.defaultsUrl", "");
|
||||
user_pref("extensions.getAddons.cache.enabled", false);
|
||||
|
||||
/** TELEMETRY ***/
|
||||
user_pref("datareporting.policy.dataSubmissionEnabled", false);
|
||||
user_pref("datareporting.healthreport.uploadEnabled", false);
|
||||
user_pref("toolkit.telemetry.unified", false);
|
||||
user_pref("toolkit.telemetry.enabled", false);
|
||||
user_pref("toolkit.telemetry.server", "data:,");
|
||||
user_pref("toolkit.telemetry.archive.enabled", false);
|
||||
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
|
||||
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
|
||||
user_pref("toolkit.telemetry.updatePing.enabled", false);
|
||||
user_pref("toolkit.telemetry.bhrPing.enabled", false);
|
||||
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
|
||||
user_pref("toolkit.telemetry.coverage.opt-out", true);
|
||||
user_pref("toolkit.coverage.opt-out", true);
|
||||
user_pref("toolkit.coverage.endpoint.base", "");
|
||||
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
|
||||
user_pref("browser.newtabpage.activity-stream.telemetry", false);
|
||||
user_pref("datareporting.usage.uploadEnabled", false);
|
||||
/** TELEMETRY ***/
|
||||
user_pref("datareporting.policy.dataSubmissionEnabled", false);
|
||||
user_pref("datareporting.healthreport.uploadEnabled", false);
|
||||
user_pref("toolkit.telemetry.unified", false);
|
||||
user_pref("toolkit.telemetry.enabled", false);
|
||||
user_pref("toolkit.telemetry.server", "data:,");
|
||||
user_pref("toolkit.telemetry.archive.enabled", false);
|
||||
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
|
||||
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
|
||||
user_pref("toolkit.telemetry.updatePing.enabled", false);
|
||||
user_pref("toolkit.telemetry.bhrPing.enabled", false);
|
||||
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
|
||||
user_pref("toolkit.telemetry.coverage.opt-out", true);
|
||||
user_pref("toolkit.coverage.opt-out", true);
|
||||
user_pref("toolkit.coverage.endpoint.base", "");
|
||||
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
|
||||
user_pref("browser.newtabpage.activity-stream.telemetry", false);
|
||||
user_pref("datareporting.usage.uploadEnabled", false);
|
||||
|
||||
/** EXPERIMENTS ***/
|
||||
user_pref("app.shield.optoutstudies.enabled", false);
|
||||
user_pref("app.normandy.enabled", false);
|
||||
user_pref("app.normandy.api_url", "");
|
||||
/** EXPERIMENTS ***/
|
||||
user_pref("app.shield.optoutstudies.enabled", false);
|
||||
user_pref("app.normandy.enabled", false);
|
||||
user_pref("app.normandy.api_url", "");
|
||||
|
||||
/** CRASH REPORTS ***/
|
||||
user_pref("breakpad.reportURL", "");
|
||||
user_pref("browser.tabs.crashReporting.sendReport", false);
|
||||
/** CRASH REPORTS ***/
|
||||
user_pref("breakpad.reportURL", "");
|
||||
user_pref("browser.tabs.crashReporting.sendReport", false);
|
||||
|
||||
/****************************************************************************
|
||||
* SECTION: PESKYFOX *
|
||||
****************************************************************************/
|
||||
/** MOZILLA UI ***/
|
||||
user_pref("browser.privatebrowsing.vpnpromourl", "");
|
||||
user_pref("extensions.getAddons.showPane", false);
|
||||
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
|
||||
user_pref("browser.discovery.enabled", false);
|
||||
user_pref("browser.shell.checkDefaultBrowser", false);
|
||||
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
|
||||
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
|
||||
user_pref("browser.preferences.moreFromMozilla", false);
|
||||
user_pref("browser.aboutConfig.showWarning", false);
|
||||
user_pref("browser.aboutwelcome.enabled", false);
|
||||
user_pref("browser.profiles.enabled", true);
|
||||
/****************************************************************************
|
||||
* SECTION: PESKYFOX *
|
||||
****************************************************************************/
|
||||
/** MOZILLA UI ***/
|
||||
user_pref("browser.privatebrowsing.vpnpromourl", "");
|
||||
user_pref("extensions.getAddons.showPane", false);
|
||||
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
|
||||
user_pref("browser.discovery.enabled", false);
|
||||
user_pref("browser.shell.checkDefaultBrowser", false);
|
||||
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
|
||||
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
|
||||
user_pref("browser.preferences.moreFromMozilla", false);
|
||||
user_pref("browser.aboutConfig.showWarning", false);
|
||||
user_pref("browser.aboutwelcome.enabled", false);
|
||||
user_pref("browser.profiles.enabled", true);
|
||||
|
||||
/** THEME ADJUSTMENTS ***/
|
||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
|
||||
user_pref("browser.compactmode.show", true);
|
||||
user_pref("browser.privateWindowSeparation.enabled", false); // WINDOWS
|
||||
/** THEME ADJUSTMENTS ***/
|
||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
|
||||
user_pref("browser.compactmode.show", true);
|
||||
user_pref("browser.privateWindowSeparation.enabled", false); // WINDOWS
|
||||
|
||||
/** AI ***/
|
||||
user_pref("browser.ml.enable", false);
|
||||
user_pref("browser.ml.chat.enabled", false);
|
||||
/** AI ***/
|
||||
user_pref("browser.ml.enable", false);
|
||||
user_pref("browser.ml.chat.enabled", false);
|
||||
|
||||
/** FULLSCREEN NOTICE ***/
|
||||
user_pref("full-screen-api.transition-duration.enter", "0 0");
|
||||
user_pref("full-screen-api.transition-duration.leave", "0 0");
|
||||
user_pref("full-screen-api.warning.timeout", 0);
|
||||
/** FULLSCREEN NOTICE ***/
|
||||
user_pref("full-screen-api.transition-duration.enter", "0 0");
|
||||
user_pref("full-screen-api.transition-duration.leave", "0 0");
|
||||
user_pref("full-screen-api.warning.timeout", 0);
|
||||
|
||||
/** URL BAR ***/
|
||||
user_pref("browser.urlbar.trending.featureGate", false);
|
||||
/** URL BAR ***/
|
||||
user_pref("browser.urlbar.trending.featureGate", false);
|
||||
|
||||
/** NEW TAB PAGE ***/
|
||||
user_pref("browser.newtabpage.activity-stream.default.sites", "");
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
|
||||
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsoredCheckboxes", false);
|
||||
/** NEW TAB PAGE ***/
|
||||
user_pref("browser.newtabpage.activity-stream.default.sites", "");
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
|
||||
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsoredCheckboxes", false);
|
||||
|
||||
/** POCKET ***/
|
||||
user_pref("extensions.pocket.enabled", false);
|
||||
/** POCKET ***/
|
||||
user_pref("extensions.pocket.enabled", false);
|
||||
|
||||
/** DOWNLOADS ***/
|
||||
user_pref("browser.download.manager.addToRecentDocs", false);
|
||||
/** DOWNLOADS ***/
|
||||
user_pref("browser.download.manager.addToRecentDocs", false);
|
||||
|
||||
/** PDF ***/
|
||||
user_pref("browser.download.open_pdf_attachments_inline", true);
|
||||
/** PDF ***/
|
||||
user_pref("browser.download.open_pdf_attachments_inline", true);
|
||||
|
||||
/** TAB BEHAVIOR ***/
|
||||
user_pref("browser.bookmarks.openInTabClosesMenu", false);
|
||||
user_pref("browser.menu.showViewImageInfo", true);
|
||||
user_pref("findbar.highlightAll", true);
|
||||
user_pref("layout.word_select.eat_space_to_next_word", false);
|
||||
/** TAB BEHAVIOR ***/
|
||||
user_pref("browser.bookmarks.openInTabClosesMenu", false);
|
||||
user_pref("browser.menu.showViewImageInfo", true);
|
||||
user_pref("findbar.highlightAll", true);
|
||||
user_pref("layout.word_select.eat_space_to_next_word", false);
|
||||
|
||||
/****************************************************************************
|
||||
* START: MY OVERRIDES *
|
||||
****************************************************************************/
|
||||
// visit https://github.com/yokoffing/Betterfox/wiki/Common-Overrides
|
||||
// visit https://github.com/yokoffing/Betterfox/wiki/Optional-Hardening
|
||||
// Enter your personal overrides below this line:
|
||||
/****************************************************************************
|
||||
* START: MY OVERRIDES *
|
||||
****************************************************************************/
|
||||
// visit https://github.com/yokoffing/Betterfox/wiki/Common-Overrides
|
||||
// visit https://github.com/yokoffing/Betterfox/wiki/Optional-Hardening
|
||||
// Enter your personal overrides below this line:
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* SECTION: SMOOTHFOX *
|
||||
****************************************************************************/
|
||||
// visit https://github.com/yokoffing/Betterfox/blob/main/Smoothfox.js
|
||||
// Enter your scrolling overrides below this line:
|
||||
/****************************************************************************
|
||||
* SECTION: SMOOTHFOX *
|
||||
****************************************************************************/
|
||||
// visit https://github.com/yokoffing/Betterfox/blob/main/Smoothfox.js
|
||||
// Enter your scrolling overrides below this line:
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* END: BETTERFOX *
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
* END: BETTERFOX *
|
||||
****************************************************************************/
|
||||
'';
|
||||
search = {
|
||||
default = "ddg";
|
||||
@@ -232,49 +237,63 @@ user_pref("layout.word_select.eat_space_to_next_word", false);
|
||||
"ebay".metaData.hidden = true;
|
||||
|
||||
"ddg" = {
|
||||
urls = [{
|
||||
template = "https://duckduckgo.com";
|
||||
params = [{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://duckduckgo.com";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",d" ];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",n" ];
|
||||
};
|
||||
"Wikipedia" = {
|
||||
urls = [{
|
||||
template = "https://en.wikipedia.org/wiki/Special:Search";
|
||||
params = [{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://en.wikipedia.org/wiki/Special:Search";
|
||||
params = [
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",w" ];
|
||||
};
|
||||
"GitHub" = {
|
||||
urls = [{
|
||||
template = "https://github.com/search";
|
||||
params = [{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://github.com/search";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",gh" ];
|
||||
};
|
||||
};
|
||||
@@ -313,8 +332,7 @@ in
|
||||
"ebay@search.mozilla.org".installation_mode = "blocked";
|
||||
"wikipedia@search.mozilla.org".installation_mode = "blocked";
|
||||
"{5cd68d86-8324-4ab2-9e0d-3afcc60bee5f}" = {
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
@@ -323,16 +341,18 @@ in
|
||||
default = {
|
||||
name = "privacy-friendly";
|
||||
extraConfig = betterfox;
|
||||
settings = merge ([
|
||||
(import ./config/preferences.nix)
|
||||
(import ./config/browser-features.nix)
|
||||
(import ./config/privacy.nix)
|
||||
(import ./config/tracking.nix)
|
||||
(import ./config/tracking-webaudio.nix)
|
||||
(import ./config/security.nix)
|
||||
(import ./config/speed.nix)
|
||||
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
|
||||
[ (import ./config/nvidia-fixes.nix) ]);
|
||||
settings = merge (
|
||||
[
|
||||
(import ./config/preferences.nix)
|
||||
(import ./config/browser-features.nix)
|
||||
(import ./config/privacy.nix)
|
||||
(import ./config/tracking.nix)
|
||||
(import ./config/tracking-webaudio.nix)
|
||||
(import ./config/security.nix)
|
||||
(import ./config/speed.nix)
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
|
||||
);
|
||||
userChrome = ''
|
||||
/* Hide tab bar. Used with Sidebery */
|
||||
#TabsToolbar {
|
||||
@@ -375,15 +395,17 @@ in
|
||||
enable-webaudio = {
|
||||
name = "privacy-but-enable-webaudio";
|
||||
id = 2;
|
||||
settings = merge ([
|
||||
(import ./config/preferences.nix)
|
||||
(import ./config/browser-features.nix)
|
||||
(import ./config/privacy.nix)
|
||||
(import ./config/tracking.nix)
|
||||
(import ./config/security.nix)
|
||||
(import ./config/speed.nix)
|
||||
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
|
||||
[ (import ./config/nvidia-fixes.nix) ]);
|
||||
settings = merge (
|
||||
[
|
||||
(import ./config/preferences.nix)
|
||||
(import ./config/browser-features.nix)
|
||||
(import ./config/privacy.nix)
|
||||
(import ./config/tracking.nix)
|
||||
(import ./config/security.nix)
|
||||
(import ./config/speed.nix)
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
|
||||
);
|
||||
userChrome = ''
|
||||
/* Hide tab bar. Used with Sidebery */
|
||||
#TabsToolbar {
|
||||
@@ -413,10 +435,13 @@ in
|
||||
visibility: collapse !important;
|
||||
}
|
||||
'';
|
||||
settings = merge
|
||||
([ (import ./config/preferences.nix) (import ./config/speed.nix) ]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable
|
||||
[ (import ./config/nvidia-fixes.nix) ]);
|
||||
settings = merge (
|
||||
[
|
||||
(import ./config/preferences.nix)
|
||||
(import ./config/speed.nix)
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
|
||||
);
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
clearurls
|
||||
darkreader
|
||||
@@ -435,8 +460,15 @@ in
|
||||
genericName = "Web Browser";
|
||||
exec = "firefox -P privacy-but-enable-webaudio %U";
|
||||
terminal = false;
|
||||
categories = [ "Application" "Network" "WebBrowser" ];
|
||||
mimeType = [ "text/html" "text/xml" ];
|
||||
categories = [
|
||||
"Application"
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
mimeType = [
|
||||
"text/html"
|
||||
"text/xml"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ lib, config, osConfig, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
merge = lib.foldr (a: b: a // b) { };
|
||||
search = {
|
||||
@@ -11,49 +17,63 @@ let
|
||||
"eBay".metaData.hidden = true;
|
||||
|
||||
"DuckDuckGo" = {
|
||||
urls = [{
|
||||
template = "https://duckduckgo.com";
|
||||
params = [{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://duckduckgo.com";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",d" ];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",n" ];
|
||||
};
|
||||
"Wikipedia" = {
|
||||
urls = [{
|
||||
template = "https://en.wikipedia.org/wiki/Special:Search";
|
||||
params = [{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://en.wikipedia.org/wiki/Special:Search";
|
||||
params = [
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",w" ];
|
||||
};
|
||||
"GitHub" = {
|
||||
urls = [{
|
||||
template = "https://github.com/search";
|
||||
params = [{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
urls = [
|
||||
{
|
||||
template = "https://github.com/search";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",gh" ];
|
||||
};
|
||||
};
|
||||
@@ -86,25 +106,28 @@ in
|
||||
"ebay@search.mozilla.org".installation_mode = "blocked";
|
||||
"wikipedia@search.mozilla.org".installation_mode = "blocked";
|
||||
"{5cd68d86-8324-4ab2-9e0d-3afcc60bee5f}" = {
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles.default = {
|
||||
inherit search;
|
||||
settings = merge ([
|
||||
(import ../firefox/config/preferences.nix)
|
||||
(import ../firefox/config/browser-features.nix)
|
||||
(import ../firefox/config/privacy.nix)
|
||||
(import ../firefox/config/tracking.nix)
|
||||
(import ../firefox/config/tracking-webaudio.nix)
|
||||
(import ../firefox/config/security.nix)
|
||||
(import ../firefox/config/speed.nix)
|
||||
(import ./floorp-config.nix)
|
||||
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
|
||||
[ (import ../firefox/config/nvidia-fixes.nix) ]);
|
||||
settings = merge (
|
||||
[
|
||||
(import ../firefox/config/preferences.nix)
|
||||
(import ../firefox/config/browser-features.nix)
|
||||
(import ../firefox/config/privacy.nix)
|
||||
(import ../firefox/config/tracking.nix)
|
||||
(import ../firefox/config/tracking-webaudio.nix)
|
||||
(import ../firefox/config/security.nix)
|
||||
(import ../firefox/config/speed.nix)
|
||||
(import ./floorp-config.nix)
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
|
||||
(import ../firefox/config/nvidia-fixes.nix)
|
||||
]
|
||||
);
|
||||
userChrome = ''
|
||||
/* Hide tab bar. Used with Sidebery */
|
||||
#TabsToolbar {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.file.".gitconfig" = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
isPc = osConfig.networking.hostName == "kop-pc";
|
||||
@@ -16,7 +23,13 @@ let
|
||||
hyprctl --instance 0 "dispatch exec hyprlock"
|
||||
'';
|
||||
scale = if isLaptop then "1.33333" else "1";
|
||||
monitor1 = if isPc then "DP-1" else if isLaptop then "eDP-1" else "eDP-1";
|
||||
monitor1 =
|
||||
if isPc then
|
||||
"DP-1"
|
||||
else if isLaptop then
|
||||
"eDP-1"
|
||||
else
|
||||
"eDP-1";
|
||||
monitor2 = "HDMI-A-1";
|
||||
in
|
||||
{
|
||||
@@ -38,32 +51,35 @@ in
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor =
|
||||
if isPc then [
|
||||
"${monitor2},1920x1080@60,0x0,${scale}"
|
||||
"${monitor1},2560x1440@144,1920x0,${scale}"
|
||||
"Unknown-1,disable"
|
||||
] else if isLaptop then [
|
||||
# laptop
|
||||
"eDP-1,2256x1504@60,0x0,${scale}"
|
||||
#"DP-3,1920x1080@60,1920x0,1"
|
||||
#",preferred,auto,1,mirror,eDP-1"
|
||||
",preferred,auto,auto"
|
||||
] else
|
||||
if isPc then
|
||||
[
|
||||
"${monitor2},1920x1080@60,0x0,${scale}"
|
||||
"${monitor1},2560x1440@144,1920x0,${scale}"
|
||||
"Unknown-1,disable"
|
||||
]
|
||||
else if isLaptop then
|
||||
[
|
||||
# laptop
|
||||
"eDP-1,2256x1504@60,0x0,${scale}"
|
||||
#"DP-3,1920x1080@60,1920x0,1"
|
||||
#",preferred,auto,1,mirror,eDP-1"
|
||||
",preferred,auto,auto"
|
||||
]
|
||||
else
|
||||
[
|
||||
# Default
|
||||
",preferred,auto,auto"
|
||||
];
|
||||
|
||||
workspace =
|
||||
lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
"1,monitor:${monitor1}"
|
||||
"2,monitor:${monitor1}"
|
||||
"3,monitor:${monitor1}"
|
||||
"4,monitor:${monitor1}"
|
||||
"5,monitor:${monitor1}"
|
||||
"9,monitor:${monitor2}"
|
||||
"10,monitor:${monitor2}"
|
||||
];
|
||||
workspace = lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
"1,monitor:${monitor1}"
|
||||
"2,monitor:${monitor1}"
|
||||
"3,monitor:${monitor1}"
|
||||
"4,monitor:${monitor1}"
|
||||
"5,monitor:${monitor1}"
|
||||
"9,monitor:${monitor2}"
|
||||
"10,monitor:${monitor2}"
|
||||
];
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
@@ -74,13 +90,16 @@ in
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# Some default env vars.
|
||||
env =
|
||||
[ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" "GDK_SCALE,${scale}" ]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
];
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"GDK_SCALE,${scale}"
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
];
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input = {
|
||||
@@ -93,7 +112,9 @@ in
|
||||
follow_mouse = 1;
|
||||
float_switch_override_focus = 2;
|
||||
|
||||
touchpad = { natural_scroll = true; };
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0;
|
||||
@@ -169,8 +190,7 @@ in
|
||||
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile =
|
||||
true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # you probably want this
|
||||
};
|
||||
|
||||
@@ -212,8 +232,9 @@ in
|
||||
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||
grimblast = "${pkgs.grimblast}/bin/grimblast";
|
||||
saved-screenshot-cmd = ''${grimblast} --freeze save area $OUT && notify-send "Saved screenshot to $OUT" -h string:image-path:$OUT && echo "file://$(realpath $OUT)" | wl-copy -t text/uri-list
|
||||
'';
|
||||
saved-screenshot-cmd = ''
|
||||
${grimblast} --freeze save area $OUT && notify-send "Saved screenshot to $OUT" -h string:image-path:$OUT && echo "file://$(realpath $OUT)" | wl-copy -t text/uri-list
|
||||
'';
|
||||
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
|
||||
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
||||
#swaylock = "${pkgs.swaylock}/bin/swaylock";
|
||||
@@ -241,10 +262,8 @@ in
|
||||
''$mainMod, R, exec, hyprctl hyprpaper reload ,"$(ls -d ~/synced/default/dinge/Bg/* | shuf -n 1)"''
|
||||
"$mainMod, W, exec, hyprctl hyprpaper reload ,${config.stylix.image}"
|
||||
" , Print, exec, hyprshade off && ${grimblast} --freeze copy area && hyprshade auto"
|
||||
''
|
||||
$mainMod, Print, exec, export OUT=/tmp/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
|
||||
''
|
||||
Shift_L, Print, exec, export OUT=~/Pictures/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
|
||||
''$mainMod, Print, exec, export OUT=/tmp/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
|
||||
''Shift_L, Print, exec, export OUT=~/Pictures/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
|
||||
#"$mainMod, G, exec, ${peek}" # record gif
|
||||
"$mainMod, SPACE, exec, ${rofi} -modi drun -show drun -config ~/.config/rofi/rofidmenu.rasi"
|
||||
" , XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||
@@ -359,12 +378,14 @@ in
|
||||
"dex --autostart --environment Hyprland"
|
||||
"${pkgs.hypridle}/bin/hypridle &"
|
||||
#"${pkgs.dunst}/bin/dunst &"
|
||||
] ++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
]
|
||||
++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
"[workspace 9 silent] sleep 2 && discord"
|
||||
"[workspace 9 silent] sleep 2 && discordcanary"
|
||||
"[workspace 10 silent] firefox"
|
||||
"xrandr --monitor ${monitor1} --primary"
|
||||
] ++ [
|
||||
]
|
||||
++ [
|
||||
"sleep 3 && ${pkgs.waybar}/bin/waybar &"
|
||||
"${restartPortals}"
|
||||
];
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland.videobridge;
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
let cfg = osConfig.custom.graphical.hyprland;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.hyprlock.enable = true;
|
||||
programs.hyprlock.settings = {
|
||||
|
||||
@@ -1,36 +1,47 @@
|
||||
{ osConfig, pkgs, lib, ... }:
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = osConfig.custom.graphical.hyprland;
|
||||
in {
|
||||
config = lib.mkIf cfg.enable
|
||||
{
|
||||
home.file.".config/hypr/hyprshade.toml".source = ../../.config/hypr/hyprshade.toml;
|
||||
wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.hyprshade}/bin/hyprshade auto" ];
|
||||
systemd.user = {
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".config/hypr/hyprshade.toml".source = ../../.config/hypr/hyprshade.toml;
|
||||
wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.hyprshade}/bin/hyprshade auto" ];
|
||||
systemd.user = {
|
||||
|
||||
services.hyprshade = {
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
services.hyprshade = {
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
|
||||
Unit = {
|
||||
ConditionEnvironment = "HYPRLAND_INSTANCE_SIGNATURE";
|
||||
Description = "Apply screen filter";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.hyprshade}/bin/hyprshade auto";
|
||||
};
|
||||
Unit = {
|
||||
ConditionEnvironment = "HYPRLAND_INSTANCE_SIGNATURE";
|
||||
Description = "Apply screen filter";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
timers.hyprshade = {
|
||||
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
|
||||
Unit = { Description = "Apply screen filter on schedule"; };
|
||||
|
||||
Timer.OnCalendar = [ "*-*-* 06:00:00" "*-*-* 19:00:00" ];
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.hyprshade}/bin/hyprshade auto";
|
||||
};
|
||||
};
|
||||
|
||||
timers.hyprshade = {
|
||||
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
|
||||
Unit = {
|
||||
Description = "Apply screen filter on schedule";
|
||||
};
|
||||
|
||||
Timer.OnCalendar = [
|
||||
"*-*-* 06:00:00"
|
||||
"*-*-* 19:00:00"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
let cfg = osConfig.custom.graphical.hyprland;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
plugins = [ pkgs.hyprlandPlugins.hyprspace ];
|
||||
@@ -9,16 +18,18 @@ in {
|
||||
"$mainMod, TAB, overview:toggle"
|
||||
"$mainMod SHIFT, TAB, overview:toggle, all"
|
||||
];
|
||||
plugin = [{
|
||||
overview = {
|
||||
affectStrut = false;
|
||||
hideTopLayers = true;
|
||||
panelHeight = 250;
|
||||
showEmptyWorkspace = false;
|
||||
showNewWorkspace = true;
|
||||
disableBlur = true;
|
||||
};
|
||||
}];
|
||||
plugin = [
|
||||
{
|
||||
overview = {
|
||||
affectStrut = false;
|
||||
hideTopLayers = true;
|
||||
panelHeight = 250;
|
||||
showEmptyWorkspace = false;
|
||||
showNewWorkspace = true;
|
||||
disableBlur = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = osConfig.custom.graphical.hyprland;
|
||||
in {
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
config =
|
||||
let
|
||||
# styles from https://github.com/khaneliman/khanelinix/blob/8375f8cfbe5bfd87565b4dc34c9d30630c17336d/modules/home/desktop/addons/waybar/default.nix
|
||||
@@ -37,25 +46,43 @@ in {
|
||||
#"hyprland/window"
|
||||
];
|
||||
modules-center = [ ];
|
||||
modules-right = [ "group/stats" "group/other" ];
|
||||
modules-right = [
|
||||
"group/stats"
|
||||
"group/other"
|
||||
];
|
||||
"group/stats" = {
|
||||
"orientation" = "horizontal";
|
||||
"modules" = [ "network" "cpu" "memory" "temperature" ]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "custom/nvidia" ]
|
||||
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "custom/amd-gpu" ]
|
||||
++ lib.optionals osConfig.services.power-profiles-daemon.enable [ "power-profiles-daemon" ];
|
||||
"modules" = [
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "custom/nvidia" ]
|
||||
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "custom/amd-gpu" ]
|
||||
++ lib.optionals osConfig.services.power-profiles-daemon.enable [ "power-profiles-daemon" ];
|
||||
};
|
||||
"group/other" = {
|
||||
"orientation" = "horizontal";
|
||||
"modules" =
|
||||
[ "tray" "backlight" "pulseaudio" "mpris" "battery" "clock" ];
|
||||
"modules" = [
|
||||
"tray"
|
||||
"backlight"
|
||||
"pulseaudio"
|
||||
"mpris"
|
||||
"battery"
|
||||
"clock"
|
||||
];
|
||||
};
|
||||
"cpu" = {
|
||||
"format" = " {usage}%";
|
||||
"tooltip" = true;
|
||||
};
|
||||
"disk" = { "format" = " {percentage_used}%"; };
|
||||
"memory" = { "format" = " {}%"; };
|
||||
"disk" = {
|
||||
"format" = " {percentage_used}%";
|
||||
};
|
||||
"memory" = {
|
||||
"format" = " {}%";
|
||||
};
|
||||
|
||||
"idle_inhibitor" = {
|
||||
"format" = "{icon} ";
|
||||
@@ -95,7 +122,10 @@ in {
|
||||
"phone" = "";
|
||||
"portable" = "";
|
||||
"car" = "";
|
||||
"default" = [ "" "" ];
|
||||
"default" = [
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"scroll-step" = 1;
|
||||
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
@@ -110,18 +140,30 @@ in {
|
||||
"temperature".critical-threshold = 80;
|
||||
"temperature".format = "{temperatureC}°C ";
|
||||
"temperature".interval = 5;
|
||||
"temperature".hwmon-path =
|
||||
lib.mkIf (osConfig.networking.hostName == "framework")
|
||||
"/sys/class/hwmon/hwmon6/temp1_input";
|
||||
"temperature".hwmon-path = lib.mkIf (
|
||||
osConfig.networking.hostName == "framework"
|
||||
) "/sys/class/hwmon/hwmon6/temp1_input";
|
||||
"backlight".format = "{percent}% {icon}";
|
||||
"backlight".states = [ 0 50 ];
|
||||
"backlight".format-icons = [ "" "" ];
|
||||
"backlight".states = [
|
||||
0
|
||||
50
|
||||
];
|
||||
"backlight".format-icons = [
|
||||
""
|
||||
""
|
||||
];
|
||||
"battery".states.good = 95;
|
||||
"battery".interval = 5;
|
||||
"battery".states.warning = 30;
|
||||
"battery".states.critical = 15;
|
||||
"battery".format = "{capacity}% / {power:.2}W {icon}";
|
||||
"battery".format-icons = [ "" "" "" "" "" ];
|
||||
"battery".format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
"clock" = {
|
||||
format = "{:%F %H:%M}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
@@ -148,7 +190,9 @@ in {
|
||||
"default" = "▶";
|
||||
"mpv" = "🎵";
|
||||
};
|
||||
"status-icons" = { "paused" = "⏸"; };
|
||||
"status-icons" = {
|
||||
"paused" = "⏸";
|
||||
};
|
||||
};
|
||||
"power-profiles-daemon" = {
|
||||
"format" = "{icon}";
|
||||
@@ -217,8 +261,7 @@ in {
|
||||
"class<firefox-beta>" = "";
|
||||
"class<firefox-developer-edition>" = "";
|
||||
"class<firefox> title<.*github.*>" = "";
|
||||
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" =
|
||||
"";
|
||||
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" = "";
|
||||
"class<kitty>" = "";
|
||||
"class<org.wezfurlong.wezterm>" = "";
|
||||
"class<mediainfo-gui>" = "";
|
||||
@@ -247,8 +290,7 @@ in {
|
||||
};
|
||||
};
|
||||
};
|
||||
style =
|
||||
"${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
|
||||
style = "${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ osConfig, pkgs, config, lib, ... }:
|
||||
let cfg = osConfig.custom.graphical.i3;
|
||||
in {
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.i3;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".config/i3" = {
|
||||
recursive = true;
|
||||
@@ -55,10 +63,12 @@ in {
|
||||
module-margin = 1;
|
||||
modules-left = "i3 xwindow";
|
||||
modules-center = "";
|
||||
modules-right = [ "music network memory cpu cpu-wattage cpu-temp" ]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "nvidia-gpu" ]
|
||||
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "amd-gpu" ]
|
||||
++ [ "pulseaudio date tray" ];
|
||||
modules-right = [
|
||||
"music network memory cpu cpu-wattage cpu-temp"
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "nvidia-gpu" ]
|
||||
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "amd-gpu" ]
|
||||
++ [ "pulseaudio date tray" ];
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
enable-ipc = true;
|
||||
@@ -69,8 +79,10 @@ in {
|
||||
# override-redirect = true;
|
||||
};
|
||||
"module/i3" =
|
||||
let padding = 2;
|
||||
in {
|
||||
let
|
||||
padding = 2;
|
||||
in
|
||||
{
|
||||
type = "internal/i3";
|
||||
pin-workspaces = true;
|
||||
show-urgent = true;
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{
|
||||
plugins.nvim-autopairs = { enable = true; };
|
||||
plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
{ plugins.barbar = { enable = true; }; } # tab bar up top
|
||||
{
|
||||
plugins.barbar = {
|
||||
enable = true;
|
||||
};
|
||||
} # tab bar up top
|
||||
|
||||
@@ -10,15 +10,25 @@
|
||||
};
|
||||
};
|
||||
|
||||
cmp-buffer = { enable = true; };
|
||||
cmp-buffer = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp-emoji = { enable = true; };
|
||||
cmp-emoji = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp-nvim-lsp = { enable = true; };
|
||||
cmp-nvim-lsp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp-path = { enable = true; };
|
||||
cmp-path = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp_luasnip = { enable = true; };
|
||||
cmp_luasnip = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp = {
|
||||
enable = true;
|
||||
@@ -48,11 +58,29 @@
|
||||
completion = {
|
||||
scrollbar = true;
|
||||
sidePadding = 0;
|
||||
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
|
||||
border = [
|
||||
"╭"
|
||||
"─"
|
||||
"╮"
|
||||
"│"
|
||||
"╯"
|
||||
"─"
|
||||
"╰"
|
||||
"│"
|
||||
];
|
||||
};
|
||||
|
||||
settings.documentation = {
|
||||
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
|
||||
border = [
|
||||
"╭"
|
||||
"─"
|
||||
"╮"
|
||||
"│"
|
||||
"╯"
|
||||
"─"
|
||||
"╰"
|
||||
"│"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -65,8 +93,7 @@
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<CR>" =
|
||||
"cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false })";
|
||||
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false })";
|
||||
"<Tab>" =
|
||||
# lua
|
||||
''
|
||||
@@ -96,7 +123,11 @@
|
||||
};
|
||||
|
||||
formatting = {
|
||||
fields = [ "abbr" "kind" "menu" ];
|
||||
fields = [
|
||||
"abbr"
|
||||
"kind"
|
||||
"menu"
|
||||
];
|
||||
format =
|
||||
# lua
|
||||
''
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
showmode = false; #already shown in lightline
|
||||
showmode = false; # already shown in lightline
|
||||
|
||||
autoindent = true;
|
||||
clipboard = "unnamedplus";
|
||||
@@ -207,16 +207,16 @@
|
||||
options.desc = "Inline function";
|
||||
}
|
||||
# hop
|
||||
{
|
||||
{
|
||||
key = "f";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require'hop'.hint_char1({
|
||||
--direction = require'hop.hint'.HintDirection.AFTER_CURSOR,
|
||||
current_line_only = false,
|
||||
case_insensitive = true,
|
||||
})
|
||||
end
|
||||
function()
|
||||
require'hop'.hint_char1({
|
||||
--direction = require'hop.hint'.HintDirection.AFTER_CURSOR,
|
||||
current_line_only = false,
|
||||
case_insensitive = true,
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.remap = true;
|
||||
}
|
||||
@@ -229,7 +229,7 @@
|
||||
current_line_only = false
|
||||
})
|
||||
end
|
||||
'';
|
||||
'';
|
||||
options.remap = true;
|
||||
}
|
||||
];
|
||||
|
||||
@@ -1,47 +1,59 @@
|
||||
{ lib, pkgs, osConfig, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html
|
||||
let
|
||||
cfg = osConfig.custom.nixvimPlugins;
|
||||
args = { inherit lib pkgs; };
|
||||
|
||||
importFile = file:
|
||||
let config = import file;
|
||||
in if builtins.isFunction config then config args else config;
|
||||
configs = map importFile ([
|
||||
./config.nix
|
||||
] ++ lib.optionals cfg [
|
||||
./auto-pairs.nix
|
||||
./autosave.nix
|
||||
./blankline.nix
|
||||
./barbar.nix
|
||||
./cmp.nix
|
||||
./fidget.nix
|
||||
./refactoring.nix
|
||||
./git.nix
|
||||
./lightline.nix
|
||||
./lsp.nix
|
||||
./images.nix
|
||||
./none-ls.nix
|
||||
./nvim-tree.nix
|
||||
importFile =
|
||||
file:
|
||||
let
|
||||
config = import file;
|
||||
in
|
||||
if builtins.isFunction config then config args else config;
|
||||
configs = map importFile (
|
||||
[
|
||||
./config.nix
|
||||
]
|
||||
++ lib.optionals cfg [
|
||||
./auto-pairs.nix
|
||||
./autosave.nix
|
||||
./blankline.nix
|
||||
./barbar.nix
|
||||
./cmp.nix
|
||||
./fidget.nix
|
||||
./refactoring.nix
|
||||
./git.nix
|
||||
./lightline.nix
|
||||
./lsp.nix
|
||||
./images.nix
|
||||
./none-ls.nix
|
||||
./nvim-tree.nix
|
||||
#./neo-tree.nix
|
||||
./telescope.nix
|
||||
./toggleterm.nix
|
||||
./treesitter.nix
|
||||
./trouble.nix
|
||||
./which_key.nix
|
||||
./wilder.nix
|
||||
./typst-preview.nix
|
||||
./markdown.nix
|
||||
./hop.nix
|
||||
./colorizer.nix
|
||||
./surround.nix
|
||||
./vimwiki.nix
|
||||
]);
|
||||
merged =
|
||||
builtins.foldl' (acc: elem: lib.recursiveUpdate acc elem) { } configs;
|
||||
./telescope.nix
|
||||
./toggleterm.nix
|
||||
./treesitter.nix
|
||||
./trouble.nix
|
||||
./which_key.nix
|
||||
./wilder.nix
|
||||
./typst-preview.nix
|
||||
./markdown.nix
|
||||
./hop.nix
|
||||
./colorizer.nix
|
||||
./surround.nix
|
||||
./vimwiki.nix
|
||||
]
|
||||
);
|
||||
merged = builtins.foldl' (acc: elem: lib.recursiveUpdate acc elem) { } configs;
|
||||
in
|
||||
{
|
||||
home.sessionVariables = { EDITOR = "nvim"; };
|
||||
home.packages = with pkgs; [ nixfmt-rfc-style ]; # nixd config option to set nixpkgs-fmt should work, but it doesn't
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
home.packages = with pkgs; [ nixfmt-rfc-style ]; # nixd config option to set nixpkgs-fmt should work, but it doesn't
|
||||
programs.nixvim = merged;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
plugins = {
|
||||
diffview = { enable = true; };
|
||||
lazygit = { enable = true; };
|
||||
diffview = {
|
||||
enable = true;
|
||||
};
|
||||
lazygit = {
|
||||
enable = true;
|
||||
};
|
||||
#neogit = {
|
||||
# enable = true;
|
||||
# settings.integrations = { diffview = true; };
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
{ plugins.lightline = { enable = true; }; } #status line at the bottom
|
||||
{
|
||||
plugins.lightline = {
|
||||
enable = true;
|
||||
};
|
||||
} # status line at the bottom
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
cssls.enable = true;
|
||||
gopls.enable = true;
|
||||
clojure_lsp.enable = true;
|
||||
qmlls =
|
||||
{
|
||||
enable = true;
|
||||
settings.cmd = [ "qmlls" "-E" ];
|
||||
};
|
||||
qmlls = {
|
||||
enable = true;
|
||||
settings.cmd = [
|
||||
"qmlls"
|
||||
"-E"
|
||||
];
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
@@ -33,7 +35,7 @@
|
||||
};
|
||||
tinymist.enable = true; # typst
|
||||
};
|
||||
keymaps= [
|
||||
keymaps = [
|
||||
{
|
||||
key = "gd";
|
||||
lspBufAction = "definition";
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
plugins.render-markdown = {
|
||||
enable = true;
|
||||
settings = {
|
||||
file_types = [ "markdown" "vimwiki"];
|
||||
file_types = [
|
||||
"markdown"
|
||||
"vimwiki"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# default keybinds
|
||||
# window = {
|
||||
# mappings = {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{
|
||||
plugins = { refactoring.enable = true; };
|
||||
plugins = {
|
||||
refactoring.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
options.desc = "List buffers";
|
||||
};
|
||||
};
|
||||
extensions.fzf-native = { enable = true; };
|
||||
extensions.fzf-native = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,5 +2,7 @@
|
||||
opts = {
|
||||
timeoutlen = 500;
|
||||
};
|
||||
plugins.which-key = { enable = true; };
|
||||
plugins.which-key = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
plugins.wilder = {
|
||||
enable = true;
|
||||
modes = [ ":" "/" "?" ];
|
||||
modes = [
|
||||
":"
|
||||
"/"
|
||||
"?"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.file.".config/nvim" = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
{ osConfig, pkgs, lib, inputs, ... }:
|
||||
let cfg = osConfig.custom.services.opensnitch;
|
||||
in { config = lib.mkIf cfg.enable { services.opensnitch-ui.enable = true; }; }
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.services.opensnitch;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable { services.opensnitch-ui.enable = true; };
|
||||
}
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with config.stylix.fonts;
|
||||
let
|
||||
mkLiteral = name: "${name}";
|
||||
mkRgba = opacity: color:
|
||||
mkRgba =
|
||||
opacity: color:
|
||||
let
|
||||
c = config.lib.stylix.colors;
|
||||
r = c."${color}-rgb-r";
|
||||
@@ -11,8 +18,7 @@ let
|
||||
in
|
||||
"rgba ( ${r}, ${g}, ${b}, ${opacity} % )";
|
||||
mkRgb = mkRgba "100";
|
||||
rofiOpacity =
|
||||
builtins.toString (builtins.ceil (config.stylix.opacity.popups * 100));
|
||||
rofiOpacity = builtins.toString (builtins.ceil (config.stylix.opacity.popups * 100));
|
||||
rofiTheme = {
|
||||
background = mkRgba rofiOpacity "base00";
|
||||
lightbg = mkRgba rofiOpacity "base01";
|
||||
@@ -68,7 +74,9 @@ in
|
||||
enable = true;
|
||||
text = ''
|
||||
* {
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (name: value: "${name}: ${value};") rofiTheme)}
|
||||
${builtins.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (name: value: "${name}: ${value};") rofiTheme
|
||||
)}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ osConfig, pkgs, config, lib, ... }:
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.stylix;
|
||||
base16 = config.stylix.base16Scheme;
|
||||
@@ -14,7 +20,7 @@ in
|
||||
enable = true;
|
||||
addCss = false;
|
||||
};
|
||||
gtk.flatpakSupport.enable = true; #edits ~/.themes/adw-gtk3
|
||||
gtk.flatpakSupport.enable = true; # edits ~/.themes/adw-gtk3
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home = {
|
||||
pointerCursor = {
|
||||
|
||||
@@ -1,26 +1,32 @@
|
||||
{ pkgs, config, osConfig, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf osConfig.custom.hardware.vr.enable
|
||||
{
|
||||
xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.monado}/share/openxr/1/openxr_monado.json";
|
||||
xdg.configFile."openvr/openvrpaths.vrpath".text = ''
|
||||
{
|
||||
"config" :
|
||||
[
|
||||
"~/.local/share/Steam/config"
|
||||
],
|
||||
"external_drivers" : null,
|
||||
"jsonid" : "vrpathreg",
|
||||
"log" :
|
||||
[
|
||||
"~/.local/share/Steam/logs"
|
||||
],
|
||||
"runtime" :
|
||||
[
|
||||
"${pkgs.opencomposite}/lib/opencomposite"
|
||||
],
|
||||
"version" : 1
|
||||
}
|
||||
'';
|
||||
};
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf osConfig.custom.hardware.vr.enable {
|
||||
xdg.configFile."openxr/1/active_runtime.json".source =
|
||||
"${pkgs.monado}/share/openxr/1/openxr_monado.json";
|
||||
xdg.configFile."openvr/openvrpaths.vrpath".text = ''
|
||||
{
|
||||
"config" :
|
||||
[
|
||||
"~/.local/share/Steam/config"
|
||||
],
|
||||
"external_drivers" : null,
|
||||
"jsonid" : "vrpathreg",
|
||||
"log" :
|
||||
[
|
||||
"~/.local/share/Steam/logs"
|
||||
],
|
||||
"runtime" :
|
||||
[
|
||||
"${pkgs.opencomposite}/lib/opencomposite"
|
||||
],
|
||||
"version" : 1
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
@@ -18,11 +24,9 @@
|
||||
};
|
||||
shellAliases = {
|
||||
# TODO: gifsicle -O3 --lossy=30 noita-20240328-191617-1612416266-00316616.gif -o noita-20240328-191617-1612416266.gif
|
||||
backupNoita =
|
||||
"cp -r ~/.local/share/Steam/steamapps/compatdata/881100/pfx/drive_c/users/steamuser/AppData/LocalLow/Nolla_Games_Noita/* ~/synced/default/dont_remotebackup/noita_save";
|
||||
backupNoita = "cp -r ~/.local/share/Steam/steamapps/compatdata/881100/pfx/drive_c/users/steamuser/AppData/LocalLow/Nolla_Games_Noita/* ~/synced/default/dont_remotebackup/noita_save";
|
||||
checkTime = "(cd ~/synced/work_drive/TS && nix run)";
|
||||
checkWaylandWindowsKDE =
|
||||
"qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole";
|
||||
checkWaylandWindowsKDE = "qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole";
|
||||
collectGarbage = "nh clean all";
|
||||
edit = "cd ~/projects/github/nix-config && nvim .";
|
||||
ll = "ls -l";
|
||||
@@ -36,14 +40,10 @@
|
||||
dev = "nix-shell --run zsh";
|
||||
rmt = "trash put";
|
||||
bat = "bat -P --style plain";
|
||||
cdf =
|
||||
"cd $(fd --type d --exclude node_modules --exclude bin --exclude target --exclude .cache . | fzf)";
|
||||
cpu_performance =
|
||||
"echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_powersave =
|
||||
"echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_schedutil =
|
||||
"echo schedutil | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cdf = "cd $(fd --type d --exclude node_modules --exclude bin --exclude target --exclude .cache . | fzf)";
|
||||
cpu_performance = "echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_powersave = "echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_schedutil = "echo schedutil | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_freq = ''watch -n 1 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""'';
|
||||
gpu_monitor = "nvidia-smi dmon -s puct";
|
||||
nix-shell = "nix-shell --command zsh";
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
{ pkgs, modulesPath, config, lib, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
modulesPath,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-graphical-gnome.nix"
|
||||
];
|
||||
@@ -15,8 +22,7 @@
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
boot.kernelParams =
|
||||
[ "nvidia-drm.fbdev=1" ];
|
||||
boot.kernelParams = [ "nvidia-drm.fbdev=1" ];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
extensions = with pkgs.postgresql14Packages; [ pg_libversion ];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
typst
|
||||
];
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.audio;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.awesome;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.awesome;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.awesome = {
|
||||
enable = lib.mkEnableOption "Enables awesome";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.basics;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.basics;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.basics = {
|
||||
enable = mkEnableOption "Enables basics";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.code.android;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.code.android;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.code.android = {
|
||||
enable = mkEnableOption "Enables code";
|
||||
};
|
||||
@@ -10,6 +18,9 @@ in {
|
||||
documentation.dev.enable = true;
|
||||
programs.adb.enable = true;
|
||||
environment.systemPackages = with pkgs; [ android-studio ];
|
||||
users.users.${config.mainUser.name}.extraGroups = [ "adbusers" "kvm" ];
|
||||
users.users.${config.mainUser.name}.extraGroups = [
|
||||
"adbusers"
|
||||
"kvm"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.code;
|
||||
@@ -12,23 +18,26 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
documentation.dev.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
man-pages
|
||||
stable.jetbrains.idea-ultimate
|
||||
typescript
|
||||
bruno
|
||||
nodejs_22 # needed for tabby extension
|
||||
python3
|
||||
gcc
|
||||
] ++ lib.optionals cfg.rider [
|
||||
pkgs.jetbrains.rider
|
||||
] ++ lib.optionals cfg.clion [
|
||||
pkgs.jetbrains.clion
|
||||
];
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
man-pages
|
||||
stable.jetbrains.idea-ultimate
|
||||
typescript
|
||||
bruno
|
||||
nodejs_22 # needed for tabby extension
|
||||
python3
|
||||
gcc
|
||||
]
|
||||
++ lib.optionals cfg.rider [
|
||||
pkgs.jetbrains.rider
|
||||
]
|
||||
++ lib.optionals cfg.clion [
|
||||
pkgs.jetbrains.clion
|
||||
];
|
||||
|
||||
#environment.sessionVariables = {
|
||||
# DOTNET_ROOT = "${pkgs.dotnet-sdk_7}";
|
||||
#};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.cosmic;
|
||||
in
|
||||
@@ -13,7 +19,7 @@ in
|
||||
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
|
||||
};
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = if (config.custom.graphical.sddm.enable == false) then true else false;
|
||||
services.displayManager.cosmic-greeter.enable =
|
||||
if (config.custom.graphical.sddm.enable == false) then true else false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
imports = [
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.emulators;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.games;
|
||||
@@ -22,12 +27,13 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall =
|
||||
true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall =
|
||||
true; # Open ports in the firewall for Source Dedicated Server
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
gamescopeSession.enable = true;
|
||||
extraCompatPackages = with pkgs; [ proton-ge-bin steamtinkerlaunch ];
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
steamtinkerlaunch
|
||||
];
|
||||
};
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
@@ -37,19 +43,28 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ mangohud lutris ]
|
||||
++ optionals cfg.enablePreinstalled (with pkgs; [
|
||||
#taisei
|
||||
#osu-lazer-bin
|
||||
wineWowPackages.unstableFull
|
||||
winetricks
|
||||
heroic
|
||||
prismlauncher
|
||||
steamtinkerlaunch
|
||||
tetrio-desktop
|
||||
beyond-all-reason
|
||||
#libs
|
||||
]) ++ optionals cfg.enableVr (with pkgs; [ bs-manager ]);
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
mangohud
|
||||
lutris
|
||||
]
|
||||
++ optionals cfg.enablePreinstalled (
|
||||
with pkgs;
|
||||
[
|
||||
#taisei
|
||||
#osu-lazer-bin
|
||||
wineWowPackages.unstableFull
|
||||
winetricks
|
||||
heroic
|
||||
prismlauncher
|
||||
steamtinkerlaunch
|
||||
tetrio-desktop
|
||||
beyond-all-reason
|
||||
#libs
|
||||
]
|
||||
)
|
||||
++ optionals cfg.enableVr (with pkgs; [ bs-manager ]);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,114 +1,124 @@
|
||||
{ config, lib, ... }:
|
||||
let cfg = config.custom.graphical.gnome;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.gnome;
|
||||
in
|
||||
{
|
||||
# doesnt work for me.. nothing changes
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.dconf.profiles.user.databases = [{
|
||||
lockAll = true;
|
||||
settings = with lib.gvariant; {
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
resize-with-right-button = true;
|
||||
};
|
||||
"org/gnome/desktop/sound" = { event-sounds = false; };
|
||||
"org/gnome/desktop/peripherals/mouse" = { accel-profile = "flat"; };
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" =
|
||||
{
|
||||
programs.dconf.profiles.user.databases = [
|
||||
{
|
||||
lockAll = true;
|
||||
settings = with lib.gvariant; {
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
resize-with-right-button = true;
|
||||
};
|
||||
"org/gnome/desktop/sound" = {
|
||||
event-sounds = false;
|
||||
};
|
||||
"org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
name = "nautilus";
|
||||
command = "nautilus";
|
||||
binding = "<Super>e";
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" =
|
||||
{
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||
name = "kitty super";
|
||||
command = "kitty";
|
||||
binding = "<Super>q";
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" =
|
||||
{
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
|
||||
binding = "<Alt>space";
|
||||
command = "rofi -show combi";
|
||||
name = "Open Rofi";
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
enabled-extensions = [
|
||||
"blur-my-shell@aunetx"
|
||||
"trayIconsReloaded@selfmade.pl"
|
||||
"Vitals@CoreCoding.com"
|
||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
||||
"dash-to-dock@micxgx.gmail.com"
|
||||
"just-perfection-desktop@just-perfection"
|
||||
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
||||
"apps-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
];
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
enabled-extensions = [
|
||||
"blur-my-shell@aunetx"
|
||||
"trayIconsReloaded@selfmade.pl"
|
||||
"Vitals@CoreCoding.com"
|
||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
||||
"dash-to-dock@micxgx.gmail.com"
|
||||
"just-perfection-desktop@just-perfection"
|
||||
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
||||
"apps-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
];
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
edge-tiling = true;
|
||||
workspaces-only-on-primary = true;
|
||||
dynamic-workspaces = false;
|
||||
};
|
||||
#"org/gnome/desktop/wm/preferences" = {
|
||||
# num-workspaces = 9;
|
||||
# focus-mode = "sloppy";
|
||||
#};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
#minimize = [ "<Super>comma" ];
|
||||
maximize = [ "<Super>f" ];
|
||||
#switch-to-workspace-left = [ "<Super>e" ];
|
||||
#switch-to-workspace-right = [ "<Super>r" ];
|
||||
unmaximize = mkEmptyArray type.string;
|
||||
activate-window-menu = mkEmptyArray type.string;
|
||||
move-to-monitor-up = mkEmptyArray type.string;
|
||||
move-to-monitor-down = mkEmptyArray type.string;
|
||||
#move-to-monitor-left = [ "<Super><Shift>e" ];
|
||||
#move-to-monitor-right = [ "<Super><Shift>r" ];
|
||||
move-to-workspace-down = mkEmptyArray type.string;
|
||||
move-to-workspace-up = mkEmptyArray type.string;
|
||||
switch-to-workspace-down = [
|
||||
"<Primary><Super>Down"
|
||||
"<Primary><Super>j"
|
||||
];
|
||||
switch-to-workspace-up = [
|
||||
"<Primary><Super>Up"
|
||||
"<Primary><Super>k"
|
||||
];
|
||||
toggle-maximized = [ "<Super>f" ];
|
||||
close = [ "<Alt>F4" ];
|
||||
switch-to-workspace-1 = [ "<Super>1" ];
|
||||
switch-to-workspace-2 = [ "<Super>2" ];
|
||||
switch-to-workspace-3 = [ "<Super>3" ];
|
||||
switch-to-workspace-4 = [ "<Super>4" ];
|
||||
switch-to-workspace-5 = [ "<Super>5" ];
|
||||
switch-to-workspace-6 = [ "<Super>6" ];
|
||||
switch-to-workspace-7 = [ "<Super>7" ];
|
||||
switch-to-workspace-8 = [ "<Super>8" ];
|
||||
switch-to-workspace-9 = [ "<Super>9" ];
|
||||
move-to-workspace-1 = [ "<Super><Shift>1" ];
|
||||
move-to-workspace-2 = [ "<Super><Shift>2" ];
|
||||
move-to-workspace-3 = [ "<Super><Shift>3" ];
|
||||
move-to-workspace-4 = [ "<Super><Shift>4" ];
|
||||
move-to-workspace-5 = [ "<Super><Shift>5" ];
|
||||
move-to-workspace-6 = [ "<Super><Shift>6" ];
|
||||
move-to-workspace-7 = [ "<Super><Shift>7" ];
|
||||
move-to-workspace-8 = [ "<Super><Shift>8" ];
|
||||
move-to-workspace-9 = [ "<Super><Shift>9" ];
|
||||
};
|
||||
"org/gnome/shell/keybindings" = {
|
||||
# Following binds need to be disabled, as their defaults are used for
|
||||
# the binds above, and will run into conflicts.
|
||||
switch-to-application-1 = mkEmptyArray type.string;
|
||||
switch-to-application-2 = mkEmptyArray type.string;
|
||||
switch-to-application-3 = mkEmptyArray type.string;
|
||||
switch-to-application-4 = mkEmptyArray type.string;
|
||||
switch-to-application-5 = mkEmptyArray type.string;
|
||||
switch-to-application-6 = mkEmptyArray type.string;
|
||||
switch-to-application-7 = mkEmptyArray type.string;
|
||||
switch-to-application-8 = mkEmptyArray type.string;
|
||||
switch-to-application-9 = mkEmptyArray type.string;
|
||||
};
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
edge-tiling = true;
|
||||
workspaces-only-on-primary = true;
|
||||
dynamic-workspaces = false;
|
||||
};
|
||||
#"org/gnome/desktop/wm/preferences" = {
|
||||
# num-workspaces = 9;
|
||||
# focus-mode = "sloppy";
|
||||
#};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
#minimize = [ "<Super>comma" ];
|
||||
maximize = [ "<Super>f" ];
|
||||
#switch-to-workspace-left = [ "<Super>e" ];
|
||||
#switch-to-workspace-right = [ "<Super>r" ];
|
||||
unmaximize = mkEmptyArray type.string;
|
||||
activate-window-menu = mkEmptyArray type.string;
|
||||
move-to-monitor-up = mkEmptyArray type.string;
|
||||
move-to-monitor-down = mkEmptyArray type.string;
|
||||
#move-to-monitor-left = [ "<Super><Shift>e" ];
|
||||
#move-to-monitor-right = [ "<Super><Shift>r" ];
|
||||
move-to-workspace-down = mkEmptyArray type.string;
|
||||
move-to-workspace-up = mkEmptyArray type.string;
|
||||
switch-to-workspace-down =
|
||||
[ "<Primary><Super>Down" "<Primary><Super>j" ];
|
||||
switch-to-workspace-up = [ "<Primary><Super>Up" "<Primary><Super>k" ];
|
||||
toggle-maximized = [ "<Super>f" ];
|
||||
close = [ "<Alt>F4" ];
|
||||
switch-to-workspace-1 = [ "<Super>1" ];
|
||||
switch-to-workspace-2 = [ "<Super>2" ];
|
||||
switch-to-workspace-3 = [ "<Super>3" ];
|
||||
switch-to-workspace-4 = [ "<Super>4" ];
|
||||
switch-to-workspace-5 = [ "<Super>5" ];
|
||||
switch-to-workspace-6 = [ "<Super>6" ];
|
||||
switch-to-workspace-7 = [ "<Super>7" ];
|
||||
switch-to-workspace-8 = [ "<Super>8" ];
|
||||
switch-to-workspace-9 = [ "<Super>9" ];
|
||||
move-to-workspace-1 = [ "<Super><Shift>1" ];
|
||||
move-to-workspace-2 = [ "<Super><Shift>2" ];
|
||||
move-to-workspace-3 = [ "<Super><Shift>3" ];
|
||||
move-to-workspace-4 = [ "<Super><Shift>4" ];
|
||||
move-to-workspace-5 = [ "<Super><Shift>5" ];
|
||||
move-to-workspace-6 = [ "<Super><Shift>6" ];
|
||||
move-to-workspace-7 = [ "<Super><Shift>7" ];
|
||||
move-to-workspace-8 = [ "<Super><Shift>8" ];
|
||||
move-to-workspace-9 = [ "<Super><Shift>9" ];
|
||||
};
|
||||
"org/gnome/shell/keybindings" = {
|
||||
# Following binds need to be disabled, as their defaults are used for
|
||||
# the binds above, and will run into conflicts.
|
||||
switch-to-application-1 = mkEmptyArray type.string;
|
||||
switch-to-application-2 = mkEmptyArray type.string;
|
||||
switch-to-application-3 = mkEmptyArray type.string;
|
||||
switch-to-application-4 = mkEmptyArray type.string;
|
||||
switch-to-application-5 = mkEmptyArray type.string;
|
||||
switch-to-application-6 = mkEmptyArray type.string;
|
||||
switch-to-application-7 = mkEmptyArray type.string;
|
||||
switch-to-application-8 = mkEmptyArray type.string;
|
||||
switch-to-application-9 = mkEmptyArray type.string;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.gnome;
|
||||
in {
|
||||
options.custom.graphical.gnome = { enable = mkEnableOption "Enables gnome"; };
|
||||
let
|
||||
cfg = config.custom.graphical.gnome;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.gnome = {
|
||||
enable = mkEnableOption "Enables gnome";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver = {
|
||||
xkb.layout = config.mainUser.layout;
|
||||
xkb.variant = config.mainUser.variant;
|
||||
enable = true;
|
||||
displayManager.gdm.enable =
|
||||
lib.mkIf (!config.custom.graphical.sddm.enable) true;
|
||||
displayManager.gdm.enable = lib.mkIf (!config.custom.graphical.sddm.enable) true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
@@ -21,23 +29,26 @@ in {
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.gnome.excludePackages = (with pkgs; [
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
cheese
|
||||
gedit # text editor
|
||||
gnome-music
|
||||
gnome-terminal
|
||||
epiphany # web browser
|
||||
#geary # email reader
|
||||
evince # document viewer
|
||||
gnome-characters
|
||||
totem # video player
|
||||
tali # poker game
|
||||
iagno # go game
|
||||
hitori # sudoku game
|
||||
atomix # puzzle game
|
||||
]);
|
||||
environment.gnome.excludePackages = (
|
||||
with pkgs;
|
||||
[
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
cheese
|
||||
gedit # text editor
|
||||
gnome-music
|
||||
gnome-terminal
|
||||
epiphany # web browser
|
||||
#geary # email reader
|
||||
evince # document viewer
|
||||
gnome-characters
|
||||
totem # video player
|
||||
tali # poker game
|
||||
iagno # go game
|
||||
hitori # sudoku game
|
||||
atomix # puzzle game
|
||||
]
|
||||
);
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wmctrl
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
let cfg = config.custom.graphical.hyprland;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.hyprland = {
|
||||
enable = lib.mkEnableOption "Enables hyprland";
|
||||
};
|
||||
@@ -14,8 +22,7 @@ in {
|
||||
xkb.variant = config.mainUser.variant;
|
||||
enable = true;
|
||||
};
|
||||
services.displayManager.sddm.enable =
|
||||
!config.services.xserver.displayManager.gdm.enable;
|
||||
services.displayManager.sddm.enable = !config.services.xserver.displayManager.gdm.enable;
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
@@ -30,7 +37,9 @@ in {
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
programs.hyprland = { enable = true; };
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
security.pam.services.hyprlock = { };
|
||||
systemd = {
|
||||
@@ -41,8 +50,7 @@ in {
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
@@ -72,9 +80,8 @@ in {
|
||||
#xdg-utils
|
||||
#xwayland
|
||||
(writeShellScriptBin "copyfiletoclip" ''
|
||||
echo "file://$(realpath $1)" | wl-copy -t text/uri-list
|
||||
''
|
||||
)
|
||||
echo "file://$(realpath $1)" | wl-copy -t text/uri-list
|
||||
'')
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.i3;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.i3;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.i3.enable = lib.mkOption {
|
||||
@@ -24,14 +31,18 @@ in {
|
||||
};
|
||||
|
||||
services = {
|
||||
displayManager = { defaultSession = "none+i3"; };
|
||||
displayManager = {
|
||||
defaultSession = "none+i3";
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
xkb.layout = config.mainUser.layout;
|
||||
xkb.variant = config.mainUser.variant;
|
||||
desktopManager = { xterm.enable = false; };
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
};
|
||||
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
@@ -53,8 +64,7 @@ in {
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.ime;
|
||||
in {
|
||||
options.custom.graphical.ime = { enable = mkEnableOption "Enables ime"; };
|
||||
let
|
||||
cfg = config.custom.graphical.ime;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.ime = {
|
||||
enable = mkEnableOption "Enables ime";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
i18n.inputMethod = {
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.lightdm;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.lightdm;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.lightdm.enable = lib.mkOption {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.lxqt;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let cfg = config.custom.graphical.nightlight;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.nightlight;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.nightlight = {
|
||||
enable = lib.mkEnableOption "Enables nightlight";
|
||||
};
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.niri;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.niri;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.niri.enable = lib.mkOption {
|
||||
@@ -11,7 +18,9 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri = { enable = true; };
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ xwayland-satellite ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.noise-supression;
|
||||
in
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.obs;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.openrgb;
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.plasma;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.plasma;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.plasma = {
|
||||
enable = mkEnableOption "Enables plasma";
|
||||
};
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.sddm;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.sddm;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.sddm.enable = lib.mkOption {
|
||||
@@ -11,12 +18,12 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ (pkgs.sddm-astronaut.override { embeddedTheme = "pixel_sakura";}) ];
|
||||
environment.systemPackages = [ (pkgs.sddm-astronaut.override { embeddedTheme = "pixel_sakura"; }) ];
|
||||
services = {
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
theme = "sddm-astronaut-theme";
|
||||
extraPackages = [ (pkgs.sddm-astronaut.override { embeddedTheme = "pixel_sakura";}) ];
|
||||
extraPackages = [ (pkgs.sddm-astronaut.override { embeddedTheme = "pixel_sakura"; }) ];
|
||||
#wayland.enable = true;
|
||||
#sddm.theme = "breeze";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.shared;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.shared;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.shared = {
|
||||
enable = mkEnableOption "Enables shared";
|
||||
};
|
||||
@@ -39,16 +47,21 @@ in {
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 53317 ]; # localsend
|
||||
allowedUDPPorts = [ 1194 53317 ]; # openvpn, localsend
|
||||
allowedTCPPortRanges = [{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
allowedUDPPorts = [
|
||||
1194
|
||||
53317
|
||||
]; # openvpn, localsend
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
];
|
||||
allowedUDPPortRanges = [{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
let cfg = config.custom.graphical.stylix;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.stylix;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.stylix = with lib; {
|
||||
enable = mkEnableOption "Enables stylix";
|
||||
image = mkOption {
|
||||
@@ -11,7 +18,13 @@ in {
|
||||
'';
|
||||
};
|
||||
base16Scheme = mkOption {
|
||||
type = with lib.types; nullOr (oneOf [ path lines attrs ]);
|
||||
type =
|
||||
with lib.types;
|
||||
nullOr (oneOf [
|
||||
path
|
||||
lines
|
||||
attrs
|
||||
]);
|
||||
default = null;
|
||||
description = ''
|
||||
The base16 scheme to use.
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.sway;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.sway;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.sway.enable = lib.mkOption {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.xfce;
|
||||
|
||||
@@ -1,54 +1,73 @@
|
||||
{ lib, config, pkgs, inputs, pkgsVersion, ... }:
|
||||
let cfg = config.custom.hardware.amd-gpu;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
pkgsVersion,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.amd-gpu;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.amd-gpu = {
|
||||
enable = lib.mkEnableOption "Enables amd gpus";
|
||||
overdrive = lib.mkEnableOption "Enables overdrive";
|
||||
rocm.enable = lib.mkEnableOption "Enables rocm";
|
||||
};
|
||||
|
||||
config =
|
||||
lib.mkIf cfg.enable {
|
||||
boot.kernelParams = lib.mkIf cfg.overdrive
|
||||
[ "amdgpu.ppfeaturemask=0xfff7ffff" "split_lock_detect=off" ];
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.kernelParams = lib.mkIf cfg.overdrive [
|
||||
"amdgpu.ppfeaturemask=0xfff7ffff"
|
||||
"split_lock_detect=off"
|
||||
];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = lib.mkIf cfg.rocm.enable (with pkgs; [ rocmPackages.clr rocmPackages.clr.icd ]);
|
||||
};
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = lib.mkIf cfg.rocm.enable (
|
||||
with pkgs;
|
||||
[
|
||||
rocmPackages.clr
|
||||
rocmPackages.clr.icd
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
hardware.amdgpu.initrd.enable = lib.mkDefault true;
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
# controller (overclock, undervolt, fan curves)
|
||||
environment.systemPackages = with pkgs; [
|
||||
hardware.amdgpu.initrd.enable = lib.mkDefault true;
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
# controller (overclock, undervolt, fan curves)
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
nvtopPackages.amd
|
||||
amdgpu_top
|
||||
] ++ lib.optionals cfg.rocm.enable [
|
||||
]
|
||||
++ lib.optionals cfg.rocm.enable [
|
||||
clinfo
|
||||
rocmPackages.rocminfo
|
||||
] ++ lib.optionals cfg.overdrive [
|
||||
]
|
||||
++ lib.optionals cfg.overdrive [
|
||||
lact
|
||||
];
|
||||
systemd = {
|
||||
packages = lib.mkIf cfg.overdrive (with pkgs; [ lact ]);
|
||||
services.lactd.wantedBy = lib.mkIf cfg.overdrive [ "multi-user.target" ];
|
||||
#rocm
|
||||
tmpfiles.rules =
|
||||
let
|
||||
rocmEnv = pkgs.symlinkJoin {
|
||||
name = "rocm-combined";
|
||||
paths = with pkgs.rocmPackages; [
|
||||
rocblas
|
||||
hipblas
|
||||
clr
|
||||
];
|
||||
};
|
||||
in
|
||||
lib.mkIf cfg.rocm.enable
|
||||
[
|
||||
"L+ /opt/rocm - - - - ${rocmEnv}"
|
||||
systemd = {
|
||||
packages = lib.mkIf cfg.overdrive (with pkgs; [ lact ]);
|
||||
services.lactd.wantedBy = lib.mkIf cfg.overdrive [ "multi-user.target" ];
|
||||
#rocm
|
||||
tmpfiles.rules =
|
||||
let
|
||||
rocmEnv = pkgs.symlinkJoin {
|
||||
name = "rocm-combined";
|
||||
paths = with pkgs.rocmPackages; [
|
||||
rocblas
|
||||
hipblas
|
||||
clr
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
lib.mkIf cfg.rocm.enable [
|
||||
"L+ /opt/rocm - - - - ${rocmEnv}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.hardware.android;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.android;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.android = {
|
||||
enable = lib.mkEnableOption "Enables android phone support";
|
||||
};
|
||||
@@ -9,7 +16,7 @@ in {
|
||||
programs.adb = {
|
||||
enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs;[
|
||||
environment.systemPackages = with pkgs; [
|
||||
scrcpy # mirrors screen to pc, -S turns off screen while active, --render-driver opengl uses opengl for rendering
|
||||
];
|
||||
users.users.${config.mainUser.name}.extraGroups = [ "adbusers" ];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, config, ... }: {
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./amd-gpu.nix
|
||||
./android.nix
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.hardware.fingerprint;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.fingerprint;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.fingerprint = {
|
||||
enable = lib.mkEnableOption "Enables fingerprint sensor support";
|
||||
};
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
services.fwupd.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{ lib, config, pkgs, inputs, pkgsVersion, ... }:
|
||||
let cfg = config.custom.hardware.nvidia;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
pkgsVersion,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.nvidia;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.nvidia = {
|
||||
enable = lib.mkEnableOption "Enables nvidia gpus";
|
||||
powerLimit = {
|
||||
@@ -32,51 +41,57 @@ in {
|
||||
let
|
||||
# the option was renamed in unstable
|
||||
nvidiaOption =
|
||||
if (pkgsVersion == inputs.nixpkgs-unstable) then {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
||||
if (pkgsVersion == inputs.nixpkgs-unstable) then
|
||||
{
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
nvidia_oc = "${pkgs.nvidia_oc}/bin/nvidia_oc";
|
||||
in
|
||||
lib.mkIf cfg.enable (lib.recursiveUpdate nvidiaOption {
|
||||
boot.kernelParams =
|
||||
[ "nvidia-drm.fbdev=1" "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.deviceSection = ''
|
||||
Option "Coolbits" "24"
|
||||
'';
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
# Open drivers with gsp stutters in VR - https://github.com/ValveSoftware/SteamVR-for-Linux/issues/631
|
||||
gsp.enable = config.hardware.nvidia.open;
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
powerManagement.enable = false;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# GSP must be enabled for this to work.
|
||||
open = false;
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
lib.mkIf cfg.enable (
|
||||
lib.recursiveUpdate nvidiaOption {
|
||||
boot.kernelParams = [
|
||||
"nvidia-drm.fbdev=1"
|
||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||
];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.deviceSection = ''
|
||||
Option "Coolbits" "24"
|
||||
'';
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
# Open drivers with gsp stutters in VR - https://github.com/ValveSoftware/SteamVR-for-Linux/issues/631
|
||||
gsp.enable = config.hardware.nvidia.open;
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
powerManagement.enable = false;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# GSP must be enabled for this to work.
|
||||
open = false;
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
#package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||
# version = "570.124.04";
|
||||
# sha256_64bit = "sha256-G3hqS3Ei18QhbFiuQAdoik93jBlsFI2RkWOBXuENU8Q=";
|
||||
@@ -85,40 +100,35 @@ in {
|
||||
# settingsSha256 = "sha256-LNL0J/sYHD8vagkV1w8tb52gMtzj/F0QmJTV1cMaso8=";
|
||||
# persistencedSha256 = "";
|
||||
#};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
libva
|
||||
libva-utils
|
||||
pkgs.nvidia_oc
|
||||
(gwe.override { nvidia_x11 = config.hardware.nvidia.package; })
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
libva
|
||||
libva-utils
|
||||
pkgs.nvidia_oc
|
||||
(gwe.override { nvidia_x11 = config.hardware.nvidia.package; })
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
# for firefox, see https://github.com/elFarto/nvidia-vaapi-driver/#firefox
|
||||
MOZ_DISABLE_RDD_SANDBOX = "1";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
};
|
||||
environment.sessionVariables = {
|
||||
# for firefox, see https://github.com/elFarto/nvidia-vaapi-driver/#firefox
|
||||
MOZ_DISABLE_RDD_SANDBOX = "1";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
};
|
||||
|
||||
systemd.services.nvidiaSetPower = lib.mkIf cfg.powerLimit.enable {
|
||||
description =
|
||||
"Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
|
||||
script = "/run/current-system/sw/bin/nvidia-smi -pl=${
|
||||
toString cfg.powerLimit.wattage
|
||||
}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
systemd.services.nvidiaSetClocks = lib.mkIf cfg.clock.enable {
|
||||
description = "Set GPU clocks";
|
||||
script =
|
||||
"${nvidia_oc} set -i 0 --min-clock ${toString cfg.clock.min} --max-clock ${
|
||||
toString cfg.clock.max
|
||||
} --freq-offset ${toString cfg.clock.offset}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
};
|
||||
systemd.services.nvidiaSetPower = lib.mkIf cfg.powerLimit.enable {
|
||||
description = "Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
|
||||
script = "/run/current-system/sw/bin/nvidia-smi -pl=${toString cfg.powerLimit.wattage}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
systemd.services.nvidiaSetClocks = lib.mkIf cfg.clock.enable {
|
||||
description = "Set GPU clocks";
|
||||
script = "${nvidia_oc} set -i 0 --min-clock ${toString cfg.clock.min} --max-clock ${toString cfg.clock.max} --freq-offset ${toString cfg.clock.offset}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
};
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
boot = {
|
||||
extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||
|
||||
@@ -16,4 +16,3 @@ in
|
||||
hardware.system76.enableAll = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
services.fstrim.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.hardware.tablet;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.hardware.tablet;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.tablet = {
|
||||
enable = mkEnableOption "Enables tablet";
|
||||
};
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.hardware.tpm;
|
||||
in {
|
||||
options.custom.hardware.tpm = { enable = mkEnableOption "Enables tpm"; };
|
||||
let
|
||||
cfg = config.custom.hardware.tpm;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.tpm = {
|
||||
enable = mkEnableOption "Enables tpm";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.hardware.vfio;
|
||||
@@ -15,9 +20,24 @@ in
|
||||
|
||||
config = mkIf (cfg.enable && config.virtualisation.libvirtd.enable) {
|
||||
boot = {
|
||||
kernelModules = [ "vfio" "vfio_iommu_type1" "vfio_pci" ];
|
||||
kernelParams = [ "amd_iommu=on" "iommu=pt" ] ++ (if cfg.stub_pci != [] then [ "vfio-pci.ids=${concatStringsSep "," cfg.stub_pci}" ] else []);
|
||||
blacklistedKernelModules = [ "nouveau" "nvidia" "nvidiafb" "nvidia-drm" "nvidia-uvm" "nvidia-modeset" ];
|
||||
kernelModules = [
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
"vfio_pci"
|
||||
];
|
||||
kernelParams = [
|
||||
"amd_iommu=on"
|
||||
"iommu=pt"
|
||||
]
|
||||
++ (if cfg.stub_pci != [ ] then [ "vfio-pci.ids=${concatStringsSep "," cfg.stub_pci}" ] else [ ]);
|
||||
blacklistedKernelModules = [
|
||||
"nouveau"
|
||||
"nvidia"
|
||||
"nvidiafb"
|
||||
"nvidia-drm"
|
||||
"nvidia-uvm"
|
||||
"nvidia-modeset"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.vr;
|
||||
# https://wiki.nixos.org/wiki/VR#Patching_AMDGPU_to_allow_high_priority_queues
|
||||
amdgpu =
|
||||
{ pkgs
|
||||
, lib
|
||||
, kernel ? pkgs.linuxPackages_latest.kernel
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
kernel ? pkgs.linuxPackages_latest.kernel,
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "amdgpu-kernel-module";
|
||||
inherit (kernel) src version postPatch nativeBuildInputs;
|
||||
inherit (kernel)
|
||||
src
|
||||
version
|
||||
postPatch
|
||||
nativeBuildInputs
|
||||
;
|
||||
|
||||
kernel_dev = kernel.dev;
|
||||
kernelVersion = kernel.modDirVersion;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.hardware.wooting;
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.misc.backup;
|
||||
@@ -22,7 +28,15 @@ in
|
||||
};
|
||||
excludePaths = lib.mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "**/Cache" "**/.cache" "**/__pycache__" "**/node_modules" "**/venv" "*.o" "*.out" ];
|
||||
default = [
|
||||
"**/Cache"
|
||||
"**/.cache"
|
||||
"**/__pycache__"
|
||||
"**/node_modules"
|
||||
"**/venv"
|
||||
"*.o"
|
||||
"*.out"
|
||||
];
|
||||
description = "paths to exclude from the backup";
|
||||
};
|
||||
excludePathsRemote = lib.mkOption {
|
||||
@@ -39,17 +53,29 @@ in
|
||||
text = ''
|
||||
# Check how much space is used by the backup paths
|
||||
echo "Checking storage space (small) with excluded paths..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)} ${builtins.concatStringsSep " " cfg.small}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)
|
||||
} ${builtins.concatStringsSep " " cfg.small}
|
||||
echo "Checking storage space (small) with excluded paths (remote)..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)} ${builtins.concatStringsSep " " cfg.small}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)
|
||||
} ${builtins.concatStringsSep " " cfg.small}
|
||||
echo "Checking storage space (medium) with excluded paths..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)} ${builtins.concatStringsSep " " cfg.medium}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)
|
||||
} ${builtins.concatStringsSep " " cfg.medium}
|
||||
echo "Checking storage space (medium) with excluded paths (remote)..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)} ${builtins.concatStringsSep " " cfg.medium}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)
|
||||
} ${builtins.concatStringsSep " " cfg.medium}
|
||||
echo "Checking storage space (full) with excluded paths..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)} ${builtins.concatStringsSep " " cfg.large}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)
|
||||
} ${builtins.concatStringsSep " " cfg.large}
|
||||
echo "Checking storage space (full) with excluded paths (remote)..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)} ${builtins.concatStringsSep " " cfg.large}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)
|
||||
} ${builtins.concatStringsSep " " cfg.large}
|
||||
'';
|
||||
};
|
||||
cli = "${pkgs.internxt-cli}/bin/internxt";
|
||||
@@ -94,7 +120,11 @@ in
|
||||
};
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
environment.systemPackages = [ checkStorageSpace startInternxtWebdav stopInternxtWebdav ];
|
||||
environment.systemPackages = [
|
||||
checkStorageSpace
|
||||
startInternxtWebdav
|
||||
stopInternxtWebdav
|
||||
];
|
||||
age.secrets.restic-pw = {
|
||||
file = ../../secrets/restic-pw.age;
|
||||
};
|
||||
@@ -126,7 +156,12 @@ in
|
||||
OnCalendar = "04:00";
|
||||
Persistent = true;
|
||||
};
|
||||
pruneOpts = [ "--keep-daily 7" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
repository = "/1tbssd/restic";
|
||||
};
|
||||
#localbackup-1tb = {
|
||||
@@ -148,7 +183,12 @@ in
|
||||
paths = cfg.medium;
|
||||
rcloneConfigFile = config.age.secrets.restic-gdrive.path;
|
||||
repository = "rclone:it-experts:backup";
|
||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||
pruneOpts = [
|
||||
"--keep-daily 5"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 02:00:00";
|
||||
Persistent = true;
|
||||
@@ -160,37 +200,53 @@ in
|
||||
environmentFile = config.age.secrets.restic-s3.path;
|
||||
exclude = cfg.excludePathsRemote;
|
||||
paths = cfg.small;
|
||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||
pruneOpts = [
|
||||
"--keep-daily 5"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 02:00:00";
|
||||
Persistent = true;
|
||||
};
|
||||
repository = "s3:s3.us-west-002.backblazeb2.com/kop-bucket";
|
||||
};
|
||||
remotebackup-large = let cli = "${pkgs.internxt-cli}/bin/internxt"; in {
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets.restic-pw.path;
|
||||
environmentFile = config.age.secrets.restic-internxt.path;
|
||||
exclude = cfg.excludePathsRemote;
|
||||
paths = cfg.large;
|
||||
backupPrepareCommand = ''
|
||||
${startInternxtWebdav}
|
||||
'';
|
||||
backupCleanupCommand = ''
|
||||
${stopInternxtWebdav}
|
||||
'';
|
||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 02:00:00";
|
||||
Persistent = true;
|
||||
};
|
||||
rcloneConfig = {
|
||||
remotebackup-large =
|
||||
let
|
||||
cli = "${pkgs.internxt-cli}/bin/internxt";
|
||||
in
|
||||
{
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets.restic-pw.path;
|
||||
environmentFile = config.age.secrets.restic-internxt.path;
|
||||
exclude = cfg.excludePathsRemote;
|
||||
paths = cfg.large;
|
||||
backupPrepareCommand = ''
|
||||
${startInternxtWebdav}
|
||||
'';
|
||||
backupCleanupCommand = ''
|
||||
${stopInternxtWebdav}
|
||||
'';
|
||||
pruneOpts = [
|
||||
"--keep-daily 5"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 02:00:00";
|
||||
Persistent = true;
|
||||
};
|
||||
rcloneConfig = {
|
||||
type = "webdav";
|
||||
url = "https://127.0.0.1:3005";
|
||||
};
|
||||
rcloneOptions = {
|
||||
"no-check-certificate" = true;
|
||||
};
|
||||
repository = "rclone:internxt:backup";
|
||||
};
|
||||
rcloneOptions = { "no-check-certificate" = true; };
|
||||
repository = "rclone:internxt:backup";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
services.btrfs.autoScrub.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.cli-tools;
|
||||
in {
|
||||
options.custom.cli-tools = { enable = mkEnableOption "Enables cli-tools"; };
|
||||
let
|
||||
cfg = config.custom.cli-tools;
|
||||
in
|
||||
{
|
||||
options.custom.cli-tools = {
|
||||
enable = mkEnableOption "Enables cli-tools";
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
@@ -48,10 +58,7 @@ in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
getTotalPowerUsed
|
||||
watchCurrentPowerUsed
|
||||
(if lib.versionOlder lib.version "25.05" then
|
||||
wget
|
||||
else
|
||||
powerjoular) # monitor power usage
|
||||
(if lib.versionOlder lib.version "25.05" then wget else powerjoular) # monitor power usage
|
||||
bat # fancy cat
|
||||
fd # nicer find
|
||||
duf # nicer du
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.misc.docker;
|
||||
@@ -9,7 +15,9 @@ in
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.daemon.settings = { ip = "127.0.0.1"; };
|
||||
virtualisation.docker.daemon.settings = {
|
||||
ip = "127.0.0.1";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
];
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
{ lib, pkgs, config, ... }: {
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# before: Startup finished in 18.830s (firmware) + 5.844s (loader) + 4.422s (kernel) + 7.616s (userspace) = 36.713s
|
||||
# after: Startup finished in 14.115s (firmware) + 789ms (loader) + 4.312s (kernel) + 5.777s (userspace) = 24.995s
|
||||
systemd = {
|
||||
targets.network-online.wantedBy =
|
||||
lib.mkForce [ ]; # Normally ["multi-user.target"]
|
||||
services.NetworkManager-wait-online.wantedBy =
|
||||
lib.mkForce [ ]; # Normally ["network-online.target"]
|
||||
targets.network-online.wantedBy = lib.mkForce [ ]; # Normally ["multi-user.target"]
|
||||
services.NetworkManager-wait-online.wantedBy = lib.mkForce [ ]; # Normally ["network-online.target"]
|
||||
};
|
||||
# mash spacebar to still be able to select a different boot option
|
||||
boot.loader.timeout = 1;
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.custom.misc.firejail;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.misc.firejail;
|
||||
in
|
||||
{
|
||||
options.custom.misc.firejail = {
|
||||
enable = lib.mkEnableOption "Enables firejail";
|
||||
package = lib.mkOption {
|
||||
@@ -13,12 +20,17 @@ in {
|
||||
mk = lib.mkOption {
|
||||
readOnly = true;
|
||||
description = "Utility function to make a wrappedBinaries entry";
|
||||
default = name:
|
||||
{ pkg, profile ? name, bin ? name }: {
|
||||
default =
|
||||
name:
|
||||
{
|
||||
pkg,
|
||||
profile ? name,
|
||||
bin ? name,
|
||||
}:
|
||||
{
|
||||
${bin} = {
|
||||
executable = "${lib.getBin pkg}/bin/${bin}";
|
||||
profile =
|
||||
"${config.custom.misc.firejail.package}/etc/firejail/${profile}.profile";
|
||||
profile = "${config.custom.misc.firejail.package}/etc/firejail/${profile}.profile";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
#amdgpu_module_pkg =
|
||||
# { pkgs, lib, fetchurl, kernel ? pkgs.linuxPackages_latest.kernel, ... }:
|
||||
@@ -46,22 +51,26 @@ let
|
||||
# amdgpu_module = pkgs.callPackage amdgpu_module_pkg {
|
||||
# kernel = config.boot.kernelPackages.kernel;
|
||||
# };
|
||||
amd_drm_next_pkg = { fetchurl, buildLinux, ... }@args:
|
||||
amd_drm_next_pkg =
|
||||
{ fetchurl, buildLinux, ... }@args:
|
||||
|
||||
buildLinux (args // rec {
|
||||
version = "6.14.0-rc6";
|
||||
modDirVersion = version;
|
||||
buildLinux (
|
||||
args
|
||||
// rec {
|
||||
version = "6.14.0-rc6";
|
||||
modDirVersion = version;
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-fixes-6.15-2025-04-09/linux-amd-drm-fixes-6.15-2025-04-09.tar.gz";
|
||||
#"https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-21/linux-amd-drm-next-6.15-2025-03-21.tar.gz";
|
||||
hash = "sha256-AhyDuV9KufqDJEJ+Fp+jnAta3OM/a9OcMNG9UV+OgR0=";
|
||||
};
|
||||
kernelPatches = [ ];
|
||||
src = fetchurl {
|
||||
url = "https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-fixes-6.15-2025-04-09/linux-amd-drm-fixes-6.15-2025-04-09.tar.gz";
|
||||
#"https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-21/linux-amd-drm-next-6.15-2025-03-21.tar.gz";
|
||||
hash = "sha256-AhyDuV9KufqDJEJ+Fp+jnAta3OM/a9OcMNG9UV+OgR0=";
|
||||
};
|
||||
kernelPatches = [ ];
|
||||
|
||||
extraMeta.branch = "6.14.0-rc6";
|
||||
} // (args.argsOverride or { }));
|
||||
extraMeta.branch = "6.14.0-rc6";
|
||||
}
|
||||
// (args.argsOverride or { })
|
||||
);
|
||||
linux_amd_drm_next = pkgs.callPackage amd_drm_next_pkg { };
|
||||
|
||||
linux_6_14 = pkgs.buildLinux {
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
networking.nftables.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.nixvimPlugins;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.nixvimPlugins;
|
||||
in
|
||||
{
|
||||
options.custom.nixvimPlugins = mkEnableOption "Enables nixvim plugins";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.etc."current-system-packages".text =
|
||||
let
|
||||
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||
sortedUnique =
|
||||
builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||
in
|
||||
formatted;
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let cfg = config.custom.misc.podman;
|
||||
in {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.misc.podman;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
custom.misc.podman = { enable = lib.mkEnableOption "Enable podman service"; };
|
||||
custom.misc.podman = {
|
||||
enable = lib.mkEnableOption "Enable podman service";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable common container config files in /etc/containers
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.custom.static-ip;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.static-ip;
|
||||
in
|
||||
{
|
||||
options.custom.static-ip = {
|
||||
enable = mkEnableOption "Enables static-ip";
|
||||
ip = lib.mkOption {
|
||||
@@ -23,20 +25,23 @@ in {
|
||||
};
|
||||
};
|
||||
config =
|
||||
let fallback = "1.1.1.1";
|
||||
in mkIf cfg.enable {
|
||||
let
|
||||
fallback = "1.1.1.1";
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
networking = {
|
||||
defaultGateway = cfg.gateway;
|
||||
useDHCP = false;
|
||||
nameservers = [ cfg.dns ]
|
||||
++ lib.lists.optionals (!config.services.resolved.enable) [ fallback ];
|
||||
nameservers = [ cfg.dns ] ++ lib.lists.optionals (!config.services.resolved.enable) [ fallback ];
|
||||
interfaces = {
|
||||
${cfg.interface} = {
|
||||
name = "eth0";
|
||||
ipv4.addresses = [{
|
||||
address = cfg.ip;
|
||||
prefixLength = 24;
|
||||
}];
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = cfg.ip;
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
boot.tmp.useTmpfs = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.virt-manager;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.virt-manager;
|
||||
in
|
||||
{
|
||||
options.custom.virt-manager = {
|
||||
enable = mkEnableOption "Enables virt-manager";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.dconf.enable =
|
||||
true; # virt-manager requires dconf to remember settings
|
||||
programs.dconf.enable = true; # virt-manager requires dconf to remember settings
|
||||
environment.systemPackages = with pkgs; [ virtiofsd ];
|
||||
environment.sessionVariables.GSETTINGS_BACKEND = "keyfile";
|
||||
boot.extraModprobeConfig = ''
|
||||
@@ -25,19 +31,31 @@ in {
|
||||
};
|
||||
hooks.qemu = {
|
||||
# doesnt work, screen just freezes. no error in libvirt logs though, so idk how to fix it
|
||||
"passthrough" = lib.getExe (pkgs.writeShellApplication {
|
||||
name = "qemu-hook";
|
||||
excludeShellChecks = [ "SC2046" "SC2086" ];
|
||||
"passthrough" = lib.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "qemu-hook";
|
||||
excludeShellChecks = [
|
||||
"SC2046"
|
||||
"SC2086"
|
||||
];
|
||||
|
||||
runtimeInputs = with pkgs; [ libvirt systemd kmod ];
|
||||
text = builtins.readFile ./hook.sh;
|
||||
});
|
||||
runtimeInputs = with pkgs; [
|
||||
libvirt
|
||||
systemd
|
||||
kmod
|
||||
];
|
||||
text = builtins.readFile ./hook.sh;
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
services.spice-vdagentd.enable = true;
|
||||
users.users.${config.mainUser.name}.extraGroups =
|
||||
[ "libvirtd" "kvm" "input" ];
|
||||
users.users.${config.mainUser.name}.extraGroups = [
|
||||
"libvirtd"
|
||||
"kvm"
|
||||
"input"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.wireshark;
|
||||
@@ -15,4 +20,3 @@ in
|
||||
users.users.${config.mainUser.name}.extraGroups = [ "wireshark" ];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user