diff --git a/flake.nix b/flake.nix index c744e81..9287bf3 100644 --- a/flake.nix +++ b/flake.nix @@ -34,7 +34,7 @@ # aragon = nixpkgs.lib.nixosSystem { - # system = "x86_64-linux"; + # system = "x83_64-linux"; # specialArgs = { # inherit inputs; # }; @@ -53,8 +53,21 @@ # }; - + aragon = nixpkgs.lib.nixosSystem { + system = "x84_64-linux"; + specialArgs = { + inherit inputs; + }; + modules = [ + # Overlays-module makes "pkgs.unstable" available in configuration.nix + ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) + ./machines/aragon/configuration.nix + sops-nix.nixosModules.sops + ]; + }; + + galadriel = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { diff --git a/home/code.nix b/home/code.nix index eb032b2..3020001 100644 --- a/home/code.nix +++ b/home/code.nix @@ -1,8 +1,7 @@ {pkgs, lib, ...}: -let - unstable = import { config = { allowUnfree = true; }; }; -in { + + unstable.config.allowUnfree = true; home-manager.users.gunalx = { #vscode with home manager programs.vscode = { diff --git a/home/home.nix b/home/home.nix index 2b3b7ad..8dadf45 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,7 +1,4 @@ -{ config, pkgs, ... }: -let - home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz"; -in +{ config, pkgs, home-manager, ... }: { imports = [ (import "${home-manager}/nixos") diff --git a/machines/aragon/steam.nix b/home/steam.nix similarity index 79% rename from machines/aragon/steam.nix rename to home/steam.nix index ee62b1f..dfa1e55 100644 --- a/machines/aragon/steam.nix +++ b/home/steam.nix @@ -15,6 +15,12 @@ environment.systemPackages = [ pkgs.steam-run + pkgs.unstable.alvr + pkgs.openvr + pkgs.openhmd + pkgs.sidequest + pkgs.mplayer + pkgs.appimage-run ]; diff --git a/machines/aragon/code.nix b/machines/aragon/code.nix deleted file mode 100644 index eb032b2..0000000 --- a/machines/aragon/code.nix +++ /dev/null @@ -1,15 +0,0 @@ -{pkgs, lib, ...}: -let - unstable = import { config = { allowUnfree = true; }; }; -in -{ - home-manager.users.gunalx = { - #vscode with home manager - programs.vscode = { - enable = true; - enableUpdateCheck = false; - package = unstable.vscode-fhs; - - }; - }; -} diff --git a/machines/aragon/configuration.nix b/machines/aragon/configuration.nix index 6fad3b7..f696e02 100644 --- a/machines/aragon/configuration.nix +++ b/machines/aragon/configuration.nix @@ -3,18 +3,23 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, lib, ... }: - { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + + + #profiles + ../../profiles/base.nix + + #home manager - ./home.nix + #../../home/home.nix #customised applications - ./steam.nix - ./podman.nix + ../../home/steam.nix + ../../services/podman.nix ]; # Bootloader. @@ -69,7 +74,7 @@ xkbVariant = ""; }; -fonts.fonts = with pkgs; [ +fonts.packages = with pkgs; [ noto-fonts noto-fonts-cjk noto-fonts-emoji @@ -97,11 +102,12 @@ fonts.fonts = with pkgs; [ alsa.support32Bit = true; pulse.enable = true; # If you want to use JACK applications, uncomment this - #jack.enable = true; + jack.enable = true; # use the example session manager (no others are packaged yet so this is enabled by default, # no need to redefine it in your config for now) #media-session.enable = true; + }; # Enable touchpad support (enabled default in most desktopManager). @@ -113,15 +119,15 @@ fonts.fonts = with pkgs; [ description = "Adrian Gunnar Lauterer"; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; [ - firefox - kate - + firefox + kate + unstable.ollama python310 python310Packages.scipy python310Packages.sympy python310Packages.numpy python310Packages.matplotlib - python310Packages.torch + python310Packages.torchWithRocm python310Packages.torchvision gcc gpp @@ -129,11 +135,24 @@ fonts.fonts = with pkgs; [ rustup rustc cargo + etcher + rpi-imager + minecraft + prismlauncher + hmcl + appimage-run + #unstable.alvr + easyeffects + ]; }; + #allow electron 19 becasue of etcher + nixpkgs.config.permittedInsecurePackages = [ + "electron-19.1.9" + ]; # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -155,15 +174,19 @@ fonts.fonts = with pkgs; [ python310Packages.sympy python310Packages.numpy python310Packages.matplotlib - python310Packages.torch + #python310Packages.torch python310Packages.torchvision + python310Packages.torchWithRocm gcc gpp - cmake + gdb + cmake rustup rustc cargo cura + prusa-slicer + openscad htop killall docker-compose @@ -195,10 +218,12 @@ fonts.fonts = with pkgs; [ services.udev.extraRules = '' ACTION=="add", SUBSYSTEM=="pci", DRIVER=="pcieport", ATTR{power/wakeup}="disabled" ''; - # systemd.targets.sleep.enable = false; - # systemd.targets.suspend.enable = false; - # systemd.targets.hibernate.enable = false; - # systemd.targets.hybrid-sleep.enable = false; + +#comment out to enable sleep. Uncommented over vacations +# systemd.targets.sleep.enable = false; +# systemd.targets.suspend.enable = false; +# systemd.targets.hibernate.enable = false; +# systemd.targets.hybrid-sleep.enable = false; # Some programs need SUID wrappers, can be configured further or are @@ -218,7 +243,7 @@ fonts.fonts = with pkgs; [ # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. - # networking.firewall.enable = false; + networking.firewall.enable = false; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/machines/aragon/hardware-configuration.nix b/machines/aragon/hardware-configuration.nix index 203c4d7..dabc4d8 100644 --- a/machines/aragon/hardware-configuration.nix +++ b/machines/aragon/hardware-configuration.nix @@ -9,11 +9,29 @@ ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; - #boot.initrd.kernelModules = ["amdgou" ]; boot.initrd.kernelModules = ["amdgpu" ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; + + services.xserver.videoDrivers = [ "amdgpu" ]; + systemd.tmpfiles.rules = [ + "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" + ]; + hardware.opengl.extraPackages = with pkgs; [ + rocmPackages.clr.icd + #amdvlk + libva-utils + ]; + + #hardware.opengl.extraPackages32 = with pkgs; [ + # driversi686Linux.amdvlk + #]; + + hardware.opengl.driSupport = true; # This is already enabled by default + hardware.opengl.driSupport32Bit = true; # For 32 bit applications + + fileSystems."/" = { device = "/dev/disk/by-uuid/8ab16ad5-08d2-44f9-a9e4-2e6240bfd8f8"; diff --git a/machines/aragon/home.nix b/machines/aragon/home.nix deleted file mode 100644 index cd8ff47..0000000 --- a/machines/aragon/home.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, pkgs, ... }: -let - home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz"; -in -{ - imports = [ - (import "${home-manager}/nixos") - ./code.nix - ]; - - home-manager.users.gunalx = { - /* The home.stateVersion option does not have a default and must be set */ - home.stateVersion = "23.05"; - /* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */ - - - }; -} diff --git a/machines/aragon/podman.nix b/machines/aragon/podman.nix deleted file mode 100644 index c6b0fce..0000000 --- a/machines/aragon/podman.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - virtualisation.podman = { - enable = true; - dockerCompat = true; - dockerSocket.enable = true ; - autoPrune.flags = ["--all"]; - autoPrune.enable = true; - - - }; -} diff --git a/services/podman.nix b/services/podman.nix index 27cb982..25e0c6b 100644 --- a/services/podman.nix +++ b/services/podman.nix @@ -3,10 +3,14 @@ # Arion works with Docker, but for NixOS-based containers, you need Podman # since NixOS 21.05. virtualisation.docker.enable = false; - virtualisation.podman.enable = true; - virtualisation.podman.dockerSocket.enable = true; - virtualisation.podman.defaultNetwork.settings = { dns_enabled = true; }; + virtualisation.podman = { + enable = true; + dockerCompat = true; + dockerSocket.enable = true ; + autoPrune.flags = ["--all"]; + autoPrune.enable = true; + defaultNetwork.settings = { dns_enabled = true; }; + }; - # Use your username instead of `myuser` users.extraUsers.gunalx.extraGroups = ["podman"]; }