works again, mostly done, now we can start with server

This commit is contained in:
martyTF 2026-04-03 01:11:14 +02:00
parent 784f214fb7
commit 270e1a0be4
38 changed files with 623 additions and 381 deletions

View file

@ -14,7 +14,7 @@
nixpkgs.config.allowUnfree = true;
imports = [
./modules
# ./options.nix
];
environment.pathsToLink = [

12
home/apps/default.nix Normal file
View file

@ -0,0 +1,12 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./terminal
];
}

View file

@ -8,5 +8,6 @@
{
imports = [
./kitty.nix
./ranger.nix
];
}

View file

@ -2,6 +2,7 @@
config,
lib,
pkgs,
osConfig,
...
}:

View file

@ -8,5 +8,6 @@
{
imports = [
./desktop
./apps
];
}

View file

@ -8,12 +8,20 @@
}:
{
config = lib.mkIf osConfig.desktop.shell.noctalia.enable {
};
imports = lib.mkIf osConfig.desktop.shell.noctalia.enable [
imports =
if true then
[
inputs.noctalia.homeModules.default
]
else
[ ];
config = {
programs.noctalia-shell =
if osConfig.desktop.shell.noctalia.enable then
{
enable = true;
}
else
{ };
};
}

View file

@ -8,7 +8,9 @@
}:
{
config = lib.mkIf osConfig.desktop.shell.walker.enable {
config =
if osConfig.desktop.shell.walker.enable then
{
programs = {
walker = {
enable = true;
@ -18,9 +20,15 @@
};
};
};
};
}
else
{ };
imports = lib.mkIf osConfig.desktop.shell.walker.enable [
imports =
if osConfig.desktop.shell.walker.enable then
[
inputs.walker.homeManagerModules.default
]
else
[ ];
}

View file

@ -11,6 +11,7 @@
options = {
desktop = {
hyprland = {
enable = lib.mkEnableOption "enable hyprland";
monitors = lib.mkOption {
default = [
",preferred,auto,1"
@ -44,7 +45,7 @@
};
};
config = lib.mkIf osConfig.desktop.hyprland.enable {
config = lib.mkIf osConfig.desktop.window-managers.hyprland.enable {
xdg.portal = {
enable = true;
configPackages = [
@ -97,9 +98,9 @@
(lib.mkIf (osConfig.desktop.shell.rofi.enable) "$mod, D, exec, rofi -show drun")
"$mod, return, exec, ${osConfig.apps.terminal.binary}"
(lib.mkIf (osConfig.desktop.utilities.grimblast.enable) ", print, exec, GRIMBLAST_EDITOR=gradia grimblast edit area")
(lib.mkIf (osConfig.desktop.shell.walker.enable) (
lib.mkIf (osConfig.misc.bitwarden.enable) "$mod, B, exec, rbw unlocked || kitty --class kitty-floating -e rbw unlock; selected=$(rbw list | walker -d); wl-copy $(rbw get \"$selected\"); sleep 30; rbw lock"
))
(lib.mkIf (osConfig.desktop.shell.walker.enable && osConfig.misc.bitwarden.enable)
"$mod, B, exec, rbw unlocked || kitty --class kitty-floating -e rbw unlock; selected=$(rbw list | walker -d); wl-copy $(rbw get \"$selected\"); sleep 30; rbw lock"
)
"$mod, F, fullscreen, 1"
"$shiftmod, F, fullscreen, 0"
"$shiftmod, Q, killactive,"

View file

@ -8,19 +8,14 @@
}:
let
modifier = lib.mkIf (${osConfig.keybinds.modifier} == "Meta") "Mod";
modifier = if (osConfig.keybinds.modifier == "Meta") then "Mod" else null;
kb-layout = builtins.substring 0 2 osConfig.system.locale;
in
{
options = {
desktop.window-managers = {
niri = {
};
};
};
config = lib.mkIf osConfig.desktop.window-managers.niri.enable {
config =
if osConfig.desktop.window-managers.niri.enable then
{
home.file = {
"~/.config/niri/config.kdl" = ''
input {
@ -108,5 +103,7 @@ include "noctalia.kdl"
'';
};
};
}
else
{ };
}

View file

@ -3,18 +3,14 @@
pkgs,
lib,
inputs,
osConfig,
...
}:
{
options = {
desktop.window-managers = {
sway = {
};
};
};
config = lib.mkIf osConfig.desktop.window-managers.sway.enable {
config =
if osConfig.desktop.window-managers.sway.enable then
{
wayland.windowManager.sway = {
enable = true;
package = pkgs.swayfx;
@ -68,5 +64,7 @@
};
checkConfig = false;
};
};
}
else
{ };
}

View file

@ -40,7 +40,7 @@
};
imports = [
./../../modules
./../../home
];
programs.home-manager.enable = true;
}

View file

@ -16,11 +16,26 @@
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf (apps.audio.base.enable) pavucontrol)
(lib.mkIf (apps.audio.base.enable) playerctl)
(lib.mkIf (apps.audio.editing.enable) tenacity)
(lib.mkIf (apps.audio.editing.enable) flac)
];
environment.systemPackages =
with pkgs;
[ ]
++ (
if (config.apps.audio.base.enable) then
[
pavucontrol
playerctl
]
else
[ ]
)
++ (
if (config.apps.audio.editing.enable) then
[
tenacity
flac
]
else
[ ]
);
};
}

