switch to literate config
This commit is contained in:
parent
da9931c43c
commit
635b4350b3
14 changed files with 2447 additions and 567 deletions
2
LICENSE
2
LICENSE
|
|
@ -1,3 +1,4 @@
|
||||||
|
# LICENSE
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2026 asnev
|
Copyright (c) 2026 asnev
|
||||||
|
|
@ -19,3 +20,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783703440,
|
"lastModified": 1783856661,
|
||||||
"narHash": "sha256-O3/YajjWo001VUIgD8BwaRdSNLUFe7nZ1qV5TwhRBcw=",
|
"narHash": "sha256-ZGP04e+Q6WyQJGA9ZvI5CL6+heGQldbAG9U1T9NGvmU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8f0500b9660505dc3cb647775fe9a978a74b5283",
|
"rev": "569d578509928497eddc3fdbf94a799027050be4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
412
flake.nix
412
flake.nix
|
|
@ -1,3 +1,4 @@
|
||||||
|
# flake.nix
|
||||||
{
|
{
|
||||||
description = "asnev's NixOS configuration";
|
description = "asnev's NixOS configuration";
|
||||||
|
|
||||||
|
|
@ -21,21 +22,422 @@
|
||||||
home-manager,
|
home-manager,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
# flake-modules
|
||||||
nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/configuration.nix
|
# phostron-configuration
|
||||||
./hosts/phostron/configuration.nix
|
# nixos-configuration
|
||||||
./profiles/desktops/kde.nix
|
({ config, lib, pkgs, inputs, ... }: {
|
||||||
./users/coyote/configuration.nix
|
# nixos-configuration-contents
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = prev.stdenv.hostPlatform.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
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;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nh alejandra literate
|
||||||
|
# system utils
|
||||||
|
firmware-updater mtr gnupg ddate testdisk tree wget btop plocate traceroute
|
||||||
|
rlwrap entr unzip ffmpeg imagemagick
|
||||||
|
# extra (oxidised) utils
|
||||||
|
fd bat xh tlrc dysk dust hyperfine ripgrep fzf eza
|
||||||
|
];
|
||||||
|
environment.shellAliases = {
|
||||||
|
l = "eza --grid --all";
|
||||||
|
ll = "eza --long --all";
|
||||||
|
ls = "eza --long";
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
cat = "bat"; # this line is really funny to me
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
# nixos-configuration-programs-contents
|
||||||
|
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)";
|
||||||
|
};
|
||||||
|
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];
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
# kde-plasma-configuration
|
||||||
|
({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
|
||||||
|
];
|
||||||
|
environment.plasma6.excludePackages = [pkgs.kdePackages.discover];
|
||||||
|
})
|
||||||
|
|
||||||
|
({ config, lib, pkgs, modulesPath, ... }: {
|
||||||
|
# phostron-hardware-configuration-contents
|
||||||
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-amd"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/DFC9-994A";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
|
# phostron-configuration-contents
|
||||||
|
system.stateVersion = "26.05"; # I didn't read the comment. :)
|
||||||
|
|
||||||
|
networking.hostName = "phostron";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = false;
|
||||||
|
services.displayManager.sddm.settings.Theme.Font = "Inter";
|
||||||
|
services.displayManager.sddm.settings.Theme.CursorSize = 18;
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
# coyote-configuration
|
||||||
|
({ pkgs, config, ... }: let
|
||||||
|
# coyote-configuration-variables
|
||||||
|
USER_ID = 1000;
|
||||||
|
KEY_FILE = "id_ed25519";
|
||||||
|
|
||||||
|
in {
|
||||||
|
# coyote-configuration-contents
|
||||||
|
users.users.coyote = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "coyote";
|
||||||
|
extraGroups = ["wheel" "networkmanager"];
|
||||||
|
uid = USER_ID;
|
||||||
|
};
|
||||||
|
users.defaultUserShell = pkgs.unstable.fish;
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
})
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.extraSpecialArgs = {inherit inputs;};
|
home-manager.extraSpecialArgs = {inherit inputs;};
|
||||||
home-manager.users.coyote = import ./users/coyote/home.nix;
|
home-manager.users.coyote.imports = [
|
||||||
|
({ pkgs, config, lib, inputs, ... }: {
|
||||||
|
# coyote-home-manager-configuration
|
||||||
|
# coyote-home-manager-configuration-contents
|
||||||
|
home.stateVersion = "26.05"; # Nope, didn't read the comment either.
|
||||||
|
home.username = "coyote";
|
||||||
|
home.homeDirectory = "/home/coyote";
|
||||||
|
home.shell.enableShellIntegration = true;
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# TUI
|
||||||
|
tdf neocities
|
||||||
|
# productivity
|
||||||
|
libreoffice-fresh karp keepassxc
|
||||||
|
# multimedia
|
||||||
|
furnace corrscope vlc haruna subtitlecomposer kid3 kdePackages.kdenlive
|
||||||
|
unstable.audacity
|
||||||
|
# Internet
|
||||||
|
ungoogled-chromium
|
||||||
|
# games
|
||||||
|
osu-lazer-bin
|
||||||
|
# emulation
|
||||||
|
# (unstable.bottles.override {removeWarningPopup = true;})
|
||||||
|
# devel
|
||||||
|
unstable.racket guile unstable.lazygit
|
||||||
|
];
|
||||||
|
home.file = let
|
||||||
|
mkVimAfterFtplugin = content: langs:
|
||||||
|
builtins.listToAttrs (map (lang: {
|
||||||
|
name = ".vim/after/ftplugin/${lang}.vim";
|
||||||
|
value = {text = content;};
|
||||||
|
})
|
||||||
|
langs);
|
||||||
|
tab2Vim = ''
|
||||||
|
setlocal expandtab
|
||||||
|
setlocal tabstop=2
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
'';
|
||||||
|
tab4Vim = ''
|
||||||
|
setlocal expandtab
|
||||||
|
setlocal tabstop=4
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal softtabstop=4
|
||||||
|
'';
|
||||||
|
tabsVim = ''
|
||||||
|
setlocal noexpandtab
|
||||||
|
setlocal tabstop=4
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal softtabstop=0
|
||||||
|
'';
|
||||||
|
lispVim = ''
|
||||||
|
setlocal expandtab
|
||||||
|
setlocal tabstop=2
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
|
||||||
|
setlocal lisp
|
||||||
|
setlocal autoindent
|
||||||
|
setlocal showmatch
|
||||||
|
|
||||||
|
setlocal lispwords+=defun,defmacro,defvar,defparameter,defmethod,define-syntax,lambda,let,let*,letre,flet,labels,progn,when,unless,if,cond
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
lib.mkMerge [
|
||||||
|
(mkVimAfterFtplugin tab2Vim ["javascript" "typescript" "html" "css" "json" "nix" "vim"])
|
||||||
|
(mkVimAfterFtplugin tab4Vim ["python" "rust" "java" "lua" "c" "cpp" "h" "hpp"])
|
||||||
|
(mkVimAfterFtplugin tabsVim ["go" "make"])
|
||||||
|
(mkVimAfterFtplugin lispVim ["lisp" "scheme" "clojure" "racket"])
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
# coyote-home-manager-programs
|
||||||
|
# coyote-home-manager-programs-general
|
||||||
|
tmux = {
|
||||||
|
enable = true;
|
||||||
|
clock24 = true;
|
||||||
|
baseIndex = 1;
|
||||||
|
shortcut = "a";
|
||||||
|
keyMode = "vi";
|
||||||
|
terminal = "screen-256color";
|
||||||
|
escapeTime = 0;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g pane-base-index 1
|
||||||
|
set-window-option -g pane-base-index 1
|
||||||
|
set-option -g renumber-windows on
|
||||||
|
set-option -g status-right "\"#W\""
|
||||||
|
set -ga terminal-overrides ",*:RGB"
|
||||||
|
set -g mouse on
|
||||||
|
set -g set-clipboard on
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
git.enable = true;
|
||||||
|
git.settings = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
advice.defaultBranchName = false;
|
||||||
|
gpg.format = "ssh";
|
||||||
|
commit.gpgSign = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
librewolf.enable = true;
|
||||||
|
librewolf.languagePacks = ["en-GB"];
|
||||||
|
librewolf.settings = {
|
||||||
|
"privacy.resistFingerprinting" = false;
|
||||||
|
"librewolf.webgl.prompt" = false;
|
||||||
|
"identity.fxaccounts.enabled" = true;
|
||||||
|
"middlemouse.paste" = false;
|
||||||
|
"general.autoScroll" = true;
|
||||||
|
"browser.discovery.containers.enabled" = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
yt-dlp.enable = true;
|
||||||
|
yt-dlp.package = pkgs.unstable.yt-dlp;
|
||||||
|
|
||||||
|
starship.package = pkgs.unstable.starship;
|
||||||
|
|
||||||
|
obs-studio.enable = true;
|
||||||
|
obs-studio.plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
input-overlay droidcam-obs wlrobs
|
||||||
|
];
|
||||||
|
|
||||||
|
# coyote-home-manager-programs-vim
|
||||||
|
vim.enable = true;
|
||||||
|
vim.packageConfigurable = pkgs.unstable.vim-full;
|
||||||
|
vim.defaultEditor = true;
|
||||||
|
vim.plugins = let
|
||||||
|
literate-vim = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
name = "literate.vim";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "zyedidia";
|
||||||
|
repo = "literate.vim";
|
||||||
|
rev = "4ffd45cb1657b67f4ed0eb639478a69209ec1f94";
|
||||||
|
sha256 = "sha256-X5iJyjeLBkKh4tUoDG8VDO6DwYVOI9DpRqpic8NinwA=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
with pkgs.unstable.vimPlugins; [
|
||||||
|
gruvbox rainbow literate-vim
|
||||||
|
];
|
||||||
|
vim.extraConfig = ''
|
||||||
|
# coyote-home-manager-programs-vim-vimrc
|
||||||
|
set nocompatible
|
||||||
|
set encoding=utf-8
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
set clipboard=unnamedplus
|
||||||
|
set mouse=a
|
||||||
|
set history=1000
|
||||||
|
set updatetime=300
|
||||||
|
|
||||||
|
syntax on
|
||||||
|
set ruler
|
||||||
|
set showcmd
|
||||||
|
set showmode
|
||||||
|
set laststatus=1
|
||||||
|
set wildmenu
|
||||||
|
set wildmode=longest,list,full
|
||||||
|
set ttyfast
|
||||||
|
set lazyredraw
|
||||||
|
|
||||||
|
filetype plugin indent on
|
||||||
|
set autoindent
|
||||||
|
set smartindent
|
||||||
|
set expandtab
|
||||||
|
set smarttab
|
||||||
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set softtabstop=4
|
||||||
|
|
||||||
|
set hlsearch
|
||||||
|
set incsearch
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
inoremap <C-l> λ
|
||||||
|
set termguicolors
|
||||||
|
set background=dark
|
||||||
|
colorscheme gruvbox
|
||||||
|
let g:terminal_ansi_colors = ['#282828', '#cc241d', '#98971a', '#d79921', '#458588', '#b16286', '#689d6a', '#a89984', '#928374', '#fb4934', '#b8bb26', '#fabd2f', '#83a598', '#d3869b', '#8ec07c', '#ebdbb2']
|
||||||
|
let g:rainbow_active = 1
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
# coyote-home-manager-programs-fastfetch
|
||||||
|
fastfetch.enable = true;
|
||||||
|
fastfetch.settings = {
|
||||||
|
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||||
|
logo.type = "small";
|
||||||
|
logo.padding.top = 4;
|
||||||
|
logo.padding.left = 3;
|
||||||
|
logo.padding.right = 4;
|
||||||
|
display.separator = " ";
|
||||||
|
modules = [
|
||||||
|
{key = "╭─────────╮"; type = "custom";}
|
||||||
|
{key = "│ {#31}user {#keys}│"; type = "title"; format = "{user-name}";}
|
||||||
|
{key = "│ {#32}host {#keys}│"; type = "title"; format = "{host-name}";}
|
||||||
|
{key = "│ {#33}uptime {#keys}│"; type = "uptime";}
|
||||||
|
{key = "│ {#34}distro {#keys}│"; type = "os";}
|
||||||
|
{key = "│ {#35}kernel {#keys}│"; type = "kernel";}
|
||||||
|
{key = "│ {#36}desktop {#keys}│"; type = "de";}
|
||||||
|
{key = "│ {#31}term {#keys}│"; type = "terminal";}
|
||||||
|
{key = "│ {#32}shell {#keys}│"; type = "shell";}
|
||||||
|
{key = "│ {#33}cpu {#keys}│"; type = "cpu"; showPeCoreCount = true;}
|
||||||
|
{key = "│ {#34}disk {#keys}│"; type = "disk"; folders = "/";}
|
||||||
|
{key = "│ {#35}memory {#keys}│"; type = "memory";}
|
||||||
|
{key = "│ {#36}network {#keys}│"; type = "localip"; format = "{ipv4} ({ifname})";}
|
||||||
|
{key = "├─────────┤"; type = "custom";}
|
||||||
|
{key = "│ {#39}colors {#keys}│"; type = "colors"; symbol = "circle";}
|
||||||
|
{key = "╰─────────╯"; type = "custom";}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [./hardware-configuration.nix];
|
|
||||||
|
|
||||||
system.stateVersion = "26.05"; # I hope you know what you're doing. :)
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
|
|
||||||
services.displayManager.sddm.settings.Theme.Font = "Inter";
|
|
||||||
services.displayManager.sddm.settings.Theme.CursorSize = 18;
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.bluetooth.powerOnBoot = false;
|
|
||||||
|
|
||||||
networking.hostName = "phostron";
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.firewall.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
|
||||||
boot.initrd.kernelModules = [];
|
|
||||||
boot.kernelModules = ["kvm-amd"];
|
|
||||||
boot.extraModulePackages = [];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/DFC9-994A";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = ["fmask=0077" "dmask=0077"];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
|
||||||
{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
1191
nixos.html
Normal file
1191
nixos.html
Normal file
File diff suppressed because it is too large
Load diff
843
nixos.lit
Normal file
843
nixos.lit
Normal file
|
|
@ -0,0 +1,843 @@
|
||||||
|
@code_type nix .nix
|
||||||
|
@comment_type # %s
|
||||||
|
@add_css style.css
|
||||||
|
|
||||||
|
@title asnev's NixOS configuration
|
||||||
|
|
||||||
|
@s table of contents
|
||||||
|
|
||||||
|
- [1. table of contents](#1:1)
|
||||||
|
- [2. introduction](#1:2)
|
||||||
|
- [3. limitations](#1:3)
|
||||||
|
- [4. flake structure](#1:4)
|
||||||
|
- [5. global NixOS options](#1:5)
|
||||||
|
- [6. host configuration: phostron](#1:6)
|
||||||
|
- [7. desktop configuration: KDE Plasma](#1:7)
|
||||||
|
- [8. user configuration: coyote](#1:8)
|
||||||
|
- [9. Home Manager configuration: coyote](#1:9)
|
||||||
|
- [10. licence](#1:10)
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
@s introduction
|
||||||
|
|
||||||
|
welcome! this page is the literate configuration for my NixOS setup. here,
|
||||||
|
declarations are set to configure my (currently) only host system, `phostron`,
|
||||||
|
a ThinkPad L14 Gen 1, to use flakes, Home Manager, a global nixpkgs-unstable
|
||||||
|
overlay, alongside general NixOS configurations tailored to my hardware and
|
||||||
|
user environment preferences.<br><br>
|
||||||
|
|
||||||
|
being a literate configuration file, this means that both the HTML page you're
|
||||||
|
reading right now, and the Nix flake file that get parsed when building the
|
||||||
|
system, are compiled from the *same* exact source file. that's literate
|
||||||
|
programming in a nutshell--programming with a documentation-first paradigm.
|
||||||
|
though of course, the details don't stop there. the rabbit hole can get really,
|
||||||
|
*really* deep; just ask your favourite search engine for all the
|
||||||
|
*breathtakingly comprehensive* NixOS configs (literate or otherwise) that are
|
||||||
|
out there!<br><br>
|
||||||
|
|
||||||
|
[you can get the source code here](https://git.gay/asnev/nixos).
|
||||||
|
|
||||||
|
<br><hr>
|
||||||
|
|
||||||
|
@s limitations
|
||||||
|
|
||||||
|
this is a simple configuration. i don't have immediate plans in declaratively
|
||||||
|
configuring absolutely *everything* there is on my system. as someone who still
|
||||||
|
has many things to learn about Nix(OS), my current rationale is to configure
|
||||||
|
everything that's comfortably sensible. additional options and/or verbosity can
|
||||||
|
be added later as my configuration grows in the future (or not). following the
|
||||||
|
'simple' nature of my configuration, Home Manager is notably installed as a
|
||||||
|
NixOS module instead of being standalone. while doing so does make rebuilding
|
||||||
|
the user environment a bit annoying, personally, i don't mind it that
|
||||||
|
much.<br><br>
|
||||||
|
|
||||||
|
this is also a simple configuration, in the way of the literate programming
|
||||||
|
tools used, which is [Literate](https://github.com/zyedidia/Literate). while it
|
||||||
|
does offer a very approachable format based on Markdown, it's a bit lacking in
|
||||||
|
that it can't provide syntax highlighting in multiple different languages
|
||||||
|
(you'll see the mixed-up colours later, sorry), and it can't export source code
|
||||||
|
files into files which live within subdirectories. i've resorted to let
|
||||||
|
*everything* reside within one `flake.nix` file which, while it does make users
|
||||||
|
who wish to navigate through the unwomen (uncommented) configuration
|
||||||
|
expressions quite... annoying (to put it lightly), at least everything is
|
||||||
|
organised when viewed through the literate source code.<br><br>
|
||||||
|
|
||||||
|
eventually, when i can build up the courage... i'd like to begin my 'journey'
|
||||||
|
with Emacs and utilise Org-mode and Org-babel, a much, *much* more flexible
|
||||||
|
literate programming environment. <sub>emphasis on 'eventually'...</sub><br><br>
|
||||||
|
|
||||||
|
i don't expect anyone reading this to be wishing to use *my* specific
|
||||||
|
configuration for their setup, so i'll skip over instructions for installing
|
||||||
|
the operating system and let the following configurations assume that a fresh,
|
||||||
|
flake-enabled NixOS system is present and ready to go.
|
||||||
|
|
||||||
|
<br><hr>
|
||||||
|
|
||||||
|
@s flake structure
|
||||||
|
|
||||||
|
we'll outline a basic flake for the system(s)...
|
||||||
|
|
||||||
|
--- flake.nix
|
||||||
|
{
|
||||||
|
description = "asnev's NixOS configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs = {
|
||||||
|
url = "github:nixos/nixpkgs/nixos-26.05";
|
||||||
|
};
|
||||||
|
nixpkgs-unstable = {
|
||||||
|
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/release-26.05";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs @ {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
|
home-manager,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
@{flake-modules}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
---
|
||||||
|
|
||||||
|
...and configure the modules. declared below are separate modules for the host,
|
||||||
|
user, and user environment managed by Home Manager. everything lives within the
|
||||||
|
one NixOS module, so it is structured thusly:
|
||||||
|
|
||||||
|
--- flake-modules
|
||||||
|
nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
|
modules = [
|
||||||
|
@{phostron-configuration}
|
||||||
|
@{coyote-configuration}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
TODO: consider adding a shell environment module?
|
||||||
|
|
||||||
|
<br><hr>
|
||||||
|
|
||||||
|
@s global NixOS options
|
||||||
|
|
||||||
|
before getting into the host-specific configurations, here we set options that
|
||||||
|
get applied to *all* NixOS systems, regardless of machine. we'll start by
|
||||||
|
declaring the initial attribute set arguments, which will soon be a familiar
|
||||||
|
pattern here...
|
||||||
|
|
||||||
|
--- nixos-configuration
|
||||||
|
({ config, lib, pkgs, inputs, ... }: {
|
||||||
|
@{nixos-configuration-contents}
|
||||||
|
})
|
||||||
|
---
|
||||||
|
|
||||||
|
...then we set Nix-related declarations since we'd like to declare the system
|
||||||
|
to use flakes (obviously),
|
||||||
|
|
||||||
|
--- nixos-configuration-contents
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
---
|
||||||
|
|
||||||
|
but also have an overlay of `nixpkgs-unstable` to be available globally. this
|
||||||
|
is so that i can have unstable packages installed in userspaces managed via
|
||||||
|
Home Manager.
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = prev.stdenv.hostPlatform.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
getting into the rest of the options, let's configure the way the system should
|
||||||
|
boot. i like to have absolutely nothing being displayed as my computer turns
|
||||||
|
on.
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
next, some basic locale settings.
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
time.timeZone = "Asia/Jakarta";
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
---
|
||||||
|
|
||||||
|
service options. note the options for PipeWire here.
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
basic security options.
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
---
|
||||||
|
|
||||||
|
and now we get into the fun (translation: less boring) stuff with system
|
||||||
|
packages!
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nh alejandra literate
|
||||||
|
# system utils
|
||||||
|
firmware-updater mtr gnupg ddate testdisk tree wget btop plocate traceroute
|
||||||
|
rlwrap entr unzip ffmpeg imagemagick
|
||||||
|
# extra (oxidised) utils
|
||||||
|
fd bat xh tlrc dysk dust hyperfine ripgrep fzf eza
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
if the list seems a bit sparse for desktop applications, that's intentional. i
|
||||||
|
prefer to keep those within userspace via Home Manager, which will be
|
||||||
|
explored later below.<br><br>
|
||||||
|
|
||||||
|
let's set a few useful shell aliases, notably substituting `ls` for `eza` for a
|
||||||
|
prettier directory output. (TODO: consider figuring how to switch to `uutils`
|
||||||
|
globally maybe?)
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
environment.shellAliases = {
|
||||||
|
l = "eza --grid --all";
|
||||||
|
ll = "eza --long --all";
|
||||||
|
ls = "eza --long";
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
cat = "bat"; # this line is really funny to me
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
here's the start of options for programmes...
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
programs = {
|
||||||
|
@{nixos-configuration-programs-contents}
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
nothing much here, starting with a few options to prettify the terminal a bit.
|
||||||
|
|
||||||
|
> "zsh is bash with plugins; fish is zsh with plugins" --0atman
|
||||||
|
|
||||||
|
yes, the lambda (λ) as a terminal prompt character absolutely counts towards
|
||||||
|
style points. (joke)
|
||||||
|
|
||||||
|
--- nixos-configuration-programs-contents
|
||||||
|
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)";
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
a few one-off options here. these settings would be in the Home Manager section
|
||||||
|
if they existed there, but they don't, so, oh well.
|
||||||
|
|
||||||
|
--- nixos-configuration-programs-contents +=
|
||||||
|
obs-studio.enableVirtualCamera = true;
|
||||||
|
ssh.startAgent = true;
|
||||||
|
---
|
||||||
|
|
||||||
|
`nix-ld` is important for running generic binaries and AppImages. ironically,
|
||||||
|
i have yet felt the need to utilise software outside of the `nixpkgs`
|
||||||
|
repository, hence the sparse `libraries` pkgs list, lol.
|
||||||
|
|
||||||
|
--- nixos-configuration-programs-contents +=
|
||||||
|
nix-ld.enable = true;
|
||||||
|
nix-ld.libraries = with pkgs; [
|
||||||
|
fuse
|
||||||
|
e2fsprogs
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
fonts! because typography (and internationalisation) matters.
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
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
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
some font settings.
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
fonts.fontconfig.antialias = true;
|
||||||
|
fonts.fontconfig.subpixel.rgba = "rgb";
|
||||||
|
---
|
||||||
|
|
||||||
|
finally, XDG portal settings... which i'll admit i don't quite understand but
|
||||||
|
they're here so here they are.
|
||||||
|
|
||||||
|
--- nixos-configuration-contents +=
|
||||||
|
xdg.portal.enable = true;
|
||||||
|
xdg.portal.config.common.default = ["gtk"];
|
||||||
|
xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-wlr];
|
||||||
|
---
|
||||||
|
|
||||||
|
we're finished with the global config, let's move into the per-machine options.
|
||||||
|
|
||||||
|
<br><hr>
|
||||||
|
|
||||||
|
@s host configuration: phostron
|
||||||
|
|
||||||
|
we make sure that we load in the global options we've set, alongside a choice
|
||||||
|
of one's preferred graphical interface.
|
||||||
|
|
||||||
|
--- phostron-configuration
|
||||||
|
@{nixos-configuration}
|
||||||
|
@{kde-plasma-configuration}
|
||||||
|
---
|
||||||
|
|
||||||
|
then we may start with configuring the machine specifically. with the NixOS
|
||||||
|
installer's automatically generated `hardware-configuration.nix` file, our job
|
||||||
|
is basically half done here.
|
||||||
|
|
||||||
|
--- phostron-configuration +=
|
||||||
|
({ config, lib, pkgs, modulesPath, ... }: {
|
||||||
|
@{phostron-hardware-configuration-contents}
|
||||||
|
@{phostron-configuration-contents}
|
||||||
|
})
|
||||||
|
---
|
||||||
|
|
||||||
|
i'll copy over said file verbatim (excluding the pre-generated comment blurb at
|
||||||
|
the beginning of the file).
|
||||||
|
|
||||||
|
--- phostron-hardware-configuration-contents
|
||||||
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-amd"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/DFC9-994A";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
---
|
||||||
|
|
||||||
|
with that done, we can move on to the less scary stuff.
|
||||||
|
|
||||||
|
--- phostron-configuration-contents
|
||||||
|
system.stateVersion = "26.05"; # I didn't read the comment. :)
|
||||||
|
|
||||||
|
networking.hostName = "phostron";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = false;
|
||||||
|
---
|
||||||
|
|
||||||
|
<br><hr>
|
||||||
|
|
||||||
|
@s desktop configuration: KDE Plasma
|
||||||
|
|
||||||
|
let's bring ourselves to the 90s with a proper graphical user interface! and
|
||||||
|
have some additional apps to boot.
|
||||||
|
|
||||||
|
--- kde-plasma-configuration
|
||||||
|
({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
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
> "Discover? Where we're going... we don't need Discover."
|
||||||
|
|
||||||
|
--- kde-plasma-configuration +=
|
||||||
|
environment.plasma6.excludePackages = [pkgs.kdePackages.discover];
|
||||||
|
})
|
||||||
|
---
|
||||||
|
|
||||||
|
i've set some additional options in how i'd like SDDM to look for `phostron`
|
||||||
|
specifically.
|
||||||
|
|
||||||
|
--- phostron-configuration-contents +=
|
||||||
|
services.displayManager.sddm.settings.Theme.Font = "Inter";
|
||||||
|
services.displayManager.sddm.settings.Theme.CursorSize = 18;
|
||||||
|
---
|
||||||
|
|
||||||
|
(TODO: consider adding the `plasma-manager` flake module in the future?)
|
||||||
|
|
||||||
|
<br><hr>
|
||||||
|
|
||||||
|
@s user configuration: coyote
|
||||||
|
|
||||||
|
that's me. `:3c`<br><br>
|
||||||
|
|
||||||
|
not just NixOS options, but also any other modules loaded into the system via
|
||||||
|
the flake, like Home Manager, as seen later.
|
||||||
|
|
||||||
|
--- coyote-configuration
|
||||||
|
({ pkgs, config, ... }: let
|
||||||
|
@{coyote-configuration-variables}
|
||||||
|
in {
|
||||||
|
@{coyote-configuration-contents}
|
||||||
|
})
|
||||||
|
---
|
||||||
|
|
||||||
|
let's get the user-specific NixOS options out of the way. basic user management
|
||||||
|
stuff and setting the default shell of choice.
|
||||||
|
|
||||||
|
--- coyote-configuration-variables
|
||||||
|
USER_ID = 1000;
|
||||||
|
---
|
||||||
|
|
||||||
|
--- coyote-configuration-contents
|
||||||
|
users.users.coyote = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "coyote";
|
||||||
|
extraGroups = ["wheel" "networkmanager"];
|
||||||
|
uid = USER_ID;
|
||||||
|
};
|
||||||
|
users.defaultUserShell = pkgs.unstable.fish;
|
||||||
|
---
|
||||||
|
|
||||||
|
for me, i have a little daemon blurb to get SSH for Git working... properly? i
|
||||||
|
can't remember--i think i stole this from GitHub somewhere...<br><br>
|
||||||
|
|
||||||
|
there's another variable we need to set before getting there though.
|
||||||
|
|
||||||
|
--- coyote-configuration-variables +=
|
||||||
|
KEY_FILE = "id_ed25519";
|
||||||
|
---
|
||||||
|
|
||||||
|
--- coyote-configuration-contents +=
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
<br><hr>
|
||||||
|
|
||||||
|
@s Home Manager configuration: coyote
|
||||||
|
|
||||||
|
let's get into the *fun* fun stuff, [yaeh](https://youtu.be/SacogDL_4JU).<br><br>
|
||||||
|
|
||||||
|
not forgetting to set the flake module for it first though. as mentioned in the
|
||||||
|
beginning, my preference is to have it loaded as a NixOS module.
|
||||||
|
|
||||||
|
--- coyote-configuration +=
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = {inherit inputs;};
|
||||||
|
home-manager.users.coyote.imports = [
|
||||||
|
({ pkgs, config, lib, inputs, ... }: {
|
||||||
|
@{coyote-home-manager-configuration}
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
---
|
||||||
|
|
||||||
|
the basic contents structure is as follows. a separate section for programmes
|
||||||
|
should make it easier for including more software configurations in the future.
|
||||||
|
|
||||||
|
--- coyote-home-manager-configuration
|
||||||
|
@{coyote-home-manager-configuration-contents}
|
||||||
|
programs = {
|
||||||
|
@{coyote-home-manager-programs}
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
standard configuration stuff.
|
||||||
|
|
||||||
|
--- coyote-home-manager-configuration-contents
|
||||||
|
home.stateVersion = "26.05"; # Nope, didn't read the comment either.
|
||||||
|
home.username = "coyote";
|
||||||
|
home.homeDirectory = "/home/coyote";
|
||||||
|
home.shell.enableShellIntegration = true;
|
||||||
|
---
|
||||||
|
|
||||||
|
now we get to configure the user packages! there's... not a lot of them.
|
||||||
|
|
||||||
|
--- coyote-home-manager-configuration-contents +=
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# TUI
|
||||||
|
tdf neocities
|
||||||
|
# productivity
|
||||||
|
libreoffice-fresh karp keepassxc
|
||||||
|
# multimedia
|
||||||
|
furnace corrscope vlc haruna subtitlecomposer kid3 kdePackages.kdenlive
|
||||||
|
unstable.audacity
|
||||||
|
# Internet
|
||||||
|
ungoogled-chromium
|
||||||
|
# games
|
||||||
|
osu-lazer-bin
|
||||||
|
# emulation
|
||||||
|
# (unstable.bottles.override {removeWarningPopup = true;})
|
||||||
|
# devel
|
||||||
|
unstable.racket guile unstable.lazygit
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
next is (arguably) the more fun way to install and configure programmes, via
|
||||||
|
programme options. not every programme will get a dedicated section. for the
|
||||||
|
ones that are too short to consider notable, i'll have them clumped with a
|
||||||
|
bunch of others.
|
||||||
|
|
||||||
|
--- coyote-home-manager-programs
|
||||||
|
@{coyote-home-manager-programs-general}
|
||||||
|
@{coyote-home-manager-programs-vim}
|
||||||
|
@{coyote-home-manager-programs-fastfetch}
|
||||||
|
---
|
||||||
|
|
||||||
|
these don't need much explanation. (TODO: could try declaratively setting
|
||||||
|
LibreWolf profiles.)
|
||||||
|
|
||||||
|
--- coyote-home-manager-programs-general
|
||||||
|
tmux = {
|
||||||
|
enable = true;
|
||||||
|
clock24 = true;
|
||||||
|
baseIndex = 1;
|
||||||
|
shortcut = "a";
|
||||||
|
keyMode = "vi";
|
||||||
|
terminal = "screen-256color";
|
||||||
|
escapeTime = 0;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g pane-base-index 1
|
||||||
|
set-window-option -g pane-base-index 1
|
||||||
|
set-option -g renumber-windows on
|
||||||
|
set-option -g status-right "\"#W\""
|
||||||
|
set -ga terminal-overrides ",*:RGB"
|
||||||
|
set -g mouse on
|
||||||
|
set -g set-clipboard on
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
git.enable = true;
|
||||||
|
git.settings = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
advice.defaultBranchName = false;
|
||||||
|
gpg.format = "ssh";
|
||||||
|
commit.gpgSign = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
librewolf.enable = true;
|
||||||
|
librewolf.languagePacks = ["en-GB"];
|
||||||
|
librewolf.settings = {
|
||||||
|
"privacy.resistFingerprinting" = false;
|
||||||
|
"librewolf.webgl.prompt" = false;
|
||||||
|
"identity.fxaccounts.enabled" = true;
|
||||||
|
"middlemouse.paste" = false;
|
||||||
|
"general.autoScroll" = true;
|
||||||
|
"browser.discovery.containers.enabled" = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
yt-dlp.enable = true;
|
||||||
|
yt-dlp.package = pkgs.unstable.yt-dlp;
|
||||||
|
|
||||||
|
starship.package = pkgs.unstable.starship;
|
||||||
|
|
||||||
|
obs-studio.enable = true;
|
||||||
|
obs-studio.plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
input-overlay droidcam-obs wlrobs
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
and here... lies my dreaded Vim configuration...
|
||||||
|
|
||||||
|
--- coyote-home-manager-programs-vim
|
||||||
|
vim.enable = true;
|
||||||
|
vim.packageConfigurable = pkgs.unstable.vim-full;
|
||||||
|
vim.defaultEditor = true;
|
||||||
|
vim.plugins = let
|
||||||
|
literate-vim = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
name = "literate.vim";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "zyedidia";
|
||||||
|
repo = "literate.vim";
|
||||||
|
rev = "4ffd45cb1657b67f4ed0eb639478a69209ec1f94";
|
||||||
|
sha256 = "sha256-X5iJyjeLBkKh4tUoDG8VDO6DwYVOI9DpRqpic8NinwA=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
with pkgs.unstable.vimPlugins; [
|
||||||
|
gruvbox rainbow literate-vim
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
`.vimrc` moment...
|
||||||
|
|
||||||
|
--- coyote-home-manager-programs-vim +=
|
||||||
|
vim.extraConfig = ''
|
||||||
|
@{coyote-home-manager-programs-vim-vimrc}
|
||||||
|
'';
|
||||||
|
---
|
||||||
|
|
||||||
|
there's really not much, starting with bog-standard Vimscript for sensible
|
||||||
|
options,
|
||||||
|
😎
|
||||||
|
--- coyote-home-manager-programs-vim-vimrc
|
||||||
|
set nocompatible
|
||||||
|
set encoding=utf-8
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
set clipboard=unnamedplus
|
||||||
|
set mouse=a
|
||||||
|
set history=1000
|
||||||
|
set updatetime=300
|
||||||
|
|
||||||
|
syntax on
|
||||||
|
set ruler
|
||||||
|
set showcmd
|
||||||
|
set showmode
|
||||||
|
set laststatus=1
|
||||||
|
set wildmenu
|
||||||
|
set wildmode=longest,list,full
|
||||||
|
set ttyfast
|
||||||
|
set lazyredraw
|
||||||
|
|
||||||
|
filetype plugin indent on
|
||||||
|
set autoindent
|
||||||
|
set smartindent
|
||||||
|
set expandtab
|
||||||
|
set smarttab
|
||||||
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set softtabstop=4
|
||||||
|
|
||||||
|
set hlsearch
|
||||||
|
set incsearch
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
---
|
||||||
|
|
||||||
|
and you gotta map a keybind to output lambda to live out that Lisp/Scheme vibe
|
||||||
|
😎 (i barely can even code in them),
|
||||||
|
|
||||||
|
--- coyote-home-manager-programs-vim-vimrc +=
|
||||||
|
inoremap <C-l> λ
|
||||||
|
---
|
||||||
|
|
||||||
|
i love Gruvbox... <sub>(hi Vimjoyer)</sub>
|
||||||
|
|
||||||
|
--- coyote-home-manager-programs-vim-vimrc +=
|
||||||
|
set termguicolors
|
||||||
|
set background=dark
|
||||||
|
colorscheme gruvbox
|
||||||
|
let g:terminal_ansi_colors = ['#282828', '#cc241d', '#98971a', '#d79921', '#458588', '#b16286', '#689d6a', '#a89984', '#928374', '#fb4934', '#b8bb26', '#fabd2f', '#83a598', '#d3869b', '#8ec07c', '#ebdbb2']
|
||||||
|
---
|
||||||
|
|
||||||
|
finally, plugin configs! there's only one...
|
||||||
|
|
||||||
|
--- coyote-home-manager-programs-vim-vimrc +=
|
||||||
|
let g:rainbow_active = 1
|
||||||
|
---
|
||||||
|
|
||||||
|
this part is kinda... bodgy, but, it's the only way i've found to consistently
|
||||||
|
configure per-language settings in Vim, thru Home Manager's `home.file.<...>`
|
||||||
|
dotfiles generation into `~/.vim/after/ftplugin/`.<br><br>
|
||||||
|
|
||||||
|
TODO: find a more efficient way of doing this, for sure.<br><br>
|
||||||
|
|
||||||
|
we'll set a little function to automate that for us.
|
||||||
|
|
||||||
|
--- coyote-home-manager-configuration-contents +=
|
||||||
|
home.file = let
|
||||||
|
mkVimAfterFtplugin = content: langs:
|
||||||
|
builtins.listToAttrs (map (lang: {
|
||||||
|
name = ".vim/after/ftplugin/${lang}.vim";
|
||||||
|
value = {text = content;};
|
||||||
|
})
|
||||||
|
langs);
|
||||||
|
---
|
||||||
|
|
||||||
|
next are the actual per-language configurations for Vim.
|
||||||
|
|
||||||
|
--- coyote-home-manager-configuration-contents +=
|
||||||
|
tab2Vim = ''
|
||||||
|
setlocal expandtab
|
||||||
|
setlocal tabstop=2
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
'';
|
||||||
|
tab4Vim = ''
|
||||||
|
setlocal expandtab
|
||||||
|
setlocal tabstop=4
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal softtabstop=4
|
||||||
|
'';
|
||||||
|
tabsVim = ''
|
||||||
|
setlocal noexpandtab
|
||||||
|
setlocal tabstop=4
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal softtabstop=0
|
||||||
|
'';
|
||||||
|
lispVim = ''
|
||||||
|
setlocal expandtab
|
||||||
|
setlocal tabstop=2
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
|
||||||
|
setlocal lisp
|
||||||
|
setlocal autoindent
|
||||||
|
setlocal showmatch
|
||||||
|
|
||||||
|
setlocal lispwords+=defun,defmacro,defvar,defparameter,defmethod,define-syntax,lambda,let,let*,letre,flet,labels,progn,when,unless,if,cond
|
||||||
|
'';
|
||||||
|
---
|
||||||
|
|
||||||
|
now all we have to do is set the languages to their designated configs and all
|
||||||
|
the `.vim` files get generated automatically!
|
||||||
|
|
||||||
|
--- coyote-home-manager-configuration-contents +=
|
||||||
|
in
|
||||||
|
lib.mkMerge [
|
||||||
|
(mkVimAfterFtplugin tab2Vim ["javascript" "typescript" "html" "css" "json" "nix" "vim"])
|
||||||
|
(mkVimAfterFtplugin tab4Vim ["python" "rust" "java" "lua" "c" "cpp" "h" "hpp"])
|
||||||
|
(mkVimAfterFtplugin tabsVim ["go" "make"])
|
||||||
|
(mkVimAfterFtplugin lispVim ["lisp" "scheme" "clojure" "racket"])
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
(i'll figure out how to use Neovim Lua and nvf one day i swear...) <sub>(or
|
||||||
|
like, Emacs...)</sub><br><br>
|
||||||
|
|
||||||
|
moving to a little Fastfetch configuring just for pretty. mine is taken from
|
||||||
|
one of the preset settings but with a minified distro logo.
|
||||||
|
|
||||||
|
--- coyote-home-manager-programs-fastfetch
|
||||||
|
fastfetch.enable = true;
|
||||||
|
fastfetch.settings = {
|
||||||
|
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||||
|
logo.type = "small";
|
||||||
|
logo.padding.top = 4;
|
||||||
|
logo.padding.left = 3;
|
||||||
|
logo.padding.right = 4;
|
||||||
|
display.separator = " ";
|
||||||
|
modules = [
|
||||||
|
{key = "╭─────────╮"; type = "custom";}
|
||||||
|
{key = "│ {#31}user {#keys}│"; type = "title"; format = "{user-name}";}
|
||||||
|
{key = "│ {#32}host {#keys}│"; type = "title"; format = "{host-name}";}
|
||||||
|
{key = "│ {#33}uptime {#keys}│"; type = "uptime";}
|
||||||
|
{key = "│ {#34}distro {#keys}│"; type = "os";}
|
||||||
|
{key = "│ {#35}kernel {#keys}│"; type = "kernel";}
|
||||||
|
{key = "│ {#36}desktop {#keys}│"; type = "de";}
|
||||||
|
{key = "│ {#31}term {#keys}│"; type = "terminal";}
|
||||||
|
{key = "│ {#32}shell {#keys}│"; type = "shell";}
|
||||||
|
{key = "│ {#33}cpu {#keys}│"; type = "cpu"; showPeCoreCount = true;}
|
||||||
|
{key = "│ {#34}disk {#keys}│"; type = "disk"; folders = "/";}
|
||||||
|
{key = "│ {#35}memory {#keys}│"; type = "memory";}
|
||||||
|
{key = "│ {#36}network {#keys}│"; type = "localip"; format = "{ipv4} ({ifname})";}
|
||||||
|
{key = "├─────────┤"; type = "custom";}
|
||||||
|
{key = "│ {#39}colors {#keys}│"; type = "colors"; symbol = "circle";}
|
||||||
|
{key = "╰─────────╯"; type = "custom";}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
<br><hr>
|
||||||
|
|
||||||
|
@s licence
|
||||||
|
|
||||||
|
this configuration is provided under the MIT licence, a copy of which can be
|
||||||
|
read below.
|
||||||
|
|
||||||
|
--- "LICENSE"
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 asnev
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
---
|
||||||
|
|
@ -1,149 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
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;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
|
||||||
nix.settings.auto-optimise-store = true;
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
|
||||||
system = prev.stdenv.hostPlatform.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nh
|
|
||||||
alejandra
|
|
||||||
literate
|
|
||||||
# system utils
|
|
||||||
firmware-updater
|
|
||||||
mtr
|
|
||||||
gnupg
|
|
||||||
ddate
|
|
||||||
testdisk
|
|
||||||
tree
|
|
||||||
wget
|
|
||||||
btop
|
|
||||||
plocate
|
|
||||||
traceroute
|
|
||||||
rlwrap
|
|
||||||
entr
|
|
||||||
unzip
|
|
||||||
ffmpeg
|
|
||||||
imagemagick
|
|
||||||
# extra utils
|
|
||||||
fd
|
|
||||||
bat
|
|
||||||
xh
|
|
||||||
tlrc
|
|
||||||
dysk
|
|
||||||
dust
|
|
||||||
hyperfine
|
|
||||||
ripgrep
|
|
||||||
fzf
|
|
||||||
eza
|
|
||||||
];
|
|
||||||
environment.shellAliases = {
|
|
||||||
l = "eza --long --all";
|
|
||||||
ll = "eza --long";
|
|
||||||
ls = "eza --long";
|
|
||||||
".." = "cd ..";
|
|
||||||
"..." = "cd ../..";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
fish.enable = true;
|
|
||||||
|
|
||||||
atuin.enable = true;
|
|
||||||
atuin.settings.sync_address = "https://api.atuin.sh";
|
|
||||||
|
|
||||||
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 = "x";
|
|
||||||
};
|
|
||||||
character.success_symbol = "[λ](bold green)";
|
|
||||||
character.error_symbol = "[λ](bold red)";
|
|
||||||
};
|
|
||||||
|
|
||||||
obs-studio.enableVirtualCamera = true;
|
|
||||||
ssh.startAgent = true;
|
|
||||||
|
|
||||||
nix-ld.enable = true;
|
|
||||||
nix-ld.libraries = with pkgs; [
|
|
||||||
fuse
|
|
||||||
e2fsprogs
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts.fontconfig.antialias = true;
|
|
||||||
fonts.fontconfig.subpixel.rgba = "rgb";
|
|
||||||
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
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.portal.enable = true;
|
|
||||||
xdg.portal.config.common.default = ["gtk"];
|
|
||||||
xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-wlr];
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs.kdePackages; [
|
|
||||||
kate
|
|
||||||
bluez-qt
|
|
||||||
kalk
|
|
||||||
filelight
|
|
||||||
kamoso
|
|
||||||
konversation
|
|
||||||
kmail
|
|
||||||
ktorrent
|
|
||||||
];
|
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [discover];
|
|
||||||
}
|
|
||||||
1
style.css
Normal file
1
style.css
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
body{font-family:Inter,Arial,sans-serif;font-size:1em}.prettyprint{background:#1d1f21!important;font-family:Iosevka,Consolas,monospace!important;border:0!important}.pln{color:#c5c8c6}ol.linenums{margin-top:0;margin-bottom:0;color:#969896}li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8,li.L9{padding-left:1em;background-color:#1d1f21;list-style-type:decimal}@media screen{.str{color:#b5bd68}.kwd{color:#b294bb}.com{color:#969896}.typ{color:#81a2be}.lit{color:#de935f}.pun{color:#c5c8c6}.opn{color:#c5c8c6}.clo{color:#c5c8c6}.tag{color:#c66}.atn{color:#de935f}.atv{color:#8abeb7}.dec{color:#de935f}.var{color:#c66}.fun{color:#81a2be}}p:not(.notp){text-indent:0!important;}.seealso,.codeblock_name{font-size:8pt!important}blockquote{font-style:italic}
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
USER_ID = 1000;
|
|
||||||
KEY_FILE = "id_ed25519";
|
|
||||||
in {
|
|
||||||
users.users.coyote = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "coyote";
|
|
||||||
extraGroups = ["wheel" "networkmanager"];
|
|
||||||
uid = USER_ID;
|
|
||||||
};
|
|
||||||
users.defaultUserShell = pkgs.unstable.fish;
|
|
||||||
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,97 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
home.stateVersion = "26.05"; # I hope you know what you're doing. :)
|
|
||||||
|
|
||||||
home.username = "coyote";
|
|
||||||
home.homeDirectory = "/home/coyote";
|
|
||||||
home.shell.enableShellIntegration = true;
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# TUI
|
|
||||||
tdf
|
|
||||||
neocities
|
|
||||||
# productivity
|
|
||||||
libreoffice-fresh
|
|
||||||
karp
|
|
||||||
keepassxc
|
|
||||||
# multimedia
|
|
||||||
furnace
|
|
||||||
corrscope
|
|
||||||
vlc
|
|
||||||
haruna
|
|
||||||
subtitlecomposer
|
|
||||||
kid3
|
|
||||||
kdePackages.kdenlive
|
|
||||||
unstable.audacity
|
|
||||||
# Internet
|
|
||||||
ungoogled-chromium
|
|
||||||
# games
|
|
||||||
osu-lazer-bin
|
|
||||||
# emulation
|
|
||||||
# (unstable.bottles.override {removeWarningPopup = true;})
|
|
||||||
# devel
|
|
||||||
unstable.racket
|
|
||||||
guile
|
|
||||||
unstable.lazygit
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
tmux = {
|
|
||||||
enable = true;
|
|
||||||
clock24 = true;
|
|
||||||
baseIndex = 1;
|
|
||||||
shortcut = "a";
|
|
||||||
keyMode = "vi";
|
|
||||||
terminal = "screen-256color";
|
|
||||||
escapeTime = 0;
|
|
||||||
extraConfig = ''
|
|
||||||
set -g pane-base-index 1
|
|
||||||
set-window-option -g pane-base-index 1
|
|
||||||
set-option -g renumber-windows on
|
|
||||||
set-option -g status-right "\"#W\""
|
|
||||||
set -ga terminal-overrides ",*:RGB"
|
|
||||||
set -g mouse on
|
|
||||||
set -g set-clipboard on
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
git.enable = true;
|
|
||||||
git.settings = {
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
advice.defaultBranchName = false;
|
|
||||||
gpg.format = "ssh";
|
|
||||||
commit.gpgSign = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
librewolf.enable = true;
|
|
||||||
librewolf.languagePacks = ["en-GB"];
|
|
||||||
librewolf.settings = {
|
|
||||||
"privacy.resistFingerprinting" = false;
|
|
||||||
"librewolf.webgl.prompt" = false;
|
|
||||||
"identity.fxaccounts.enabled" = true;
|
|
||||||
"middlemouse.paste" = false;
|
|
||||||
"general.autoScroll" = true;
|
|
||||||
"browser.discovery.containers.enabled" = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
yt-dlp.enable = true;
|
|
||||||
yt-dlp.package = pkgs.unstable.yt-dlp;
|
|
||||||
|
|
||||||
starship.package = pkgs.unstable.starship;
|
|
||||||
|
|
||||||
obs-studio.enable = true;
|
|
||||||
obs-studio.plugins = with pkgs.obs-studio-plugins; [
|
|
||||||
input-overlay
|
|
||||||
droidcam-obs
|
|
||||||
wlrobs
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = let
|
|
||||||
programsDir = ./programs;
|
|
||||||
programsImports = map (name: programsDir + "/${name}") (
|
|
||||||
builtins.filter
|
|
||||||
(name: builtins.match ".*\\.nix" name != null)
|
|
||||||
(builtins.attrNames (builtins.readDir programsDir))
|
|
||||||
);
|
|
||||||
in
|
|
||||||
programsImports;
|
|
||||||
}
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
programs.fastfetch = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
|
||||||
logo = {
|
|
||||||
type = "small";
|
|
||||||
padding = {
|
|
||||||
top = 4;
|
|
||||||
left = 3;
|
|
||||||
right = 4;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
display = {
|
|
||||||
separator = " ";
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
{
|
|
||||||
key = "╭─────────╮";
|
|
||||||
type = "custom";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#31}user {#keys}│";
|
|
||||||
type = "title";
|
|
||||||
format = "{user-name}";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#32}host {#keys}│";
|
|
||||||
type = "title";
|
|
||||||
format = "{host-name}";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#33}uptime {#keys}│";
|
|
||||||
type = "uptime";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#34}distro {#keys}│";
|
|
||||||
type = "os";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#35}kernel {#keys}│";
|
|
||||||
type = "kernel";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#36}desktop {#keys}│";
|
|
||||||
type = "de";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#31}term {#keys}│";
|
|
||||||
type = "terminal";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#32}shell {#keys}│";
|
|
||||||
type = "shell";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#33}cpu {#keys}│";
|
|
||||||
type = "cpu";
|
|
||||||
showPeCoreCount = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#34}disk {#keys}│";
|
|
||||||
type = "disk";
|
|
||||||
folders = "/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#35}memory {#keys}│";
|
|
||||||
type = "memory";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#36}network {#keys}│";
|
|
||||||
type = "localip";
|
|
||||||
format = "{ipv4} ({ifname})";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "├─────────┤";
|
|
||||||
type = "custom";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "│ {#39}colors {#keys}│";
|
|
||||||
type = "colors";
|
|
||||||
symbol = "circle";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "╰─────────╯";
|
|
||||||
type = "custom";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,121 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs.vim = {
|
|
||||||
enable = true;
|
|
||||||
packageConfigurable = pkgs.unstable.vim-full;
|
|
||||||
|
|
||||||
plugins = let
|
|
||||||
literate-vim = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "literate.vim";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "zyedidia";
|
|
||||||
repo = "literate.vim";
|
|
||||||
rev = "4ffd45cb1657b67f4ed0eb639478a69209ec1f94";
|
|
||||||
sha256 = "sha256-X5iJyjeLBkKh4tUoDG8VDO6DwYVOI9DpRqpic8NinwA=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
with pkgs.unstable.vimPlugins; [
|
|
||||||
gruvbox
|
|
||||||
rainbow
|
|
||||||
literate-vim
|
|
||||||
];
|
|
||||||
|
|
||||||
defaultEditor = true;
|
|
||||||
extraConfig = ''
|
|
||||||
let g:terminal_ansi_colors = ['#282828', '#cc241d', '#98971a', '#d79921', '#458588', '#b16286', '#689d6a', '#a89984', '#928374', '#fb4934', '#b8bb26', '#fabd2f', '#83a598', '#d3869b', '#8ec07c', '#ebdbb2']
|
|
||||||
|
|
||||||
set nocompatible
|
|
||||||
set encoding=utf-8
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
set clipboard=unnamedplus
|
|
||||||
set mouse=a
|
|
||||||
set history=1000
|
|
||||||
set updatetime=300
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
set ruler
|
|
||||||
set showcmd
|
|
||||||
set showmode
|
|
||||||
set laststatus=1
|
|
||||||
set wildmenu
|
|
||||||
set wildmode=longest,list,full
|
|
||||||
set ttyfast
|
|
||||||
set lazyredraw
|
|
||||||
|
|
||||||
filetype plugin indent on
|
|
||||||
set autoindent
|
|
||||||
set smartindent
|
|
||||||
set expandtab
|
|
||||||
set smarttab
|
|
||||||
set tabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
set softtabstop=4
|
|
||||||
|
|
||||||
set hlsearch
|
|
||||||
set incsearch
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
|
||||||
|
|
||||||
" keybinds
|
|
||||||
inoremap <C-l> λ
|
|
||||||
|
|
||||||
" gruvbox
|
|
||||||
set termguicolors
|
|
||||||
set background=dark
|
|
||||||
colorscheme gruvbox
|
|
||||||
|
|
||||||
" rainbow
|
|
||||||
let g:rainbow_active = 1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file = let
|
|
||||||
mkVimAfterFtplugin = content: langs:
|
|
||||||
builtins.listToAttrs (map (lang: {
|
|
||||||
name = ".vim/after/ftplugin/${lang}.vim";
|
|
||||||
value = {text = content;};
|
|
||||||
})
|
|
||||||
langs);
|
|
||||||
|
|
||||||
tab2Vim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=2
|
|
||||||
setlocal shiftwidth=2
|
|
||||||
setlocal softtabstop=2
|
|
||||||
'';
|
|
||||||
tab4Vim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=4
|
|
||||||
setlocal shiftwidth=4
|
|
||||||
setlocal softtabstop=4
|
|
||||||
'';
|
|
||||||
tabsVim = ''
|
|
||||||
setlocal noexpandtab
|
|
||||||
setlocal tabstop=4
|
|
||||||
setlocal shiftwidth=4
|
|
||||||
setlocal softtabstop=0
|
|
||||||
'';
|
|
||||||
lispVim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=2
|
|
||||||
setlocal shiftwidth=2
|
|
||||||
setlocal softtabstop=2
|
|
||||||
|
|
||||||
setlocal lisp
|
|
||||||
setlocal autoindent
|
|
||||||
setlocal showmatch
|
|
||||||
|
|
||||||
setlocal lispwords+=defun,defmacro,defvar,defparameter,defmethod,define-syntax,lambda,let,let*,letre,flet,labels,progn,when,unless,if,cond
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
lib.mkMerge [
|
|
||||||
(mkVimAfterFtplugin tab2Vim ["javascript" "typescript" "html" "css" "json" "nix" "vim"])
|
|
||||||
(mkVimAfterFtplugin tab4Vim ["python" "rust" "java" "lua" "c" "cpp" "h" "hpp"])
|
|
||||||
(mkVimAfterFtplugin tabsVim ["go" "make"])
|
|
||||||
(mkVimAfterFtplugin lispVim ["lisp" "scheme" "clojure" "racket"])
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Reference in a new issue