Commit a19a4aa63c9b

Vincent Demeester <vincent@sbr.pm>
2020-06-06 13:34:48
systems & home: migrate naruhodo to systems…
… and update home.nix for fedora usage with home-manager. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent bcef479
assets/nix-channels
@@ -1,3 +0,0 @@
-https://nixos.org/channels/nixpkgs-unstable nixpkgs
-https://github.com/rycee/home-manager/archive/master.tar.gz home-manager
-https://nixos.org/channels/nixos-20.03 nixos
machines/base.nix
@@ -1,39 +0,0 @@
-{ pkgs, ... }:
-
-{
-  home.file.".nix-channels".source = ../assets/nix-channels;
-  home.packages = with pkgs; [
-    enchive
-    entr
-    exa
-    fd
-    htop
-    mpw
-    ncurses
-    scripts
-    tree
-  ];
-  programs.direnv.enable = true;
-  programs.direnv.stdlib = ''
-    mkdir -p $HOME/.cache/direnv/layouts
-    pwd_hash=$(echo -n $PWD | shasum | cut -d ' ' -f 1)
-    direnv_layout_dir=$HOME/.cache/direnv/layouts/$pwd_hash
-    source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc
-  '';
-  xdg.configFile."nr/default" = {
-    text = builtins.toJSON [
-      { cmd = "ncdu"; }
-      { cmd = "sshfs"; }
-      { cmd = "gotop"; }
-      { cmd = "pandoc"; }
-      { cmd = "dust"; pkg = "du-dust"; }
-      { cmd = "bandwhich"; }
-      { cmd = "lspci"; pkg = "pciutils"; }
-      { cmd = "lsusb"; pkg = "usbutils"; }
-      { cmd = "9"; pkg = "plan9port"; }
-      { cmd = "wakeonlan"; pkg = "python36Packages.wakeonlan"; }
-      { cmd = "beet"; pkg = "beets"; }
-    ];
-    onChange = "${pkgs.my.nr}/bin/nr default";
-  };
-}
machines/fedora-base.nix
@@ -1,11 +0,0 @@
-{ pkgs, ... }:
-
-{
-  imports = [ ./base.nix ];
-  machine.base.fedora = true;
-  programs = {
-    man.enable = false;
-  };
-  profiles.bash.enable = false;
-  home.extraOutputsToInstall = [ "man" ];
-}
machines/naruhodo.nix
@@ -1,41 +0,0 @@
-{ pkgs, ... }:
-
-with import ../assets/machines.nix;{
-  imports = [
-    ./fedora-base.nix
-  ];
-  home.packages = with pkgs; [
-    golangci-lint
-    my.ram
-  ];
-  profiles.containers.kubernetes = {
-    enable = true;
-    containers = false;
-    minikube.enable = false;
-    nr = false;
-    kind = true;
-  };
-  profiles.mails = {
-    enable = true;
-    sync = false;
-  };
-  profiles.finances.enable = true;
-  profiles.gpg.pinentry = "/usr/bin/pinentry";
-  profiles.zsh = {
-    enable = true;
-  };
-  profiles.ssh.machines = sshConfig;
-  profiles.dev = {
-    enable = true;
-    js.enable = true;
-  };
-  profiles.emacs = {
-    enable = true;
-    texlive = false;
-    daemonService = true;
-    capture = true;
-  };
-  home.file.".local/share/applications/redhat-vpn.desktop".source = ../assets/redhat-vpn.desktop;
-  # FIXME(vdemeester) move this to the bootstrap shell
-  # xdg.configFile."user-dirs.dirs".source = ../modules/profiles/assets/xorg/user-dirs.dirs;
-}
assets/redhat-vpn.desktop → systems/naruhodo/redhat-vpn.desktop
File renamed without changes
systems/naruhodo.home.nix
@@ -0,0 +1,25 @@
+{ lib, ... }:
+
+with lib;
+let
+  hostname = "hokkaido";
+  secretPath = ../secrets/machines.nix;
+  secretCondition = (builtins.pathExists secretPath);
+in
+{
+  imports = [
+    (import ../users/vincent/core)
+    # mails
+    (import ../users/vincent/mails { inherit hostname; })
+    # dev
+    (import ../users/vincent/dev)
+    # containers
+    ../users/vincent/containers/kubernetes.nix
+    ../users/vincent/containers/openshift.nix
+  ];
+
+  home.file.".local/share/applications/redhat-vpn.desktop".source = ./naruhodo/redhat-vpn.desktop;
+
+  programs.man.enable = true;
+  home.extraOutputsToInstall = [ "man" ];
+}
home.nix
@@ -18,9 +18,7 @@ in
     (import ./nix).emacs
   ];
   imports = [
-    # Default profile with default configuration
-    ./modules/module-list.nix
     # Machine specific configuration files
-    (./machines + "/${hostName}.nix")
+    (./systems + "/${hostName}.home.nix")
   ];
 }