refactor nixos config
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
nemo
|
nemo
|
||||||
pywal
|
pywal
|
||||||
jq
|
jq
|
||||||
|
# quickshell
|
||||||
];
|
];
|
||||||
programs.vicinae.enable = true;
|
programs.vicinae.enable = true;
|
||||||
services.swww.enable = true;
|
services.swww.enable = true;
|
||||||
|
|||||||
@@ -106,6 +106,15 @@
|
|||||||
"${super}+Shift, 0, exec, ~/.config/hypr/scripts/workspace_action.sh movetoworkspacesilent 10"
|
"${super}+Shift, 0, exec, ~/.config/hypr/scripts/workspace_action.sh movetoworkspacesilent 10"
|
||||||
"${super}+Shift, S, movetoworkspacesilent, special"
|
"${super}+Shift, S, movetoworkspacesilent, special"
|
||||||
"${super}, S, togglespecialworkspace"
|
"${super}, S, togglespecialworkspace"
|
||||||
|
|
||||||
|
"RCtrl, 1, togglespecialworkspace, s1"
|
||||||
|
"RCtrl, 2, togglespecialworkspace, s2"
|
||||||
|
"RCtrl, 3, togglespecialworkspace, s3"
|
||||||
|
"RCtrl, 4, togglespecialworkspace, s4"
|
||||||
|
"RCtrl, 5, togglespecialworkspace, s5"
|
||||||
|
# ''
|
||||||
|
# ${super}+Ctrl, 1, exec, [workspace special term; float; move 15% 15%; size 70% 70%] kitty
|
||||||
|
# ''
|
||||||
];
|
];
|
||||||
|
|
||||||
bindd = [
|
bindd = [
|
||||||
|
|||||||
@@ -86,12 +86,11 @@
|
|||||||
|
|
||||||
wttr = "curl wttr.in/Ramenki\\?p1MQ";
|
wttr = "curl wttr.in/Ramenki\\?p1MQ";
|
||||||
|
|
||||||
gitpa = ''f() { git add -A && git commit -m "$1" && git push; }; f'';
|
gitpa = ''
|
||||||
|
f() { git add -A && git commit -m "$1" && git push; unset -f f; }; f
|
||||||
|
'';
|
||||||
|
og = ''f() { z github "$@" && code . && exit; unset -f f; }; f'';
|
||||||
|
|
||||||
amnezia = ''
|
|
||||||
(pgrep -x ".AmneziaVPN-ser" > /dev/null 2>&1 || sudo AmneziaVPN-service > /dev/null 2>&1 &) &
|
|
||||||
AmneziaVPN > /dev/null 2>&1 &
|
|
||||||
''; # TODO: start system with service
|
|
||||||
cnfg = "cd nixos-config && code . && exit";
|
cnfg = "cd nixos-config && code . && exit";
|
||||||
x = "select_command";
|
x = "select_command";
|
||||||
u = "update_git_config";
|
u = "update_git_config";
|
||||||
|
|||||||
+10
-130
@@ -1,143 +1,23 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./amnezia.nix ];
|
imports = [
|
||||||
zramSwap.enable = true;
|
./modules/amnezia.nix
|
||||||
services.btrfs.autoScrub.enable = true;
|
./modules/security.nix
|
||||||
services.btrfs.autoScrub.interval = "weekly";
|
./modules/memory.nix
|
||||||
|
./modules/fonts.nix
|
||||||
# networkmanagerapplet and nm-applet
|
./modules/boot.nix
|
||||||
|
./modules/programs.nix
|
||||||
virtualisation.virtualbox.host.enable = true;
|
./modules/networking.nix
|
||||||
virtualisation.libvirtd.enable = true;
|
./modules/power.nix
|
||||||
programs.virt-manager.enable = true;
|
];
|
||||||
users.extraGroups.vboxusers.members = [ "krosh" ];
|
|
||||||
|
|
||||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
|
||||||
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
# services.yubikey-agent.enable = true;
|
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ssh.startAgent = true;
|
programs.ssh.startAgent = true;
|
||||||
|
|
||||||
services.fprintd.enable = true;
|
|
||||||
# services.fprintd.tod.enable = true;
|
|
||||||
# services.fprintd.enrollPermissions = "uaccess";
|
|
||||||
# security.polkit.enable = true;
|
|
||||||
security.pam.services.sudo.fprintAuth = true;
|
|
||||||
security.pam.services.login.fprintAuth = lib.mkForce true;
|
|
||||||
# security.pam.services.lightdm.fprintAuth =
|
|
||||||
# true; # or gdm/sddm depending on your display manager
|
|
||||||
|
|
||||||
# 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
|
|
||||||
# };
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
options = "--delete-older-than 14d";
|
options = "--delete-older-than 14d";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.nameservers = [ "8.8.8.8" "1.1.1.1" ];
|
|
||||||
networking.networkmanager.insertNameservers = [ "1.1.1.1" "8.8.8.8" ];
|
|
||||||
networking.firewall.enable = false;
|
|
||||||
|
|
||||||
programs.firefox.enable = true;
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
kitty
|
|
||||||
# amnezia-vpn
|
|
||||||
powertop
|
|
||||||
system76-scheduler
|
|
||||||
tlp
|
|
||||||
# lenovo-legion
|
|
||||||
fprintd
|
|
||||||
# fprintd-clients
|
|
||||||
yubioath-flutter
|
|
||||||
yubikey-manager
|
|
||||||
pam_u2f
|
|
||||||
qbittorrent
|
|
||||||
];
|
|
||||||
|
|
||||||
# starting the following units: accounts-daemon.service, systemd-modules-load.service, systemd-tmpfiles-resetup.service, tlp.ser
|
|
||||||
|
|
||||||
# TODO: Добавить настройку вентиляторов
|
|
||||||
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
configure = {
|
|
||||||
customRC = ''
|
|
||||||
set runtimepath^=${pkgs.vimPlugins.jellybeans-vim}
|
|
||||||
colorscheme jellybeans
|
|
||||||
set number
|
|
||||||
set cc=80
|
|
||||||
set list
|
|
||||||
set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:»
|
|
||||||
if &diff
|
|
||||||
colorscheme blue
|
|
||||||
endif
|
|
||||||
'';
|
|
||||||
packages.myVimPackage = with pkgs.vimPlugins; { start = [ ctrlp ]; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# fonts.packages = builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
# from example
|
|
||||||
nerd-fonts.fira-code
|
|
||||||
nerd-fonts.droid-sans-mono
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk-sans
|
|
||||||
noto-fonts-color-emoji
|
|
||||||
liberation_ttf
|
|
||||||
fira-code
|
|
||||||
fira-code-symbols
|
|
||||||
mplus-outline-fonts.githubRelease
|
|
||||||
dina-font
|
|
||||||
proggyfonts
|
|
||||||
];
|
|
||||||
fonts.enableDefaultPackages = true;
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
|
|
||||||
plymouth = {
|
|
||||||
enable = true;
|
|
||||||
theme = "lone";
|
|
||||||
themePackages = with pkgs;
|
|
||||||
[
|
|
||||||
(adi1090x-plymouth-themes.override { selected_themes = [ "lone" ]; })
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
consoleLogLevel = 3;
|
|
||||||
initrd.verbose = false;
|
|
||||||
# kernelModules = [ "tun" ]; # check if tun really needed
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
kernelParams = [
|
|
||||||
"quiet"
|
|
||||||
"splash"
|
|
||||||
"boot.shell_on_fail"
|
|
||||||
"udev.log_priority=3"
|
|
||||||
"rd.systemd.show_status=auto"
|
|
||||||
"kvm.enable_virt_at_load=0"
|
|
||||||
];
|
|
||||||
loader.timeout = 0;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
plymouth = {
|
||||||
|
enable = true;
|
||||||
|
theme = "double";
|
||||||
|
themePackages = with pkgs;
|
||||||
|
[
|
||||||
|
(adi1090x-plymouth-themes.override {
|
||||||
|
selected_themes = [ "double" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
consoleLogLevel = 3;
|
||||||
|
initrd.verbose = false;
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
"boot.shell_on_fail"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
"rd.systemd.show_status=auto"
|
||||||
|
"kvm.enable_virt_at_load=0"
|
||||||
|
];
|
||||||
|
loader.timeout = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
nerd-fonts.fira-code
|
||||||
|
nerd-fonts.droid-sans-mono
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-color-emoji
|
||||||
|
liberation_ttf
|
||||||
|
fira-code
|
||||||
|
fira-code-symbols
|
||||||
|
mplus-outline-fonts.githubRelease
|
||||||
|
dina-font
|
||||||
|
proggyfonts
|
||||||
|
];
|
||||||
|
fonts.enableDefaultPackages = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
zramSwap.enable = true;
|
||||||
|
services.btrfs.autoScrub.enable = true;
|
||||||
|
services.btrfs.autoScrub.interval = "weekly";
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# networkmanagerapplet and nm-applet
|
||||||
|
|
||||||
|
networking.nameservers = [ "8.8.8.8" "1.1.1.1" ];
|
||||||
|
networking.networkmanager.insertNameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
|
networking.firewall.enable = false; # need it?
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
# TODO: Добавить настройку вентиляторов
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [ powertop system76-scheduler tlp ];
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
#! KROSH MENTION
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ kitty qbittorrent ];
|
||||||
|
|
||||||
|
virtualisation.virtualbox.host.enable = true;
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
users.extraGroups.vboxusers.members = [ "krosh" ];
|
||||||
|
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
configure = {
|
||||||
|
customRC = ''
|
||||||
|
set runtimepath^=${pkgs.vimPlugins.jellybeans-vim}
|
||||||
|
colorscheme jellybeans
|
||||||
|
set number
|
||||||
|
set cc=80
|
||||||
|
set list
|
||||||
|
set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:»
|
||||||
|
if &diff
|
||||||
|
colorscheme blue
|
||||||
|
endif
|
||||||
|
'';
|
||||||
|
packages.myVimPackage = with pkgs.vimPlugins; { start = [ ctrlp ]; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# };
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
fprintd
|
||||||
|
yubioath-flutter
|
||||||
|
yubikey-manager
|
||||||
|
pam_u2f
|
||||||
|
];
|
||||||
|
services.pcscd.enable = true;
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
# services.yubikey-agent.enable = true;
|
||||||
|
|
||||||
|
services.fprintd.enable = true;
|
||||||
|
security.pam.services.sudo.fprintAuth = true;
|
||||||
|
security.pam.services.login.fprintAuth = lib.mkForce true;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user