Hermes: Initial bringup

This is minimal config for Hermes on WSL2.

Emacs is untested yet and needs ~/org/ to be imperatively copied still.

Email, Syncthing and Backup modules are yet to be set up and might need
some imperative actions.

However, the system is working and automatically logs into correct
default user.
This commit is contained in:
Payas Relekar 2022-06-02 07:19:59 +00:00
parent 34271354f2
commit 0700205e2d
5 changed files with 156 additions and 7 deletions

View file

@ -7,6 +7,10 @@
url = "github:numtide/nixpkgs-unfree";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@ -25,6 +29,7 @@
outputs =
{ self
, nixpkgs
, nixos-wsl
, home-manager
, emacs-overlay
, agenix
@ -83,27 +88,23 @@
# Modules and module config
./modules/fish.nix
./modules/plasma-desktop.nix
./modules/fonts.nix
./modules/users.nix
# agenix.nixosModules.age
# ./modules/agenix.nix
nixos-wsl.nixosModules.wsl
# Host-specific config
./hosts/enterprise/hw.nix
./hosts/enterprise/networking.nix
./hosts/enterprise/sound.nix
# ./hosts/enterprise/backup.nix
# ./hosts/enterprise/syncthing.nix
# ./hosts/enterprise/nvidia.nix
./hosts/enterprise/configuration.nix
./hosts/hermes/configuration.nix
# User-specific config : Home-manager
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.payas = import ./hosts/enterprise/home.nix;
home-manager.users.payas = import ./hosts/hermes/home.nix;
}
];

View file

@ -0,0 +1,39 @@
{ lib, pkgs, config, modulesPath, ... }:
with lib;
let
nixos-wsl = import ./nixos-wsl;
in
{
imports = [
"${modulesPath}/profiles/minimal.nix"
# nixos-wsl.nixosModules.wsl
];
wsl = {
enable = true;
automountPath = "/mnt";
defaultUser = "payas";
startMenuLaunchers = true;
wslConf = {
automount = {
enabled = true;
mountFsTab = true;
root = "/mnt/";
options = "metadata,uid=1000,gid=100";
};
network = {
hostname = "hermes";
};
};
};
system.stateVersion = "22.05";
networking.hostName = "hermes";
# Enable integration with Docker Desktop (needs to be installed)
# docker.enable = true;
}

62
hosts/hermes/emacs.nix Normal file
View file

@ -0,0 +1,62 @@
{ config, pkgs, emacs-overlay, ... }:
{
nixpkgs.overlays = [ emacs-overlay.overlay ];
programs = {
# Emacs Git (master branch, currently 29.0) with extra packages (that require native component)
# Built via nix-community/emacs-overlay expressions
emacs = {
enable = true;
package = pkgs.emacsPgtkNativeComp;
extraPackages = epkgs: with epkgs; [
pdf-tools
org-pdftools
emacsql
emacsql-sqlite
emacsql-sqlite-builtin
(tree-sitter-langs.withPlugins (p: [
p.tree-sitter-bash
p.tree-sitter-css
p.tree-sitter-html
p.tree-sitter-java
p.tree-sitter-javascript
p.tree-sitter-json
p.tree-sitter-nix
p.tree-sitter-python
]))
];
};
direnv = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
nix-direnv.enable = true;
};
};
home.packages = with pkgs; [
binutils # native-comp needs 'as', provided by this
sqlite # for org-roam
gcc # also for org-roam
# aspell is used by ispell for spell check
(aspellWithDicts (dicts: with dicts; [
en en-computers en-science mr ]))
beancount
fava
# imagemagick
# tectonic # munging TeX better than texlive
# texlive.combined.scheme-full # because org-babel cannot use tectonic
pandoc # convert doc formats
# ghostscript # mungind pfds
pdftk # munging pdfs in less incantation-y way
# Nix things
nixpkgs-fmt
rnix-lsp
];
}

46
hosts/hermes/home.nix Normal file
View file

@ -0,0 +1,46 @@
{ config, pkgs, ... }:
{
imports = [
../../modules/common-home.nix
./emacs.nix
];
home.packages = with pkgs; [
# learn...things?
# anki
# security
# keepassxc # password management
# age # secrets management
# apps
# vlc
# strawberry
# picard # tag music tracks
# firefox-wayland
# soulseekqt
# appimage-run # for soulseek-qt
# communication
# element-desktop
# nheko
# utilities
# youtube-dl
# qbittorrent
# digikam
# okular
# kcalc
# ark # munging archives
# unrar # So ark can open .rar files
# spectacle
# gwenview
# kate
# libreoffice # thoroughly average grown up stuff
# Nix things
# niv
];
}

View file

@ -12,6 +12,7 @@ in
extraGroups = [ "wheel" "networkmanager" "adbusers" "docker" "libvirtd" ];
home = "/home/${payas}";
description = payas;
group = "users";
};
groups.input.members = [ payas ];