summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/base-client.nix9
-rwxr-xr-xmodules/base-server.nix42
-rwxr-xr-xmodules/base.nix26
-rw-r--r--modules/monitoring/module.nix1
-rw-r--r--modules/software-templates/devenv/c-cpp.nix4
-rw-r--r--modules/software-templates/devenv/dotnet.nix4
-rw-r--r--modules/software-templates/devenv/go.nix17
-rw-r--r--modules/software-templates/devenv/java.nix4
-rw-r--r--modules/software-templates/devenv/javascript.nix4
-rw-r--r--modules/users/Arci.nix3
-rwxr-xr-xmodules/users/Rory.client.nix2
-rwxr-xr-xmodules/users/Rory.nix17
-rw-r--r--modules/users/Rory/chimmie_fedi-wallpaper.pngbin0 -> 1403953 bytes
-rw-r--r--modules/users/Rory/xenia_drawing5-1.pngbin0 -> 1480870 bytes
-rw-r--r--modules/users/Rory/xenia_drawing5-1_2160p.pngbin0 -> 4768319 bytes
-rw-r--r--modules/users/Rory/xenia_drawing5.pngbin0 -> 916370 bytes
-rw-r--r--modules/users/geba.nix199
-rwxr-xr-xmodules/users/ks.nix1
18 files changed, 259 insertions, 74 deletions
diff --git a/modules/base-client.nix b/modules/base-client.nix

