home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

k8sn2.nix (1114B)


      1 { sources ? import ../../nix
      2 , lib ? sources.lib
      3 , pkgs ? sources.pkgs { }
      4 , ...
      5 }:
      6 
      7 let
      8   hostname = "k8sn2";
      9   kubeMasterIP = "192.168.1.130";
     10 in
     11 {
     12   imports = [
     13     <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
     14     (import ../../nix).home-manager-stable
     15     ../modules
     16     # FIXME Need to refactor vincent user as.. it's adding way to much by default...
     17     # (import ../../../users).vincent
     18     (import ../../users).root
     19   ];
     20 
     21   fileSystems."/" = {
     22     device = "/dev/disk/by-label/nixos";
     23     fsType = "ext4";
     24     autoResize = true;
     25   };
     26 
     27   boot.growPartition = true;
     28   boot.kernelParams = [ "console=ttyS0" ];
     29   boot.loader.grub.device = "/dev/vda";
     30   boot.loader.timeout = 0;
     31 
     32   networking = {
     33     hostName = hostname;
     34     domain = "home";
     35     firewall.enable = false;
     36   };
     37 
     38   profiles = {
     39     nix-auto-update.enable = false;
     40     ssh.enable = true;
     41     # systemd-boot doesn't with nixos-generators 🙃
     42     base.systemd-boot = false;
     43     kubernetes = {
     44       enable = true;
     45       master = {
     46         enable = false;
     47         ip = kubeMasterIP;
     48       };
     49     };
     50   };
     51 
     52   users.extraUsers.root.password = "";
     53 }