diff --git a/flake.lock b/flake.lock index df852ee..6125877 100644 --- a/flake.lock +++ b/flake.lock @@ -40,6 +40,25 @@ "type": "github" } }, + "crane": { + "inputs": { + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1717383740, + "narHash": "sha256-559HbY4uhNeoYvK3H6AMZAtVfmR3y8plXZ1x6ON/cWU=", + "owner": "ipetkov", + "repo": "crane", + "rev": "b65673fce97d277934488a451724be94cc62499a", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "ref": "v0.17.3", + "repo": "crane", + "type": "github" + } + }, "devshell": { "inputs": { "flake-utils": "flake-utils_4", @@ -128,6 +147,21 @@ "type": "github" } }, + "flake-compat_4": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -220,7 +254,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1685518550, @@ -499,6 +533,21 @@ } }, "nixpkgs-stable": { + "locked": { + "lastModified": 1719426051, + "narHash": "sha256-yJL9VYQhaRM7xs0M867ZFxwaONB9T2Q4LnGo1WovuR4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "89c49874fb15f4124bf71ca5f42a04f2ee5825fd", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-24.05", + "type": "indirect" + } + }, + "nixpkgs-stable_2": { "locked": { "lastModified": 1719720450, "narHash": "sha256-57+R2Uj3wPeDeq8p8un19tzFFlgWiXJ8PbzgKtBgBX8=", @@ -579,6 +628,37 @@ } }, "nixpkgs_6": { + "locked": { + "lastModified": 1714656196, + "narHash": "sha256-kjQkA98lMcsom6Gbhw8SYzmwrSo+2nruiTcTZp5jK7o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "94035b482d181af0a0f8f77823a790b256b7c3cc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-24.05", + "type": "indirect" + } + }, + "nixpkgs_8": { "locked": { "lastModified": 1686020360, "narHash": "sha256-Wee7lIlZ6DIZHHLiNxU5KdYZQl0iprENXa/czzI6Cj4=", @@ -621,6 +701,28 @@ "type": "github" } }, + "proxmox-nixos": { + "inputs": { + "crane": "crane", + "flake-compat": "flake-compat_4", + "nixpkgs": "nixpkgs_7", + "nixpkgs-stable": "nixpkgs-stable", + "utils": "utils" + }, + "locked": { + "lastModified": 1719988415, + "narHash": "sha256-bUVo+LApRTJUUi1YIAQwtH2S521ZHYa8nwityjC2Few=", + "owner": "SaumonNet", + "repo": "proxmox-nixos", + "rev": "ff9bcfe67d34bf7ae25a065f2a732815904b4001", + "type": "github" + }, + "original": { + "owner": "SaumonNet", + "repo": "proxmox-nixos", + "type": "github" + } + }, "root": { "inputs": { "apple-silicon": "apple-silicon", @@ -636,6 +738,7 @@ "nixpkgs-2405": "nixpkgs-2405", "nixpkgs-master": "nixpkgs-master", "nixvim": "nixvim", + "proxmox-nixos": "proxmox-nixos", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix" } @@ -661,7 +764,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1720187017, @@ -680,7 +783,7 @@ "spicetify-nix": { "inputs": { "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1704167711, @@ -756,6 +859,21 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -776,6 +894,24 @@ "repo": "treefmt-nix", "type": "github" } + }, + "utils": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 27934cf..30e7ec1 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,10 @@ url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; + proxmox-nixos = { + url = "github:SaumonNet/proxmox-nixos"; + # inputs.nixpkgs.follows = "proxmox-nixos"; + }; firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixvim = { @@ -49,13 +53,9 @@ lib = nixpkgs.lib; util = (import ./overlays/util.nix {} {}).util; system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - overlays = util.nixFilesIn ./overlays; - }; in { nixosConfigurations = { - "asmodeus" = lib.nixosSystem { + "asmodeus" = lib.nixosSystem rec { system = "x86_64-linux"; modules = [ ./hosts/x86_64-linux/asmodeus diff --git a/home/modules/home-pkgs.nix b/home/modules/home-pkgs.nix index b210459..c112fad 100644 --- a/home/modules/home-pkgs.nix +++ b/home/modules/home-pkgs.nix @@ -43,6 +43,8 @@ in { pkgs.moodle-dl + pkgs.nextcloud-client + pkgs.obsidian pkgs.prismlauncher diff --git a/home/modules/nixvim.nix b/home/modules/nixvim.nix index abf55a7..cf6ff72 100644 --- a/home/modules/nixvim.nix +++ b/home/modules/nixvim.nix @@ -31,17 +31,32 @@ indent-blankline.enable = true; lualine.enable = true; lsp-format = {enable = true;}; - # copilot-lua = { - # enable = true; - # suggestion = { - # enabled = false; - # }; - # panel.enabled = false; - # }; - # copilot-cmp.enable = true; + copilot-lua = { + enable = true; + suggestion = { + enabled = false; + }; + panel.enabled = false; + }; + copilot-cmp.enable = true; + neocord.enable = true; + rustaceanvim = { + enable = true; + server = { + settings = { + inlayHints = { + closureStyle = "rust_analyzer"; + }; + typing.autoClosingAngleBrackets.enable = true; + }; + }; + }; lsp = { enable = true; + inlayHints = true; servers = { + typst-lsp.enable = true; + typos-lsp.enable = true; docker-compose-language-service.enable = true; pylsp.enable = true; bashls.enable = true; @@ -54,11 +69,11 @@ java-language-server.enable = true; hls.enable = true; eslint.enable = true; - rust-analyzer = { - enable = true; - installCargo = false; - installRustc = false; - }; + # rust-analyzer = { + # enable = true; + # installCargo = false; + # installRustc = false; + # }; nil_ls.enable = true; }; }; @@ -91,7 +106,7 @@ {name = "path";} {name = "buffer";} {name = "luasnip";} - # {name = "copilot";} + {name = "copilot";} ]; #mapping = { # __raw = '' @@ -131,7 +146,7 @@ luasnip.enable = true; cmp_luasnip.enable = true; neo-tree.enable = true; - presence-nvim.enable = true; + # presence-nvim.enable = true; crates-nvim.enable = true; fidget.enable = true; alpha = { @@ -306,6 +321,12 @@ options.silent = true; action = "Telescope live_grep"; } + { + mode = "n"; + key = "fd"; + options.silent = true; + action = "Telescope diagnostics"; + } { mode = "n"; key = "hh"; diff --git a/hosts/x86_64-linux/beleth/default.nix b/hosts/x86_64-linux/beleth/default.nix index 417fd3c..c984800 100644 --- a/hosts/x86_64-linux/beleth/default.nix +++ b/hosts/x86_64-linux/beleth/default.nix @@ -121,26 +121,6 @@ with lib; { reverse_proxy http://127.0.0.1:28981 ''; }; - "radarr.heroin.trade" = { - extraConfig = '' - reverse_proxy http://127.0.0.1:7878 - ''; - }; - "sonarr.heroin.trade" = { - extraConfig = '' - reverse_proxy http://127.0.0.1:8989 - ''; - }; - "prowlarr.heroin.trade" = { - extraConfig = '' - reverse_proxy http://127.0.0.1:9696 - ''; - }; - "qbit.heroin.trade" = { - extraConfig = '' - reverse_proxy http://127.0.0.1:8085 - ''; - }; "servers" = { extraConfig = '' metrics diff --git a/hosts/x86_64-linux/beleth/monitoring.nix b/hosts/x86_64-linux/beleth/monitoring.nix index 53bfe21..1047bbd 100644 --- a/hosts/x86_64-linux/beleth/monitoring.nix +++ b/hosts/x86_64-linux/beleth/monitoring.nix @@ -39,7 +39,7 @@ exporters = { node = { enable = true; - enabledCollectors = ["systemd" "sysctl" "powersupplyclass"]; + enabledCollectors = ["systemd" "sysctl" "powersupplyclass" "textfile" "netdev" "filesystem" "ethtool"]; port = 9002; }; wireguard = { diff --git a/hosts/x86_64-linux/lab/default.nix b/hosts/x86_64-linux/lab/default.nix new file mode 100644 index 0000000..6ce9f42 --- /dev/null +++ b/hosts/x86_64-linux/lab/default.nix @@ -0,0 +1,115 @@ +{ + pkgs, + lib, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # networking.hostName = "nixos"; # Define your hostname. + # Pick only one of the below networking options. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + # Set your time zone. + time.timeZone = "Europe/Berlin"; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Select internationalisation properties. + # i18n.defaultLocale = "en_US.UTF-8"; + # console = { + # font = "Lat2-Terminus16"; + # keyMap = "us"; + # useXkbConfig = true; # use xkb.options in tty. + # }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Configure keymap in X11 + # services.xserver.xkb.layout = "us"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound. + # hardware.pulseaudio.enable = true; + # OR + # services.pipewire = { + # enable = true; + # pulse.enable = true; + # }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + # users.users.alice = { + # isNormalUser = true; + # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + # packages = with pkgs; [ + # firefox + # tree + # ]; + # }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + # environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + # ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = false; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "24.11"; # Did you read the comment? +} diff --git a/hosts/x86_64-linux/lab/hardware-configuration.nix b/hosts/x86_64-linux/lab/hardware-configuration.nix new file mode 100644 index 0000000..a74faba --- /dev/null +++ b/hosts/x86_64-linux/lab/hardware-configuration.nix @@ -0,0 +1,57 @@ +# 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 = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" "sr_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/5e34fc38-c199-4b85-b756-1c65ed7471fc"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/C3D3-9E29"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; + + fileSystems."/mnt/HDD2" = { + device = "/dev/disk/by-uuid/c37bc41d-8d92-4b7e-ac45-3420804d086c"; + fsType = "ext4"; + }; + + fileSystems."/mnt/HDD1" = { + device = "/dev/disk/by-uuid/bc68de4c-ad5c-4016-ac11-65de448949fe"; + fsType = "ext4"; + }; + + 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.br-13d49cf29f84.useDHCP = lib.mkDefault true; + # networking.interfaces.br-2383346df094.useDHCP = lib.mkDefault true; + # networking.interfaces.docker0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; + # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}