View file

@ -14,6 +14,7 @@
./misc
./peripherals
./video
./sync
./terminal
];
}

View file

@ -7,7 +7,6 @@
{
imports = [
./git.nix
./editor.nix
./godot.nix
./languages.nix

View file

@ -11,44 +11,54 @@
editor = {
vscodium.enable = lib.mkEnableOption "enable vscodium";
emacs.enable = lib.mkEnableOption "enable emacs";
default = lib.mkOption {
default = "vscodium";
description = "default editor";
};
};
};
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf config.development.editor.vscodium.enable vscodium)
environment.systemPackages =
with pkgs;
[
nixfmt
];
]
++ (if config.development.editor.vscodium.enable then [ vscodium ] else [ ]);
programs = {
vscode = lib.mkIf config.development.editor.vscodium.enable {
vscode =
if config.development.editor.vscodium.enable then
{
enable = true;
package = pkgs.vscodium;
defaultEditor = lib.mkIf (config.development.editor.default == "vscodium") true;
profiles.default.extensions = with pkgs.vscode-extensions; [
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons
jnoortheen.nix-ide
alefragnani.project-manager
naumovs.color-highlight
geequlim.godot-tools
stylelint.vscode-stylelint
ecmel.vscode-html-css
esbenp.prettier-vscode
];
};
defaultEditor = if (config.development.editor.default == "vscodium") then true else false;
# profiles.default.extensions = with pkgs.vscode-extensions; [
# catppuccin.catppuccin-vsc
# catppuccin.catppuccin-vsc-icons
# jnoortheen.nix-ide
# alefragnani.project-manager
# naumovs.color-highlight
# geequlim.godot-tools
# stylelint.vscode-stylelint
# ecmel.vscode-html-css
# esbenp.prettier-vscode
# ];
}
else
{ };
};
services = {
emacs = lib.mkIf config.development.editor.emacs.enable {
emacs =
if config.development.editor.emacs.enable then
{
enable = true;
install = true;
defaultEditor = lib.mkIf (config.development.editor.default == "emacs") true;
};
};
home.sessionVariables = {
EDITOR = lib.mkDefault "codium";
defaultEditor = if (config.development.editor.default == "emacs") then true else false;
}
else
{ };
};
};
}

View file

@ -12,9 +12,14 @@
};
};
config = lib.mkIf config.apps.development.godot.enable {
systemPackages = with pkgs; [
config = {
environment.systemPackages =
if config.apps.development.godot.enable then
with pkgs;
[
godot
];
]
else
[ ];
};
}

