refactor!: switch to dendritic pattern
BREAKING CHANGE: complete reorganization of the repository
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
flake.modules.nixos.appimage = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.packages.appimage;
|
||||
in {
|
||||
options.mySystem.packages.appimage.enable = mkEnableOption "Enables AppImage support";
|
||||
config.programs.appimage = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
binfmt = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
flake.modules.nixos.base-packages = {pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
openssl
|
||||
wget
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
perSystem = {pkgs, ...}: {
|
||||
packages.bun-baseline = pkgs.callPackage ../../packages/bun-baseline.nix {};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
flake.modules.nixos.flatpak = {
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.packages.flatpak;
|
||||
in {
|
||||
options.mySystem.packages.flatpak = {
|
||||
enable = mkEnableOption "Enable Flatpak support";
|
||||
builder.enable = mkEnableOption "Enable Flatpak builder";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = lists.optional cfg.builder.enable pkgs.flatpak-builder;
|
||||
services.flatpak.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
flake.modules.nixos.nano = {
|
||||
programs.nano = {
|
||||
enable = true;
|
||||
syntaxHighlight = true;
|
||||
nanorc = ''
|
||||
set tabsize 2
|
||||
set autoindent
|
||||
set atblanks
|
||||
set linenumber
|
||||
set smarthome
|
||||
set softwrap
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
flake.modules.nixos.nix-settings = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.packages.nix;
|
||||
in {
|
||||
options.mySystem.packages.nix = {
|
||||
allowUnfree = mkEnableOption "Enable unfree packages";
|
||||
disableSandbox = mkEnableOption "Disable Nix sandbox";
|
||||
gc = {
|
||||
automatic = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
dates = mkOption {
|
||||
type = types.str;
|
||||
default = "Monday 01:00 UTC";
|
||||
};
|
||||
options = mkOption {
|
||||
type = types.str;
|
||||
default = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
nix-ld.enable = mkEnableOption "Enable unpatched binaries support";
|
||||
trusted-users = mkOption {
|
||||
type = types.listOf types.str;
|
||||
example = ["alice" "bob"];
|
||||
default = ["@wheel" "root"];
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
nix = {
|
||||
inherit (cfg) gc;
|
||||
settings = {
|
||||
inherit (cfg) trusted-users;
|
||||
sandbox = cfg.disableSandbox;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs = {
|
||||
inherit (cfg) nix-ld;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
flake.modules.nixos.steam = {pkgs, ...}: {
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
protontricks.enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
extraCompatPackages = [pkgs.proton-ge-bin];
|
||||
package = pkgs.steam.override {
|
||||
extraEnv = {
|
||||
MANGOHUD = true;
|
||||
OBS_VKCAPTURE = true;
|
||||
RADV_TEX_ANISO = 16;
|
||||
};
|
||||
extraLibraries = p: with p; [atk];
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
qt5.qtmultimedia
|
||||
qt5.qtbase
|
||||
libpulseaudio
|
||||
];
|
||||
};
|
||||
};
|
||||
gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
args = [
|
||||
"--rt"
|
||||
"--expose-wayland"
|
||||
];
|
||||
};
|
||||
};
|
||||
hardware.steam-hardware.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user