From 39157db0dae083f09e6fde699e29d2f9dc15165a Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sun, 28 Apr 2024 15:11:56 -0600 Subject: [PATCH] cleanup --- flake.nix | 12 +++++++++++ modules/apps.nix | 4 +--- modules/apps/art.nix | 6 +++--- modules/apps/dictionaries.nix | 9 +++----- modules/apps/fonts.nix | 11 ++-------- modules/apps/gaming.nix | 27 +++++++++++------------ modules/apps/internet.nix | 17 ++++++--------- modules/apps/multimedia.nix | 18 ++++++---------- modules/apps/office.nix | 4 ++-- modules/default.nix | 40 ----------------------------------- modules/dev/haskell.nix | 4 +--- modules/dev/nix.nix | 4 +--- modules/dev/python.nix | 10 ++++----- modules/services.nix | 4 +--- modules/services/network.nix | 6 ++---- modules/services/nvidia.nix | 4 +--- modules/services/sound.nix | 7 +----- modules/shell.nix | 4 +--- modules/shell/exercism.nix | 4 +--- modules/template.nix | 6 +----- 20 files changed, 62 insertions(+), 139 deletions(-) delete mode 100644 modules/default.nix diff --git a/flake.nix b/flake.nix index 6342963..9d716d0 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,18 @@ (self: super: { planify = pkgsU.planify; gdtoolkit = pkgsU.gdtoolkit; + lutris = super.lutris.override { + extraPkgs = pkgs: [ + pkgs.winetricks + pkgs.wine64Packages.stable + pkgs.wineWowPackages.stable + ]; + }; + nerdfonts = super.nerdfonts.override { + fonts = [ "CascadiaCode" "ComicShannsMono" "Iosevka" ]; + }; + handbrake = super.handbrake.override { useGtk = true; }; + discord = super.discord.override { withOpenASAR = true; }; }) ]; }) diff --git a/modules/apps.nix b/modules/apps.nix index 270693a..82c23d0 100644 --- a/modules/apps.nix +++ b/modules/apps.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { imports = [ ./apps/art.nix ./apps/dictionaries.nix diff --git a/modules/apps/art.nix b/modules/apps/art.nix index a3583dd..db95168 100644 --- a/modules/apps/art.nix +++ b/modules/apps/art.nix @@ -5,16 +5,16 @@ }; config = lib.mkIf config.my.apps.art.enable { users.users.jawz.packages = with pkgs; - ([ + [ gimp # the coolest bestest art program to never exist krita # art to your heart desire! mypaint # not the best art program mypaint-brushes # but it's got some mypaint-brushes1 # nice damn brushes - # drawpile # arty party with friends!! pureref # create inspiration/reference boards blender # cgi animation and sculpting - ]) ++ (if config.my.dev.gameDev.enable then [ + # drawpile # arty party with friends!! + ] ++ (if config.my.dev.gameDev.enable then [ godot_4 # game development gdtoolkit # gdscript language server ] else diff --git a/modules/apps/dictionaries.nix b/modules/apps/dictionaries.nix index 2bfe334..bdcd9a4 100644 --- a/modules/apps/dictionaries.nix +++ b/modules/apps/dictionaries.nix @@ -1,14 +1,11 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.apps.dictionaries.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.apps.dictionaries.enable { - users.users.jawz.packages = with pkgs; ([ + users.users.jawz.packages = with pkgs; [ hunspell hunspellDicts.it_IT hunspellDicts.es_MX - hunspellDicts.es_ES hunspellDicts.en_CA-large - ]); + ]; }; } diff --git a/modules/apps/fonts.nix b/modules/apps/fonts.nix index efb1994..d4311a2 100644 --- a/modules/apps/fonts.nix +++ b/modules/apps/fonts.nix @@ -1,13 +1,6 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.apps.fonts.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.apps.fonts.enable { - users.users.jawz.packages = with pkgs; ([ - (nerdfonts.override { - fonts = [ "CascadiaCode" "ComicShannsMono" "Iosevka" ]; - }) - symbola - ]); + users.users.jawz.packages = with pkgs; [ nerdfonts symbola ]; }; } diff --git a/modules/apps/gaming.nix b/modules/apps/gaming.nix index 498ebe9..aeb199a 100644 --- a/modules/apps/gaming.nix +++ b/modules/apps/gaming.nix @@ -1,25 +1,22 @@ { config, lib, pkgs, ... }: { options.my.apps.gaming.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.apps.gaming.enable { - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; + programs = { + gamemode.enable = true; + steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; }; - users.users.jawz.packages = with pkgs; ([ - (lutris.override { - extraPkgs = pkgs: [ - winetricks - wine64Packages.stable - wineWowPackages.stable - ]; - }) + users.users.jawz.packages = with pkgs; [ + lutris # games launcher & emulator hub cartridges # games launcher - heroic # install epic games gamemode # optimizes linux to have better gaming performance + heroic # install epic games + protonup-qt # update proton-ge # grapejuice # roblox manager # minecraft # minecraft official launcher - protonup-qt # update proton-ge # ns-usbloader # load games into my switch # emulators @@ -29,6 +26,6 @@ dolphin-emu # wii emulator citra-nightly # 3Ds emulator snes9x-gtk # snes emulator - ]); + ]; }; } diff --git a/modules/apps/internet.nix b/modules/apps/internet.nix index 9b3eae0..adaea69 100644 --- a/modules/apps/internet.nix +++ b/modules/apps/internet.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.apps.internet.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.apps.internet.enable { programs = { @@ -10,8 +8,8 @@ languagePacks = [ "en-CA" "es-MX" "it" ]; }; }; - services = { psd.enable = true; }; - users.users.jawz.packages = with pkgs; ([ + services.psd.enable = true; + users.users.jawz.packages = with pkgs; [ nextcloud-client # self-hosted google-drive alternative fragments # beautiful torrent client protonmail-bridge # bridge for protonmail @@ -19,12 +17,9 @@ chromium # web browser with spyware included telegram-desktop # furry chat nicotine-plus # remember Ares? - vesktop - (pkgs.discord.override { - withOpenASAR = true; - # withVencord = true; - }) + vesktop # screen share with audio discord + discord # :3 # hugo # website engine - ]); + ]; }; } diff --git a/modules/apps/multimedia.nix b/modules/apps/multimedia.nix index ef7d97f..e0f7f65 100644 --- a/modules/apps/multimedia.nix +++ b/modules/apps/multimedia.nix @@ -1,22 +1,18 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.apps.multimedia.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.apps.multimedia.enable { - users.users.jawz.packages = with pkgs; ([ - # cozy # audiobooks player - # gnome-podcasts # podcast player - # hakuneko # manga & comic GUI downloader + users.users.jawz.packages = with pkgs; [ celluloid # video player curtail # image compressor easyeffects # equalizer - # (handbrake.override { - # useGtk = true; - # }) # video converter, may be unnecessary + handbrake # video converter, may be unnecessary identity # compare images or videos mousai # poor man shazam shortwave # listen to world radio tagger # tag music files - ]); + # cozy # audiobooks player + # gnome-podcasts # podcast player + # hakuneko # manga & comic GUI downloader + ]; }; } diff --git a/modules/apps/office.nix b/modules/apps/office.nix index 8ffe210..9fe288b 100644 --- a/modules/apps/office.nix +++ b/modules/apps/office.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: { options.my.apps.office.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.apps.office.enable { - users.users.jawz.packages = with pkgs; ([ + users.users.jawz.packages = with pkgs; [ libreoffice # office, but based calibre # ugly af eBook library manager newsflash # feed reader, syncs with nextcloud @@ -10,6 +10,6 @@ # foliate # gtk eBook reader # wike # gtk wikipedia wow! # denaro # manage your finances - ]); + ]; }; } diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index 5612018..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ pkgs, config, lib, inputs, outputs, myLib, ... }: -let - cfg = config.myNixOS; - - features = myLib.extendModules (name: { - extraOptions = { - myNixOS.${name}.enable = - lib.mkEnableOption "enable my ${name} configuration"; - }; - configExtension = config: (lib.mkIf cfg.${name}.enable config); - }) (myLib.filesIn ./features); - - bundles = myLib.extendModules (name: { - extraOptions = { - myNixOS.bundles.${name}.enable = - lib.mkEnableOption "enable ${name} module bundle"; - }; - configExtension = config: (lib.mkIf cfg.bundles.${name}.enable config); - }) (myLib.filesIn ./bundles); - - services = myLib.extendModules (name: { - extraOptions = { - myNixOS.services.${name}.enable = - lib.mkEnableOption "enable ${name} service"; - }; - configExtension = config: (lib.mkIf cfg.services.${name}.enable config); - }) (myLib.filesIn ./services); - -in { - imports = [ inputs.home-manager.nixosModules.home-manager ] ++ features - ++ bundles ++ services; - options.myNixOS = { sharedSettings = { }; }; - config = { - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nixpkgs = { - hostPlatform = lib.mkDefault "x86_64-linux"; - config.allowUnfree = true; - }; - }; -} diff --git a/modules/dev/haskell.nix b/modules/dev/haskell.nix index 05f3dd8..1b366dc 100644 --- a/modules/dev/haskell.nix +++ b/modules/dev/haskell.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.dev.haskell.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.haskell.enable { users.users.jawz.packages = with pkgs; ([ diff --git a/modules/dev/nix.nix b/modules/dev/nix.nix index 367f8ab..f639d80 100644 --- a/modules/dev/nix.nix +++ b/modules/dev/nix.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.dev.nix.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.nix.enable { users.users.jawz.packages = with pkgs; ([ diff --git a/modules/dev/python.nix b/modules/dev/python.nix index 08de9bd..30ed7fd 100644 --- a/modules/dev/python.nix +++ b/modules/dev/python.nix @@ -1,15 +1,10 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.dev.python.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.dev.python.enable { users.users.jawz.packages = with pkgs; ([ pipenv # python development workflow for humans (python3.withPackages (ps: with ps; [ - # nose # testing and running python scripts - # poetry # dependency management made easy - # pytest # framework for writing tests black # Python code formatter editorconfig # follow rules of contributin flake8 # wraper for pyflakes, pycodestyle and mccabe @@ -17,6 +12,9 @@ pyflakes # checks source code for errors pylint # bug and style checker for python speedtest-cli # check internet speed from the comand line + # nose # testing and running python scripts + # poetry # dependency management made easy + # pytest # framework for writing tests ])) ]); }; diff --git a/modules/services.nix b/modules/services.nix index b8312eb..a3cd8a6 100644 --- a/modules/services.nix +++ b/modules/services.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { imports = [ ./services/network.nix ./services/nvidia.nix diff --git a/modules/services/network.nix b/modules/services/network.nix index 2bf4bfd..77d0522 100644 --- a/modules/services/network.nix +++ b/modules/services/network.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.services.network.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.services.network.enable { networking = { @@ -12,7 +10,7 @@ 192.168.1.69 server 192.168.1.100 miniserver ''; - firewall = { enable = true; }; + firewall.enable = true; }; }; } diff --git a/modules/services/nvidia.nix b/modules/services/nvidia.nix index ce97052..4ce4e94 100644 --- a/modules/services/nvidia.nix +++ b/modules/services/nvidia.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.services.nvidia.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.services.nvidia.enable { services.xserver.videoDrivers = [ "nvidia" ]; diff --git a/modules/services/sound.nix b/modules/services/sound.nix index e7b21a4..0ac5a7d 100644 --- a/modules/services/sound.nix +++ b/modules/services/sound.nix @@ -1,9 +1,4 @@ -{ config, lib, pkgs, ... }: -# let -# nixGaming = import (builtins.fetchTarball -# "https://github.com/fufexan/nix-gaming/archive/master.tar.gz"); -# in -{ +{ config, lib, pkgs, ... }: { imports = [ # nixGaming.nixosModules.pipewireLowLatency ]; diff --git a/modules/shell.nix b/modules/shell.nix index 01201f5..bd8e5bb 100644 --- a/modules/shell.nix +++ b/modules/shell.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { imports = [ ./shell/exercism.nix ./dev/python.nix ./dev/haskell.nix ]; my = { shell = { exercism.enable = lib.mkDefault false; }; diff --git a/modules/shell/exercism.nix b/modules/shell/exercism.nix index 31d1189..bd4ba8b 100644 --- a/modules/shell/exercism.nix +++ b/modules/shell/exercism.nix @@ -1,6 +1,4 @@ -{ config, lib, pkgs, ... }: - -{ +{ config, lib, pkgs, ... }: { options.my.shell.exercism.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.shell.exercism.enable { users.users.jawz.packages = with pkgs; ([ diff --git a/modules/template.nix b/modules/template.nix index 11afecc..7a2e40f 100644 --- a/modules/template.nix +++ b/modules/template.nix @@ -1,5 +1 @@ -{ config, lib, pkgs, ... }: - -{ - users.users.jawz.packages = with pkgs; ([ ]); -} +{ config, lib, pkgs, ... }: { users.users.jawz.packages = with pkgs; ([ ]); }