unliterated my config
This commit is contained in:
parent
02f76a734e
commit
1f978da586
1 changed files with 566 additions and 2495 deletions
193
modules/common.nix
Normal file
193
modules/common.nix
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# use flakes and Lix instead of the default Nix implementation
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.package = pkgs.lixPackageSets.stable.lix;
|
||||
|
||||
# global nixpkgs-unstable overlay, so unstable packages are available to
|
||||
# Home Manager userspaces too, plus a couple of Lix-related package pins
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = prev.stdenv.hostPlatform.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
})
|
||||
(final: prev: {
|
||||
inherit
|
||||
(prev.lixPackageSets.stable)
|
||||
nixpkgs-review
|
||||
nix-eval-jobs
|
||||
nix-fast-build
|
||||
colmena
|
||||
;
|
||||
})
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.systemd-boot.configurationLimit = 10;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.timeout = 2;
|
||||
kernelParams = ["quiet" "rd.udev.log_level=3" "rd.systemd.show_status=auto"];
|
||||
initrd.verbose = false;
|
||||
consoleLogLevel = 3;
|
||||
kernelPackages = pkgs.linuxPackages;
|
||||
};
|
||||
|
||||
time.timeZone = "Asia/Jakarta";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
services = {
|
||||
fwupd.enable = true;
|
||||
xserver.xkb.layout = "us";
|
||||
locate.enable = true;
|
||||
printing.enable = true;
|
||||
openssh.enable = false;
|
||||
pulseaudio.enable = false;
|
||||
|
||||
pipewire.enable = true;
|
||||
pipewire.alsa.enable = true;
|
||||
pipewire.alsa.support32Bit = true;
|
||||
pipewire.pulse.enable = true;
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
security.sudo.enable = false;
|
||||
|
||||
security.doas.enable = true;
|
||||
security.doas.extraRules = [
|
||||
{
|
||||
groups = ["wheel"];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nh
|
||||
alejandra
|
||||
git
|
||||
# system utils
|
||||
firmware-updater
|
||||
mtr
|
||||
gnupg
|
||||
ddate
|
||||
testdisk
|
||||
tree
|
||||
wget
|
||||
btop
|
||||
plocate
|
||||
traceroute
|
||||
rlwrap
|
||||
entr
|
||||
unzip
|
||||
ffmpeg
|
||||
imagemagick
|
||||
gnome-disk-utility
|
||||
# extra (oxidised) utils
|
||||
fd
|
||||
bat
|
||||
xh
|
||||
tlrc
|
||||
dysk
|
||||
dust
|
||||
hyperfine
|
||||
ripgrep
|
||||
fzf
|
||||
eza
|
||||
];
|
||||
|
||||
environment.shellAliases = {
|
||||
sudo = "doas";
|
||||
l = "eza --grid --all";
|
||||
ll = "eza --long --all";
|
||||
ls = "eza --long";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
cat = "bat";
|
||||
};
|
||||
|
||||
# fixes Librewolf not rendering text in its UI (as of 2026-07-30)
|
||||
environment.sessionVariables.XDG_DATA_DIRS = [
|
||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||
];
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
|
||||
atuin.enable = true;
|
||||
atuin.settings.sync_address = "https://api.atuin.sh";
|
||||
atuin.settings.enter_accept = true;
|
||||
|
||||
starship.enable = true;
|
||||
starship.transientPrompt.enable = true;
|
||||
starship.transientPrompt.left = "starship module character";
|
||||
starship.settings = {
|
||||
"$schema" = "https://starship.rs/config-schema.json";
|
||||
git_status = {
|
||||
ahead = ">";
|
||||
behind = "<";
|
||||
diverged = "<>";
|
||||
renamed = "r";
|
||||
deleted = "d";
|
||||
};
|
||||
character.success_symbol = "[λ](bold green)";
|
||||
character.error_symbol = "[λ](bold red)";
|
||||
};
|
||||
|
||||
git.enable = true;
|
||||
git.config = {
|
||||
init.defaultBranch = "main";
|
||||
advice.defaultBranchName = false;
|
||||
gpg.format = "ssh";
|
||||
commit.gpgSign = true;
|
||||
url."https://github.com/".insteadOf = ["github:"];
|
||||
};
|
||||
|
||||
steam.enable = true;
|
||||
|
||||
# one-off options that would live in the Home Manager section if the
|
||||
# relevant modules existed there
|
||||
obs-studio.enableVirtualCamera = true;
|
||||
ssh.startAgent = true;
|
||||
|
||||
nix-ld.enable = true;
|
||||
nix-ld.libraries = with pkgs; [fuse e2fsprogs];
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
# GUI fonts
|
||||
inter
|
||||
corefonts
|
||||
vista-fonts
|
||||
roboto
|
||||
cantarell-fonts
|
||||
# fonts for i18n
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-color-emoji
|
||||
noto-fonts-monochrome-emoji
|
||||
unifont
|
||||
unifont_upper
|
||||
unifont-csur
|
||||
# terminal fonts
|
||||
nerd-fonts.iosevka
|
||||
];
|
||||
|
||||
fonts.fontconfig.antialias = true;
|
||||
fonts.fontconfig.subpixel.rgba = "rgb";
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.config.common.default = ["gtk"];
|
||||
xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-wlr];
|
||||
}
|
||||
Reference in a new issue