View file

@ -8,13 +8,15 @@
{
options = {
apps.development.languages = {
python = lib.mkEnableOption "enable python";
python.enable = lib.mkEnableOption "enable python";
};
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf lib.mkIf config.development.languages.python.enable virtualenv)
];
environment.systemPackages =
with pkgs;
[
]
++ (if config.apps.development.languages.python.enable then [ virtualenv ] else [ ]);
};
}

View file

@ -8,21 +8,43 @@
{
options = {
apps.gaming = {
enable = true;
enable = lib.mkEnableOption "enable gaming";
steam.enable = lib.mkEnableOption "enable steam";
minecraft.enable = lib.mkEnableOption "enable minecraft";
};
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf (config.apps.gaming.enable) cartridges)
(lib.mkIf (config.apps.gaming.enable) lutris)
(lib.mkIf (config.apps.gaming.minecraft.enable) prismlauncher)
(lib.mkIf (config.apps.gaming.steam.enable) adwsteamgtk)
];
environment.systemPackages =
with pkgs;
[ ]
++ (
if (config.apps.gaming.enable) then
[
cartridges
lutris
]
else
[ ]
)
++ (
if (config.apps.gaming.minecraft.enable) then
[ prismlauncher ]
else
[ ]
)
++ (
if (config.apps.gaming.steam.enable) then
[ adwsteamgtk ]
else
[ ]
);
programs = {
steam = lib.mkIf config.apps.gaming.steam.enable {
steam =
if config.apps.gaming.steam.enable then
{
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
@ -35,7 +57,9 @@
extraPackages = with pkgs; [
gamescope
];
};
}
else
{ };
gamescope = {
enable = true;
capSysNice = true;

View file

@ -15,10 +15,25 @@
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf (apps.image.base.enable) nomacs)
(lib.mkIf (apps.image.editing.enable) gimp3-with-plugins)
(lib.mkIf (apps.image.editing.enable) krita)
];
environment.systemPackages =
with pkgs;
[ ]
++ (
if (config.apps.image.base.enable) then
[ nomacs ]
else
[ ]
)
++ (
if (config.apps.image.editing.enable) then
[
gimp3-with-plugins
krita
]
else
[ ]
);
};
}

View file

@ -26,9 +26,19 @@
};
config = {
environment.systemPackages = [
(lib.mkIf config.apps.internet.browsers.zen-browser.enable config.apps.internet.browsers.zen-browser.package)
(lib.mkIf config.apps.internet.browsers.tor-browser.enable config.apps.internet.browsers.tor-browser.package)
];
environment.systemPackages =
[ ]
++ (
if config.apps.internet.browsers.zen-browser.enable then
[ config.apps.internet.browsers.zen-browser.package ]
else
[ ]
)
++ (
if config.apps.internet.browsers.tor-browser.enable then
[ config.apps.internet.browsers.tor-browser.package ]
else
[ ]
);
};
}

View file

@ -16,16 +16,43 @@
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf (config.apps.misc.obsidian.enable) obsidian)
(lib.mkIf (config.apps.misc.bitwarden.enable) rbw (
lib.mkIf (config.desktop.shell.rofi.enable) pinentry-curses rofi-rbw
))
(lib.mkIf (config.apps.misc.blender.enable) blender)
environment.systemPackages =
with pkgs;
[
libsecret
gcr_4
pass
];
]
++ (
if (config.apps.misc.obsidian.enable) then
[ obsidian ]
else
[ ]
)
++ (
if (config.apps.misc.bitwarden.enable) then
[ rbw ]
++ (
if (config.desktop.shell.rofi.enable) then
[
pinentry-curses
rofi-rbw
]
else
[ ]
)
else
[ ]
)
++ (
if (config.apps.misc.blender.enable) then
[ blender ]
else
[ ]
);
programs = {
seahorse.enable = true;
};

View file

