format all
This commit is contained in:
133
flake.nix
133
flake.nix
@@ -59,24 +59,27 @@
|
||||
#};
|
||||
};
|
||||
outputs =
|
||||
{ self
|
||||
, nur
|
||||
, nixpkgs
|
||||
, nixos-hardware
|
||||
, nixpkgs-unstable
|
||||
, agenix
|
||||
, home-manager
|
||||
, home-manager-unstable
|
||||
{
|
||||
self,
|
||||
nur,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
nixpkgs-unstable,
|
||||
agenix,
|
||||
home-manager,
|
||||
home-manager-unstable,
|
||||
#, nixos-cosmic
|
||||
, nixvim
|
||||
, stylix
|
||||
, disko
|
||||
, flake-utils
|
||||
, ...
|
||||
nixvim,
|
||||
stylix,
|
||||
disko,
|
||||
flake-utils,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
overlays = { outputs, ... }: {
|
||||
overlays =
|
||||
{ outputs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = with outputs.overlays; [
|
||||
#unstable-packages
|
||||
stable-packages
|
||||
@@ -85,54 +88,78 @@
|
||||
nur.overlays.default
|
||||
];
|
||||
};
|
||||
defaultModules = [ ./modules agenix.nixosModules.default overlays ];
|
||||
defaultModules = [
|
||||
./modules
|
||||
agenix.nixosModules.default
|
||||
overlays
|
||||
];
|
||||
# helper function to create a machine
|
||||
mkHost =
|
||||
{ modules
|
||||
, specialArgs ? {
|
||||
{
|
||||
modules,
|
||||
specialArgs ? {
|
||||
pkgsVersion = nixpkgs-unstable;
|
||||
home-manager-version = home-manager-unstable;
|
||||
}
|
||||
, system ? "x86_64-linux"
|
||||
, minimal ? false
|
||||
, graphical ? true
|
||||
},
|
||||
system ? "x86_64-linux",
|
||||
minimal ? false,
|
||||
graphical ? true,
|
||||
}:
|
||||
let lib = specialArgs.pkgsVersion.lib;
|
||||
in specialArgs.pkgsVersion.lib.nixosSystem {
|
||||
let
|
||||
lib = specialArgs.pkgsVersion.lib;
|
||||
in
|
||||
specialArgs.pkgsVersion.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = modules ++ defaultModules ++ lib.lists.optionals (!minimal)
|
||||
[ specialArgs.home-manager-version.nixosModules.home-manager ]
|
||||
modules =
|
||||
modules
|
||||
++ defaultModules
|
||||
++ lib.lists.optionals (!minimal) [ specialArgs.home-manager-version.nixosModules.home-manager ]
|
||||
++ lib.lists.optionals (!minimal && graphical) [
|
||||
stylix.nixosModules.stylix
|
||||
inputs.nixpkgs-xr.nixosModules.nixpkgs-xr
|
||||
./modules/graphical/stylix.nix
|
||||
#nixos-cosmic.nixosModules.default
|
||||
#./modules/graphical/cosmic.nix
|
||||
({ outputs, ... }: { stylix.image = ./tsukasa.jpg; })
|
||||
(
|
||||
{ outputs, ... }:
|
||||
{
|
||||
stylix.image = ./tsukasa.jpg;
|
||||
}
|
||||
)
|
||||
];
|
||||
specialArgs = specialArgs // { inherit inputs outputs; };
|
||||
specialArgs = specialArgs // {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
};
|
||||
mkStableServer =
|
||||
{ modules
|
||||
, specialArgs ? {
|
||||
{
|
||||
modules,
|
||||
specialArgs ? {
|
||||
pkgsVersion = nixpkgs;
|
||||
home-manager-version = home-manager;
|
||||
}
|
||||
, system ? "x86_64-linux"
|
||||
, minimal ? false
|
||||
},
|
||||
system ? "x86_64-linux",
|
||||
minimal ? false,
|
||||
}:
|
||||
let lib = specialArgs.pkgsVersion.lib;
|
||||
in specialArgs.pkgsVersion.lib.nixosSystem {
|
||||
let
|
||||
lib = specialArgs.pkgsVersion.lib;
|
||||
in
|
||||
specialArgs.pkgsVersion.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = modules
|
||||
++ [ ./modules agenix.nixosModules.default overlays ]
|
||||
++ lib.lists.optionals (!minimal)
|
||||
[ specialArgs.home-manager-version.nixosModules.home-manager ];
|
||||
specialArgs = specialArgs // { inherit inputs outputs; };
|
||||
modules =
|
||||
modules
|
||||
++ [
|
||||
./modules
|
||||
agenix.nixosModules.default
|
||||
overlays
|
||||
]
|
||||
++ lib.lists.optionals (!minimal) [ specialArgs.home-manager-version.nixosModules.home-manager ];
|
||||
specialArgs = specialArgs // {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
};
|
||||
customPackages = flake-utils.lib.eachDefaultSystem (system: {
|
||||
packages =
|
||||
import ./pkgs { pkgs = nixpkgs-unstable.legacyPackages.${system}; };
|
||||
packages = import ./pkgs { pkgs = nixpkgs-unstable.legacyPackages.${system}; };
|
||||
});
|
||||
in
|
||||
{
|
||||
@@ -140,7 +167,10 @@
|
||||
|
||||
nixosConfigurations = {
|
||||
"kop-pc" = mkHost {
|
||||
modules = [ ./users/kopatz ./systems/pc/configuration.nix ];
|
||||
modules = [
|
||||
./users/kopatz
|
||||
./systems/pc/configuration.nix
|
||||
];
|
||||
};
|
||||
"framework" = mkHost {
|
||||
modules = [
|
||||
@@ -159,11 +189,16 @@
|
||||
pkgsVersion = nixpkgs;
|
||||
home-manager-version = home-manager;
|
||||
};
|
||||
modules =
|
||||
[ disko.nixosModules.disko ./systems/adam-site/configuration.nix ];
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./systems/adam-site/configuration.nix
|
||||
];
|
||||
};
|
||||
"amd-server" = mkHost {
|
||||
modules = [ ./users/kopatz ./systems/amd-server/configuration.nix ];
|
||||
modules = [
|
||||
./users/kopatz
|
||||
./systems/amd-server/configuration.nix
|
||||
];
|
||||
};
|
||||
"amd-server-vpn-vm" = mkHost {
|
||||
modules = [
|
||||
@@ -173,8 +208,12 @@
|
||||
];
|
||||
};
|
||||
# build vm -> nixos-rebuild build-vm --flake .#vm
|
||||
"vm" =
|
||||
mkHost { modules = [ ./users/vm ./systems/vm/configuration.nix ]; };
|
||||
"vm" = mkHost {
|
||||
modules = [
|
||||
./users/vm
|
||||
./systems/vm/configuration.nix
|
||||
];
|
||||
};
|
||||
# nixos-rebuild switch --flake .#server-vm --target-host root@192.168.0.21
|
||||
"server-vm" = mkHost {
|
||||
modules = [
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
{ osConfig, config, pkgs, inputs, lib, ... }: {
|
||||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf osConfig.custom.graphical.code.enable rec {
|
||||
#home.activation.makeVSCodeConfigWritable =
|
||||
# let
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
home.file.".config/Vencord/themes/theme.css".source = ./BasicBackground.theme.css;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ lib, osConfig, pkgs, ... }:
|
||||
let enable = osConfig.custom.graphical.i3.enable || osConfig.custom.graphical.hyprland.enable;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
enable = osConfig.custom.graphical.i3.enable || osConfig.custom.graphical.hyprland.enable;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf enable {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
{ lib, pkgs, ... }: {
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
#logo = { source = ../test.sixel; type = "raw"; width = 40; height = 40; };
|
||||
display = { separator = ""; };
|
||||
display = {
|
||||
separator = "";
|
||||
};
|
||||
|
||||
# https://www.nerdfonts.com/cheat-sheet
|
||||
modules = [
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
# Firefox 83 introduced sponsored top sites
|
||||
# (https://support.mozilla.org/en-US/kb/sponsor-privacy), which are sponsored ads
|
||||
# displayed as suggestions in the URL bar.
|
||||
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" =
|
||||
false;
|
||||
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = false;
|
||||
# Disable about:config warning.
|
||||
# No details
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, lib, osConfig, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
base16 = osConfig.stylix.base16Scheme;
|
||||
@@ -232,17 +237,22 @@ user_pref("layout.word_select.eat_space_to_next_word", false);
|
||||
"ebay".metaData.hidden = true;
|
||||
|
||||
"ddg" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://duckduckgo.com";
|
||||
params = [{
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",d" ];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
@@ -254,27 +264,36 @@ user_pref("layout.word_select.eat_space_to_next_word", false);
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",n" ];
|
||||
};
|
||||
"Wikipedia" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://en.wikipedia.org/wiki/Special:Search";
|
||||
params = [{
|
||||
params = [
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",w" ];
|
||||
};
|
||||
"GitHub" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://github.com/search";
|
||||
params = [{
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",gh" ];
|
||||
};
|
||||
};
|
||||
@@ -313,8 +332,7 @@ in
|
||||
"ebay@search.mozilla.org".installation_mode = "blocked";
|
||||
"wikipedia@search.mozilla.org".installation_mode = "blocked";
|
||||
"{5cd68d86-8324-4ab2-9e0d-3afcc60bee5f}" = {
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
@@ -323,7 +341,8 @@ in
|
||||
default = {
|
||||
name = "privacy-friendly";
|
||||
extraConfig = betterfox;
|
||||
settings = merge ([
|
||||
settings = merge (
|
||||
[
|
||||
(import ./config/preferences.nix)
|
||||
(import ./config/browser-features.nix)
|
||||
(import ./config/privacy.nix)
|
||||
@@ -331,8 +350,9 @@ in
|
||||
(import ./config/tracking-webaudio.nix)
|
||||
(import ./config/security.nix)
|
||||
(import ./config/speed.nix)
|
||||
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
|
||||
[ (import ./config/nvidia-fixes.nix) ]);
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
|
||||
);
|
||||
userChrome = ''
|
||||
/* Hide tab bar. Used with Sidebery */
|
||||
#TabsToolbar {
|
||||
@@ -375,15 +395,17 @@ in
|
||||
enable-webaudio = {
|
||||
name = "privacy-but-enable-webaudio";
|
||||
id = 2;
|
||||
settings = merge ([
|
||||
settings = merge (
|
||||
[
|
||||
(import ./config/preferences.nix)
|
||||
(import ./config/browser-features.nix)
|
||||
(import ./config/privacy.nix)
|
||||
(import ./config/tracking.nix)
|
||||
(import ./config/security.nix)
|
||||
(import ./config/speed.nix)
|
||||
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
|
||||
[ (import ./config/nvidia-fixes.nix) ]);
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
|
||||
);
|
||||
userChrome = ''
|
||||
/* Hide tab bar. Used with Sidebery */
|
||||
#TabsToolbar {
|
||||
@@ -413,10 +435,13 @@ in
|
||||
visibility: collapse !important;
|
||||
}
|
||||
'';
|
||||
settings = merge
|
||||
([ (import ./config/preferences.nix) (import ./config/speed.nix) ]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable
|
||||
[ (import ./config/nvidia-fixes.nix) ]);
|
||||
settings = merge (
|
||||
[
|
||||
(import ./config/preferences.nix)
|
||||
(import ./config/speed.nix)
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
|
||||
);
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
clearurls
|
||||
darkreader
|
||||
@@ -435,8 +460,15 @@ in
|
||||
genericName = "Web Browser";
|
||||
exec = "firefox -P privacy-but-enable-webaudio %U";
|
||||
terminal = false;
|
||||
categories = [ "Application" "Network" "WebBrowser" ];
|
||||
mimeType = [ "text/html" "text/xml" ];
|
||||
categories = [
|
||||
"Application"
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
mimeType = [
|
||||
"text/html"
|
||||
"text/xml"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ lib, config, osConfig, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
merge = lib.foldr (a: b: a // b) { };
|
||||
search = {
|
||||
@@ -11,17 +17,22 @@ let
|
||||
"eBay".metaData.hidden = true;
|
||||
|
||||
"DuckDuckGo" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://duckduckgo.com";
|
||||
params = [{
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",d" ];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
@@ -33,27 +44,36 @@ let
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",n" ];
|
||||
};
|
||||
"Wikipedia" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://en.wikipedia.org/wiki/Special:Search";
|
||||
params = [{
|
||||
params = [
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",w" ];
|
||||
};
|
||||
"GitHub" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://github.com/search";
|
||||
params = [{
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = [ ",gh" ];
|
||||
};
|
||||
};
|
||||
@@ -86,15 +106,15 @@ in
|
||||
"ebay@search.mozilla.org".installation_mode = "blocked";
|
||||
"wikipedia@search.mozilla.org".installation_mode = "blocked";
|
||||
"{5cd68d86-8324-4ab2-9e0d-3afcc60bee5f}" = {
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles.default = {
|
||||
inherit search;
|
||||
settings = merge ([
|
||||
settings = merge (
|
||||
[
|
||||
(import ../firefox/config/preferences.nix)
|
||||
(import ../firefox/config/browser-features.nix)
|
||||
(import ../firefox/config/privacy.nix)
|
||||
@@ -103,8 +123,11 @@ in
|
||||
(import ../firefox/config/security.nix)
|
||||
(import ../firefox/config/speed.nix)
|
||||
(import ./floorp-config.nix)
|
||||
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
|
||||
[ (import ../firefox/config/nvidia-fixes.nix) ]);
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
|
||||
(import ../firefox/config/nvidia-fixes.nix)
|
||||
]
|
||||
);
|
||||
userChrome = ''
|
||||
/* Hide tab bar. Used with Sidebery */
|
||||
#TabsToolbar {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.file.".gitconfig" = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
isPc = osConfig.networking.hostName == "kop-pc";
|
||||
@@ -16,7 +23,13 @@ let
|
||||
hyprctl --instance 0 "dispatch exec hyprlock"
|
||||
'';
|
||||
scale = if isLaptop then "1.33333" else "1";
|
||||
monitor1 = if isPc then "DP-1" else if isLaptop then "eDP-1" else "eDP-1";
|
||||
monitor1 =
|
||||
if isPc then
|
||||
"DP-1"
|
||||
else if isLaptop then
|
||||
"eDP-1"
|
||||
else
|
||||
"eDP-1";
|
||||
monitor2 = "HDMI-A-1";
|
||||
in
|
||||
{
|
||||
@@ -38,24 +51,27 @@ in
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor =
|
||||
if isPc then [
|
||||
if isPc then
|
||||
[
|
||||
"${monitor2},1920x1080@60,0x0,${scale}"
|
||||
"${monitor1},2560x1440@144,1920x0,${scale}"
|
||||
"Unknown-1,disable"
|
||||
] else if isLaptop then [
|
||||
]
|
||||
else if isLaptop then
|
||||
[
|
||||
# laptop
|
||||
"eDP-1,2256x1504@60,0x0,${scale}"
|
||||
#"DP-3,1920x1080@60,1920x0,1"
|
||||
#",preferred,auto,1,mirror,eDP-1"
|
||||
",preferred,auto,auto"
|
||||
] else
|
||||
]
|
||||
else
|
||||
[
|
||||
# Default
|
||||
",preferred,auto,auto"
|
||||
];
|
||||
|
||||
workspace =
|
||||
lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
workspace = lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
"1,monitor:${monitor1}"
|
||||
"2,monitor:${monitor1}"
|
||||
"3,monitor:${monitor1}"
|
||||
@@ -74,8 +90,11 @@ in
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# Some default env vars.
|
||||
env =
|
||||
[ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" "GDK_SCALE,${scale}" ]
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"GDK_SCALE,${scale}"
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
@@ -93,7 +112,9 @@ in
|
||||
follow_mouse = 1;
|
||||
float_switch_override_focus = 2;
|
||||
|
||||
touchpad = { natural_scroll = true; };
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0;
|
||||
@@ -169,8 +190,7 @@ in
|
||||
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile =
|
||||
true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # you probably want this
|
||||
};
|
||||
|
||||
@@ -212,7 +232,8 @@ in
|
||||
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||
grimblast = "${pkgs.grimblast}/bin/grimblast";
|
||||
saved-screenshot-cmd = ''${grimblast} --freeze save area $OUT && notify-send "Saved screenshot to $OUT" -h string:image-path:$OUT && echo "file://$(realpath $OUT)" | wl-copy -t text/uri-list
|
||||
saved-screenshot-cmd = ''
|
||||
${grimblast} --freeze save area $OUT && notify-send "Saved screenshot to $OUT" -h string:image-path:$OUT && echo "file://$(realpath $OUT)" | wl-copy -t text/uri-list
|
||||
'';
|
||||
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
|
||||
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
||||
@@ -241,10 +262,8 @@ in
|
||||
''$mainMod, R, exec, hyprctl hyprpaper reload ,"$(ls -d ~/synced/default/dinge/Bg/* | shuf -n 1)"''
|
||||
"$mainMod, W, exec, hyprctl hyprpaper reload ,${config.stylix.image}"
|
||||
" , Print, exec, hyprshade off && ${grimblast} --freeze copy area && hyprshade auto"
|
||||
''
|
||||
$mainMod, Print, exec, export OUT=/tmp/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
|
||||
''
|
||||
Shift_L, Print, exec, export OUT=~/Pictures/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
|
||||
''$mainMod, Print, exec, export OUT=/tmp/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
|
||||
''Shift_L, Print, exec, export OUT=~/Pictures/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
|
||||
#"$mainMod, G, exec, ${peek}" # record gif
|
||||
"$mainMod, SPACE, exec, ${rofi} -modi drun -show drun -config ~/.config/rofi/rofidmenu.rasi"
|
||||
" , XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||
@@ -359,12 +378,14 @@ in
|
||||
"dex --autostart --environment Hyprland"
|
||||
"${pkgs.hypridle}/bin/hypridle &"
|
||||
#"${pkgs.dunst}/bin/dunst &"
|
||||
] ++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
]
|
||||
++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
|
||||
"[workspace 9 silent] sleep 2 && discord"
|
||||
"[workspace 9 silent] sleep 2 && discordcanary"
|
||||
"[workspace 10 silent] firefox"
|
||||
"xrandr --monitor ${monitor1} --primary"
|
||||
] ++ [
|
||||
]
|
||||
++ [
|
||||
"sleep 3 && ${pkgs.waybar}/bin/waybar &"
|
||||
"${restartPortals}"
|
||||
];
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland.videobridge;
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
let cfg = osConfig.custom.graphical.hyprland;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.hyprlock.enable = true;
|
||||
programs.hyprlock.settings = {
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
{ osConfig, pkgs, lib, ... }:
|
||||
|
||||
let cfg = osConfig.custom.graphical.hyprland;
|
||||
in {
|
||||
config = lib.mkIf cfg.enable
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".config/hypr/hyprshade.toml".source = ../../.config/hypr/hyprshade.toml;
|
||||
wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.hyprshade}/bin/hyprshade auto" ];
|
||||
systemd.user = {
|
||||
@@ -27,9 +33,14 @@ in {
|
||||
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
|
||||
Unit = { Description = "Apply screen filter on schedule"; };
|
||||
Unit = {
|
||||
Description = "Apply screen filter on schedule";
|
||||
};
|
||||
|
||||
Timer.OnCalendar = [ "*-*-* 06:00:00" "*-*-* 19:00:00" ];
|
||||
Timer.OnCalendar = [
|
||||
"*-*-* 06:00:00"
|
||||
"*-*-* 19:00:00"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
let cfg = osConfig.custom.graphical.hyprland;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
plugins = [ pkgs.hyprlandPlugins.hyprspace ];
|
||||
@@ -9,7 +18,8 @@ in {
|
||||
"$mainMod, TAB, overview:toggle"
|
||||
"$mainMod SHIFT, TAB, overview:toggle, all"
|
||||
];
|
||||
plugin = [{
|
||||
plugin = [
|
||||
{
|
||||
overview = {
|
||||
affectStrut = false;
|
||||
hideTopLayers = true;
|
||||
@@ -18,7 +28,8 @@ in {
|
||||
showNewWorkspace = true;
|
||||
disableBlur = true;
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
{ config, osConfig, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = osConfig.custom.graphical.hyprland;
|
||||
in {
|
||||
let
|
||||
cfg = osConfig.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
config =
|
||||
let
|
||||
# styles from https://github.com/khaneliman/khanelinix/blob/8375f8cfbe5bfd87565b4dc34c9d30630c17336d/modules/home/desktop/addons/waybar/default.nix
|
||||
@@ -37,25 +46,43 @@ in {
|
||||
#"hyprland/window"
|
||||
];
|
||||
modules-center = [ ];
|
||||
modules-right = [ "group/stats" "group/other" ];
|
||||
modules-right = [
|
||||
"group/stats"
|
||||
"group/other"
|
||||
];
|
||||
"group/stats" = {
|
||||
"orientation" = "horizontal";
|
||||
"modules" = [ "network" "cpu" "memory" "temperature" ]
|
||||
"modules" = [
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "custom/nvidia" ]
|
||||
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "custom/amd-gpu" ]
|
||||
++ lib.optionals osConfig.services.power-profiles-daemon.enable [ "power-profiles-daemon" ];
|
||||
};
|
||||
"group/other" = {
|
||||
"orientation" = "horizontal";
|
||||
"modules" =
|
||||
[ "tray" "backlight" "pulseaudio" "mpris" "battery" "clock" ];
|
||||
"modules" = [
|
||||
"tray"
|
||||
"backlight"
|
||||
"pulseaudio"
|
||||
"mpris"
|
||||
"battery"
|
||||
"clock"
|
||||
];
|
||||
};
|
||||
"cpu" = {
|
||||
"format" = " {usage}%";
|
||||
"tooltip" = true;
|
||||
};
|
||||
"disk" = { "format" = " {percentage_used}%"; };
|
||||
"memory" = { "format" = " {}%"; };
|
||||
"disk" = {
|
||||
"format" = " {percentage_used}%";
|
||||
};
|
||||
"memory" = {
|
||||
"format" = " {}%";
|
||||
};
|
||||
|
||||
"idle_inhibitor" = {
|
||||
"format" = "{icon} ";
|
||||
@@ -95,7 +122,10 @@ in {
|
||||
"phone" = "";
|
||||
"portable" = "";
|
||||
"car" = "";
|
||||
"default" = [ "" "" ];
|
||||
"default" = [
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"scroll-step" = 1;
|
||||
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
@@ -110,18 +140,30 @@ in {
|
||||
"temperature".critical-threshold = 80;
|
||||
"temperature".format = "{temperatureC}°C ";
|
||||
"temperature".interval = 5;
|
||||
"temperature".hwmon-path =
|
||||
lib.mkIf (osConfig.networking.hostName == "framework")
|
||||
"/sys/class/hwmon/hwmon6/temp1_input";
|
||||
"temperature".hwmon-path = lib.mkIf (
|
||||
osConfig.networking.hostName == "framework"
|
||||
) "/sys/class/hwmon/hwmon6/temp1_input";
|
||||
"backlight".format = "{percent}% {icon}";
|
||||
"backlight".states = [ 0 50 ];
|
||||
"backlight".format-icons = [ "" "" ];
|
||||
"backlight".states = [
|
||||
0
|
||||
50
|
||||
];
|
||||
"backlight".format-icons = [
|
||||
""
|
||||
""
|
||||
];
|
||||
"battery".states.good = 95;
|
||||
"battery".interval = 5;
|
||||
"battery".states.warning = 30;
|
||||
"battery".states.critical = 15;
|
||||
"battery".format = "{capacity}% / {power:.2}W {icon}";
|
||||
"battery".format-icons = [ "" "" "" "" "" ];
|
||||
"battery".format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
"clock" = {
|
||||
format = "{:%F %H:%M}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
@@ -148,7 +190,9 @@ in {
|
||||
"default" = "▶";
|
||||
"mpv" = "🎵";
|
||||
};
|
||||
"status-icons" = { "paused" = "⏸"; };
|
||||
"status-icons" = {
|
||||
"paused" = "⏸";
|
||||
};
|
||||
};
|
||||
"power-profiles-daemon" = {
|
||||
"format" = "{icon}";
|
||||
@@ -217,8 +261,7 @@ in {
|
||||
"class<firefox-beta>" = "";
|
||||
"class<firefox-developer-edition>" = "";
|
||||
"class<firefox> title<.*github.*>" = "";
|
||||
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" =
|
||||
"";
|
||||
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" = "";
|
||||
"class<kitty>" = "";
|
||||
"class<org.wezfurlong.wezterm>" = "";
|
||||
"class<mediainfo-gui>" = "";
|
||||
@@ -247,8 +290,7 @@ in {
|
||||
};
|
||||
};
|
||||
};
|
||||
style =
|
||||
"${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
|
||||
style = "${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ osConfig, pkgs, config, lib, ... }:
|
||||
let cfg = osConfig.custom.graphical.i3;
|
||||
in {
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.i3;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".config/i3" = {
|
||||
recursive = true;
|
||||
@@ -55,7 +63,9 @@ in {
|
||||
module-margin = 1;
|
||||
modules-left = "i3 xwindow";
|
||||
modules-center = "";
|
||||
modules-right = [ "music network memory cpu cpu-wattage cpu-temp" ]
|
||||
modules-right = [
|
||||
"music network memory cpu cpu-wattage cpu-temp"
|
||||
]
|
||||
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "nvidia-gpu" ]
|
||||
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "amd-gpu" ]
|
||||
++ [ "pulseaudio date tray" ];
|
||||
@@ -69,8 +79,10 @@ in {
|
||||
# override-redirect = true;
|
||||
};
|
||||
"module/i3" =
|
||||
let padding = 2;
|
||||
in {
|
||||
let
|
||||
padding = 2;
|
||||
in
|
||||
{
|
||||
type = "internal/i3";
|
||||
pin-workspaces = true;
|
||||
show-urgent = true;
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{
|
||||
plugins.nvim-autopairs = { enable = true; };
|
||||
plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
{ plugins.barbar = { enable = true; }; } # tab bar up top
|
||||
{
|
||||
plugins.barbar = {
|
||||
enable = true;
|
||||
};
|
||||
} # tab bar up top
|
||||
|
||||
@@ -10,15 +10,25 @@
|
||||
};
|
||||
};
|
||||
|
||||
cmp-buffer = { enable = true; };
|
||||
cmp-buffer = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp-emoji = { enable = true; };
|
||||
cmp-emoji = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp-nvim-lsp = { enable = true; };
|
||||
cmp-nvim-lsp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp-path = { enable = true; };
|
||||
cmp-path = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp_luasnip = { enable = true; };
|
||||
cmp_luasnip = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
cmp = {
|
||||
enable = true;
|
||||
@@ -48,11 +58,29 @@
|
||||
completion = {
|
||||
scrollbar = true;
|
||||
sidePadding = 0;
|
||||
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
|
||||
border = [
|
||||
"╭"
|
||||
"─"
|
||||
"╮"
|
||||
"│"
|
||||
"╯"
|
||||
"─"
|
||||
"╰"
|
||||
"│"
|
||||
];
|
||||
};
|
||||
|
||||
settings.documentation = {
|
||||
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
|
||||
border = [
|
||||
"╭"
|
||||
"─"
|
||||
"╮"
|
||||
"│"
|
||||
"╯"
|
||||
"─"
|
||||
"╰"
|
||||
"│"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -65,8 +93,7 @@
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<CR>" =
|
||||
"cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false })";
|
||||
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false })";
|
||||
"<Tab>" =
|
||||
# lua
|
||||
''
|
||||
@@ -96,7 +123,11 @@
|
||||
};
|
||||
|
||||
formatting = {
|
||||
fields = [ "abbr" "kind" "menu" ];
|
||||
fields = [
|
||||
"abbr"
|
||||
"kind"
|
||||
"menu"
|
||||
];
|
||||
format =
|
||||
# lua
|
||||
''
|
||||
|
||||
@@ -1,15 +1,25 @@
|
||||
{ lib, pkgs, osConfig, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
# https://nix-community.github.io/nixvim/NeovimOptions/index.html
|
||||
let
|
||||
cfg = osConfig.custom.nixvimPlugins;
|
||||
args = { inherit lib pkgs; };
|
||||
|
||||
importFile = file:
|
||||
let config = import file;
|
||||
in if builtins.isFunction config then config args else config;
|
||||
configs = map importFile ([
|
||||
importFile =
|
||||
file:
|
||||
let
|
||||
config = import file;
|
||||
in
|
||||
if builtins.isFunction config then config args else config;
|
||||
configs = map importFile (
|
||||
[
|
||||
./config.nix
|
||||
] ++ lib.optionals cfg [
|
||||
]
|
||||
++ lib.optionals cfg [
|
||||
./auto-pairs.nix
|
||||
./autosave.nix
|
||||
./blankline.nix
|
||||
@@ -36,12 +46,14 @@ let
|
||||
./colorizer.nix
|
||||
./surround.nix
|
||||
./vimwiki.nix
|
||||
]);
|
||||
merged =
|
||||
builtins.foldl' (acc: elem: lib.recursiveUpdate acc elem) { } configs;
|
||||
]
|
||||
);
|
||||
merged = builtins.foldl' (acc: elem: lib.recursiveUpdate acc elem) { } configs;
|
||||
in
|
||||
{
|
||||
home.sessionVariables = { EDITOR = "nvim"; };
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
home.packages = with pkgs; [ nixfmt-rfc-style ]; # nixd config option to set nixpkgs-fmt should work, but it doesn't
|
||||
programs.nixvim = merged;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
plugins = {
|
||||
diffview = { enable = true; };
|
||||
lazygit = { enable = true; };
|
||||
diffview = {
|
||||
enable = true;
|
||||
};
|
||||
lazygit = {
|
||||
enable = true;
|
||||
};
|
||||
#neogit = {
|
||||
# enable = true;
|
||||
# settings.integrations = { diffview = true; };
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
{ plugins.lightline = { enable = true; }; } #status line at the bottom
|
||||
{
|
||||
plugins.lightline = {
|
||||
enable = true;
|
||||
};
|
||||
} # status line at the bottom
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
cssls.enable = true;
|
||||
gopls.enable = true;
|
||||
clojure_lsp.enable = true;
|
||||
qmlls =
|
||||
{
|
||||
qmlls = {
|
||||
enable = true;
|
||||
settings.cmd = [ "qmlls" "-E" ];
|
||||
settings.cmd = [
|
||||
"qmlls"
|
||||
"-E"
|
||||
];
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
plugins.render-markdown = {
|
||||
enable = true;
|
||||
settings = {
|
||||
file_types = [ "markdown" "vimwiki"];
|
||||
file_types = [
|
||||
"markdown"
|
||||
"vimwiki"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# default keybinds
|
||||
# window = {
|
||||
# mappings = {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{
|
||||
plugins = { refactoring.enable = true; };
|
||||
plugins = {
|
||||
refactoring.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
options.desc = "List buffers";
|
||||
};
|
||||
};
|
||||
extensions.fzf-native = { enable = true; };
|
||||
extensions.fzf-native = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,5 +2,7 @@
|
||||
opts = {
|
||||
timeoutlen = 500;
|
||||
};
|
||||
plugins.which-key = { enable = true; };
|
||||
plugins.which-key = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
plugins.wilder = {
|
||||
enable = true;
|
||||
modes = [ ":" "/" "?" ];
|
||||
modes = [
|
||||
":"
|
||||
"/"
|
||||
"?"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.file.".config/nvim" = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
{ osConfig, pkgs, lib, inputs, ... }:
|
||||
let cfg = osConfig.custom.services.opensnitch;
|
||||
in { config = lib.mkIf cfg.enable { services.opensnitch-ui.enable = true; }; }
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.services.opensnitch;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable { services.opensnitch-ui.enable = true; };
|
||||
}
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with config.stylix.fonts;
|
||||
let
|
||||
mkLiteral = name: "${name}";
|
||||
mkRgba = opacity: color:
|
||||
mkRgba =
|
||||
opacity: color:
|
||||
let
|
||||
c = config.lib.stylix.colors;
|
||||
r = c."${color}-rgb-r";
|
||||
@@ -11,8 +18,7 @@ let
|
||||
in
|
||||
"rgba ( ${r}, ${g}, ${b}, ${opacity} % )";
|
||||
mkRgb = mkRgba "100";
|
||||
rofiOpacity =
|
||||
builtins.toString (builtins.ceil (config.stylix.opacity.popups * 100));
|
||||
rofiOpacity = builtins.toString (builtins.ceil (config.stylix.opacity.popups * 100));
|
||||
rofiTheme = {
|
||||
background = mkRgba rofiOpacity "base00";
|
||||
lightbg = mkRgba rofiOpacity "base01";
|
||||
@@ -68,7 +74,9 @@ in
|
||||
enable = true;
|
||||
text = ''
|
||||
* {
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (name: value: "${name}: ${value};") rofiTheme)}
|
||||
${builtins.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (name: value: "${name}: ${value};") rofiTheme
|
||||
)}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ osConfig, pkgs, config, lib, ... }:
|
||||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.custom.graphical.stylix;
|
||||
base16 = config.stylix.base16Scheme;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home = {
|
||||
pointerCursor = {
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
{ pkgs, config, osConfig, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf osConfig.custom.hardware.vr.enable
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.monado}/share/openxr/1/openxr_monado.json";
|
||||
config = lib.mkIf osConfig.custom.hardware.vr.enable {
|
||||
xdg.configFile."openxr/1/active_runtime.json".source =
|
||||
"${pkgs.monado}/share/openxr/1/openxr_monado.json";
|
||||
xdg.configFile."openvr/openvrpaths.vrpath".text = ''
|
||||
{
|
||||
"config" :
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
@@ -18,11 +24,9 @@
|
||||
};
|
||||
shellAliases = {
|
||||
# TODO: gifsicle -O3 --lossy=30 noita-20240328-191617-1612416266-00316616.gif -o noita-20240328-191617-1612416266.gif
|
||||
backupNoita =
|
||||
"cp -r ~/.local/share/Steam/steamapps/compatdata/881100/pfx/drive_c/users/steamuser/AppData/LocalLow/Nolla_Games_Noita/* ~/synced/default/dont_remotebackup/noita_save";
|
||||
backupNoita = "cp -r ~/.local/share/Steam/steamapps/compatdata/881100/pfx/drive_c/users/steamuser/AppData/LocalLow/Nolla_Games_Noita/* ~/synced/default/dont_remotebackup/noita_save";
|
||||
checkTime = "(cd ~/synced/work_drive/TS && nix run)";
|
||||
checkWaylandWindowsKDE =
|
||||
"qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole";
|
||||
checkWaylandWindowsKDE = "qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole";
|
||||
collectGarbage = "nh clean all";
|
||||
edit = "cd ~/projects/github/nix-config && nvim .";
|
||||
ll = "ls -l";
|
||||
@@ -36,14 +40,10 @@
|
||||
dev = "nix-shell --run zsh";
|
||||
rmt = "trash put";
|
||||
bat = "bat -P --style plain";
|
||||
cdf =
|
||||
"cd $(fd --type d --exclude node_modules --exclude bin --exclude target --exclude .cache . | fzf)";
|
||||
cpu_performance =
|
||||
"echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_powersave =
|
||||
"echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_schedutil =
|
||||
"echo schedutil | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cdf = "cd $(fd --type d --exclude node_modules --exclude bin --exclude target --exclude .cache . | fzf)";
|
||||
cpu_performance = "echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_powersave = "echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_schedutil = "echo schedutil | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
|
||||
cpu_freq = ''watch -n 1 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""'';
|
||||
gpu_monitor = "nvidia-smi dmon -s puct";
|
||||
nix-shell = "nix-shell --command zsh";
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
{ pkgs, modulesPath, config, lib, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
modulesPath,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-graphical-gnome.nix"
|
||||
];
|
||||
@@ -15,8 +22,7 @@
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
boot.kernelParams =
|
||||
[ "nvidia-drm.fbdev=1" ];
|
||||
boot.kernelParams = [ "nvidia-drm.fbdev=1" ];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
extensions = with pkgs.postgresql14Packages; [ pg_libversion ];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
typst
|
||||
];
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.audio;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.awesome;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.awesome;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.awesome = {
|
||||
enable = lib.mkEnableOption "Enables awesome";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.basics;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.basics;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.basics = {
|
||||
enable = mkEnableOption "Enables basics";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.code.android;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.code.android;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.code.android = {
|
||||
enable = mkEnableOption "Enables code";
|
||||
};
|
||||
@@ -10,6 +18,9 @@ in {
|
||||
documentation.dev.enable = true;
|
||||
programs.adb.enable = true;
|
||||
environment.systemPackages = with pkgs; [ android-studio ];
|
||||
users.users.${config.mainUser.name}.extraGroups = [ "adbusers" "kvm" ];
|
||||
users.users.${config.mainUser.name}.extraGroups = [
|
||||
"adbusers"
|
||||
"kvm"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.code;
|
||||
@@ -12,7 +18,9 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
documentation.dev.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
man-pages
|
||||
stable.jetbrains.idea-ultimate
|
||||
typescript
|
||||
@@ -20,9 +28,11 @@ in
|
||||
nodejs_22 # needed for tabby extension
|
||||
python3
|
||||
gcc
|
||||
] ++ lib.optionals cfg.rider [
|
||||
]
|
||||
++ lib.optionals cfg.rider [
|
||||
pkgs.jetbrains.rider
|
||||
] ++ lib.optionals cfg.clion [
|
||||
]
|
||||
++ lib.optionals cfg.clion [
|
||||
pkgs.jetbrains.clion
|
||||
];
|
||||
|
||||
@@ -31,4 +41,3 @@ in
|
||||
#};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.cosmic;
|
||||
in
|
||||
@@ -13,7 +19,7 @@ in
|
||||
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
|
||||
};
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = if (config.custom.graphical.sddm.enable == false) then true else false;
|
||||
services.displayManager.cosmic-greeter.enable =
|
||||
if (config.custom.graphical.sddm.enable == false) then true else false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
imports = [
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.emulators;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.games;
|
||||
@@ -22,12 +27,13 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall =
|
||||
true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall =
|
||||
true; # Open ports in the firewall for Source Dedicated Server
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
gamescopeSession.enable = true;
|
||||
extraCompatPackages = with pkgs; [ proton-ge-bin steamtinkerlaunch ];
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
steamtinkerlaunch
|
||||
];
|
||||
};
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
@@ -37,8 +43,15 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ mangohud lutris ]
|
||||
++ optionals cfg.enablePreinstalled (with pkgs; [
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
mangohud
|
||||
lutris
|
||||
]
|
||||
++ optionals cfg.enablePreinstalled (
|
||||
with pkgs;
|
||||
[
|
||||
#taisei
|
||||
#osu-lazer-bin
|
||||
wineWowPackages.unstableFull
|
||||
@@ -49,7 +62,9 @@ in
|
||||
tetrio-desktop
|
||||
beyond-all-reason
|
||||
#libs
|
||||
]) ++ optionals cfg.enableVr (with pkgs; [ bs-manager ]);
|
||||
]
|
||||
)
|
||||
++ optionals cfg.enableVr (with pkgs; [ bs-manager ]);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
{ config, lib, ... }:
|
||||
let cfg = config.custom.graphical.gnome;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.gnome;
|
||||
in
|
||||
{
|
||||
# doesnt work for me.. nothing changes
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.dconf.profiles.user.databases = [{
|
||||
programs.dconf.profiles.user.databases = [
|
||||
{
|
||||
lockAll = true;
|
||||
settings = with lib.gvariant; {
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
@@ -16,22 +19,23 @@ in {
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
resize-with-right-button = true;
|
||||
};
|
||||
"org/gnome/desktop/sound" = { event-sounds = false; };
|
||||
"org/gnome/desktop/peripherals/mouse" = { accel-profile = "flat"; };
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" =
|
||||
{
|
||||
"org/gnome/desktop/sound" = {
|
||||
event-sounds = false;
|
||||
};
|
||||
"org/gnome/desktop/peripherals/mouse" = {
|
||||
accel-profile = "flat";
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
name = "nautilus";
|
||||
command = "nautilus";
|
||||
binding = "<Super>e";
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" =
|
||||
{
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||
name = "kitty super";
|
||||
command = "kitty";
|
||||
binding = "<Super>q";
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" =
|
||||
{
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
|
||||
binding = "<Alt>space";
|
||||
command = "rofi -show combi";
|
||||
name = "Open Rofi";
|
||||
@@ -71,9 +75,14 @@ in {
|
||||
#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" ];
|
||||
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" ];
|
||||
@@ -109,6 +118,7 @@ in {
|
||||
switch-to-application-9 = mkEmptyArray type.string;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.gnome;
|
||||
in {
|
||||
options.custom.graphical.gnome = { enable = mkEnableOption "Enables gnome"; };
|
||||
let
|
||||
cfg = config.custom.graphical.gnome;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.gnome = {
|
||||
enable = mkEnableOption "Enables gnome";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver = {
|
||||
xkb.layout = config.mainUser.layout;
|
||||
xkb.variant = config.mainUser.variant;
|
||||
enable = true;
|
||||
displayManager.gdm.enable =
|
||||
lib.mkIf (!config.custom.graphical.sddm.enable) true;
|
||||
displayManager.gdm.enable = lib.mkIf (!config.custom.graphical.sddm.enable) true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
@@ -21,7 +29,9 @@ in {
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.gnome.excludePackages = (with pkgs; [
|
||||
environment.gnome.excludePackages = (
|
||||
with pkgs;
|
||||
[
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
cheese
|
||||
@@ -37,7 +47,8 @@ in {
|
||||
iagno # go game
|
||||
hitori # sudoku game
|
||||
atomix # puzzle game
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wmctrl
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
let cfg = config.custom.graphical.hyprland;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.hyprland;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.hyprland = {
|
||||
enable = lib.mkEnableOption "Enables hyprland";
|
||||
};
|
||||
@@ -14,8 +22,7 @@ in {
|
||||
xkb.variant = config.mainUser.variant;
|
||||
enable = true;
|
||||
};
|
||||
services.displayManager.sddm.enable =
|
||||
!config.services.xserver.displayManager.gdm.enable;
|
||||
services.displayManager.sddm.enable = !config.services.xserver.displayManager.gdm.enable;
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
@@ -30,7 +37,9 @@ in {
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
programs.hyprland = { enable = true; };
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
security.pam.services.hyprlock = { };
|
||||
systemd = {
|
||||
@@ -41,8 +50,7 @@ in {
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
@@ -73,8 +81,7 @@ in {
|
||||
#xwayland
|
||||
(writeShellScriptBin "copyfiletoclip" ''
|
||||
echo "file://$(realpath $1)" | wl-copy -t text/uri-list
|
||||
''
|
||||
)
|
||||
'')
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.i3;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.i3;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.i3.enable = lib.mkOption {
|
||||
@@ -24,14 +31,18 @@ in {
|
||||
};
|
||||
|
||||
services = {
|
||||
displayManager = { defaultSession = "none+i3"; };
|
||||
displayManager = {
|
||||
defaultSession = "none+i3";
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
xkb.layout = config.mainUser.layout;
|
||||
xkb.variant = config.mainUser.variant;
|
||||
desktopManager = { xterm.enable = false; };
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
};
|
||||
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
@@ -53,8 +64,7 @@ in {
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.ime;
|
||||
in {
|
||||
options.custom.graphical.ime = { enable = mkEnableOption "Enables ime"; };
|
||||
let
|
||||
cfg = config.custom.graphical.ime;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.ime = {
|
||||
enable = mkEnableOption "Enables ime";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
i18n.inputMethod = {
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.lightdm;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.lightdm;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.lightdm.enable = lib.mkOption {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.lxqt;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let cfg = config.custom.graphical.nightlight;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.nightlight;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.nightlight = {
|
||||
enable = lib.mkEnableOption "Enables nightlight";
|
||||
};
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.niri;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.niri;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.niri.enable = lib.mkOption {
|
||||
@@ -11,7 +18,9 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri = { enable = true; };
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ xwayland-satellite ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.noise-supression;
|
||||
in
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.obs;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.openrgb;
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.plasma;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.plasma;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.plasma = {
|
||||
enable = mkEnableOption "Enables plasma";
|
||||
};
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.sddm;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.sddm;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.sddm.enable = lib.mkOption {
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.graphical.shared;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.graphical.shared;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.shared = {
|
||||
enable = mkEnableOption "Enables shared";
|
||||
};
|
||||
@@ -39,13 +47,18 @@ in {
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 53317 ]; # localsend
|
||||
allowedUDPPorts = [ 1194 53317 ]; # openvpn, localsend
|
||||
allowedTCPPortRanges = [{
|
||||
allowedUDPPorts = [
|
||||
1194
|
||||
53317
|
||||
]; # openvpn, localsend
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
];
|
||||
allowedUDPPortRanges = [{
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
let cfg = config.custom.graphical.stylix;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.stylix;
|
||||
in
|
||||
{
|
||||
options.custom.graphical.stylix = with lib; {
|
||||
enable = mkEnableOption "Enables stylix";
|
||||
image = mkOption {
|
||||
@@ -11,7 +18,13 @@ in {
|
||||
'';
|
||||
};
|
||||
base16Scheme = mkOption {
|
||||
type = with lib.types; nullOr (oneOf [ path lines attrs ]);
|
||||
type =
|
||||
with lib.types;
|
||||
nullOr (oneOf [
|
||||
path
|
||||
lines
|
||||
attrs
|
||||
]);
|
||||
default = null;
|
||||
description = ''
|
||||
The base16 scheme to use.
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.graphical.sway;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.graphical.sway;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
custom.graphical.sway.enable = lib.mkOption {
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.graphical.xfce;
|
||||
|
||||
@@ -1,33 +1,53 @@
|
||||
{ lib, config, pkgs, inputs, pkgsVersion, ... }:
|
||||
let cfg = config.custom.hardware.amd-gpu;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
pkgsVersion,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.amd-gpu;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.amd-gpu = {
|
||||
enable = lib.mkEnableOption "Enables amd gpus";
|
||||
overdrive = lib.mkEnableOption "Enables overdrive";
|
||||
rocm.enable = lib.mkEnableOption "Enables rocm";
|
||||
};
|
||||
|
||||
config =
|
||||
lib.mkIf cfg.enable {
|
||||
boot.kernelParams = lib.mkIf cfg.overdrive
|
||||
[ "amdgpu.ppfeaturemask=0xfff7ffff" "split_lock_detect=off" ];
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.kernelParams = lib.mkIf cfg.overdrive [
|
||||
"amdgpu.ppfeaturemask=0xfff7ffff"
|
||||
"split_lock_detect=off"
|
||||
];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = lib.mkIf cfg.rocm.enable (with pkgs; [ rocmPackages.clr rocmPackages.clr.icd ]);
|
||||
extraPackages = lib.mkIf cfg.rocm.enable (
|
||||
with pkgs;
|
||||
[
|
||||
rocmPackages.clr
|
||||
rocmPackages.clr.icd
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
hardware.amdgpu.initrd.enable = lib.mkDefault true;
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
# controller (overclock, undervolt, fan curves)
|
||||
environment.systemPackages = with pkgs; [
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
nvtopPackages.amd
|
||||
amdgpu_top
|
||||
] ++ lib.optionals cfg.rocm.enable [
|
||||
]
|
||||
++ lib.optionals cfg.rocm.enable [
|
||||
clinfo
|
||||
rocmPackages.rocminfo
|
||||
] ++ lib.optionals cfg.overdrive [
|
||||
]
|
||||
++ lib.optionals cfg.overdrive [
|
||||
lact
|
||||
];
|
||||
systemd = {
|
||||
@@ -45,8 +65,7 @@ in {
|
||||
];
|
||||
};
|
||||
in
|
||||
lib.mkIf cfg.rocm.enable
|
||||
[
|
||||
lib.mkIf cfg.rocm.enable [
|
||||
"L+ /opt/rocm - - - - ${rocmEnv}"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.hardware.android;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.android;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.android = {
|
||||
enable = lib.mkEnableOption "Enables android phone support";
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, config, ... }: {
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./amd-gpu.nix
|
||||
./android.nix
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.custom.hardware.fingerprint;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.fingerprint;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.fingerprint = {
|
||||
enable = lib.mkEnableOption "Enables fingerprint sensor support";
|
||||
};
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
services.fwupd.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
{ lib, config, pkgs, inputs, pkgsVersion, ... }:
|
||||
let cfg = config.custom.hardware.nvidia;
|
||||
in {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
pkgsVersion,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.nvidia;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.nvidia = {
|
||||
enable = lib.mkEnableOption "Enables nvidia gpus";
|
||||
powerLimit = {
|
||||
@@ -32,13 +41,16 @@ in {
|
||||
let
|
||||
# the option was renamed in unstable
|
||||
nvidiaOption =
|
||||
if (pkgsVersion == inputs.nixpkgs-unstable) then {
|
||||
if (pkgsVersion == inputs.nixpkgs-unstable) then
|
||||
{
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
@@ -47,9 +59,12 @@ in {
|
||||
};
|
||||
nvidia_oc = "${pkgs.nvidia_oc}/bin/nvidia_oc";
|
||||
in
|
||||
lib.mkIf cfg.enable (lib.recursiveUpdate nvidiaOption {
|
||||
boot.kernelParams =
|
||||
[ "nvidia-drm.fbdev=1" "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
|
||||
lib.mkIf cfg.enable (
|
||||
lib.recursiveUpdate nvidiaOption {
|
||||
boot.kernelParams = [
|
||||
"nvidia-drm.fbdev=1"
|
||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||
];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.deviceSection = ''
|
||||
Option "Coolbits" "24"
|
||||
@@ -103,22 +118,17 @@ in {
|
||||
};
|
||||
|
||||
systemd.services.nvidiaSetPower = lib.mkIf cfg.powerLimit.enable {
|
||||
description =
|
||||
"Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
|
||||
script = "/run/current-system/sw/bin/nvidia-smi -pl=${
|
||||
toString cfg.powerLimit.wattage
|
||||
}";
|
||||
description = "Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
|
||||
script = "/run/current-system/sw/bin/nvidia-smi -pl=${toString cfg.powerLimit.wattage}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
systemd.services.nvidiaSetClocks = lib.mkIf cfg.clock.enable {
|
||||
description = "Set GPU clocks";
|
||||
script =
|
||||
"${nvidia_oc} set -i 0 --min-clock ${toString cfg.clock.min} --max-clock ${
|
||||
toString cfg.clock.max
|
||||
} --freq-offset ${toString cfg.clock.offset}";
|
||||
script = "${nvidia_oc} set -i 0 --min-clock ${toString cfg.clock.min} --max-clock ${toString cfg.clock.max} --freq-offset ${toString cfg.clock.offset}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
};
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
boot = {
|
||||
extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||
|
||||
@@ -16,4 +16,3 @@ in
|
||||
hardware.system76.enableAll = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
services.fstrim.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.hardware.tablet;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.hardware.tablet;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.tablet = {
|
||||
enable = mkEnableOption "Enables tablet";
|
||||
};
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.hardware.tpm;
|
||||
in {
|
||||
options.custom.hardware.tpm = { enable = mkEnableOption "Enables tpm"; };
|
||||
let
|
||||
cfg = config.custom.hardware.tpm;
|
||||
in
|
||||
{
|
||||
options.custom.hardware.tpm = {
|
||||
enable = mkEnableOption "Enables tpm";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.hardware.vfio;
|
||||
@@ -15,9 +20,24 @@ in
|
||||
|
||||
config = mkIf (cfg.enable && config.virtualisation.libvirtd.enable) {
|
||||
boot = {
|
||||
kernelModules = [ "vfio" "vfio_iommu_type1" "vfio_pci" ];
|
||||
kernelParams = [ "amd_iommu=on" "iommu=pt" ] ++ (if cfg.stub_pci != [] then [ "vfio-pci.ids=${concatStringsSep "," cfg.stub_pci}" ] else []);
|
||||
blacklistedKernelModules = [ "nouveau" "nvidia" "nvidiafb" "nvidia-drm" "nvidia-uvm" "nvidia-modeset" ];
|
||||
kernelModules = [
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
"vfio_pci"
|
||||
];
|
||||
kernelParams = [
|
||||
"amd_iommu=on"
|
||||
"iommu=pt"
|
||||
]
|
||||
++ (if cfg.stub_pci != [ ] then [ "vfio-pci.ids=${concatStringsSep "," cfg.stub_pci}" ] else [ ]);
|
||||
blacklistedKernelModules = [
|
||||
"nouveau"
|
||||
"nvidia"
|
||||
"nvidiafb"
|
||||
"nvidia-drm"
|
||||
"nvidia-uvm"
|
||||
"nvidia-modeset"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.hardware.vr;
|
||||
# https://wiki.nixos.org/wiki/VR#Patching_AMDGPU_to_allow_high_priority_queues
|
||||
amdgpu =
|
||||
{ pkgs
|
||||
, lib
|
||||
, kernel ? pkgs.linuxPackages_latest.kernel
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
kernel ? pkgs.linuxPackages_latest.kernel,
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "amdgpu-kernel-module";
|
||||
inherit (kernel) src version postPatch nativeBuildInputs;
|
||||
inherit (kernel)
|
||||
src
|
||||
version
|
||||
postPatch
|
||||
nativeBuildInputs
|
||||
;
|
||||
|
||||
kernel_dev = kernel.dev;
|
||||
kernelVersion = kernel.modDirVersion;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.hardware.wooting;
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.misc.backup;
|
||||
@@ -22,7 +28,15 @@ in
|
||||
};
|
||||
excludePaths = lib.mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "**/Cache" "**/.cache" "**/__pycache__" "**/node_modules" "**/venv" "*.o" "*.out" ];
|
||||
default = [
|
||||
"**/Cache"
|
||||
"**/.cache"
|
||||
"**/__pycache__"
|
||||
"**/node_modules"
|
||||
"**/venv"
|
||||
"*.o"
|
||||
"*.out"
|
||||
];
|
||||
description = "paths to exclude from the backup";
|
||||
};
|
||||
excludePathsRemote = lib.mkOption {
|
||||
@@ -39,17 +53,29 @@ in
|
||||
text = ''
|
||||
# Check how much space is used by the backup paths
|
||||
echo "Checking storage space (small) with excluded paths..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)} ${builtins.concatStringsSep " " cfg.small}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)
|
||||
} ${builtins.concatStringsSep " " cfg.small}
|
||||
echo "Checking storage space (small) with excluded paths (remote)..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)} ${builtins.concatStringsSep " " cfg.small}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)
|
||||
} ${builtins.concatStringsSep " " cfg.small}
|
||||
echo "Checking storage space (medium) with excluded paths..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)} ${builtins.concatStringsSep " " cfg.medium}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)
|
||||
} ${builtins.concatStringsSep " " cfg.medium}
|
||||
echo "Checking storage space (medium) with excluded paths (remote)..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)} ${builtins.concatStringsSep " " cfg.medium}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)
|
||||
} ${builtins.concatStringsSep " " cfg.medium}
|
||||
echo "Checking storage space (full) with excluded paths..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)} ${builtins.concatStringsSep " " cfg.large}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePaths)
|
||||
} ${builtins.concatStringsSep " " cfg.large}
|
||||
echo "Checking storage space (full) with excluded paths (remote)..."
|
||||
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)} ${builtins.concatStringsSep " " cfg.large}
|
||||
du -sch ${
|
||||
builtins.concatStringsSep " " (map (x: "--exclude=" + x) cfg.excludePathsRemote)
|
||||
} ${builtins.concatStringsSep " " cfg.large}
|
||||
'';
|
||||
};
|
||||
cli = "${pkgs.internxt-cli}/bin/internxt";
|
||||
@@ -94,7 +120,11 @@ in
|
||||
};
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
environment.systemPackages = [ checkStorageSpace startInternxtWebdav stopInternxtWebdav ];
|
||||
environment.systemPackages = [
|
||||
checkStorageSpace
|
||||
startInternxtWebdav
|
||||
stopInternxtWebdav
|
||||
];
|
||||
age.secrets.restic-pw = {
|
||||
file = ../../secrets/restic-pw.age;
|
||||
};
|
||||
@@ -126,7 +156,12 @@ in
|
||||
OnCalendar = "04:00";
|
||||
Persistent = true;
|
||||
};
|
||||
pruneOpts = [ "--keep-daily 7" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
repository = "/1tbssd/restic";
|
||||
};
|
||||
#localbackup-1tb = {
|
||||
@@ -148,7 +183,12 @@ in
|
||||
paths = cfg.medium;
|
||||
rcloneConfigFile = config.age.secrets.restic-gdrive.path;
|
||||
repository = "rclone:it-experts:backup";
|
||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||
pruneOpts = [
|
||||
"--keep-daily 5"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 02:00:00";
|
||||
Persistent = true;
|
||||
@@ -160,14 +200,23 @@ in
|
||||
environmentFile = config.age.secrets.restic-s3.path;
|
||||
exclude = cfg.excludePathsRemote;
|
||||
paths = cfg.small;
|
||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||
pruneOpts = [
|
||||
"--keep-daily 5"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 02:00:00";
|
||||
Persistent = true;
|
||||
};
|
||||
repository = "s3:s3.us-west-002.backblazeb2.com/kop-bucket";
|
||||
};
|
||||
remotebackup-large = let cli = "${pkgs.internxt-cli}/bin/internxt"; in {
|
||||
remotebackup-large =
|
||||
let
|
||||
cli = "${pkgs.internxt-cli}/bin/internxt";
|
||||
in
|
||||
{
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets.restic-pw.path;
|
||||
environmentFile = config.age.secrets.restic-internxt.path;
|
||||
@@ -179,7 +228,12 @@ in
|
||||
backupCleanupCommand = ''
|
||||
${stopInternxtWebdav}
|
||||
'';
|
||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||
pruneOpts = [
|
||||
"--keep-daily 5"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
"--keep-yearly 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 02:00:00";
|
||||
Persistent = true;
|
||||
@@ -188,7 +242,9 @@ in
|
||||
type = "webdav";
|
||||
url = "https://127.0.0.1:3005";
|
||||
};
|
||||
rcloneOptions = { "no-check-certificate" = true; };
|
||||
rcloneOptions = {
|
||||
"no-check-certificate" = true;
|
||||
};
|
||||
repository = "rclone:internxt:backup";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
services.btrfs.autoScrub.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.cli-tools;
|
||||
in {
|
||||
options.custom.cli-tools = { enable = mkEnableOption "Enables cli-tools"; };
|
||||
let
|
||||
cfg = config.custom.cli-tools;
|
||||
in
|
||||
{
|
||||
options.custom.cli-tools = {
|
||||
enable = mkEnableOption "Enables cli-tools";
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
@@ -48,10 +58,7 @@ in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
getTotalPowerUsed
|
||||
watchCurrentPowerUsed
|
||||
(if lib.versionOlder lib.version "25.05" then
|
||||
wget
|
||||
else
|
||||
powerjoular) # monitor power usage
|
||||
(if lib.versionOlder lib.version "25.05" then wget else powerjoular) # monitor power usage
|
||||
bat # fancy cat
|
||||
fd # nicer find
|
||||
duf # nicer du
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.misc.docker;
|
||||
@@ -9,7 +15,9 @@ in
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.daemon.settings = { ip = "127.0.0.1"; };
|
||||
virtualisation.docker.daemon.settings = {
|
||||
ip = "127.0.0.1";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
];
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
{ lib, pkgs, config, ... }: {
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# before: Startup finished in 18.830s (firmware) + 5.844s (loader) + 4.422s (kernel) + 7.616s (userspace) = 36.713s
|
||||
# after: Startup finished in 14.115s (firmware) + 789ms (loader) + 4.312s (kernel) + 5.777s (userspace) = 24.995s
|
||||
systemd = {
|
||||
targets.network-online.wantedBy =
|
||||
lib.mkForce [ ]; # Normally ["multi-user.target"]
|
||||
services.NetworkManager-wait-online.wantedBy =
|
||||
lib.mkForce [ ]; # Normally ["network-online.target"]
|
||||
targets.network-online.wantedBy = lib.mkForce [ ]; # Normally ["multi-user.target"]
|
||||
services.NetworkManager-wait-online.wantedBy = lib.mkForce [ ]; # Normally ["network-online.target"]
|
||||
};
|
||||
# mash spacebar to still be able to select a different boot option
|
||||
boot.loader.timeout = 1;
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.custom.misc.firejail;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.misc.firejail;
|
||||
in
|
||||
{
|
||||
options.custom.misc.firejail = {
|
||||
enable = lib.mkEnableOption "Enables firejail";
|
||||
package = lib.mkOption {
|
||||
@@ -13,12 +20,17 @@ in {
|
||||
mk = lib.mkOption {
|
||||
readOnly = true;
|
||||
description = "Utility function to make a wrappedBinaries entry";
|
||||
default = name:
|
||||
{ pkg, profile ? name, bin ? name }: {
|
||||
default =
|
||||
name:
|
||||
{
|
||||
pkg,
|
||||
profile ? name,
|
||||
bin ? name,
|
||||
}:
|
||||
{
|
||||
${bin} = {
|
||||
executable = "${lib.getBin pkg}/bin/${bin}";
|
||||
profile =
|
||||
"${config.custom.misc.firejail.package}/etc/firejail/${profile}.profile";
|
||||
profile = "${config.custom.misc.firejail.package}/etc/firejail/${profile}.profile";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
#amdgpu_module_pkg =
|
||||
# { pkgs, lib, fetchurl, kernel ? pkgs.linuxPackages_latest.kernel, ... }:
|
||||
@@ -46,22 +51,26 @@ let
|
||||
# amdgpu_module = pkgs.callPackage amdgpu_module_pkg {
|
||||
# kernel = config.boot.kernelPackages.kernel;
|
||||
# };
|
||||
amd_drm_next_pkg = { fetchurl, buildLinux, ... }@args:
|
||||
amd_drm_next_pkg =
|
||||
{ fetchurl, buildLinux, ... }@args:
|
||||
|
||||
buildLinux (args // rec {
|
||||
buildLinux (
|
||||
args
|
||||
// rec {
|
||||
version = "6.14.0-rc6";
|
||||
modDirVersion = version;
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-fixes-6.15-2025-04-09/linux-amd-drm-fixes-6.15-2025-04-09.tar.gz";
|
||||
url = "https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-fixes-6.15-2025-04-09/linux-amd-drm-fixes-6.15-2025-04-09.tar.gz";
|
||||
#"https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-21/linux-amd-drm-next-6.15-2025-03-21.tar.gz";
|
||||
hash = "sha256-AhyDuV9KufqDJEJ+Fp+jnAta3OM/a9OcMNG9UV+OgR0=";
|
||||
};
|
||||
kernelPatches = [ ];
|
||||
|
||||
extraMeta.branch = "6.14.0-rc6";
|
||||
} // (args.argsOverride or { }));
|
||||
}
|
||||
// (args.argsOverride or { })
|
||||
);
|
||||
linux_amd_drm_next = pkgs.callPackage amd_drm_next_pkg { };
|
||||
|
||||
linux_6_14 = pkgs.buildLinux {
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
networking.nftables.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.nixvimPlugins;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.nixvimPlugins;
|
||||
in
|
||||
{
|
||||
options.custom.nixvimPlugins = mkEnableOption "Enables nixvim plugins";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.etc."current-system-packages".text =
|
||||
let
|
||||
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||
sortedUnique =
|
||||
builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||
in
|
||||
formatted;
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let cfg = config.custom.misc.podman;
|
||||
in {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.misc.podman;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
custom.misc.podman = { enable = lib.mkEnableOption "Enable podman service"; };
|
||||
custom.misc.podman = {
|
||||
enable = lib.mkEnableOption "Enable podman service";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable common container config files in /etc/containers
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.custom.static-ip;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.static-ip;
|
||||
in
|
||||
{
|
||||
options.custom.static-ip = {
|
||||
enable = mkEnableOption "Enables static-ip";
|
||||
ip = lib.mkOption {
|
||||
@@ -23,20 +25,23 @@ in {
|
||||
};
|
||||
};
|
||||
config =
|
||||
let fallback = "1.1.1.1";
|
||||
in mkIf cfg.enable {
|
||||
let
|
||||
fallback = "1.1.1.1";
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
networking = {
|
||||
defaultGateway = cfg.gateway;
|
||||
useDHCP = false;
|
||||
nameservers = [ cfg.dns ]
|
||||
++ lib.lists.optionals (!config.services.resolved.enable) [ fallback ];
|
||||
nameservers = [ cfg.dns ] ++ lib.lists.optionals (!config.services.resolved.enable) [ fallback ];
|
||||
interfaces = {
|
||||
${cfg.interface} = {
|
||||
name = "eth0";
|
||||
ipv4.addresses = [{
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = cfg.ip;
|
||||
prefixLength = 24;
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -12,4 +12,3 @@ in
|
||||
boot.tmp.useTmpfs = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.custom.virt-manager;
|
||||
in {
|
||||
let
|
||||
cfg = config.custom.virt-manager;
|
||||
in
|
||||
{
|
||||
options.custom.virt-manager = {
|
||||
enable = mkEnableOption "Enables virt-manager";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.dconf.enable =
|
||||
true; # virt-manager requires dconf to remember settings
|
||||
programs.dconf.enable = true; # virt-manager requires dconf to remember settings
|
||||
environment.systemPackages = with pkgs; [ virtiofsd ];
|
||||
environment.sessionVariables.GSETTINGS_BACKEND = "keyfile";
|
||||
boot.extraModprobeConfig = ''
|
||||
@@ -25,19 +31,31 @@ in {
|
||||
};
|
||||
hooks.qemu = {
|
||||
# doesnt work, screen just freezes. no error in libvirt logs though, so idk how to fix it
|
||||
"passthrough" = lib.getExe (pkgs.writeShellApplication {
|
||||
"passthrough" = lib.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "qemu-hook";
|
||||
excludeShellChecks = [ "SC2046" "SC2086" ];
|
||||
excludeShellChecks = [
|
||||
"SC2046"
|
||||
"SC2086"
|
||||
];
|
||||
|
||||
runtimeInputs = with pkgs; [ libvirt systemd kmod ];
|
||||
runtimeInputs = with pkgs; [
|
||||
libvirt
|
||||
systemd
|
||||
kmod
|
||||
];
|
||||
text = builtins.readFile ./hook.sh;
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
services.spice-vdagentd.enable = true;
|
||||
users.users.${config.mainUser.name}.extraGroups =
|
||||
[ "libvirtd" "kvm" "input" ];
|
||||
users.users.${config.mainUser.name}.extraGroups = [
|
||||
"libvirtd"
|
||||
"kvm"
|
||||
"input"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.wireshark;
|
||||
@@ -15,4 +20,3 @@ in
|
||||
users.users.${config.mainUser.name}.extraGroups = [ "wireshark" ];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user