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