commit a19a4aa63c9b0acd9e689a83f857f9b9f8682cac
parent bcef4793b51a9dd9950b2d9f79c3e31c9a7a9692
Author: Vincent Demeester <vincent@sbr.pm>
Date: Sat, 6 Jun 2020 13:34:48 +0200
systems & home: migrate naruhodo to systems…
… and update home.nix for fedora usage with home-manager.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
7 files changed, 26 insertions(+), 97 deletions(-)
diff --git a/assets/nix-channels b/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
diff --git a/home.nix b/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")
];
}
diff --git a/machines/base.nix b/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";
- };
-}
diff --git a/machines/fedora-base.nix b/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" ];
-}
diff --git a/machines/naruhodo.nix b/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;
-}
diff --git a/systems/naruhodo.home.nix b/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" ];
+}
diff --git a/assets/redhat-vpn.desktop b/systems/naruhodo/redhat-vpn.desktop