dotfiles

My PC Dotfiles & Website
commit b86eec7d56cb52471b2c161688f1bd5f60866ac1
parent 53009e8465f85e8782e939e71d61b5bd70f7df8a
Author: maydayv7 <maydayv7@gmail.com>
Date:   Sat, 28 Oct 2023 20:00:52 +0530

fix: Multiple Fixes

+ Add `nix.tools`
+ Fix Install Media User Configuration
+ Revert making `firefox` enabled by default
+ Fix Formatting errors

Diffstat:

14 files changed, 49 insertions(+), 41 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - name: Fix Relative Flake Inputs run: nix flake lock --update-input systems - name: Build Default Install Media - run: nix build .#installMedia.xfce.config.system.build.isoImage -L --show-trace + run: nix build .#installMedia.default.config.system.build.isoImage -L --show-trace - name: Draft Release uses: ncipollo/release-action@v1.13.0 with: diff --git a/.gitlab/pipelines/build.yml b/.gitlab/pipelines/build.yml @@ -21,9 +21,7 @@ iso: - tags except: - /^(?!stable).+@/ - variables: - ISO: xfce # Default Variant - script: nix build .#installMedia.$ISO.config.system.build.isoImage -L --show-trace + script: nix build .#installMedia.default.config.system.build.isoImage -L --show-trace after_script: - nix profile install .#curl - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./result/iso/nixos.iso ${PACKAGE_REGISTRY}/installMedia/${CI_COMMIT_TAG}/NixOS.iso' diff --git a/README.md b/README.md @@ -423,7 +423,6 @@ You can navigate to the `README`s present in the various directories to know mor - Fix first boot installation - Add conditional to `lib.map.files` - Add `gui.{wallpaper,wayland}` -- Enable `firefox` by default ### 23.05 (v12) diff --git a/configuration.nix b/configuration.nix @@ -99,21 +99,15 @@ in (name: import name inputs.windows.lib self.legacyPackages."${builtins.head systems}"); ## Install Media Configuration ## - installMedia = { - # GNOME Desktop - gnome = build.iso { + installMedia = let + config = { timezone = "Asia/Kolkata"; locale = "IN"; kernel = "zfs"; - gui.desktop = "gnome"; - }; - - # XFCE Desktop - xfce = build.iso { - timezone = "Asia/Kolkata"; - locale = "IN"; - kernel = "zfs"; - gui.desktop = "xfce"; }; + in rec { + default = xfce; + gnome = build.iso (config // {gui.desktop = "gnome";}); + xfce = build.iso (config // {gui.desktop = "xfce";}); }; } diff --git a/devices/Futura.nix b/devices/Futura.nix @@ -16,7 +16,7 @@ }; gui.desktop = "xfce"; - apps.list = ["office"]; + apps.list = ["firefox" "office"]; # User Navya user = { diff --git a/devices/Vortex/default.nix b/devices/Vortex/default.nix @@ -26,8 +26,13 @@ wallpaper = "Sunrise"; }; + nix = { + index = true; + tools = true; + }; + shell.utilities = true; - apps.list = ["discord" "git" "office" "vscode" "wine"]; + apps.list = ["discord" "firefox" "git" "office" "vscode" "wine"]; # User V7 user = { diff --git a/lib/build.nix b/lib/build.nix @@ -4,8 +4,8 @@ lib, ... }: let - inherit (lib) flatten hasPrefix mapAttrsToList nameValuePair recursiveUpdate splitString; inherit (builtins) attrValues concatStringsSep filter hasAttr listToAttrs map readFile; + inherit (lib) flatten hasPrefix mapAttrsToList mkForce nameValuePair recursiveUpdate splitString; in rec { ## Builder Functions ## each = attr: func: @@ -22,6 +22,7 @@ in rec { gui.desktop = config.gui.desktop + "-minimal"; # Default User + imports = [{user.home = mkForce {};}]; user = { name = "nixos"; description = "Default User"; diff --git a/modules/README.md b/modules/README.md @@ -45,6 +45,7 @@ The `modules` directory contains custom-made pure Flakes-compatible configuratio - [`nix`](./nix): Module that configures the Nix Package Manager - - `index`: Enable Package Indexer - `"true" / "false"` + - `tools`: Enable Additional Nix Tools - `"true" / "false"` - [`user`](./user): Module that controls User Creation and Security Settings - diff --git a/modules/apps/firefox.nix b/modules/apps/firefox.nix @@ -4,9 +4,12 @@ pkgs, files, ... -}: { +}: let + inherit (lib) mkIf util; + enable = builtins.elem "firefox" config.apps.list; +in { ## Firefox Browser Configuration ## - config = { + config = mkIf enable { environment = { systemPackages = [pkgs.firefox]; sessionVariables.MOZ_USE_XINPUT2 = "1"; @@ -16,7 +19,7 @@ persist.directories = [".cache/mozilla/firefox" ".mozilla/firefox"]; home = { # File Associations - xdg.mimeApps.defaultApplications = lib.util.build.mime files.xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime files.xdg.mime { browser = ["firefox.desktop"]; }; diff --git a/modules/default.nix b/modules/default.nix @@ -28,9 +28,10 @@ in { update ? "", kernel, kernelModules ? [], - gui ? {}, apps ? {}, + gui ? {}, hardware ? {}, + nix ? {}, shell ? {}, user ? null, users ? null, @@ -123,10 +124,11 @@ in { # Package Configuration nixpkgs = {inherit pkgs;}; - nix = { - settings.max-jobs = hardware.cores or 4; - index = mkIf (update == "") true; - }; + nix = + { + settings.max-jobs = hardware.cores or 4; + } + // nix; system = { # Updates diff --git a/modules/gui/desktop/xfce.nix b/modules/gui/desktop/xfce.nix @@ -185,7 +185,7 @@ in { # Minimal XFCE Desktop Configuration (mkIf (desktop == "xfce-minimal") { # Utilities - environment.systemPackages = [pkgs.firefox]; + environment.systemPackages = [pkgs.epiphany]; # Disabled Services services.tumbler.enable = mkForce false; diff --git a/modules/nix/default.nix b/modules/nix/default.nix @@ -1,18 +1,24 @@ { + config, lib, inputs, pkgs, ... }: let - inherit (lib.util.map) array; + inherit (lib) mkEnableOption optionals util; + inherit (config.nix) tools; in { imports = [./index.nix inputs.utils.nixosModules.autoGenFromInputs]; + options.nix.tools = mkEnableOption "Enable Additional Nix Tools"; + ## Nix Settings ## config = { # Utilities - user.persist.directories = [".cache/nix" ".cache/manix"]; - environment.systemPackages = [pkgs.cachix] ++ array (import ./tools.nix) pkgs; + user.persist.directories = [".cache/nix"] ++ optionals tools [".cache/manix"]; + environment.systemPackages = + [pkgs.cachix] + ++ optionals tools (util.map.array (import ./tools.nix) pkgs); # Settings nix = { @@ -41,6 +47,7 @@ in { sandbox = true; system-features = ["kvm" "recursive-nix"]; }; + extraOptions = '' accept-flake-config = true warn-dirty = false diff --git a/modules/shell/default.nix b/modules/shell/default.nix @@ -35,7 +35,6 @@ in { file lolcat neofetch - nixos-option shellcheck stylua tree @@ -71,7 +70,6 @@ in { config = { style = "full"; italic-text = "always"; - theme = "Monokai Extended Bright"; map-syntax = [".ignore:Git Ignore"]; }; }; @@ -90,10 +88,8 @@ in { cat = "bat"; colors = "${scripts.colors}"; edit = "sudo $EDITOR"; - l = "ls --color --group-directories-first"; ls = "eza -b -h -l -F --octal-permissions --icons --time-style iso"; sike = "neofetch"; - nixos-option = "nixos-option -I nixpkgs=${path.system}/lib/compat"; }; }; }; diff --git a/modules/user/home.nix b/modules/user/home.nix @@ -14,11 +14,13 @@ systemd.user.startServices = true; # Package Configuration - home.stateVersion = config.system.stateVersion; - home.file = { - ".config/nixpkgs/config.nix".source = ../nix/config.nix; - ".config/nix/nix.conf".source = - config.environment.etc."nix/nix.conf".source; + home = { + stateVersion = config.system.stateVersion; + file = { + ".config/nixpkgs/config.nix".source = ../nix/config.nix; + ".config/nix/nix.conf".source = + config.environment.etc."nix/nix.conf".source; + }; }; }; };