Archived
Watch
1
0
Fork
You've already forked nixos
0

unliterated my config

This commit is contained in:
asnev 2026-09-07 03:21:32 +07:00
commit 1f978da586
Signed by: asnev
SSH key fingerprint: SHA256:8hagYq9hDUuS5clQ78FKhIoQDvg5crdkYMHX+3g7wB4
4 changed files with 566 additions and 2495 deletions

193
modules/common.nix Normal file
View 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];
}

View file

@ -0,0 +1,18 @@
{pkgs, ...}: {
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
environment.systemPackages = with pkgs.kdePackages; [
kate
elisa
bluez-qt
kalk
filelight
kamoso
konversation
kmail
ktorrent
kclock
];
environment.plasma6.excludePackages = [pkgs.kdePackages.discover];
}

View file

@ -0,0 +1,33 @@
{
pkgs,
config,
...
}: let
USER_ID = 1000;
KEY_FILE = "id_ed25519";
in {
users.users.coyote = {
isNormalUser = true;
description = "coyote";
extraGroups = ["wheel" "networkmanager" "lp" "scanner"];
uid = USER_ID;
};
users.defaultUserShell = pkgs.unstable.fish;
# daemon blurb to get SSH for Git working
environment.sessionVariables.SSH_AUTH_SOCK = "/run/user/${builtins.toString USER_ID}/ssh-agent";
systemd.user.services.ssh-add-key = {
wantedBy = ["default.target"];
after = ["ssh-agent.service"];
serviceConfig = {
Type = "oneshot";
ExecStartPre = "${pkgs.coreutils-full}/bin/sleep 1";
ExecStart = [
"${pkgs.openssh}/bin/ssh-add ${config.users.users.coyote.home}/.ssh/${KEY_FILE}"
];
Restart = "on-failure";
RestartSec = 1;
};
};
}

View file

@ -0,0 +1,8 @@
{inputs, ...}: {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.users.coyote.imports = [../../../home/coyote];
}