@ -31,12 +31,18 @@
};
config = {
programs = {
kdeconnect = lib.mkIf config.apps.sync.kde-connect.enable {
kdeconnect =
if config.apps.sync.kde-connect.enable then
{
enable = true;
};
}
else
{ };
};
services = {
syncthing = lib.mkIf config.apps.sync.syncthing.enable {
syncthing =
if config.apps.sync.syncthing.enable then
{
enable = true;
tray.enable = true;
guiAddress = "0.0.0.0:8384";
@ -44,9 +50,11 @@
devices = config.apps.sync.syncthing.devices;
folders = config.apps.sync.syncthing.folders;
};
overrideDevices = lib.mkIf (config.apps.sync.syncthing.devices == { }) false;
overrideFolders = lib.mkIf (config.apps.sync.syncthing.folders == { }) false;
};
overrideDevices = if (config.apps.sync.syncthing.devices == { }) then false else true;
overrideFolders = if (config.apps.sync.syncthing.folders == { }) then false else true;
}
else
{ };
};
};
}

View file

@ -19,7 +19,9 @@
bc
openssl
]
++ lib.mkIf config.apps.terminal.toys [
++ (
if config.apps.terminal.toys then
[
asciiquarium-transparent
cava
@ -28,6 +30,9 @@
fastfetch
cmatrix
astroterm
];
]
else
[ ]
);
};
}

View file

@ -13,13 +13,25 @@
};
};
config = lib.mkIf config.apps.terminal.kitty.enable {
terminal = lib.mkIf (config.apps.terminal.default == "kitty") {
package = pkgs.kitty;
binary = "${pkgs.kitty}/bin/kitty";
};
environment.systemPackages = with pkgs; [
config = {
# apps.terminal =
# if (config.apps.terminal.default == "kitty") then
# {
# package = pkgs.kitty;
# binary = "${pkgs.kitty}/bin/kitty";
# }
# else
# { };
environment.systemPackages =
with pkgs;
[ ]
++ (
if config.apps.terminal.kitty.enable then
[
kitty
];
]
else
[ ]
);
};
}

View file

@ -18,8 +18,16 @@ in
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf (tt.ranger.enable) ranger)
];
environment.systemPackages =
with pkgs;
[
]
++ (
if tt.ranger.enable then
[ ranger ]
else
[ ]
);
};
}

View file

@ -16,11 +16,32 @@
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf (apps.video.base.enable) mpv)
(lib.mkIf (apps.video.editing.enable) kdePackages.kdenlive)
(lib.mkIf (apps.video.media.enable) jellyfin-desktop)
(lib.mkIf (apps.video.media.enable) pipeline)
];
environment.systemPackages =
with pkgs;
[ ]
++ (
if config.apps.video.base.enable then
[ mpv ]
else
[ ]
)
++ (
if config.apps.video.editing.enable then
[ kdePackages.kdenlive ]
else
[ ]
)
++ (
if config.apps.video.media.enable then
[
jellyfin-desktop
pipeline
]
else
[ ]
);
};
}

View file

@ -30,22 +30,35 @@
programs = {
uwsm = {
waylandCompositors = {
hyprland = lib.mkIf config.desktop.window-managers.hyprland.enable {
hyprland =
if config.desktop.window-managers.hyprland.enable then
{
prettyName = "Hyprland";
comment = "Hyprland";
binPath = "${config.programs.hyprland.package}/bin/start-hyprland";
};
sway = lib.mkIf config.desktop.window-managers.sway.enable {
}
else
{ };
sway =
if config.desktop.window-managers.sway.enable then
{
prettyName = "Sway";
comment = "Sway";
binPath = "${config.programs.sway.package}/bin/sway --session";
};
niri = lib.mkIf config.desktop.window-managers.niri.enable {
}
else
{ };
niri =
if config.desktop.window-managers.niri.enable then
{
prettyName = "Niri";
comment = "Niri";
binPath = "${config.programs.niri.package}/bin/niri-session";
};
};
};
};
}
else
{ };
};
};
};
xdg.portal.enable = true;
}

