This commit is contained in:
Erwin Boskma 2023-05-07 17:00:43 +02:00
parent cb20e79b33
commit 10e410e233
Signed by: erwin
SSH key fingerprint: SHA256:9LmFDe1C6jSrEyqxxvX8NtJBmcbB105XoqyUZF092bg
3 changed files with 255 additions and 0 deletions

View file

@ -70,4 +70,8 @@ inputs: {
system = "aarch64-linux";
config = import ./regin/configuration.nix inputs;
};
thor = {
system = "aarch64-linux";
config = import ./thor/configuration.nix inputs;
};
}

View file

@ -0,0 +1,62 @@
{ nixpkgs, nixos-hardware, ... }:
{ pkgs, ... }:
{
imports = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
nixos-hardware.nixosModules.raspberry-pi-4
../../users/root
../../users/erwin
./home.nix
];
eboskma = {
users.erwin = {
enable = true;
};
base.kernel = pkgs.linuxKernel.packages.linux_rpi4;
networking.enable = true;
nix-common.enable = true;
systemd.enable = true;
};
hardware = {
enableAllFirmware = true;
};
boot = {
bootspec.enable = true;
};
zramSwap.enable = true;
networking = {
hostName = "thor";
useDHCP = true;
useNetworkd = true;
wireless.enable = true;
};
systemd.network = {
enable = true;
networks = {
"40-eth0" = {
DHCP = "yes";
};
};
};
services.openssh.enable = true;
security = {
polkit.enable = true;
};
environment.systemPackages = with pkgs; [
libraspberrypi
];
system.stateVersion = "23.05";
}

189
machines/thor/home.nix Normal file
View file

@ -0,0 +1,189 @@
{ pkgs, config, lib, inputs, self-overlay, ... }:
with lib; let
cfg = config.eboskma.users.erwin;
in
{
home-manager.users.erwin = {
_module.args.flake-inputs = inputs;
programs.home-manager.enable = true;
programs.command-not-found.enable = true;
home.username = "erwin";
home.homeDirectory = "/home/erwin";
home.sessionVariables = {
EDITOR = "${config.home-manager.users.erwin.eboskma.programs.emacs.package}/bin/emacsclient -c";
};
nixpkgs.config.allowUnfree = true;
home.stateVersion = "23.05";
eboskma = {
programs = {
atuin.enable = true;
bat.enable = true;
emacs = {
enable = true;
# package = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages (epkgs: [ epkgs.emacsql epkgs.emacsql-sqlite ]));
package =
let
emacs29 = pkgs.emacsPgtk.overrideAttrs (_: {
version = "29.0.90+gitc0ab4e9ca932";
src = pkgs.fetchFromSavannah {
repo = "emacs";
rev = "c0ab4e9ca9326c472ff1d9d01a0e3966f20fda27";
sha256 = "HxwVIVPIPMpp551Uo2qzcSSk2cM1N4YDBH6p3V2P4Rg=";
};
});
in
emacs29.override {
treeSitterPlugins = builtins.attrValues (filterAttrs (_: isDerivation) pkgs.tree-sitter-grammars);
};
daemon = true;
};
electron = {
enable = true;
wayland = true;
};
firefox = {
enable = true;
work = config.eboskma.base.work;
};
fish.enable = true;
foot = {
enable = true;
server = false;
};
git = {
enable = true;
name = "Erwin Boskma";
email = "erwin@datarift.nl";
# signingKey = "EE7ADEFE1D943C7B";
signingKey = "~/.ssh/id_ed25519";
signingKeyFormat = "ssh";
};
gpg.enable = true;
neovim.enable = true;
nushell.enable = true;
rofi = {
enable = true;
package = pkgs.rofi-wayland;
terminal = config.home-manager.users.erwin.wayland.windowManager.sway.config.terminal;
};
ssh.enable = true;
starship.enable = true;
sway.enable = true;
swaynotificationcenter.enable = true;
waybar.enable = true;
};
};
home.packages = with pkgs;
[
atool
bottom
fd
gnome.nautilus
imagemagick
imv
iotop
libnotify
mpv
nordzy-cursor-theme
quintom-cursor-theme
procs
ripgrep
units
unzip
xdg-utils
wl-clipboard
zeal
];
xdg = {
enable = true;
mime.enable = true;
mimeApps = {
enable = true;
defaultApplications = {
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/chrome" = "firefox.desktop";
"x-scheme-handler/terminal" = "${cfg.terminal}.desktop";
"text/html" = "firefox.desktop";
"application/x-extension-htm" = "firefox.desktop";
"application/x-extension-html" = "firefox.desktop";
"application/x-extension-shtml" = "firefox.desktop";
"application/xhtml+xml" = "firefox.desktop";
"application/x-extension-xhtml" = "firefox.desktop";
"application/x-extension-xht" = "firefox.desktop";
"application/pdf" = "org.pwmt.zathura-pdf-mupdf.desktop";
};
associations = {
added = {
"image/jpeg" = "imv.desktop";
"image/png" = "imv.desktop";
"image/gif" = "imv.desktop";
"application/zip" = "org.gnome.FileRoller.desktop";
};
};
};
userDirs = {
enable = true;
createDirectories = true;
};
};
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-gtk fcitx5-configtool ];
};
gtk = {
enable = true;
theme = {
name = "Arc-Dark";
package = pkgs.arc-theme;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
gtk3 = {
bookmarks = [
"file:///home/erwin/workspace"
];
extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-cursor-theme-name = "Nordzy-cursors";
};
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-cursor-theme-name = "Nordzy-cursors";
};
};
imports = [
{
nixpkgs.overlays = [
self-overlay
inputs.ha-now-playing.overlays.${pkgs.system}
inputs.pamedia.overlays.${pkgs.system}
inputs.emacs-overlay.overlay
];
}
../../modules/options
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
};
programs.bandwhich.enable = true;
services.ddccontrol.enable = true;
}