diff --git a/modules/home/default.nix b/modules/home/default.nix index 558e853..d39c679 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,10 +1,17 @@ { self, inputs, ... }: { - flake.homeModules.baseHome = { config, pkgs, ... }: { + flake.homeModules.core-home = { config, pkgs, ... }: { + + #modules = [ + #self.modules.terminal + #self.modules.theme + #]; imports = [ - ./terminal - self.modules.theme + #./terminal + self.modules.terminal + self.modules.desktop + #self.modules.theme ]; home = { diff --git a/modules/home/terminal/default.nix b/modules/home/terminal/default.nix index 6eaa7d0..f121351 100644 --- a/modules/home/terminal/default.nix +++ b/modules/home/terminal/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ self, inputs, ... }: # let bindings let @@ -12,27 +12,42 @@ in { - # list of modules to include - imports = [ - ./programs - ./kitty.nix - ./fish.nix - ]; + # terminal supermodule + flake.homeModules.terminal = { config, pkgs, ... }: { - # environment variables - home.sessionVariables = { + # list of modules to include + imports = [ - # clean up ~ - LESSHISTFILE = "${cache}/less/history"; - LESSKEY = "${conf}/less/lesskey"; + # terminal emulator + self.modules.kitty + # text editor + self.modules.helix + # file manager + self.modules.yazi + # shell and prompt + self.modules.fish + # version control + self.modules.git - WINEPREFIX = "${data}/wine"; - XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority"; + ]; - EDITOR = "helix"; - DIRENV_LOG_FORMAT = ""; + # environment variables + home.sessionVariables = { + + # clean up ~ + LESSHISTFILE = "${cache}/less/history"; + LESSKEY = "${conf}/less/lesskey"; + + WINEPREFIX = "${data}/wine"; + XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority"; + + EDITOR = "helix"; + DIRENV_LOG_FORMAT = ""; + + # auto-run programs using nix-index-database + NIX_AUTO_RUN = "1"; + }; - # auto-run programs using nix-index-database - NIX_AUTO_RUN = "1"; }; + } diff --git a/modules/home/terminal/fish.nix b/modules/home/terminal/fish.nix index bcae3fd..bee249b 100644 --- a/modules/home/terminal/fish.nix +++ b/modules/home/terminal/fish.nix @@ -1,12 +1,24 @@ { self, inputs, ... }: { - perSystem = { pkgs, ... }: { + flake.modules.homeManager.fish = { # defines a custom fish package - packages.myFish = inputs.wrapper-modules.wrappers.fish.wrap { + home.packages = with pkgs; [ + fish + ]; - settings = { - foo = bar; + programs = { + + # starship prompt + starship = { + enable = true; + settings = { }; + }; + + # fish shell + fish = { + enable = true; + settings = { }; }; }; diff --git a/modules/home/terminal/git.nix b/modules/home/terminal/git.nix index 72b32e0..a408fa3 100644 --- a/modules/home/terminal/git.nix +++ b/modules/home/terminal/git.nix @@ -1,14 +1,15 @@ { self, inputs, ... }: { - perSystem = { pkgs, ... }: { + # defines a custom git module + flake.modules.homeManager.git = { - # defines a custom git package - packages.myGit = inputs.wrapper-modules.wrappers.git.wrap { - - settings = { - foo = bar; - }; + # packages to include + home.packages = with pkgs; [ + git + ]; + programs.git = { + enable = true; }; }; diff --git a/modules/home/terminal/helix.nix b/modules/home/terminal/helix.nix index 70731cc..eeb07d1 100644 --- a/modules/home/terminal/helix.nix +++ b/modules/home/terminal/helix.nix @@ -1,10 +1,16 @@ { self, inputs, ... }: { + # defines a custom helix module flake.modules.homeManager.helix = { + home.packages = with pkgs; [ + helix + ]; + programs.helix = { - enable = true; # enables helix + # enables helix + enable = true; settings = { diff --git a/modules/home/terminal/yazi.nix b/modules/home/terminal/yazi.nix index 0b2e950..02846b5 100644 --- a/modules/home/terminal/yazi.nix +++ b/modules/home/terminal/yazi.nix @@ -1,26 +1,22 @@ { self, inputs, ... }: { - flake.nixosModules.niri = { pkgs, lib, ... }: { - programs.niri = { + # defines a custom yazi module + flake.modules.homeManager.yazi = { + + # packages to include + home.package = with pkgs; [ + yazi + ]; + + programs.yazi = { + + # enables yazi enable = true; - package = self.packages.${pkgs.stdenv.hostPlatform.system}.myNiri; - }; - }; - perSystem = { pkgs, ... }: { + # yazi settings + settings = { }; - packages.myNiri = inputs.wrapper-modules.wrappers.niri.wrap { - inherit pkgs; - settings = { - foo = bar; - foorbar = { - bar = true; - foo = "always"; - barbar = 5; - }; - }; }; }; - } diff --git a/modules/hosts/default.nix b/modules/hosts/default.nix index 309cb87..18730d7 100644 --- a/modules/hosts/default.nix +++ b/modules/hosts/default.nix @@ -25,9 +25,6 @@ inherit specialArgs; modules = [ - # include the core configuration - self.nixosModules.coreConfig - # specify host config directory ./hades diff --git a/modules/hosts/hades/configuration.nix b/modules/hosts/hades/configuration.nix index 3d6744e..ca6d304 100644 --- a/modules/hosts/hades/configuration.nix +++ b/modules/hosts/hades/configuration.nix @@ -3,7 +3,7 @@ { # defines a module - flake.nixosModules.hadesConfig = + flake.nixosModules.hades = { pkgs, lib, @@ -14,12 +14,7 @@ { # other modules to import - imports = [ - self.nixosModules.hadesHardware - self.nixosModules.coreConfig - self.nixosModules.programs - self.nixosModules.niri - ]; + imports = [ ]; # set hostname networking.hostName = "hades"; diff --git a/modules/hosts/hades/default.nix b/modules/hosts/hades/default.nix index 94ce41c..09bee3b 100644 --- a/modules/hosts/hades/default.nix +++ b/modules/hosts/hades/default.nix @@ -13,11 +13,11 @@ modules = [ # core system modules - self.nixosModules.coreConfig + self.nixosModules.core # hades system modules - self.nixosModules.hadesHardware - self.nixosModules.hadesConfig + self.nixosModules.hades + self.nixosModules.hades-hardware # home manager and home manager imports inputs.home-manager.nixosModules.home-manager @@ -25,8 +25,8 @@ home-manager.backupFileExtension = "bak"; home-manager.users.serenity = { imports = [ - config.flake.homeModules.baseHome - config.flake.homeModules.hadesHome + config.flake.homeModules.core-home + #config.flake.homeModules.hades-home ]; }; } diff --git a/modules/hosts/hades/hardware.nix b/modules/hosts/hades/hardware.nix index e2d749a..dee58c3 100644 --- a/modules/hosts/hades/hardware.nix +++ b/modules/hosts/hades/hardware.nix @@ -2,7 +2,7 @@ { # defines a module - flake.nixosModules.hadesHardware = + flake.nixosModules.hades-hardware = { config, lib, diff --git a/modules/system/core.nix b/modules/system/core.nix index a904a27..39a62fa 100644 --- a/modules/system/core.nix +++ b/modules/system/core.nix @@ -2,13 +2,12 @@ { - flake.nixosModules.coreConfig = { pkgs, ... }: { + flake.modules.nixos.core = { pkgs, ... }: { # other modules to load imports = [ - self.nixosModules.audioConfig - self.nixosModules.nixConfig - self.nixosModules.corePackages + self.nixosModules.audio + self.nixosModules.packages ]; # extra features diff --git a/modules/system/packages.nix b/modules/system/packages.nix index 58ea2e7..03ea978 100644 --- a/modules/system/packages.nix +++ b/modules/system/packages.nix @@ -1,14 +1,133 @@ { inputs, ... }: { # module declaration - flake.nixosModules.myFirstModule = { pkgs, ... }: { + flake.nixosModules.packages = { pkgs, ... }: { + + # environment variables + environment.variables = { + EDITOR = "helix"; + VISUAL = "helix"; + SYSTEMD_EDITOR = "helix"; + }; + + # nix settings + nix.settings = { + + # for packages not in nixpkgs + substituters = [ + "name.here" + ]; + # keys to sign aforementioned packages + trusted-public-keys = [ + "name.here" + ]; + }; + + # nixpkgs settings + nixpkgs = { + + # allows crud + config = { + allowUnfree = true; + allowBroken = true; + }; + + # overlays + overlays = [ + niri.overlays.niri + ]; + + }; # options declarations - programs.firefox.enable = true; + programs = { + + # necessary terminal programs + git.enable = true; + fish.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + #pinentryPackage = [ ]; + }; + + # binary support + nix-ld.enable = true; + appimage = { + enable = true; + binfmt = true; + }; + + }; + + # installs a stub elf loader to print an error + # message in the event that a user attempts + # to run an elf binary not compiled for nixos. + environment.stub-ld.enable = true; + + services = { + + # flatpak software + flatpak = { + enable = true; + }; + + }; # packages to include environment.systemPackages = with pkgs; [ + + # nix utilities + nvd + nix-tree + nix-init + nix-index + nix-prefetch + nix-output-monitor + + # filesystem + ddrutility + smartmontools + ntfs3g + exfatprogs + btrfs-progs + + # shells + fish + bash + + # core tools + btop helix + steam-run + android-cli + android-tools + magic-wormhole + + # cli tools + fd + bc + zip + icu + doas + tldr + wget + curl + file + tree + unzip + gnupg + s-tui + udiskie + busybox + ripgrep + killall + usbutils + pciutils + moreutils + libsecret + git-crypt + undervolt ]; }; diff --git a/modules/users/serenity.nix b/modules/users/serenity.nix index 70c0fcf..775a0ce 100644 --- a/modules/users/serenity.nix +++ b/modules/users/serenity.nix @@ -14,7 +14,7 @@ in { # user module declaration - flake.nixosModules.u-serenity = + flake.modules.nixos.${name} = { pkgs, ... }: @@ -42,8 +42,8 @@ in # user specific modules to import imports = [ - self.flake.homeModules.baseHome - #self.flake.homeModules.configName + self.flake.homeModules.core-home + #self.flake.homeModules.${name} ]; };