snowfall lib migration WIP
This commit is contained in:
parent
dc2440015e
commit
b9dadac2af
31 changed files with 9106 additions and 382 deletions
79
modules/nixos/presets/default/default.nix
Normal file
79
modules/nixos/presets/default/default.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace}; let
|
||||
cfg = config.${namespace}.presets.default;
|
||||
in {
|
||||
options.${namespace}.presets.default = with types; {
|
||||
enable = mkBoolOpt false "Enable preset with all the default settings - locale, time, etc";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "ru_RU.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/etc/nixos-config";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix-output-monitor
|
||||
fzf
|
||||
lazygit
|
||||
git
|
||||
btop
|
||||
comma
|
||||
snowfallorg.flake
|
||||
];
|
||||
programs.bash = {
|
||||
shellAliases = {
|
||||
ls = "${pkgs.eza}/bin/eza --icons=always";
|
||||
};
|
||||
};
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us,ru";
|
||||
variant = "";
|
||||
options = "grp:caps_toggle";
|
||||
};
|
||||
console.keyMap = "us";
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
substituters = [
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
62
modules/nixos/presets/gaming/default.nix
Normal file
62
modules/nixos/presets/gaming/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
namespace,
|
||||
system,
|
||||
target,
|
||||
format,
|
||||
virtual,
|
||||
systems,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace}; let
|
||||
cfg = config.${namespace}.presets.gaming;
|
||||
in {
|
||||
options.${namespace}.presets.gaming = with types; {
|
||||
enable = mkBoolOpt false "Enable everything that you need for gaming";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
unzip
|
||||
wget
|
||||
xdotool
|
||||
xorg.xprop
|
||||
xorg.xrandr
|
||||
unixtools.xxd
|
||||
xorg.xwininfo
|
||||
yad
|
||||
protonup-qt
|
||||
protontricks
|
||||
bottles
|
||||
];
|
||||
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
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
sdl3
|
||||
SDL2
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
gamescope
|
||||
];
|
||||
};
|
||||
};
|
||||
programs.gamemode.enable = true;
|
||||
};
|
||||
}
|
||||
33
modules/nixos/presets/wayland/default.nix
Normal file
33
modules/nixos/presets/wayland/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
namespace,
|
||||
system,
|
||||
target,
|
||||
format,
|
||||
virtual,
|
||||
systems,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace}; let
|
||||
cfg = config.${namespace}.presets.wayland;
|
||||
in {
|
||||
options.${namespace}.presets.wayland = with types; {
|
||||
enable = mkBoolOpt false "Enable preset with MUST HAVE wayland things";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
git-credential-manager
|
||||
egl-wayland
|
||||
];
|
||||
hardware.graphics.enable = true;
|
||||
};
|
||||
}
|
||||
114
modules/nixos/presets/workstation/default.nix
Normal file
114
modules/nixos/presets/workstation/default.nix
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
namespace,
|
||||
system,
|
||||
target,
|
||||
format,
|
||||
virtual,
|
||||
systems,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace}; let
|
||||
cfg = config.${namespace}.presets.workstation;
|
||||
in {
|
||||
options.${namespace}.presets.workstation = with types; {
|
||||
enable = mkBoolOpt false "Enable workstation preset";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
${namespace} = {
|
||||
presets.default = enabled;
|
||||
presets.wayland = enabled;
|
||||
hardware.printing = enabled;
|
||||
hardware.bluetooth = enabled;
|
||||
gpg = enabled;
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "kylekrein";
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
with pkgs.${namespace}; [
|
||||
libreoffice
|
||||
root-files
|
||||
pass
|
||||
gparted
|
||||
qdirstat
|
||||
exfatprogs
|
||||
kitty
|
||||
tealdeer
|
||||
telegram-desktop
|
||||
vlc
|
||||
git-credential-manager
|
||||
kitty-themes
|
||||
solaar
|
||||
pdfarranger
|
||||
densify
|
||||
gimp3
|
||||
|
||||
#kde
|
||||
kdePackages.gwenview
|
||||
kdePackages.ark
|
||||
|
||||
# user packages
|
||||
obs-studio
|
||||
neovim
|
||||
localsend
|
||||
|
||||
gdb
|
||||
element-desktop
|
||||
];
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.kdeconnect.package = lib.mkDefault pkgs.kdePackages.kdeconnect-kde;
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
font-awesome
|
||||
nerd-fonts.symbols-only
|
||||
hack-font
|
||||
# microsoft fonts:
|
||||
#corefonts
|
||||
#vistafonts
|
||||
];
|
||||
environment.sessionVariables = {
|
||||
MANPAGER = "emacsclient -c";
|
||||
EDITOR = "emacsclient -c";
|
||||
};
|
||||
hardware = {
|
||||
logitech.wireless.enable = true;
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
#programs.thunar = {
|
||||
# enable = true;
|
||||
# plugins = with pkgs.xfce; [
|
||||
# thunar-archive-plugin
|
||||
# thunar-volman
|
||||
# ];
|
||||
# };
|
||||
#programs.xfconf.enable = true; # so thunar can save config
|
||||
#services.gvfs.enable = true; # Mount, trash, and other functionalities
|
||||
#services.tumbler.enable = true; # Thumbnail support for images
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue