mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
feat: split config more
This commit is contained in:
@@ -32,6 +32,17 @@
|
|||||||
supportedFilesystems = [ "ntfs" ];
|
supportedFilesystems = [ "ntfs" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
usecases = {
|
||||||
|
gaming.enable = true;
|
||||||
|
"3d-printing".enable = true;
|
||||||
|
development = {
|
||||||
|
enable = true;
|
||||||
|
angular.enable = true;
|
||||||
|
svelte.enable = true;
|
||||||
|
docker.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
desktops = {
|
desktops = {
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
# gamescope.enable = true;
|
# gamescope.enable = true;
|
||||||
@@ -61,15 +72,7 @@
|
|||||||
|
|
||||||
services.airprint.enable = true;
|
services.airprint.enable = true;
|
||||||
|
|
||||||
services.udev.packages = with pkgs; [
|
services.udev.packages = with pkgs; [ android-udev-rules ];
|
||||||
oversteer
|
|
||||||
android-udev-rules
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation.docker.rootless = {
|
|
||||||
enable = true;
|
|
||||||
setSocketVariable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
security.sudo.configFile = ''
|
security.sudo.configFile = ''
|
||||||
@@ -80,11 +83,9 @@
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
|
||||||
"audio"
|
"audio"
|
||||||
"video"
|
"video"
|
||||||
"plugdev"
|
"plugdev"
|
||||||
"input"
|
|
||||||
"adbusers"
|
"adbusers"
|
||||||
"cdrom"
|
"cdrom"
|
||||||
];
|
];
|
||||||
@@ -92,7 +93,6 @@
|
|||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
gamemode
|
|
||||||
# Essential utils
|
# Essential utils
|
||||||
usbutils
|
usbutils
|
||||||
uhubctl
|
uhubctl
|
||||||
@@ -113,18 +113,10 @@
|
|||||||
fzf
|
fzf
|
||||||
eza
|
eza
|
||||||
# docker
|
# docker
|
||||||
docker-compose
|
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall.allowedUDPPorts = [ 50765 ];
|
||||||
allowedTCPPorts = [
|
|
||||||
8100
|
|
||||||
5037
|
|
||||||
5173
|
|
||||||
];
|
|
||||||
allowedUDPPorts = [ 50765 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
username,
|
username,
|
||||||
desktop,
|
|
||||||
stateVersion,
|
|
||||||
osConfig,
|
osConfig,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -7,9 +7,6 @@
|
|||||||
lorri
|
lorri
|
||||||
vulnix
|
vulnix
|
||||||
|
|
||||||
# fix for proton games not launching without any error message
|
|
||||||
libxcrypt
|
|
||||||
|
|
||||||
# browsers
|
# browsers
|
||||||
chromium
|
chromium
|
||||||
brave
|
brave
|
||||||
@@ -30,7 +27,6 @@
|
|||||||
(import ./threema-desktop.nix { inherit pkgs; })
|
(import ./threema-desktop.nix { inherit pkgs; })
|
||||||
(vesktop.override { electron = pkgs.electron_29; })
|
(vesktop.override { electron = pkgs.electron_29; })
|
||||||
(element-desktop.override { electron = pkgs.electron_29; })
|
(element-desktop.override { electron = pkgs.electron_29; })
|
||||||
slack
|
|
||||||
|
|
||||||
# office
|
# office
|
||||||
libreoffice
|
libreoffice
|
||||||
@@ -44,46 +40,16 @@
|
|||||||
pinta
|
pinta
|
||||||
kdePackages.kdenlive
|
kdePackages.kdenlive
|
||||||
blender-hip
|
blender-hip
|
||||||
openscad-unstable
|
|
||||||
|
|
||||||
# development
|
# development
|
||||||
insomnia
|
insomnia
|
||||||
avalonia-ilspy
|
avalonia-ilspy
|
||||||
ghidra
|
ghidra
|
||||||
|
|
||||||
# 3d printing
|
|
||||||
lpc21isp
|
|
||||||
dfu-util
|
|
||||||
cura
|
|
||||||
|
|
||||||
# gaming
|
|
||||||
steam
|
|
||||||
oversteer
|
|
||||||
obs-studio
|
|
||||||
(lutris.override {
|
|
||||||
extraLibraries =
|
|
||||||
pkgs: with pkgs; [
|
|
||||||
libgudev
|
|
||||||
libvdpau
|
|
||||||
libsoup
|
|
||||||
];
|
|
||||||
})
|
|
||||||
wine
|
|
||||||
winetricks
|
|
||||||
protontricks
|
|
||||||
mangohud
|
|
||||||
gamescope
|
|
||||||
|
|
||||||
# utils
|
# utils
|
||||||
gh
|
|
||||||
git-filter-repo
|
|
||||||
neofetch
|
|
||||||
ranger
|
|
||||||
filezilla
|
|
||||||
lazydocker
|
|
||||||
libqalculate
|
libqalculate
|
||||||
ripgrep
|
ranger
|
||||||
jq
|
neofetch
|
||||||
httpie
|
filezilla
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
git = import ./git.nix;
|
git = import ./git.nix;
|
||||||
lazygit.enable = true;
|
|
||||||
nixvim = import ./nixvim { inherit pkgs; };
|
nixvim = import ./nixvim { inherit pkgs; };
|
||||||
firefox = import ./firefox.nix { inherit pkgs; };
|
firefox = import ./firefox.nix { inherit pkgs; };
|
||||||
gpg.enable = true;
|
gpg.enable = true;
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
|
|
||||||
./locales/theaninova.nix
|
./locales/theaninova.nix
|
||||||
|
|
||||||
|
./usecases/gaming.nix
|
||||||
|
./usecases/3d-printing.nix
|
||||||
|
./usecases/development.nix
|
||||||
|
|
||||||
./services/airprint.nix
|
./services/airprint.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
27
modules/nixos/usecases/3d-printing.nix
Normal file
27
modules/nixos/usecases/3d-printing.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.usecases."3d-printing";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.usecases."3d-printing" = {
|
||||||
|
enable = mkEnableOption "Enable 3d printing stuff";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
lpc21isp
|
||||||
|
dfu-util
|
||||||
|
cura
|
||||||
|
openscad-unstable
|
||||||
|
freecad
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
40
modules/nixos/usecases/development.nix
Normal file
40
modules/nixos/usecases/development.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.usecases.development;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./development/angular.nix
|
||||||
|
./development/svelte.nix
|
||||||
|
./development/docker.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
options.usecases.development = {
|
||||||
|
enable = mkEnableOption "Enable development tools";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gh
|
||||||
|
git-filter-repo
|
||||||
|
ripgrep
|
||||||
|
jq
|
||||||
|
httpie
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
programs = {
|
||||||
|
lazygit.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
modules/nixos/usecases/development/angular.nix
Normal file
14
modules/nixos/usecases/development/angular.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.usecases.development.angular;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.usecases.development.angular = {
|
||||||
|
enable = mkEnableOption "Enable Angular develompent";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable { networking.firewall.allowedTCPPorts = [ 8100 ]; };
|
||||||
|
}
|
||||||
29
modules/nixos/usecases/development/docker.nix
Normal file
29
modules/nixos/usecases/development/docker.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.usecases.development.docker;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.usecases.development.docker = {
|
||||||
|
enable = mkEnableOption "Enable Docker stuff";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
lazydocker
|
||||||
|
docker-compose
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation.docker.rootless = {
|
||||||
|
enable = true;
|
||||||
|
setSocketVariable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
modules/nixos/usecases/development/svelte.nix
Normal file
19
modules/nixos/usecases/development/svelte.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.usecases.development.svelte;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.usecases.development.svelte = {
|
||||||
|
enable = mkEnableOption "Enable Svelte develompent";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
5073
|
||||||
|
5173
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
50
modules/nixos/usecases/gaming.nix
Normal file
50
modules/nixos/usecases/gaming.nix
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.usecases.gaming;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.usecases.gaming = {
|
||||||
|
enable = mkEnableOption "Enable gaming things";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.steam.enable = true;
|
||||||
|
|
||||||
|
services.udev.packages = with pkgs; [ oversteer ];
|
||||||
|
users.users.${username}.extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"input"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
steam
|
||||||
|
oversteer
|
||||||
|
obs-studio
|
||||||
|
(lutris.override {
|
||||||
|
extraLibraries =
|
||||||
|
pkgs: with pkgs; [
|
||||||
|
libgudev
|
||||||
|
libvdpau
|
||||||
|
libsoup
|
||||||
|
];
|
||||||
|
})
|
||||||
|
wine
|
||||||
|
winetricks
|
||||||
|
protontricks
|
||||||
|
mangohud
|
||||||
|
gamescope
|
||||||
|
gamemode
|
||||||
|
# fix for some proton games not launching without any error message
|
||||||
|
libxcrypt
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user