Formatting
This commit is contained in:
parent
ae65065d5c
commit
3ca8c5e218
9 changed files with 156 additions and 108 deletions
|
@ -1,7 +1,14 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.fcitx5;
|
let
|
||||||
in {
|
cfg = config.voidconf.fcitx5;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.voidconf.fcitx5 = {
|
options.voidconf.fcitx5 = {
|
||||||
enable = mkEnableOption "Enables fcitx5 input method engine and mozc en anthy methods";
|
enable = mkEnableOption "Enables fcitx5 input method engine and mozc en anthy methods";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.graphics;
|
let
|
||||||
in {
|
cfg = config.voidconf.graphics;
|
||||||
options.voidconf.graphics ={
|
in
|
||||||
|
{
|
||||||
|
options.voidconf.graphics = {
|
||||||
defaultSettings.enable = mkEnableOption "Enables some basic graphical settings";
|
defaultSettings.enable = mkEnableOption "Enables some basic graphical settings";
|
||||||
nvidia = {
|
nvidia = {
|
||||||
enable = mkEnableOption "Enables Nvidia settings";
|
enable = mkEnableOption "Enables Nvidia settings";
|
||||||
|
@ -25,6 +27,6 @@ in {
|
||||||
nvidiaSettings = cfg.nvidia.proprietaryDrivers;
|
nvidiaSettings = cfg.nvidia.proprietaryDrivers;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.xserver.videoDrivers = mkIf cfg.nvidia.proprietaryDrivers ["nvidia"];
|
services.xserver.videoDrivers = mkIf cfg.nvidia.proprietaryDrivers [ "nvidia" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.kernelTweaks;
|
let
|
||||||
in {
|
cfg = config.voidconf.kernelTweaks;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.voidconf.kernelTweaks = {
|
options.voidconf.kernelTweaks = {
|
||||||
enable = mkEnableOption "Enables kernel tweaks";
|
enable = mkEnableOption "Enables kernel tweaks";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.nixSettings;
|
let
|
||||||
in {
|
cfg = config.voidconf.nixSettings;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.voidconf.nixSettings = {
|
options.voidconf.nixSettings = {
|
||||||
gc = {
|
gc = {
|
||||||
automatic = mkOption {
|
automatic = mkOption {
|
||||||
|
@ -36,7 +38,10 @@ in {
|
||||||
automatic = cfg.gc.automatic;
|
automatic = cfg.gc.automatic;
|
||||||
dates = cfg.gc.dates;
|
dates = cfg.gc.dates;
|
||||||
};
|
};
|
||||||
settings.experimental-features = [ "flakes" "nix-command" ];
|
settings.experimental-features = [
|
||||||
|
"flakes"
|
||||||
|
"nix-command"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.prometheus;
|
let
|
||||||
in {
|
cfg = config.voidconf.prometheus;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.voidconf.prometheus = {
|
options.voidconf.prometheus = {
|
||||||
enable = mkEnableOption "Enable prometheus node";
|
enable = mkEnableOption "Enable prometheus node";
|
||||||
};
|
};
|
||||||
|
@ -10,7 +12,10 @@ in {
|
||||||
exporters = {
|
exporters = {
|
||||||
node = {
|
node = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enabledCollectors = [ "systemd" "cpu" ];
|
enabledCollectors = [
|
||||||
|
"systemd"
|
||||||
|
"cpu"
|
||||||
|
];
|
||||||
port = 9002;
|
port = 9002;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.services;
|
let
|
||||||
in {
|
cfg = config.voidconf.services;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.voidconf.services = {
|
options.voidconf.services = {
|
||||||
|
|
||||||
flatpak = {
|
flatpak = {
|
||||||
|
@ -26,7 +33,7 @@ in {
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
# flatpak
|
# flatpak
|
||||||
|
|
||||||
xdg.portal = mkIf cfg.flatpak.enable {
|
xdg.portal = mkIf cfg.flatpak.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -35,66 +42,69 @@ in {
|
||||||
config.common.default = "*";
|
config.common.default = "*";
|
||||||
};
|
};
|
||||||
|
|
||||||
# ssh
|
# ssh agent
|
||||||
|
|
||||||
programs.ssh = mkIf cfg.ssh.enable {
|
programs.ssh = mkIf cfg.ssh.enable {
|
||||||
startAgent = true;
|
startAgent = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
||||||
# flatpak
|
# flatpak
|
||||||
|
|
||||||
flatpak.enable = cfg.flatpak.enable;
|
flatpak.enable = cfg.flatpak.enable;
|
||||||
|
|
||||||
# yggdrasil
|
# yggdrasil
|
||||||
|
|
||||||
yggdrasil = mkIf cfg.yggdrasil.enable {
|
yggdrasil = mkIf cfg.yggdrasil.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
persistentKeys = cfg.yggdrasil.persistentKeys;
|
persistentKeys = cfg.yggdrasil.persistentKeys;
|
||||||
settings = {
|
settings = {
|
||||||
Peers = [
|
Peers = [
|
||||||
"tls://109.107.173.235:9111"
|
"tls://109.107.173.235:9111"
|
||||||
"tls://94.103.82.150:8080"
|
"tls://94.103.82.150:8080"
|
||||||
"tcp://vpn.itrus.su:7991"
|
"tcp://vpn.itrus.su:7991"
|
||||||
"tls://45.147.198.155:6010"
|
"tls://45.147.198.155:6010"
|
||||||
"tcp://ygg-nl.incognet.io:8883"
|
"tcp://ygg-nl.incognet.io:8883"
|
||||||
"tls://ygg-nl.incognet.io:8884"
|
"tls://ygg-nl.incognet.io:8884"
|
||||||
"tls://23.137.249.65:443"
|
"tls://23.137.249.65:443"
|
||||||
"tls://aaoth.xyz:25565"
|
"tls://aaoth.xyz:25565"
|
||||||
"tcp://aaoth.xyz:7777"
|
"tcp://aaoth.xyz:7777"
|
||||||
"tls://23.137.251.45:5222"
|
"tls://23.137.251.45:5222"
|
||||||
"tls://x-ams-0.sergeysedoy97.ru:65535"
|
"tls://x-ams-0.sergeysedoy97.ru:65535"
|
||||||
"tls://s-ams-0.sergeysedoy97.ru:65535"
|
"tls://s-ams-0.sergeysedoy97.ru:65535"
|
||||||
"tls://89.22.237.91:65535"
|
"tls://89.22.237.91:65535"
|
||||||
"tls://[2a0d:8480:1:f9::]:65535"
|
"tls://[2a0d:8480:1:f9::]:65535"
|
||||||
"tls://x-ams-1.sergeysedoy97.ru:65535"
|
"tls://x-ams-1.sergeysedoy97.ru:65535"
|
||||||
"tls://s-ams-1.sergeysedoy97.ru:65535"
|
"tls://s-ams-1.sergeysedoy97.ru:65535"
|
||||||
"tls://79.137.194.94:65535"
|
"tls://79.137.194.94:65535"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
};
|
|
||||||
openssh = mkIf cfg.ssh.enable {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = cfg.ssh.passwordLogin;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# i2p container
|
# ssh daemon
|
||||||
|
|
||||||
|
openssh = mkIf cfg.ssh.enable {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = cfg.ssh.passwordLogin;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# i2p container
|
||||||
|
|
||||||
containers.i2pd-container = mkIf cfg.i2p.enable {
|
containers.i2pd-container = mkIf cfg.i2p.enable {
|
||||||
autoStart = cfg.i2p.autoStart;
|
autoStart = cfg.i2p.autoStart;
|
||||||
config = {
|
config = {
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
7656
|
7656
|
||||||
7070
|
7070
|
||||||
4447
|
4447
|
||||||
4444
|
4444
|
||||||
];
|
];
|
||||||
|
|
||||||
services.i2pd = {
|
services.i2pd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.vim;
|
let
|
||||||
in {
|
cfg = config.voidconf.vim;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.voidconf.vim = {
|
options.voidconf.vim = {
|
||||||
enable = mkEnableOption "Enables opinionated vim configuration";
|
enable = mkEnableOption "Enables opinionated vim configuration";
|
||||||
enableNvim = mkEnableOption "Enables neovim and alias";
|
enableNvim = mkEnableOption "Enables neovim and alias";
|
||||||
|
@ -9,7 +16,7 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Set 'vim' as $EDITOR
|
Set 'vim' as $EDITOR
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -26,37 +33,37 @@ in {
|
||||||
|
|
||||||
(mkIf cfg.enableNvim (neovim.override { vimAlias = true; }))
|
(mkIf cfg.enableNvim (neovim.override { vimAlias = true; }))
|
||||||
|
|
||||||
((vim_configurable.override { }).customize {
|
((vim_configurable.override { }).customize {
|
||||||
name = "vim";
|
name = "vim";
|
||||||
vimrcConfig = {
|
vimrcConfig = {
|
||||||
packages.myplugs = with pkgs.vimPlugins; {
|
packages.myplugs = with pkgs.vimPlugins; {
|
||||||
start = [ vim-nix ];
|
start = [ vim-nix ];
|
||||||
opt = [];
|
opt = [ ];
|
||||||
};
|
};
|
||||||
customRC = ''
|
customRC = ''
|
||||||
syntax on
|
syntax on
|
||||||
set nocompatible
|
set nocompatible
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set hlsearch
|
set hlsearch
|
||||||
set incsearch
|
set incsearch
|
||||||
set autoindent
|
set autoindent
|
||||||
set smartindent
|
set smartindent
|
||||||
set wildmenu
|
set wildmenu
|
||||||
set expandtab
|
set expandtab
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set number
|
set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set mouse=
|
set mouse=
|
||||||
set listchars=tab:│\ ,trail:·
|
set listchars=tab:│\ ,trail:·
|
||||||
set list
|
set list
|
||||||
set scrolloff=3
|
set scrolloff=3
|
||||||
set notimeout
|
set notimeout
|
||||||
set backspace=2
|
set backspace=2
|
||||||
au FileType nix setlocal shiftwidth=2 tabstop=2 expandtab
|
au FileType nix setlocal shiftwidth=2 tabstop=2 expandtab
|
||||||
au FileType haskell,tex setlocal shiftwidth=4 tabstop=4 expandtab
|
au FileType haskell,tex setlocal shiftwidth=4 tabstop=4 expandtab
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.xconfig;
|
let
|
||||||
in {
|
cfg = config.voidconf.xconfig;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.voidconf.xconfig = {
|
options.voidconf.xconfig = {
|
||||||
|
|
||||||
enable = mkEnableOption "Enables opinionated xorg config";
|
enable = mkEnableOption "Enables opinionated xorg config";
|
||||||
|
@ -12,7 +14,10 @@ in {
|
||||||
enableProperConfig = mkEnableOption "Enable the touchpad settings";
|
enableProperConfig = mkEnableOption "Enable the touchpad settings";
|
||||||
|
|
||||||
accelProfile = mkOption {
|
accelProfile = mkOption {
|
||||||
type = types.enum [ "flat" "adaptive" ];
|
type = types.enum [
|
||||||
|
"flat"
|
||||||
|
"adaptive"
|
||||||
|
];
|
||||||
default = "adaptive";
|
default = "adaptive";
|
||||||
example = "flat";
|
example = "flat";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -23,11 +28,14 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
mouse.accelProfile = mkOption {
|
mouse.accelProfile = mkOption {
|
||||||
type = types.enum [ "flat" "adaptive" ];
|
type = types.enum [
|
||||||
|
"flat"
|
||||||
|
"adaptive"
|
||||||
|
];
|
||||||
default = "flat";
|
default = "flat";
|
||||||
example = "adaptive";
|
example = "adaptive";
|
||||||
description = ''
|
description = ''
|
||||||
Use addaptive on trackball and touchpad; and flat on any normal mouse.
|
Use addaptive on trackball and touchpad; and flat on any normal mouse.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,7 +44,7 @@ in {
|
||||||
default = ./images/city.png;
|
default = ./images/city.png;
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''
|
description = ''
|
||||||
Display manager background.
|
Display manager background.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.voidconf.zsh;
|
let
|
||||||
in {
|
cfg = config.voidconf.zsh;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.voidconf.zsh = {
|
options.voidconf.zsh = {
|
||||||
enable = mkEnableOption "Enables opinionated zsh configuration";
|
enable = mkEnableOption "Enables opinionated zsh configuration";
|
||||||
skim.enable = mkEnableOption "Enables skim support for shell history";
|
skim.enable = mkEnableOption "Enables skim support for shell history";
|
||||||
|
@ -10,7 +12,7 @@ in {
|
||||||
default = "fg=magenta,bg=black,bold,underline";
|
default = "fg=magenta,bg=black,bold,underline";
|
||||||
description = ''
|
description = ''
|
||||||
Colors for zsh autosuggestions. Check the documentation for more info.
|
Colors for zsh autosuggestions. Check the documentation for more info.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
Loading…
Add table
Reference in a new issue