diff --git a/flake.nix b/flake.nix index 807721a2..9ff6538d 100644 --- a/flake.nix +++ b/flake.nix @@ -17,13 +17,14 @@ let in { nixosConfigurations = { - hut = mkConf "hut"; - owl1 = mkConf "owl1"; - owl2 = mkConf "owl2"; - eudy = mkConf "eudy"; - koro = mkConf "koro"; - bay = mkConf "bay"; - lake2 = mkConf "lake2"; + hut = mkConf "hut"; + owl1 = mkConf "owl1"; + owl2 = mkConf "owl2"; + eudy = mkConf "eudy"; + koro = mkConf "koro"; + bay = mkConf "bay"; + lake2 = mkConf "lake2"; + raccoon = mkConf "raccoon"; }; packages.x86_64-linux = self.nixosConfigurations.hut.pkgs // { diff --git a/m/common/base/net.nix b/m/common/base/net.nix index 0f575db1..6356ad32 100644 --- a/m/common/base/net.nix +++ b/m/common/base/net.nix @@ -12,6 +12,8 @@ hosts = { "84.88.53.236" = [ "ssfhead.bsc.es" "ssfhead" ]; + "84.88.51.152" = [ "knights3.bsc.es" "raccoon" ]; + "84.88.51.142" = [ "raccoon-ipmi" ]; }; }; } diff --git a/m/common/base/users.nix b/m/common/base/users.nix index a17969f2..71b9749e 100644 --- a/m/common/base/users.nix +++ b/m/common/base/users.nix @@ -68,7 +68,7 @@ home = "/home/Computational/anavarro"; description = "Antoni Navarro"; group = "Computational"; - hosts = [ "hut" ]; + hosts = [ "hut" "raccoon" ]; hashedPassword = "$6$QdNDsuLehoZTYZlb$CDhCouYDPrhoiB7/seu7RF.Gqg4zMQz0n5sA4U1KDgHaZOxy2as9pbIGeF8tOHJKRoZajk5GiaZv0rZMn7Oq31"; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILWjRSlKgzBPZQhIeEtk6Lvws2XNcYwHcwPv4osSgst5 anavarro@ssfhead" diff --git a/m/raccoon/configuration.nix b/m/raccoon/configuration.nix new file mode 100644 index 00000000..556e9ab5 --- /dev/null +++ b/m/raccoon/configuration.nix @@ -0,0 +1,32 @@ +{ config, pkgs, lib, modulesPath, ... }: + +{ + imports = [ + ../common/base.nix + ]; + + # Don't install Grub on the disk yet + boot.loader.grub.device = "nodev"; + + networking = { + hostName = "raccoon"; + # Only BSC DNSs seem to be reachable from the office VLAN + nameservers = [ "84.88.52.35" "84.88.52.36" ]; + defaultGateway = "84.88.51.129"; + interfaces.eno0.ipv4.addresses = [ { + address = "84.88.51.152"; + prefixLength = 25; + } ]; + }; + + # Configure Nvidia driver to use with CUDA + hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production; + hardware.opengl = { + enable = true; + driSupport = true; + setLdLibraryPath = true; + }; + nixpkgs.config.allowUnfree = true; + nixpkgs.config.nvidia.acceptLicense = true; + services.xserver.videoDrivers = [ "nvidia" ]; +}