View file

@ -12,20 +12,23 @@
walker.enable = lib.mkEnableOption "enable walker";
rofi.enable = lib.mkEnableOption "enable rofi";
launcher = lib.mkOption {
default = (lib.mkIf config.desktop.shell.walker.enable "walker");
default = (if config.desktop.shell.walker.enable then "walker" else null);
description = "default launcher";
};
};
};
config = {
programs = {
walker = lib.mkIf config.desktop.shell.walker.enable {
enable = true;
};
};
environment.systemPackages = with pkgs; [
(lib.mkIf (config.desktop.shell.rofi.enable) rofi)
];
environment.systemPackages =
with pkgs;
[
]
++ (
if config.desktop.shell.rofi.enable then
[ rofi ]
else
[ ]
);
};
}

View file

@ -12,13 +12,4 @@
noctalia.enable = lib.mkEnableOption "enable noctalia";
};
};
imports = lib.mkIf config.desktop.shell.noctalia.enable [
inputs.noctalia.homeModules.default
];
config = lib.mkIf config.desktop.shell.noctalia.enable {
desktop.shell.swww.enable = lib.mkDefault false;
programs.noctalia-shell = {
enable = true;
};
};
}

View file

@ -13,10 +13,20 @@
};
};
config = lib.mkIf config.desktop.shell.swww.enable {
environment.systemPackages = with pkgs; [
config =
{
environment.systemPackages =
with pkgs;
[ ]
++ (
if config.desktop.shell.swww.enable then
[
waypaper
swww
];
]
else
[ ]
);
};
}

View file

@ -12,11 +12,15 @@
};
};
config = lib.mkIf config.desktop.shell.waybar.enable {
programs = {
config = {
programs =
if config.desktop.shell.waybar.enable then
{
waybar = {
enable = true;
};
};
}
else
{ };
};
}

View file

@ -13,10 +13,21 @@
};
};
config = lib.mkIf config.desktop.utilities.grimblast.enable {
environment.systemPackages = with pkgs; [
config =
{
environment.systemPackages =
with pkgs;
[ ]
++ (
if config.desktop.utilities.grimblast.enable then
with pkgs;
[
grimblast
gradia
];
]
else
[ ]
);
};
}

View file

@ -14,14 +14,20 @@
};
};
};
config = lib.mkIf config.desktop.window-managers.hyprland.enable {
programs.hyprland = {
config =
{
programs.hyprland =
if config.desktop.window-managers.hyprland.enable then
{
enable = true;
withUWSM = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
}
else
{ };
};
}

View file

@ -13,13 +13,24 @@
};
};
};
config = lib.mkIf config.desktop.window-managers.niri.enable {
services.gnome.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [
config = {
environment.systemPackages =
with pkgs;
[ ]
++ (
if config.desktop.window-managers.niri.enable then
[
xwayland-satellite
];
programs.niri = {
]
else
[ ]
);
programs.niri =
if config.desktop.window-managers.niri.enable then
{
enable = true;
};
}
else
{ };
};
}

View file

@ -13,12 +13,15 @@
};
};
};
config = lib.mkIf config.desktop.window-managers.sway.enable {
services.gnome.gnome-keyring.enable = true;
programs.sway = {
config = {
programs.sway =
if config.desktop.window-managers.sway.enable then
{
enable = true;
wrapperFeatures.gtk = true;
package = null;
};
}
else
{ };
};
}

View file

@ -8,6 +8,7 @@
{
imports = [
./boot.nix
./git.nix
./shell.nix
./networking.nix
./localization.nix

View file

@ -10,7 +10,7 @@
programs = {
git = {
enable = true;
settings = {
config = {
init = {
defaultBranch = "main";
};

View file

@ -2,7 +2,7 @@
{
networking = {
domain = config.domain;
domain = "maty.tf";
networkmanager.enable = true;
firewall = {
enable = true;