index 2a5c8e5..98418e8 100755 --- a/modules/base-client.nix +++ b/modules/base-client.nix
@@ -20,10 +20,10 @@ }; systemd = { - sleep.extraConfig = '' - AllowSuspend=no - AllowHibernation=no - ''; + sleep.settings.Sleep = { + AllowSuspend = "no"; + AllowHibernation = "no"; + }; }; environment.systemPackages = with pkgs; [ @@ -49,5 +49,4 @@ # disable all serial ports/consoles systemd.suppressedSystemUnits = [ "serial-getty@.service" ]; - } diff --git a/modules/base-server.nix b/modules/base-server.nix
index 1278d83..46f0c97 100755 --- a/modules/base-server.nix +++ b/modules/base-server.nix
@@ -27,10 +27,10 @@ }; }; - sleep.extraConfig = '' - AllowSuspend=no - AllowHibernation=no - ''; + sleep.settings.Sleep = { + AllowSuspend = "no"; + AllowHibernation = "no"; + }; }; #systemd.services.NetworkManager-wait-online.enable = false; @@ -77,38 +77,4 @@ # This shaves off half a gigabyte of disk space... hardware.enableAllFirmware = false; hardware.enableRedistributableFirmware = false; - - services = { - promtail = { - enable = true; - configuration = { - server = { - http_listen_port = 3031; - grpc_listen_port = 0; - }; - positions = { - filename = "/tmp/positions.yaml"; - }; - clients = [ { url = "https://loki.regional.seian.cloud/loki/api/v1/push"; } ]; - scrape_configs = [ - { - job_name = "journal"; - journal = { - max_age = "12h"; - labels = { - job = "systemd-journal"; - host = "${toString config.networking.hostName}"; - }; - }; - relabel_configs = [ - { - source_labels = [ "__journal__systemd_unit" ]; - target_label = "unit"; - } - ]; - } - ]; - }; - }; - }; } diff --git a/modules/base.nix b/modules/base.nix
index ae370f6..e539b15 100755 --- a/modules/base.nix +++ b/modules/base.nix
@@ -73,6 +73,7 @@ "8.8.8.8" "8.4.4.8" ]; + resolvconf.enable = false; }; environment.etc."resolv.conf" = lib.mkDefault { @@ -100,22 +101,26 @@ }; resolved = { enable = lib.mkForce false; - dnssec = lib.mkForce "false"; - dnsovertls = lib.mkForce "false"; + settings = { + Resolve = { + DNSSEC = lib.mkForce "false"; + DNSOverTLS = lib.mkForce "false"; + }; + }; }; }; systemd = { - sleep.extraConfig = '' - AllowSuspend=no - AllowHibernation=no - ''; + sleep.settings.Sleep = { + AllowSuspend = "no"; + AllowHibernation = "no"; + }; }; environment.systemPackages = with pkgs; [ #wget net-tools - neofetch + fastfetch lnav pciutils git @@ -132,7 +137,7 @@ dig cloud-utils #nix-output-monitor - nom.packages.${system}.default + nom.packages.${stdenv.hostPlatform.system}.default #expect unrar-wrapper #arch-install-scripts @@ -150,9 +155,7 @@ zsh-completions ]; - systemd.coredump.extraConfig = lib.mkDefault '' - Storage=none - ''; + systemd.coredump.settings.Coredump.Storage = lib.mkDefault "none"; nix = { settings = { experimental-features = [ @@ -183,7 +186,6 @@ }; monitoring.monitorAll = lib.mkForce false; - services.promtail.enable = lib.mkForce false; networking.useDHCP = lib.mkOverride 51 true; }; } diff --git a/modules/monitoring/module.nix b/modules/monitoring/module.nix
index f47c483..a676feb 100644 --- a/modules/monitoring/module.nix +++ b/modules/monitoring/module.nix
@@ -57,6 +57,7 @@ in protocol = "socket"; socket_mode = "0666"; }; + security.secret_key = "$__file{/run/credentials/grafana.service/secret_key}"; }; provision = { datasources.settings = { diff --git a/modules/software-templates/devenv/c-cpp.nix b/modules/software-templates/devenv/c-cpp.nix
index 579edcc..7e88303 100644 --- a/modules/software-templates/devenv/c-cpp.nix +++ b/modules/software-templates/devenv/c-cpp.nix
@@ -1,8 +1,8 @@ { pkgs, nix-jetbrains-plugins, ... }: { - environment.systemPackages = with nix-jetbrains-plugins.lib."${pkgs.stdenv.system}"; [ - (buildIdeWithPlugins pkgs.jetbrains "clion" [ + environment.systemPackages = with nix-jetbrains-plugins.lib; [ + (buildIdeWithPlugins pkgs "clion" [ "com.github.copilot" "nix-idea" # "visual-studio-keymap" diff --git a/modules/software-templates/devenv/dotnet.nix b/modules/software-templates/devenv/dotnet.nix
index d8871ef..53cbf52 100644 --- a/modules/software-templates/devenv/dotnet.nix +++ b/modules/software-templates/devenv/dotnet.nix
@@ -1,8 +1,8 @@ { pkgs, nix-jetbrains-plugins, ... }: { - environment.systemPackages = with nix-jetbrains-plugins.lib."${pkgs.stdenv.system}"; [ - (buildIdeWithPlugins pkgs.jetbrains "rider" [ + environment.systemPackages = with nix-jetbrains-plugins.lib; [ + (buildIdeWithPlugins pkgs "rider" [ "com.github.copilot" "nix-idea" # "visual-studio-keymap" diff --git a/modules/software-templates/devenv/go.nix b/modules/software-templates/devenv/go.nix new file mode 100644
index 0000000..bbce701 --- /dev/null +++ b/modules/software-templates/devenv/go.nix
@@ -0,0 +1,17 @@ +{ pkgs, nix-jetbrains-plugins, ... }: + +{ + environment.systemPackages = with nix-jetbrains-plugins.lib; [ + (buildIdeWithPlugins pkgs "goland" [ + "com.github.copilot" + "nix-idea" + # "visual-studio-keymap" + "String Manipulation" + ]) + pkgs.go + pkgs.gcc + ]; + environment.sessionVariables = { + DOTNET_CLI_TELEMETRY_OPTOUT = "1"; + }; +} diff --git a/modules/software-templates/devenv/java.nix b/modules/software-templates/devenv/java.nix
index ed1581a..a0065c6 100644 --- a/modules/software-templates/devenv/java.nix +++ b/modules/software-templates/devenv/java.nix
@@ -1,8 +1,8 @@ { pkgs, nix-jetbrains-plugins, ... }: { - environment.systemPackages = with nix-jetbrains-plugins.lib."${pkgs.stdenv.system}"; [ - (buildIdeWithPlugins pkgs.jetbrains "idea" [ + environment.systemPackages = with nix-jetbrains-plugins.lib; [ + (buildIdeWithPlugins pkgs "idea" [ "com.github.copilot" "nix-idea" # "visual-studio-keymap" diff --git a/modules/software-templates/devenv/javascript.nix b/modules/software-templates/devenv/javascript.nix
index 583f6ef..de69646 100644 --- a/modules/software-templates/devenv/javascript.nix +++ b/modules/software-templates/devenv/javascript.nix
@@ -1,8 +1,8 @@ { pkgs, nix-jetbrains-plugins, ... }: { - environment.systemPackages = with nix-jetbrains-plugins.lib."${pkgs.stdenv.system}"; [ - (buildIdeWithPlugins pkgs.jetbrains "webstorm" [ + environment.systemPackages = with nix-jetbrains-plugins.lib; [ + (buildIdeWithPlugins pkgs "webstorm" [ "com.github.copilot" "nix-idea" # "visual-studio-keymap" diff --git a/modules/users/Arci.nix b/modules/users/Arci.nix
index df7efb5..28c3c1c 100644 --- a/modules/users/Arci.nix +++ b/modules/users/Arci.nix
@@ -59,9 +59,8 @@ programs = { git = { enable = true; + signing.format = null; settings = { - user.name = "Rory&"; - user.email = "root@rory.gay"; safe.directory = "/"; }; }; diff --git a/modules/users/Rory.client.nix b/modules/users/Rory.client.nix
index ede12df..3394e16 100755 --- a/modules/users/Rory.client.nix +++ b/modules/users/Rory.client.nix
@@ -10,7 +10,7 @@ }; users.users.Rory.packages = with pkgs; [ - helvum + crosspipe vesktop pavucontrol wf-recorder diff --git a/modules/users/Rory.nix b/modules/users/Rory.nix
index c56c3ed..05745fc 100755 --- a/modules/users/Rory.nix +++ b/modules/users/Rory.nix
@@ -71,11 +71,13 @@ programs = { git = { enable = true; + signing.format = null; settings = { user.name = "Rory&"; user.email = "root@rory.gay"; safe.directory = "/"; advice.defaultBranchName = false; + signing.format = "openpgp"; }; }; zsh = { @@ -111,8 +113,7 @@ export DISABLE_AUTO_UPDATE=true COMPLETION_WAITING_DOTS="true" - ''; - initExtra = '' + # at the end? alias mv='mv -v' alias pre='npx prettier -w' alias git-commit='git commit --signoff --sign' @@ -192,12 +193,12 @@ 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_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; }; }; diff --git a/modules/users/Rory/chimmie_fedi-wallpaper.png b/modules/users/Rory/chimmie_fedi-wallpaper.png new file mode 100644
index 0000000..066f8b7 --- /dev/null +++ b/modules/users/Rory/chimmie_fedi-wallpaper.png
Binary files differdiff --git a/modules/users/Rory/xenia_drawing5-1.png b/modules/users/Rory/xenia_drawing5-1.png new file mode 100644
index 0000000..5d132cf --- /dev/null +++ b/modules/users/Rory/xenia_drawing5-1.png
Binary files differdiff --git a/modules/users/Rory/xenia_drawing5-1_2160p.png b/modules/users/Rory/xenia_drawing5-1_2160p.png new file mode 100644
index 0000000..791b5da --- /dev/null +++ b/modules/users/Rory/xenia_drawing5-1_2160p.png
Binary files differdiff --git a/modules/users/Rory/xenia_drawing5.png b/modules/users/Rory/xenia_drawing5.png new file mode 100644
index 0000000..10af0ca --- /dev/null +++ b/modules/users/Rory/xenia_drawing5.png
Binary files differdiff --git a/modules/users/geba.nix b/modules/users/geba.nix new file mode 100644
index 0000000..77ee689 --- /dev/null +++ b/modules/users/geba.nix
@@ -0,0 +1,199 @@ +{ lib, pkgs, ... }: + +{ + users.users.geba = { + isNormalUser = true; + group = "users"; + 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.geba = { + 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; + signing.format = null; + settings = { + 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"; + }; +} + diff --git a/modules/users/ks.nix b/modules/users/ks.nix
index d55dd1e..b0cf8df 100755 --- a/modules/users/ks.nix +++ b/modules/users/ks.nix
@@ -17,6 +17,7 @@ home-manager.users.ks = { programs.git = { enable = true; + signing.format = null; settings = { user.name = "Kinoshita Shimizu"; user.email = "ks@kinoshitaproductions.com";