diff --git a/flake.nix b/flake.nix
index f075b60..cfb4519 100755
--- a/flake.nix
+++ b/flake.nix
@@ -52,7 +52,7 @@
url = "gitlab:BotCore-Devs/BotCore-v4/staging";
#inputs.nixpkgs.follows = "nixpkgs-RoryNix"; # We need this to avoid a LIBC error.
};
-
+
ooye = {
url = "git+https://cgit.rory.gay/nix/OOYE-module.git";
};
@@ -88,8 +88,11 @@
(
{ ... }:
{
- boot.isContainer = true;
- system.stateVersion = "0";
+ nixpkgs.crossSystem = {
+ system = "riscv64-linux";
+ };
+ #boot.isContainer = true;
+ #system.stateVersion = "0";
#services.MatrixContentFilter = {
# enable = true;
# accessTokenPath = "/";
@@ -207,6 +210,29 @@
};
};
+ Arc = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ modules = [
+ ./host/Arc/configuration.nix
+ ./hardware-configuration.nix
+ home-manager.nixosModules.home-manager
+ lix-module.nixosModules.default
+ (
+ { ... }:
+ {
+ nix = {
+ registry.nixpkgs.flake = nixpkgs;
+ nixPath = [ "nixpkgs=${nixpkgs.outPath}" ];
+ };
+ }
+ )
+ ];
+ specialArgs = {
+ inherit home-manager;
+ inherit nixpkgs-stable;
+ };
+ };
+
Rory-portable = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
@@ -225,7 +251,7 @@
# ... add this line to the rest of your configuration modules
#nix-ld.nixosModules.nix-ld
- # The module in this repository defines a new module under (programs.nix-ld.dev) instead of (programs.nix-ld)
+ # The module in this repository defines a new module under (programs.nix-ld.dev) instead of (programs.nix-ld)
# to not collide with the nixpkgs version.
#{ programs.nix-ld.dev.enable = true; }
];
@@ -267,7 +293,7 @@
};
};
};
-
+
modules = {
monitoring = import ./modules/monitoring/module.nix;
redpanda-connect = import ./modules/packages/redpanda-connect/module.nix;
@@ -288,7 +314,7 @@
);
packages.mtxclient-git = (pkgs.callPackage ./modules/packages/mtxclient-git.nix { inherit mtxclientSrc; });
- packages.nbtexplorer = pkgs.callPackage ./modules/packages/nbtexplorer.nix {};
+ packages.nbtexplorer = pkgs.callPackage ./modules/packages/nbtexplorer.nix { };
# untested
packages.draupnir-main = pkgs.draupnir.overrideAttrs (oldAttrs: {
@@ -296,7 +322,7 @@
version = draupnirSrc.rev;
});
- packages.redpanda-connect = (pkgs.callPackage ./modules/packages/redpanda-connect/default.nix {});
+ packages.redpanda-connect = (pkgs.callPackage ./modules/packages/redpanda-connect/default.nix { });
}
);
}
diff --git a/host/Arc/configuration.nix b/host/Arc/configuration.nix
new file mode 100644
index 0000000..c8fe0fd
--- /dev/null
+++ b/host/Arc/configuration.nix
@@ -0,0 +1,257 @@
+args@{
+ config,
+ pkgs,
+ lib,
+ nhekoSrc,
+ mtxclientSrc,
+ ...
+}:
+
+{
+ imports = [
+ # base imports
+ ../../modules/base-client.nix
+ ../../modules/packages/vim.nix
+ ../../modules/users/Arci.nix
+
+ # hardware-specific imports
+ ./optional/hardware-specific/nvidia.nix
+
+ #./optional/gui/x11.nix
+ ./optional/gui/wayland.nix
+ ];
+
+ boot = {
+ kernelPackages = pkgs.linuxPackages_latest;
+ loader = {
+ grub = {
+ configurationLimit = 10;
+ enable = true;
+ device = "nodev"; # nodev for EFI only
+ # EFI
+ efiSupport = true;
+ efiInstallAsRemovable = true;
+ };
+ };
+ };
+ programs.noisetorch.enable = true;
+ programs.gamemode.enable = true;
+ users.users.Rory.extraGroups = [ "gamemode" ];
+ users.users.Arci.extraGroups = [ "gamemode" ];
+
+ environment.sessionVariables = {
+ ZSH_DISABLE_COMPFIX = "true";
+ };
+
+ services.udev.extraRules = ''
+ #SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0664", GROUP="users"
+ # SDP protocol
+ KERNEL=="hidraw*", ATTRS{idVendor}=="1fc9", MODE="0666"
+ ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1fc9", MODE="0666"
+ ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", MODE="0666"
+ # Flashloader
+ KERNEL=="hidraw*", ATTRS{idVendor}=="15a2", MODE="0666"
+ # Controller
+ KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="18d1", MODE="0666"
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9400", MODE="0660", TAG+="uaccess"
+ '';
+
+ networking = {
+ hostName = "Arc";
+ networkmanager.enable = true;
+ wireless.enable = false;
+ firewall = {
+ enable = false;
+ # allowedTCPPorts = [ ... ];
+ # allowedUDPPorts = [ ... ];
+ };
+
+ interfaces.enp34s0.ipv4.addresses = [
+ {
+ address = "192.168.0.10";
+ prefixLength = 24;
+ }
+ ];
+
+ defaultGateway = "192.168.0.1";
+ #useDHCP = true; # Doesn't work with NetworkManager, investigate
+ };
+
+ time.timeZone = "Europe/Brussels";
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ services = {
+ xserver = {
+ displayManager.gdm.enable = true;
+ displayManager.lightdm.enable = false;
+ enable = true;
+ updateDbusEnvironment = true;
+ xkb.layout = "us";
+ wacom.enable = true;
+ };
+ libinput.enable = true;
+
+ openssh = {
+ enable = true;
+ extraConfig = ''
+ MaxAuthTries 32
+ '';
+ settings.PermitRootLogin = "yes";
+ };
+ pipewire = {
+ enable = true;
+ audio.enable = true;
+ pulse.enable = true;
+ wireplumber.enable = true;
+ jack.enable = true;
+ alsa.enable = true;
+ };
+
+ desktopManager.plasma6.enable = true;
+ };
+
+ services.xserver.desktopManager.gnome.enable = false;
+ environment.systemPackages = with pkgs; [
+ eog
+ mpv
+ libreoffice
+ qt6.qtwayland
+
+ easyeffects
+ kitty
+ youtube-music
+
+ dbeaver-bin
+ vscode
+
+ # - Utilities
+ inkscape-with-extensions
+ gimp
+
+ # - Languages
+ #dotnet-sdk_8
+ dotnetCorePackages.sdk_9_0
+
+ #games
+ osu-lazer-bin
+ #steam
+ steam-run
+ steam-acf
+
+ # extra packages
+ dmenu
+
+ nemo
+ file-roller
+ firefox-bin
+ ungoogled-chromium #needed for Rider in order to debug WASM
+
+ unrar-wrapper
+ mangohud
+ prismlauncher
+ ];
+
+ programs.steam = {
+ enable = true;
+ gamescopeSession.enable = true;
+ extraCompatPackages = with pkgs; [
+ steam-play-none
+ proton-ge-bin
+ ];
+ };
+ virtualisation.waydroid.enable = true;
+
+ xdg = {
+ portal = {
+ enable = true;
+ extraPortals = with pkgs; [
+ #xdg-desktop-portal-gtk
+ xdg-desktop-portal-xapp
+ # (callPackage ../../modules/packages/xdg-desktop-portal-gtk.nix { })
+ ];
+ config = {
+ common = {
+ default = [ "gtk" ];
+ };
+ };
+ xdgOpenUsePortal = true;
+ };
+ #sounds.enable = true;
+ #mime.enable = true;
+ #menus.enable = true;
+ #icons.enable = true;
+ #autostart.enable = true;
+ };
+ fonts = {
+ packages = with pkgs; [
+ #(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
+ nerd-fonts.jetbrains-mono
+ noto-fonts-monochrome-emoji
+ ];
+ fontconfig.defaultFonts.monospace = with pkgs; [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ];
+ fontconfig.defaultFonts.sansSerif = with pkgs; [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ];
+ fontconfig.defaultFonts.serif = with pkgs; [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ];
+ fontconfig.defaultFonts.emoji = with pkgs; [ "freefont" ];
+ enableDefaultPackages = lib.mkForce false;
+ enableGhostscriptFonts = lib.mkForce false;
+ };
+
+ nixpkgs = {
+ config = {
+ allowUnfree = true;
+ permittedInsecurePackages = [
+ "electron-25.9.0"
+ "olm-3.2.16"
+ "dotnet-sdk-wrapped-7.0.410"
+ "dotnet-sdk-7.0.410"
+ ];
+ };
+ };
+ security = {
+ polkit.enable = true;
+ sudo.wheelNeedsPassword = false;
+ };
+
+ hardware = {
+ pulseaudio.enable = false;
+ };
+
+ programs.dconf.enable = true;
+
+ #networking.wireguard.interfaces = {
+ # wg-KP-Ran = {
+
+ #};
+ # };
+
+ virtualisation.libvirtd.enable = true;
+ programs.virt-manager.enable = true;
+
+ monitoring = {
+ monitorAll = true;
+ localPrometheus = true;
+ exposePrometheus = true;
+ localGrafana = true;
+ exposeGrafana = true;
+ nginxHost = "monitoring.localhost";
+ nginxSsl = false;
+ };
+ networking.hosts."127.0.0.1" = builtins.attrNames config.services.nginx.virtualHosts;
+
+ services.gvfs.enable = true;
+ zramSwap = {
+ enable = true;
+ memoryPercent = 200;
+ };
+ services.pcscd.enable = true;
+
+ virtualisation.vmVariant = {
+ users = {
+ mutableUsers = false;
+ users.Rory.password = "password";
+ };
+ networking.interfaces.enp34s0 = lib.mkForce { };
+ };
+
+ system.stateVersion = "24.11"; # DO NOT EDIT!
+}
diff --git a/host/Arc/hacks/drm-amd-3437.patch b/host/Arc/hacks/drm-amd-3437.patch
new file mode 100644
index 0000000..1867762
--- /dev/null
+++ b/host/Arc/hacks/drm-amd-3437.patch
@@ -0,0 +1,13 @@
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+index c556c8b653fa..272ad5e4a328 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+@@ -180,7 +180,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
+ * When GTT is just an alternative to VRAM make sure that we
+ * only use it as fallback and still try to fill up VRAM first.
+ */
+- if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)
++ if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM && !(adev->flags & AMD_IS_APU))
+ places[c].flags |= TTM_PL_FLAG_FALLBACK;
+ c++;
+ }
\ No newline at end of file
diff --git a/host/Arc/hooks/post-rebuild.sh b/host/Arc/hooks/post-rebuild.sh
new file mode 100644
index 0000000..30733ad
--- /dev/null
+++ b/host/Arc/hooks/post-rebuild.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+set -x
+
+git restore --staged hardware-configuration.nix
+git restore --staged Ran.ca
+git restore --staged modules/opensuse/
+git restore --staged opensuse/
\ No newline at end of file
diff --git a/host/Arc/hooks/pre-rebuild.sh b/host/Arc/hooks/pre-rebuild.sh
new file mode 100644
index 0000000..d4ec9d3
--- /dev/null
+++ b/host/Arc/hooks/pre-rebuild.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+set -x
+
+git add -f hardware-configuration.nix
+git add -f Ran.ca
+git add -f modules/opensuse/
+git add -f opensuse/
\ No newline at end of file
diff --git a/host/Arc/nginx/discord.localhost.nix b/host/Arc/nginx/discord.localhost.nix
new file mode 100644
index 0000000..b40e13c
--- /dev/null
+++ b/host/Arc/nginx/discord.localhost.nix
@@ -0,0 +1,36 @@
+{ pkgs, ... }:
+
+{
+ root = "/www/discord";
+ addSSL = true;
+ enableACME = false;
+
+ # We don't care about certificates around here...
+ sslCertificate = "${pkgs.path}/nixos/tests/common/acme/server/acme.test.cert.pem";
+ sslCertificateKey = "${pkgs.path}/nixos/tests/common/acme/server/acme.test.key.pem";
+
+ extraConfig = ''
+ autoindex on;
+ more_set_headers 'Access-Control-Allow-Origin: *';
+ more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS';
+ more_set_headers 'Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
+ more_set_headers 'Access-Control-Expose-Headers: Content-Length,Content-Range';
+ more_set_headers 'Access-Control-Allow-Credentials: true';
+ '';
+
+ locations = {
+ "/" = {
+ index = "index.html";
+ extraConfig = ''
+ more_set_headers 'Access-Control-Allow-Origin: *';
+ more_set_headers 'Access-Control-Allow-Methods: *';
+ more_set_headers 'Access-Control-Allow-Headers: *';
+ more_set_headers 'Access-Control-Expose-Headers: *';
+ more_set_headers 'Access-Control-Max-Age' 1728000;
+
+ # default to /index.html if file not found
+ try_files $uri $uri/ /index.html;
+ '';
+ };
+ };
+}
diff --git a/host/Arc/optional/gui/wayland.nix b/host/Arc/optional/gui/wayland.nix
new file mode 100644
index 0000000..eac6391
--- /dev/null
+++ b/host/Arc/optional/gui/wayland.nix
@@ -0,0 +1,37 @@
+{
+ pkgs,
+ ...
+}:
+
+{
+ programs.sway = {
+ enable = true;
+
+ wrapperFeatures.gtk = true;
+ extraSessionCommands = ''
+ # -- Wayland fixes
+ # SDL:
+ export SDL_VIDEODRIVER=wayland
+ # QT (needs qt5.qtwayland in systemPackages):
+ export QT_QPA_PLATFORM=wayland-egl
+ export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
+ # Fix for some Java AWT applications (e.g. Android Studio),
+ # use this if they aren't displayed properly:
+ export _JAVA_AWT_WM_NONREPARENTING=1
+ '';
+
+ extraPackages = with pkgs; [
+ swaybg
+ #swayidle
+ #swaylock
+ waybar
+ wl-clipboard
+ grim
+ slurp
+ easyeffects
+ keepassxc
+ ];
+ };
+
+ xdg.portal.wlr.enable = true;
+}
diff --git a/host/Arc/optional/gui/x11.nix b/host/Arc/optional/gui/x11.nix
new file mode 100644
index 0000000..9070298
--- /dev/null
+++ b/host/Arc/optional/gui/x11.nix
@@ -0,0 +1,36 @@
+{
+ config,
+ pkgs,
+ lib,
+ nhekoSrc,
+ mtxclientSrc,
+ ...
+}:
+
+{
+ imports = [ ];
+
+ services = {
+ xserver = {
+ windowManager.i3.enable = true;
+ windowManager.i3.extraSessionCommands = ''
+ # output from arandr:
+ #xrandr --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --output HDMI-2 --off --output DP-2 --off
+ xrandr --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --primary --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-2 --off --output DP-2 --off
+ ${pkgs.polybarFull}/bin/polybar &
+ ${pkgs.dunst}/bin/dunst &
+ ${pkgs.picom}/bin/picom --config ~/.config/picom.conf &
+ ${pkgs.feh}/bin/feh --no-fehbg --bg-fill ${../../../../modules/users/Rory/wallpaper.webp}
+ '';
+ windowManager.i3.extraPackages = with pkgs; [
+ easyeffects
+ keepassxc
+ ];
+ };
+
+ picom.enable = false;
+ #picom.vSync = false;
+ #picom.backend = "glx";
+ };
+
+}
diff --git a/host/Arc/optional/hardware-specific/amd.nix b/host/Arc/optional/hardware-specific/amd.nix
new file mode 100644
index 0000000..e4758a6
--- /dev/null
+++ b/host/Arc/optional/hardware-specific/amd.nix
@@ -0,0 +1,42 @@
+{
+ config,
+ pkgs,
+ lib,
+ nhekoSrc,
+ mtxclientSrc,
+ ...
+}:
+
+{
+ imports = [ ];
+
+ boot.initrd.kernelModules = [ "amdgpu" ];
+
+ services = {
+ xserver = {
+ windowManager.i3.extraSessionCommands = ''
+ xrandr --output HDMI-1 --mode 3840x2160 --pos 0x0 --rotate normal --primary --output DP-1 --mode 1920x1080 --pos 3840x1080 --rotate normal --output HDMI-2 --off --output DP-2 --off
+ '';
+ wacom.enable = true;
+ };
+ picom.backend = "glx";
+ };
+
+ environment.systemPackages = with pkgs; [
+ rocmPackages.rocm-smi # useful to have
+ ];
+
+ hardware = {
+ graphics = {
+ enable = true;
+ enable32Bit = true;
+ extraPackages = with pkgs; [
+ rocmPackages.clr.icd
+ #amdvlk
+ ];
+ #extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
+ };
+ };
+
+ systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
+}
diff --git a/host/Arc/optional/hardware-specific/nvidia.nix b/host/Arc/optional/hardware-specific/nvidia.nix
new file mode 100644
index 0000000..1f98541
--- /dev/null
+++ b/host/Arc/optional/hardware-specific/nvidia.nix
@@ -0,0 +1,40 @@
+{
+ config,
+ pkgs,
+ lib,
+ nhekoSrc,
+ mtxclientSrc,
+ ...
+}:
+
+{
+ imports = [
+
+ ];
+
+ services = {
+ xserver = {
+ #videoDrivers = [ "nvidia" ];
+ #windowManager.i3.extraSessionCommands = ''
+ # todo: restore
+ #'';
+ };
+ picom.backend = "glx";
+ };
+
+ hardware = {
+ graphics = {
+ enable = true;
+ };
+
+ nvidia = {
+ modesetting.enable = true;
+ powerManagement.enable = false;
+ powerManagement.finegrained = false;
+ open = true;
+ nvidiaSettings = true;
+ nvidiaPersistenced = true;
+ package = config.boot.kernelPackages.nvidiaPackages.stable;
+ };
+ };
+}
diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix
index 13d49d7..95c9775 100644
--- a/host/Rory-desktop/configuration.nix
+++ b/host/Rory-desktop/configuration.nix
@@ -27,7 +27,7 @@ args@{
./optional/gui/wayland.nix
./printing.nix
- #./ollama.nix
+ ./ollama.nix
];
boot = {
@@ -307,5 +307,9 @@ args@{
networking.interfaces.enp34s0 = lib.mkForce { };
};
+ services.rabbitmq = {
+ enable = true;
+ };
+
system.stateVersion = "22.11"; # DO NOT EDIT!
}
diff --git a/host/Rory-desktop/ollama.nix b/host/Rory-desktop/ollama.nix
index 94ec8cc..b1b0a7a 100755
--- a/host/Rory-desktop/ollama.nix
+++ b/host/Rory-desktop/ollama.nix
@@ -26,6 +26,7 @@
models = "/data/ollama/home/models";
environmentVariables = {
OLLAMA_LLM_LIBRARY = "rocm";
+ HCC_AMDGPU_TARGET = "gfx1102";
};
# writablePaths = [ "/data/ollama/home" ];
#listenAddress = "0.0.0.0:11434";
@@ -34,6 +35,7 @@
user = "ollama";
group = "ollama";
acceleration = "rocm";
+ rocmOverrideGfx = "11.0.2";
};
#services.nextjs-ollama-llm-ui = {
diff --git a/host/Rory-desktop/optional/hardware-specific/amd.nix b/host/Rory-desktop/optional/hardware-specific/amd.nix
index 509ff14..e4758a6 100644
--- a/host/Rory-desktop/optional/hardware-specific/amd.nix
+++ b/host/Rory-desktop/optional/hardware-specific/amd.nix
@@ -39,6 +39,4 @@
};
systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ];
-
- system.stateVersion = "22.11"; # DO NOT EDIT!
}
diff --git a/host/Rory-desktop/postgres.nix b/host/Rory-desktop/postgres.nix
index 60fd8d6..c201b04 100755
--- a/host/Rory-desktop/postgres.nix
+++ b/host/Rory-desktop/postgres.nix
@@ -28,10 +28,17 @@
# '';
#dataDir = "/mnt/postgres/data";
settings = {
- "max_connections" = "100";
- "shared_buffers" = "128MB";
+ "max_connections" = "1000";
+ "shared_buffers" = "512MB";
"max_wal_size" = "1GB";
"min_wal_size" = "80MB";
+
+ shared_preload_libraries = "pg_stat_statements";
+ track_io_timing = "on";
+ track_functions = "pl";
+ "pg_stat_statements.max" = "10000"; # additional
+ "pg_stat_statements.track" = "all"; # additional
+
};
};
diff --git a/host/Rory-desktop/printing.nix b/host/Rory-desktop/printing.nix
index 351b59f..4f86347 100644
--- a/host/Rory-desktop/printing.nix
+++ b/host/Rory-desktop/printing.nix
@@ -51,6 +51,4 @@
};
};
};
-
- system.stateVersion = "22.11"; # DO NOT EDIT!
}
diff --git a/host/Rory-nginx/services/redpanda/systemd-services.nix b/host/Rory-nginx/services/redpanda/systemd-services.nix
index bb13e53..6178b22 100644
--- a/host/Rory-nginx/services/redpanda/systemd-services.nix
+++ b/host/Rory-nginx/services/redpanda/systemd-services.nix
@@ -26,18 +26,22 @@
{
mapping = ''
root = this
- if this.loaded == "loaded" {
+ if this.load == "loaded" {
root.loaded_value = 1.0
} else {
root.loaded_value = 0.0
}
if this.active == "active" {
root.active_value = 1.0
+ } else if this.active == "activating" {
+ root.active_value = 0.5
} else {
root.active_value = 0.0
}
if this.sub == "active" {
root.sub_value = 1.0
+ } else if this.sub == "auto-restart" {
+ root.sub_value = 0.5
} else {
root.sub_value = 0.0
}
@@ -49,7 +53,7 @@
type = "gauge";
value = "\${!json(\"loaded_value\")}";
labels = {
- field = "loaded";
+ field = "load";
service = "\${!json(\"unit\")}";
description = "\${!json(\"description\")}";
};
diff --git a/modules/users/Arci.nix b/modules/users/Arci.nix
new file mode 100644
index 0000000..f5e747d
--- /dev/null
+++ b/modules/users/Arci.nix
@@ -0,0 +1,200 @@
+{ lib, pkgs, ... }:
+
+{
+ users.users.Arci = {
+ isNormalUser = true;
+ extraGroups = [
+ "wheel"
+ "libvirtd"
+ "ocp"
+ ];
+ packages = with pkgs; [
+ lnav
+ age
+ git
+ lsd
+ duf
+ (btop.override { rocmSupport = true; })
+ htop
+ kitty.terminfo
+ tmux
+ jq
+ dig
+
+ # - zsh
+ zsh
+ zsh-powerlevel10k
+ zsh-nix-shell
+ zsh-you-should-use
+ zsh-syntax-highlighting
+ zsh-completions
+
+ wireguard-tools
+ ];
+ openssh.authorizedKeys.keys = [
+ ];
+ useDefaultShell = true;
+ shell = pkgs.zsh;
+ };
+ programs.zsh.enable = true;
+ environment.shells = with pkgs; [ zsh ];
+
+ home-manager.users.Arci = {
+ home.preferXdgDirectories = true;
+ home.sessionVariables = {
+ EDITOR = "nvim";
+ SYSTEMD_EDITOR = "nvim";
+ GIT_EDITOR = "nvim";
+ QT_QPA_PLATFORMTHEME = "xdgdesktopportal";
+ GTK_USE_PORTAL = "1";
+ _JAVA_AWT_WM_NONREPARENTING = "1";
+ WINEDEBUG = "-all";
+ CHOKIDAR_USEPOLLING = "true";
+ MSBUILDLIVELOGGER = "auto";
+ DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER = "1";
+ DOTNET_CLI_TELEMETRY_OPTOUT = "1";
+ NIXPKGS_ALLOW_UNFREE = "1";
+ MOZ_USE_XINPUT2 = "1";
+ };
+ programs = {
+ git = {
+ enable = true;
+ userName = "Rory&";
+ userEmail = "root@rory.gay";
+ extraConfig = {
+ safe = {
+ directory = "/";
+ };
+ };
+ };
+ zsh = {
+ enable = true;
+ #enableAutosuggestions = true;
+ autosuggestion.enable = true;
+ enableVteIntegration = true;
+ autocd = true;
+
+ initExtraFirst = ''
+ export EDITOR=nvim
+ export SYSTEMD_EDITOR=$EDITOR
+ export GIT_EDITOR=$EDITOR
+ export QT_QPA_PLATFORMTHEME=xdgdesktopportal
+ export GTK_USE_PORTAL=1
+ export _JAVA_AWT_WM_NONREPARENTING=1
+ export WINEDEBUG=-all
+ export DOTPROFILE_LOADED='yes'
+ export CHOKIDAR_USEPOLLING=true
+ export MSBUILDLIVELOGGER=auto
+ export DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER=1
+ export DOTNET_CLI_TELEMETRY_OPTOUT=1
+ function mkkey() {
+ echo "Making key for $1"
+ ssh-keygen -t ed25519 -C "$HOST -> $1" -f ~/.ssh/id_ed25519_$1
+ (
+ echo "Host $1"
+ echo " IdentityFile ~/.ssh/id_ed25519_$1"
+ ) >> ~/.ssh/config
+ echo 'Done! Public key:'
+ cat ~/.ssh/id_ed25519_$1.pub
+ }
+
+ export DISABLE_AUTO_UPDATE=true
+ COMPLETION_WAITING_DOTS="true"
+ '';
+ initExtra = ''
+ alias mv='mv -v'
+ alias pre='npx prettier -w'
+ alias git-commit='git commit --signoff --sign'
+ alias npm='NODE_OPTIONS=--openssl-legacy-provider npm'
+ alias npx='NODE_OPTIONS=--openssl-legacy-provider npx'
+ alias yarn='NODE_OPTIONS=--openssl-legacy-provider npx -y yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config'
+ alias node='NODE_OPTIONS=--openssl-legacy-provider node'
+ # - dotnet
+ alias drun='dotnet watch run --no-hot-reload --property WarningLevel=0'
+ alias dbuild='dotnet watch build --no-hot-reload --property WarningLevel=0'
+ alias ls='lsd -lAhF --color=always --icon=always'
+ alias transfetch='neofetch --kitty ~/trans_witch.jpg'
+ alias gc='git-commit'
+ [ -f "$HOME/.profile" ] && . $HOME/.profile
+ '';
+ #alias knconfig='cp .config ../$(date ''+%Y%m%d_%k%M%S\'').config -v; make CC=clang LLVM=1 nconfig'
+ oh-my-zsh = {
+ enable = true;
+ plugins = [
+ "git"
+ "sudo"
+ ];
+ };
+
+ plugins = [
+ {
+ name = "powerlevel10k";
+ src = pkgs.zsh-powerlevel10k;
+ file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
+ }
+ {
+ name = "powerlevel10k-config";
+ src = lib.cleanSource ./Rory;
+ file = "p10k.zsh";
+ }
+ {
+ name = "zsh-syntax-highlighting";
+ src = pkgs.zsh-syntax-highlighting;
+ file = "share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh";
+ }
+ {
+ name = "zsh-autosuggestions";
+ src = pkgs.zsh-autosuggestions;
+ file = "share/zsh-autosuggestions/zsh-autosuggestions.zsh";
+ }
+ ];
+
+ localVariables = {
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS = [
+ "os_icon"
+ "dir"
+ "vcs"
+ "prompt_char"
+ ];
+ POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS = [
+ "status"
+ "command_execution_time"
+ "background_jobs"
+ "direnv"
+ "virtualenv"
+ "pyenv"
+ "nodeenv"
+ "context"
+ "nix_shell"
+ "vi_mode"
+ "load"
+ "disk_usage"
+ "ram"
+ ];
+ POWERLEVEL9K_MODE = "nerdfont-complete";
+ POWERLEVEL9K_ICON_PADDING = "none";
+ POWERLEVEL9K_PROMPT_ADD_NEWLINE = "false";
+ POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR = "\uE0B1";
+ POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR = "\uE0B3";
+ POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR = "\uE0B0";
+ POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR = "\uE0B2";
+ POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL = "\uE0B0";
+ POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL = "\uE0B2";
+ POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE = true;
+ };
+ };
+ neovim = {
+ defaultEditor = true;
+ viAlias = true;
+ vimAlias = true;
+ vimdiffAlias = true;
+ coc = {
+ enable = true;
+
+ };
+ };
+ };
+
+ home.stateVersion = "22.11";
+ };
+}
|