This commit is contained in:
serenity-F 2026-08-31 15:44:04 +10:00
parent 695c67bce5
commit c351c646a3
No known key found for this signature in database
13 changed files with 222 additions and 75 deletions

View file

@ -1,10 +1,17 @@
{ self, inputs, ... }: { { self, inputs, ... }: {
flake.homeModules.baseHome = { config, pkgs, ... }: { flake.homeModules.core-home = { config, pkgs, ... }: {
#modules = [
#self.modules.terminal
#self.modules.theme
#];
imports = [ imports = [
./terminal #./terminal
self.modules.theme self.modules.terminal
self.modules.desktop
#self.modules.theme
]; ];
home = { home = {

View file

@ -1,4 +1,4 @@
{ config, ... }: { self, inputs, ... }:
# let bindings # let bindings
let let
@ -12,27 +12,42 @@ in
{ {
# list of modules to include # terminal supermodule
imports = [ flake.homeModules.terminal = { config, pkgs, ... }: {
./programs
./kitty.nix
./fish.nix
];
# environment variables # list of modules to include
home.sessionVariables = { imports = [
# clean up ~ # terminal emulator
LESSHISTFILE = "${cache}/less/history"; self.modules.kitty
LESSKEY = "${conf}/less/lesskey"; # 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"; # environment variables
DIRENV_LOG_FORMAT = ""; 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";
}; };
} }

View file

@ -1,12 +1,24 @@
{ self, inputs, ... }: { { self, inputs, ... }: {
perSystem = { pkgs, ... }: { flake.modules.homeManager.fish = {
# defines a custom fish package # defines a custom fish package
packages.myFish = inputs.wrapper-modules.wrappers.fish.wrap { home.packages = with pkgs; [
fish
];
settings = { programs = {
foo = bar;
# starship prompt
starship = {
enable = true;
settings = { };
};
# fish shell
fish = {
enable = true;
settings = { };
}; };
}; };

View file

@ -1,14 +1,15 @@
{ self, inputs, ... }: { { self, inputs, ... }: {
perSystem = { pkgs, ... }: { # defines a custom git module
flake.modules.homeManager.git = {
# defines a custom git package # packages to include
packages.myGit = inputs.wrapper-modules.wrappers.git.wrap { home.packages = with pkgs; [
git
settings = { ];
foo = bar;
};
programs.git = {
enable = true;
}; };
}; };

View file

@ -1,10 +1,16 @@
{ self, inputs, ... }: { { self, inputs, ... }: {
# defines a custom helix module
flake.modules.homeManager.helix = { flake.modules.homeManager.helix = {
home.packages = with pkgs; [
helix
];
programs.helix = { programs.helix = {
enable = true; # enables helix # enables helix
enable = true;
settings = { settings = {

View file

@ -1,26 +1,22 @@
{ self, inputs, ... }: { { self, inputs, ... }: {
flake.nixosModules.niri = { pkgs, lib, ... }: { # defines a custom yazi module
programs.niri = { flake.modules.homeManager.yazi = {
# packages to include
home.package = with pkgs; [
yazi
];
programs.yazi = {
# enables yazi
enable = true; 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;
};
};
}; };
}; };
} }

View file

@ -25,9 +25,6 @@
inherit specialArgs; inherit specialArgs;
modules = [ modules = [
# include the core configuration
self.nixosModules.coreConfig
# specify host config directory # specify host config directory
./hades ./hades

View file

@ -3,7 +3,7 @@
{ {
# defines a module # defines a module
flake.nixosModules.hadesConfig = flake.nixosModules.hades =
{ {
pkgs, pkgs,
lib, lib,
@ -14,12 +14,7 @@
{ {
# other modules to import # other modules to import
imports = [ imports = [ ];
self.nixosModules.hadesHardware
self.nixosModules.coreConfig
self.nixosModules.programs
self.nixosModules.niri
];
# set hostname # set hostname
networking.hostName = "hades"; networking.hostName = "hades";

View file

@ -13,11 +13,11 @@
modules = [ modules = [
# core system modules # core system modules
self.nixosModules.coreConfig self.nixosModules.core
# hades system modules # hades system modules
self.nixosModules.hadesHardware self.nixosModules.hades
self.nixosModules.hadesConfig self.nixosModules.hades-hardware
# home manager and home manager imports # home manager and home manager imports
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
@ -25,8 +25,8 @@
home-manager.backupFileExtension = "bak"; home-manager.backupFileExtension = "bak";
home-manager.users.serenity = { home-manager.users.serenity = {
imports = [ imports = [
config.flake.homeModules.baseHome config.flake.homeModules.core-home
config.flake.homeModules.hadesHome #config.flake.homeModules.hades-home
]; ];
}; };
} }

View file

@ -2,7 +2,7 @@
{ {
# defines a module # defines a module
flake.nixosModules.hadesHardware = flake.nixosModules.hades-hardware =
{ {
config, config,
lib, lib,

View file

@ -2,13 +2,12 @@
{ {
flake.nixosModules.coreConfig = { pkgs, ... }: { flake.modules.nixos.core = { pkgs, ... }: {
# other modules to load # other modules to load
imports = [ imports = [
self.nixosModules.audioConfig self.nixosModules.audio
self.nixosModules.nixConfig self.nixosModules.packages
self.nixosModules.corePackages
]; ];
# extra features # extra features

View file

@ -1,14 +1,133 @@
{ inputs, ... }: { { inputs, ... }: {
# module declaration # 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 # 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 # packages to include
environment.systemPackages = with pkgs; [ 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 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
]; ];
}; };

View file

@ -14,7 +14,7 @@ in
{ {
# user module declaration # user module declaration
flake.nixosModules.u-serenity = flake.modules.nixos.${name} =
{ pkgs, ... }: { pkgs, ... }:
@ -42,8 +42,8 @@ in
# user specific modules to import # user specific modules to import
imports = [ imports = [
self.flake.homeModules.baseHome self.flake.homeModules.core-home
#self.flake.homeModules.configName #self.flake.homeModules.${name}
]; ];
}; };