Added productive build

This commit is contained in:
EsVagy42 2025-05-28 04:33:36 +02:00
parent afb1bb372c
commit 8b540fc0ba
3 changed files with 149 additions and 102 deletions

View file

@ -1 +1 @@
Added new konsole sessionui.rc
Added productive build

View file

@ -95,7 +95,7 @@
programs.kdeconnect.enable = true;
programs.steam = {
enable = true;
enable = !config.productiveBuild;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
@ -126,7 +126,9 @@
];
services.flatpak.enable = true;
services.flatpak.packages =
services.flatpak.packages = if config.productiveBuild then
[ ]
else
[ "flathub:app/org.opensurge2d.OpenSurge//stable" ];
services.flatpak.remotes = {
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
@ -151,13 +153,12 @@
};
};
environment.sessionVariables = {
GTK_USE_PORTAL = 1;
};
environment.sessionVariables = { GTK_USE_PORTAL = 1; };
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
environment.systemPackages = let
basePackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
kdePackages.krecorder
@ -184,8 +185,6 @@
kdePackages.merkuro
kdePackages.francis
yt-dlp
wl-clipboard
lldb
kdePackages.kompare
@ -216,6 +215,15 @@
inkscape
kdePackages.kdenlive
libreoffice
pandoc
texliveFull
beeper
];
unproductivePackages = with pkgs; [
yt-dlp
srb2
superTuxKart
kdePackages.kjumpingcube
@ -235,13 +243,11 @@
wineWowPackages.staging
winetricks
beeper
libreoffice
pandoc
texliveFull
];
in if config.productiveBuild then
basePackages
else
basePackages ++ unproductivePackages;
fonts.packages = with pkgs; [ nerd-fonts.hack ];
@ -291,5 +297,36 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
services.blocky = {
enable = config.productiveBuild;
settings = {
ports.dns = 53; # Port for incoming DNS Queries.
upstreams.groups.default = [
"https://one.one.one.one/dns-query" # Using Cloudflare's DNS over HTTPS server for resolving queries.
];
# For initially solving DoH/DoT Requests when no system Resolver is available.
bootstrapDns = {
upstream = "https://one.one.one.one/dns-query";
ips = [ "1.1.1.1" "1.0.0.1" ];
};
#Enable Blocking of certian domains.
blocking = {
blackLists = {
unproductive = [''
|
www.youtube.com
tilvids.com
mastodon.social
online-go.com
''];
};
#Configure what block categories are used
clientGroupsBlock = { default = [ "unproductive" ]; };
};
};
};
networking.nameservers =
if config.productiveBuild then [ "127.0.0.1" ] else [ ];
}

View file

@ -29,14 +29,21 @@
};
lib = nixpkgs.lib;
in {
nixosConfigurations = {
nixos = lib.nixosSystem {
nixosConfigurations = let
baseSystem = { productiveBuild }:
lib.nixosSystem {
inherit system;
modules = [
{
environment.systemPackages =
[ inputs.nixvim.packages.${system}.default ];
}
({ lib, ... }: {
options.productiveBuild = lib.mkOption {
type = lib.types.bool;
default = productiveBuild;
};
})
./configuration.nix
./devices/default/default.nix
home-manager.nixosModules.home-manager
@ -51,6 +58,9 @@
flatpaks.nixosModules.declarative-flatpak
];
};
in {
nixos = baseSystem { productiveBuild = false; };
productive = baseSystem { productiveBuild = true; };
alt = lib.nixosSystem {
inherit system;
modules = [