From d6b26b00661e51a92d68657ec313786cf6c15b4d Mon Sep 17 00:00:00 2001 From: FredzyW Date: Fri, 8 Nov 2024 09:40:39 +0100 Subject: [PATCH 1/8] Added IP --- shared/ssh.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/ssh.nix b/shared/ssh.nix index 0537ab8..d69893d 100644 --- a/shared/ssh.nix +++ b/shared/ssh.nix @@ -27,7 +27,7 @@ identityFile = "/home/fw/.ssh/fw-ssh-key"; }; "ha1" = { - hostname = "hosted-agent-1"; + hostname = "192.168.0.180"; port = 22; user = "fw"; identityFile = "/home/fw/.ssh/fw-ssh-key"; From 1fdb076fc54820a720b67178bbb9b4e19730fc0e Mon Sep 17 00:00:00 2001 From: fwastring Date: Wed, 12 Feb 2025 15:45:56 +0100 Subject: [PATCH 2/8] Big update --- config/base.nix | 23 ++++++++++++++++------- config/home.nix | 18 ++++++++---------- config/lill-home.nix | 2 +- flake.nix | 4 ++-- jobb/users.nix | 8 ++++++++ maskiner/work-desktop/configuration.nix | 3 ++- shared/dwm.nix | 2 +- shared/firefox.nix | 2 +- shared/kitty.nix | 4 ++-- shared/ssh.nix | 12 ++++++++++++ shared/tmux.nix | 12 ------------ 11 files changed, 53 insertions(+), 37 deletions(-) diff --git a/config/base.nix b/config/base.nix index 6cc2ded..25e9d42 100644 --- a/config/base.nix +++ b/config/base.nix @@ -50,8 +50,19 @@ liveRestore = false; }; + security.rtkit.enable = true; + services = { + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + jack.enable = true; + }; + }; hardware = { - pulseaudio.enable = true; + pulseaudio.enable = false; bluetooth = { enable = true; powerOnBoot = true; @@ -64,12 +75,10 @@ }; networking.networkmanager.enable = true; - networking.nameservers = [ "8.8.8.8"]; - networking.resolvconf.enable = pkgs.lib.mkForce false; -networking.dhcpcd.extraConfig = "nohook resolv.conf"; -networking.networkmanager.dns = "none"; -services.resolved.enable = false; - + networking.nameservers = [ "8.8.8.8" ]; + # networking.resolvconf.enable = pkgs.lib.mkForce false; +# networking.dhcpcd.extraConfig = "nohook resolv.conf"; +# networking.networkmanager.dns = "none"; environment.sessionVariables = { EDITOR = "nvim"; diff --git a/config/home.nix b/config/home.nix index 8af7a0e..74c3364 100644 --- a/config/home.nix +++ b/config/home.nix @@ -11,8 +11,9 @@ imports = [ ../shared/dwm.nix ../shared/vscode.nix - ../shared/dmenu.nix + # ../shared/dmenu.nix ../shared/rofi.nix + ../shared/mpv.nix ../shared/kitty.nix ../shared/alacritty.nix ../shared/tmux.nix @@ -68,6 +69,7 @@ openssl dig jq + wireguard-tools # Dev unstable.deno @@ -93,7 +95,7 @@ kubectl #LSP - roslyn + # roslyn roslyn-ls python312Packages.python-lsp-server yaml-language-server @@ -101,13 +103,9 @@ jdt-language-server texlab marksman - nodePackages_latest.bash-language-server - typescript - nodePackages_latest.typescript-language-server - nodePackages_latest.vls - nodePackages_latest.volar - lua-language-server tree-sitter + vue-language-server + nodePackages_latest.typescript-language-server gopls rust-analyzer @@ -137,8 +135,8 @@ poppler_utils #Desktop + fluent-reader unstable.feishin - firefox libreoffice unstable.signal-desktop pinta @@ -146,7 +144,7 @@ vial thunderbird alacritty - unstable.neovim + neovim fastfetch lazygit byzanz diff --git a/config/lill-home.nix b/config/lill-home.nix index 768b1f4..ac3a4bc 100644 --- a/config/lill-home.nix +++ b/config/lill-home.nix @@ -128,7 +128,7 @@ zathura thunderbird alacritty - unstable.neovim + neovim fastfetch lazygit byzanz diff --git a/flake.nix b/flake.nix index 6fa0ad9..3dc581a 100644 --- a/flake.nix +++ b/flake.nix @@ -3,12 +3,12 @@ inputs = { # Nixpkgs - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; fw-pkgs.url = "github:fwastring/fwpkgs/main"; # Home manager - home-manager.url = "github:nix-community/home-manager/release-24.05"; + home-manager.url = "github:nix-community/home-manager/release-24.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/jobb/users.nix b/jobb/users.nix index 8ad67c7..56c6e3b 100644 --- a/jobb/users.nix +++ b/jobb/users.nix @@ -35,6 +35,14 @@ "docker" ]; }; + runner = { + initialPassword = "password"; + isNormalUser = true; + description = "github runner"; + extraGroups = [ + "docker" + ]; + }; }; }; } diff --git a/maskiner/work-desktop/configuration.nix b/maskiner/work-desktop/configuration.nix index 01744cb..aa27153 100644 --- a/maskiner/work-desktop/configuration.nix +++ b/maskiner/work-desktop/configuration.nix @@ -12,7 +12,8 @@ imports = [ ./hardware-configuration.nix ../../config/base.nix - ../../config/users.nix + ../../shared/openssh.nix + ../../jobb/users.nix ]; environment.systemPackages = with pkgs; [ diff --git a/shared/dwm.nix b/shared/dwm.nix index 8068cb4..82d182d 100644 --- a/shared/dwm.nix +++ b/shared/dwm.nix @@ -3,7 +3,7 @@ let dwm = pkgs.dwm.overrideAttrs (old: { src = builtins.fetchGit { url = "https://github.com/FredzyW/dwm-conf.git"; - rev = "05276318843d1bfe90a8aae266c9e997bf97e577"; + rev = "e298bf0dac111f928ef0fbd4a7ebc21db8782df5"; }; nativeBuildInputs = with pkgs; [ xorg.libX11.dev diff --git a/shared/firefox.nix b/shared/firefox.nix index 2f98cf6..7682e22 100644 --- a/shared/firefox.nix +++ b/shared/firefox.nix @@ -9,7 +9,7 @@ builtins.fetchGit { url = "https://github.com/rockofox/firefox-minima"; ref = "main"; - rev = "c5580fd04e9b198320f79d441c78a641517d7af5"; # <-- Change this + rev = "dc40a861b24b378982c265a7769e3228ffccd45a"; # <-- Change this } }/userChrome.css"; ''; diff --git a/shared/kitty.nix b/shared/kitty.nix index d201ec8..23831bc 100644 --- a/shared/kitty.nix +++ b/shared/kitty.nix @@ -11,12 +11,12 @@ # name = "Iosevka Nerd Font Bold"; # name = "ComicShannsMono Nerd Font Bold"; name = "Hack Nerd Font Mono Bold"; - size = 13; + size = 12; }; shellIntegration = { mode = "no-cursor"; }; - theme = "Catppuccin-Mocha"; + themeFile = "Catppuccin-Mocha"; settings = { confirm_os_window_close = 2; cursor_shape = "block"; diff --git a/shared/ssh.nix b/shared/ssh.nix index f76f719..9811b93 100644 --- a/shared/ssh.nix +++ b/shared/ssh.nix @@ -86,6 +86,18 @@ user = "fw"; identityFile = "/home/fw/.ssh/id_rsa"; }; + "kube01" = { + hostname = "192.168.0.177"; + port = 22; + user = "fw"; + identityFile = "/home/fw/.ssh/fw-ssh-key"; + }; + "runner01" = { + hostname = "192.168.0.205"; + port = 22; + user = "fw"; + identityFile = "/home/fw/.ssh/fw-ssh-key"; + }; }; }; } diff --git a/shared/tmux.nix b/shared/tmux.nix index 1e42fcc..d48e1d9 100644 --- a/shared/tmux.nix +++ b/shared/tmux.nix @@ -7,16 +7,6 @@ tmuxPlugins.sensible tmuxPlugins.pain-control tmuxPlugins.sessionist - tmuxPlugins.logging - { - plugin = tmuxPlugins.resurrect; - extraConfig = '' - resurrect_dir="$HOME/.tmux/resurrect" - set -g @resurrect-dir $resurrect_dir - set -g @resurrect-hook-post-save-all 'target=$(readlink -f $resurrect_dir/last); sed "s| --cmd .*-vim-pack-dir||g; s|/etc/profiles/per-user/$USER/bin/||g" $target | sponge $target' - set -g @resurrect-strategy-nvim 'session' - ''; - } { plugin = tmuxPlugins.continuum; extraConfig = '' @@ -24,8 +14,6 @@ set -g @continuum-restore 'on' ''; } - fw-pkgs.tmuxPlugins.spotify - fw-pkgs.tmuxPlugins.tmux-fzf-window { plugin = fw-pkgs.tmuxPlugins.minimal; extraConfig = '' From 93e16f6ceb4ebdf972ff806a8aa634d3fae5caa5 Mon Sep 17 00:00:00 2001 From: fwastring Date: Wed, 19 Feb 2025 19:46:10 +0100 Subject: [PATCH 3/8] Fix some LSPs --- config/home.nix | 8 +++++--- maskiner/laptop/hardware-configuration.nix | 7 ++++--- shared/fish.nix | 2 ++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/config/home.nix b/config/home.nix index 74c3364..a5238b5 100644 --- a/config/home.nix +++ b/config/home.nix @@ -70,6 +70,7 @@ dig jq wireguard-tools + acpi # Dev unstable.deno @@ -78,13 +79,12 @@ ngrok tailwindcss nodejs_22 - gh-f - gh yarn plantuml go dotnetCorePackages.sdk_8_0_3xx templ + goa #Tools qrencode @@ -99,13 +99,15 @@ roslyn-ls python312Packages.python-lsp-server yaml-language-server + lua-language-server + typescript nil jdt-language-server texlab marksman tree-sitter vue-language-server - nodePackages_latest.typescript-language-server + typescript-language-server gopls rust-analyzer diff --git a/maskiner/laptop/hardware-configuration.nix b/maskiner/laptop/hardware-configuration.nix index 8dc9704..6d99d1f 100644 --- a/maskiner/laptop/hardware-configuration.nix +++ b/maskiner/laptop/hardware-configuration.nix @@ -14,17 +14,18 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/af77f921-bcba-43c6-8670-a90e1bde1915"; + { device = "/dev/disk/by-uuid/0f9de0d5-cdca-42a8-bb8a-070e3147396a"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/346C-F5FE"; + { device = "/dev/disk/by-uuid/3340-1019"; fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; }; swapDevices = - [ { device = "/dev/disk/by-uuid/3fa47cf3-f18d-4ab7-80e5-39bfaeada0d1"; } + [ { device = "/dev/disk/by-uuid/36870c0d-2200-4850-a8af-7021f6776651"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/shared/fish.nix b/shared/fish.nix index 036c424..c835097 100644 --- a/shared/fish.nix +++ b/shared/fish.nix @@ -61,6 +61,8 @@ set SYSTEM_DIR "$FLAKE_DIR#jobb" set -Ux FZF_CTRL_R_OPTS "--reverse" set -Ux FZF_TMUX_OPTS "-p" + set -e GOROOT + set -e GOPATH # Mocha set -Ux FZF_DEFAULT_OPTS "\ From e9b104462b39120529c03e715ed6c407279a8dbf Mon Sep 17 00:00:00 2001 From: fwastring Date: Fri, 21 Feb 2025 14:47:30 +0100 Subject: [PATCH 4/8] Moved rofi to base --- config/base.nix | 1 + config/home.nix | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/base.nix b/config/base.nix index 25e9d42..28d5633 100644 --- a/config/base.nix +++ b/config/base.nix @@ -127,6 +127,7 @@ neovim git openssh + rofi ]; diff --git a/config/home.nix b/config/home.nix index a5238b5..4de58d6 100644 --- a/config/home.nix +++ b/config/home.nix @@ -12,7 +12,7 @@ ../shared/dwm.nix ../shared/vscode.nix # ../shared/dmenu.nix - ../shared/rofi.nix + # ../shared/rofi.nix ../shared/mpv.nix ../shared/kitty.nix ../shared/alacritty.nix @@ -71,6 +71,7 @@ jq wireguard-tools acpi + light # Dev unstable.deno @@ -112,7 +113,7 @@ rust-analyzer # UI - rofi-bluetooth + # rofi-bluetooth pastel imagemagick From 166c176ed7e0f04e537e34668604fa87654daad7 Mon Sep 17 00:00:00 2001 From: fwastring Date: Fri, 21 Feb 2025 14:49:41 +0100 Subject: [PATCH 5/8] Updated dwm to new version --- shared/dwm.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/dwm.nix b/shared/dwm.nix index 82d182d..65de9f7 100644 --- a/shared/dwm.nix +++ b/shared/dwm.nix @@ -3,7 +3,7 @@ let dwm = pkgs.dwm.overrideAttrs (old: { src = builtins.fetchGit { url = "https://github.com/FredzyW/dwm-conf.git"; - rev = "e298bf0dac111f928ef0fbd4a7ebc21db8782df5"; + rev = "7e10a592cbfd1cea2b6c5e77c3738716a390eb65"; }; nativeBuildInputs = with pkgs; [ xorg.libX11.dev @@ -28,3 +28,5 @@ in home.packages = [ dwm dwmblocks ]; } + + From 3eb63178e466fda366cd1df95604a1bcae6f0eba Mon Sep 17 00:00:00 2001 From: fwastring Date: Wed, 19 Mar 2025 08:35:54 +0100 Subject: [PATCH 6/8] Added some stuff --- config/base.nix | 7 +++-- config/home.nix | 19 +++++++++---- maskiner/desktop/configuration.nix | 2 +- shared/ssh.nix | 44 +++++++++--------------------- 4 files changed, 32 insertions(+), 40 deletions(-) diff --git a/config/base.nix b/config/base.nix index 28d5633..cb1c58a 100644 --- a/config/base.nix +++ b/config/base.nix @@ -50,19 +50,20 @@ liveRestore = false; }; + hardware.pulseaudio.enable = false; security.rtkit.enable = true; services = { + tailscale = { + enable = true; + }; pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - jack.enable = true; }; }; hardware = { - pulseaudio.enable = false; bluetooth = { enable = true; powerOnBoot = true; diff --git a/config/home.nix b/config/home.nix index 4de58d6..dbf3b86 100644 --- a/config/home.nix +++ b/config/home.nix @@ -13,7 +13,7 @@ ../shared/vscode.nix # ../shared/dmenu.nix # ../shared/rofi.nix - ../shared/mpv.nix + # ../shared/mpv.nix ../shared/kitty.nix ../shared/alacritty.nix ../shared/tmux.nix @@ -60,8 +60,8 @@ bluez bluez-tools unstable.betterlockscreen - tmux - unstable.fzf + # tmux + fzf eza btop thttpd @@ -74,18 +74,23 @@ light # Dev + gh unstable.deno unstable.hugo unstable.logstash ngrok tailwindcss - nodejs_22 + nodejs_23 yarn plantuml go - dotnetCorePackages.sdk_8_0_3xx + # dotnetCorePackages.sdk_8_0_3xx + dotnetCorePackages.sdk_9_0_1xx templ goa + azuredatastudio + mdbtools + prettierd #Tools qrencode @@ -98,6 +103,9 @@ #LSP # roslyn roslyn-ls + dockerfile-language-server-nodejs + docker-compose-language-service + bash-language-server python312Packages.python-lsp-server yaml-language-server lua-language-server @@ -122,6 +130,7 @@ networkmanagerapplet networkmanager-l2tp strongswan + networkmanager_strongswan # Display scrot diff --git a/maskiner/desktop/configuration.nix b/maskiner/desktop/configuration.nix index 7e12414..292c0f4 100644 --- a/maskiner/desktop/configuration.nix +++ b/maskiner/desktop/configuration.nix @@ -21,7 +21,7 @@ ]; networking.firewall = { enable = true; - allowedTCPPorts = [ 80 443 8384 22000]; + allowedTCPPorts = [ 80 443 3000 8384 22000]; allowedUDPPortRanges = [ { from = 4000; to = 4007; } { from = 8000; to = 8010; } diff --git a/shared/ssh.nix b/shared/ssh.nix index 9811b93..207102d 100644 --- a/shared/ssh.nix +++ b/shared/ssh.nix @@ -27,42 +27,12 @@ user = "fw"; identityFile = "/home/fw/.ssh/fw-ssh-key"; }; - "ha1" = { - hostname = "192.168.0.180"; - port = 22; - user = "fw"; - identityFile = "/home/fw/.ssh/fw-ssh-key"; - }; - "ha2" = { - hostname = "192.168.0.133"; - port = 22; - user = "fw"; - identityFile = "/home/fw/.ssh/fw-ssh-key"; - }; - "ha3" = { - hostname = "192.168.0.120"; - port = 22; - user = "fw"; - identityFile = "/home/fw/.ssh/fw-ssh-key"; - }; - "ha4" = { - hostname = "192.168.0.52"; - port = 22; - user = "fw"; - identityFile = "/home/fw/.ssh/fw-ssh-key"; - }; "mac" = { hostname = "192.168.0.149"; port = 22; user = "ifacts"; identityFile = "/home/fw/.ssh/ifacts-ssh-key"; }; - "backups" = { - hostname = "192.168.0.120"; - port = 22; - user = "github"; - identityFile = "/home/fw/.ssh/github-ssh-key"; - }; "malmo" = { hostname = "192.168.0.138"; port = 22; @@ -93,7 +63,19 @@ identityFile = "/home/fw/.ssh/fw-ssh-key"; }; "runner01" = { - hostname = "192.168.0.205"; + hostname = "192.168.0.184"; + port = 22; + user = "fw"; + identityFile = "/home/fw/.ssh/fw-ssh-key"; + }; + "docker03" = { + hostname = "192.168.0.118"; + port = 22; + user = "fw"; + identityFile = "/home/fw/.ssh/fw-ssh-key"; + }; + "table" = { + hostname = "192.168.0.157"; port = 22; user = "fw"; identityFile = "/home/fw/.ssh/fw-ssh-key"; From 7cf0bb0c1c8e8e7f20fda8c8a43c8213d435fd09 Mon Sep 17 00:00:00 2001 From: fwastring Date: Fri, 21 Mar 2025 10:29:16 +0100 Subject: [PATCH 7/8] Added CD tools --- config/home.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/home.nix b/config/home.nix index dbf3b86..85176c3 100644 --- a/config/home.nix +++ b/config/home.nix @@ -74,6 +74,8 @@ light # Dev + unstable.fluxcd + argocd gh unstable.deno unstable.hugo From fa10334a545d0108c70445d85d215fe87bc234b8 Mon Sep 17 00:00:00 2001 From: fwastring Date: Thu, 27 Mar 2025 20:20:26 +0100 Subject: [PATCH 8/8] added macmini --- flake.nix | 6 +-- maskiner/macmini/configuration.nix | 53 +++++++++++++++++++++ maskiner/macmini/hardware-configuration.nix | 39 +++++++++++++++ 3 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 maskiner/macmini/configuration.nix create mode 100644 maskiner/macmini/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 3dc581a..04cf031 100644 --- a/flake.nix +++ b/flake.nix @@ -72,12 +72,12 @@ }; modules = [./maskiner/work-desktop/configuration.nix]; }; - lillen = nixpkgs.lib.nixosSystem { + macmini = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs outputs; - myhostname = "lillen"; + myhostname = "macmini"; }; - modules = [./maskiner/lillen/configuration.nix]; + modules = [./maskiner/macmini/configuration.nix]; }; }; diff --git a/maskiner/macmini/configuration.nix b/maskiner/macmini/configuration.nix new file mode 100644 index 0000000..c98d9f7 --- /dev/null +++ b/maskiner/macmini/configuration.nix @@ -0,0 +1,53 @@ +# This is your system's configuration file. +# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) +{ + inputs, + lib, + config, + pkgs, + myhostname, + ... +}: { + # You can import other NixOS modules here + imports = [ + ./hardware-configuration.nix + ../../config/users.nix + ]; + + environment.systemPackages = with pkgs; [ + unstable.lego + ]; +networking.firewall = { + enable = true; + allowedTCPPorts = [ 80 443 3000 8384 22000]; + allowedUDPPortRanges = [ + { from = 4000; to = 4007; } + { from = 8000; to = 8010; } + ]; +}; + + networking.firewall.allowedUDPPorts = [ 22000 21027 ]; + + services = { + openssh = { + enable = true; + ports = [22]; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + X11Forwarding = true; + }; + extraConfig = '' + AllowUsers fw + ''; + }; + }; + + + security.rtkit.enable = true; + networking.hostName = myhostname; + + services.xserver.dpi = 100; + + system.stateVersion = "24.11"; +} diff --git a/maskiner/macmini/hardware-configuration.nix b/maskiner/macmini/hardware-configuration.nix new file mode 100644 index 0000000..57c3ec5 --- /dev/null +++ b/maskiner/macmini/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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 = [ "ohci_pci" "ehci_pci" "ahci" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/1c7e7116-3486-45a8-90c0-d3deea8e96b0"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/B70D-941F"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0b1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}