about summary refs log tree commit diff
path: root/home/profiles
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-12-14 06:19:50 -0800
committerFranck Cuny <franck@fcuny.net>2023-12-14 06:19:59 -0800
commit94142ef5780de4a049436de08b8d7e0cd3d04245 (patch)
tree7e55f6a70bba904934a088d43f464bccbb78bdb3 /home/profiles
parentbuild(deps): bump cachix/install-nix-action from 23 to 24 (diff)
downloadworld-94142ef5780de4a049436de08b8d7e0cd3d04245.tar.gz
simplify the layout
Diffstat (limited to 'home/profiles')
-rw-r--r--home/profiles/darwin.nix36
-rw-r--r--home/profiles/dev.nix47
-rw-r--r--home/profiles/emacs.nix12
-rw-r--r--home/profiles/git.nix77
-rw-r--r--home/profiles/home.nix69
-rw-r--r--home/profiles/ssh.nix21
-rw-r--r--home/profiles/tmux.nix20
-rw-r--r--home/profiles/yubikey.nix28
-rw-r--r--home/profiles/zsh.nix45
9 files changed, 0 insertions, 355 deletions
diff --git a/home/profiles/darwin.nix b/home/profiles/darwin.nix
deleted file mode 100644
index ef2787d..0000000
--- a/home/profiles/darwin.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ config, pkgs, ... }:
-{
-  home.stateVersion = "23.05";
-
-  imports = [
-    ./git.nix
-    ./zsh.nix
-    ./dev.nix
-    ./tmux.nix
-    ./ssh.nix
-  ];
-
-  home.packages = with pkgs; [
-    direnv
-    jq
-    nixd
-    nix-direnv
-    nixfmt
-    nixpkgs-fmt
-    ripgrep
-    rnix-lsp
-    tree
-  ];
-
-  programs = {
-    direnv = {
-      enable = true;
-      nix-direnv.enable = true;
-      enableZshIntegration = true;
-      config = {
-        global.disable_stdin = true;
-        global.strict_env = true;
-      };
-    };
-  };
-}
diff --git a/home/profiles/dev.nix b/home/profiles/dev.nix
deleted file mode 100644
index a860027..0000000
--- a/home/profiles/dev.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-{ pkgs, config, ... }:
-let
-  pythonEnv = pkgs.python3.withPackages (p: with p; [
-    black
-    click
-    isort
-    pylsp-mypy
-    requests
-    types-requests
-    pip
-    ipython
-    virtualenv
-  ]);
-in
-{
-  programs.go = {
-    enable = true;
-    goPath = ".local/share/pkg.go";
-    goBin = ".local/bin.go";
-    package = pkgs.go_1_20;
-  };
-
-  home.packages = with pkgs; [
-    go-tools
-    golangci-lint
-    gopls
-
-    dive # explore layers in docker images
-
-    pythonEnv
-
-    google-cloud-sdk
-
-  ];
-
-  home.sessionPath = [
-    config.home.sessionVariables.GOBIN
-  ];
-
-  home.sessionVariables = with config.xdg; {
-    IPYTHONDIR = "${cacheHome}/ipython";
-    PIP_LOG = "${cacheHome}/pip/pip.log";
-    PYLINTHOME = "${cacheHome}/pylint";
-    PYTHON_EGG_CACHE = "${cacheHome}/python-eggs";
-    MYPY_CACHE_DIR = "${cacheHome}/mypy";
-  };
-}
diff --git a/home/profiles/emacs.nix b/home/profiles/emacs.nix
deleted file mode 100644
index dbc5411..0000000
--- a/home/profiles/emacs.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ lib, config, pkgs, ... }:
-{
-  home.packages = with pkgs; [
-    # see https://github.com/hlissner/doom-emacs/issues/4138
-    (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]))
-  ];
-
-  home.sessionVariables = {
-    EDITOR = "emacsclient -a=";
-    VISUAL = "emacsclient -a=";
-  };
-}
diff --git a/home/profiles/git.nix b/home/profiles/git.nix
deleted file mode 100644
index f26b3eb..0000000
--- a/home/profiles/git.nix
+++ /dev/null
@@ -1,77 +0,0 @@
-{ lib, pkgs, config, ... }:
-let
-  sshPub = builtins.fromTOML (
-    builtins.readFile ../../configs/ssh-pubkeys.toml
-  );
-in
-{
-  home.file.".ssh/allowed_signers".text = lib.concatMapStrings (x: "franck@fcuny.net ${x}\n") (with sshPub; [ aptos work git ykey-laptop op ]);
-
-  programs.git = {
-    enable = true;
-    userName = "Franck Cuny";
-    userEmail = "franck@fcuny.net";
-
-    signing = {
-      key = "key::${sshPub.op}";
-      signByDefault = true;
-    };
-
-    aliases = {
-      amend = "commit --amend";
-      ll = "log --pretty=\"format:%h %G? %aN  %s\"";
-    };
-
-    extraConfig = {
-      core.whitespace = "trailing-space,space-before-tab";
-      color.ui = "true";
-
-      gpg.format = "ssh";
-      gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
-      gpg.ssh.program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign";
-
-      # abort if the remote branch does not match the local one
-      push.default = "simple";
-
-      init.defaultBranch = "main";
-
-      pull.rebase = true;
-      rebase = {
-        # Automatically create a temporary stash entry before the
-        # operation begins, and apply it after the operation ends.
-        autoStash = true;
-        # Print a warning if some commits are removed
-        missingCommitsCheck = "warn";
-      };
-
-      branch.autosetuprebase = "remote";
-      branch.sort = "authordate";
-
-      commit.template = "${config.xdg.dataHome}/git/commit.template";
-    };
-
-    ignores = [
-      "*~"
-      ".direnv"
-      "__pycache__"
-    ];
-  };
-
-  xdg.dataFile."git/commit.template".source = pkgs.writeText "commit.template" ''
-
-    # (If applied, this commit will...) <subject>
-
-    # Explain why this change is being made
-
-    # --- COMMIT END ---
-    # Remember to
-    #    Use the imperative mood, present tense: `change' not `changed' nor `changes'
-    #    Do not end the subject line with a period
-    #    Use the body to explain what and why vs. how
-    #    Can use multiple lines with "-" for bullet points in body
-'';
-
-  home.packages = with pkgs; [
-    gitAndTools.pre-commit
-  ];
-}
diff --git a/home/profiles/home.nix b/home/profiles/home.nix
deleted file mode 100644
index 42517b9..0000000
--- a/home/profiles/home.nix
+++ /dev/null
@@ -1,69 +0,0 @@
-{ config, lib, pkgs, ... }:
-{
-  imports = [
-    ./git.nix
-    ./ssh.nix
-    ./zsh.nix
-  ];
-
-  home.packages = with pkgs; [
-    dive # explore layers in docker images
-    jq
-    ripgrep
-    util-linux
-    xdg-utils
-
-    age
-    rage
-    age-plugin-yubikey
-
-    # tools inside the tools directory
-    tools.git-blame-stats
-    tools.git-broom
-    tools.ipconverter
-    tools.seqstat
-
-    # tools from external repositories
-    # x509-info
-    # gh-ssh-keys
-    # masked-emails
-  ];
-
-  programs.direnv = {
-    enable = true;
-    nix-direnv.enable = true;
-    config = {
-      global.disable_stdin = true;
-      global.strict_env = true;
-    };
-  };
-
-  xdg = {
-    enable = true;
-    # File types
-    mime.enable = true;
-    # File associatons
-    mimeApps = { enable = true; };
-    # User directories
-    userDirs = {
-      enable = true;
-      createDirectories = true;
-      desktop = "${config.home.homeDirectory}/documents";
-      documents = "${config.home.homeDirectory}/documents";
-      download = "${config.home.homeDirectory}/downloads";
-      music = "${config.home.homeDirectory}/media/music";
-      pictures = "${config.home.homeDirectory}/media/pictures";
-      publicShare = "${config.home.homeDirectory}/documents/public";
-      templates = "${config.home.homeDirectory}/documents/templates";
-      videos = "${config.home.homeDirectory}/media/videos";
-    };
-  };
-
-  home.sessionVariables = with config.xdg; {
-    LESS = "-FRSXM";
-    LESSCHARSET = "utf-8";
-    LESSHISTFILE = "${dataHome}/less/history";
-    LESSKEY = "${configHome}/less/lesskey";
-    PAGER = "less";
-  };
-}
diff --git a/home/profiles/ssh.nix b/home/profiles/ssh.nix
deleted file mode 100644
index 47aee8a..0000000
--- a/home/profiles/ssh.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ ... }:
-{
-  programs.ssh = {
-    enable = true;
-    forwardAgent = true;
-    serverAliveInterval = 60;
-    controlMaster = "auto";
-    controlPersist = "30m";
-    extraConfig = ''
-      IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
-    '';
-    matchBlocks = {
-      "github.com" = {
-        hostname = "github.com";
-        user = "git";
-        forwardAgent = false;
-        extraOptions = { preferredAuthentications = "publickey"; };
-      };
-    };
-  };
-}
diff --git a/home/profiles/tmux.nix b/home/profiles/tmux.nix
deleted file mode 100644
index 22f8683..0000000
--- a/home/profiles/tmux.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ ... }:
-{
-  programs.tmux = {
-    enable = true;
-
-    terminal = "xterm-256color";
-    escapeTime = 0;
-    aggressiveResize = true;
-    baseIndex = 1;
-    shortcut = "z";
-    clock24 = true;
-    historyLimit = 50000; # Bigger buffer
-
-    extraConfig = ''
-      setw -g mouse on
-
-      set-option -g renumber-windows on
-    '';
-  };
-}
diff --git a/home/profiles/yubikey.nix b/home/profiles/yubikey.nix
deleted file mode 100644
index b18ce5d..0000000
--- a/home/profiles/yubikey.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ pkgs, lib, config, ... }:
-{
-  home.packages = with pkgs; [ yubikey-manager yubikey-touch-detector ];
-
-  systemd.user.sockets.yubikey-touch-detector = {
-    Unit.Description = "Unix socket activation for YubiKey touch detector service";
-    Socket = {
-      ListenStream = "%t/yubikey-touch-detector.socket";
-      RemoveOnStop = true;
-    };
-    Install.WantedBy = [ "sockets.target" ];
-  };
-
-  systemd.user.services.yubikey-touch-detector = {
-    Unit = {
-      Description = "Detects when your YubiKey is waiting for a touch";
-      Requires = "yubikey-touch-detector.socket";
-    };
-    Service = {
-      ExecStart = "${pkgs.yubikey-touch-detector}/bin/yubikey-touch-detector --libnotify";
-      EnvironmentFile = "-%E/yubikey-touch-detector/service.conf";
-    };
-    Install = {
-      Also = "yubikey-touch-detector.socket";
-      WantedBy = [ "default.target" ];
-    };
-  };
-}
diff --git a/home/profiles/zsh.nix b/home/profiles/zsh.nix
deleted file mode 100644
index 0cc20eb..0000000
--- a/home/profiles/zsh.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ config, pkgs, lib, ... }:
-{
-  home.packages = with pkgs; [ zsh-completions ];
-
-  programs.zsh = {
-    enable = true;
-    dotDir = ".config/zsh";
-
-    defaultKeymap = "emacs";
-    enableCompletion = true;
-    enableAutosuggestions = true;
-
-    history = {
-      size = 500000;
-      save = 500000;
-      extended = true;
-      ignoreSpace = true;
-      ignoreDups = true;
-      share = true;
-      # see
-      # https://github.com/nix-community/home-manager/blob/32a7da69dc53c9eb5ad0675eb7fdc58f7fe35272/modules/programs/zsh.nix#L537
-      path = "${config.xdg.dataHome}/zsh/zsh_history";
-    };
-
-    localVariables = {
-      # Print timing statistics for everything which takes longer than
-      # 5 seconds of user + system time.
-      REPORTTIME = 5;
-    };
-
-    shellAliases = {
-      ll = "ls -l --color=auto";
-      lt = "ls -ltrh --color=auto";
-      la = "ls -ltrha --color=auto";
-      pkgsearch = "nix search nixpkgs";
-      flup = "nix flake update --commit-lock-file";
-    };
-
-    oh-my-zsh = {
-      enable = true;
-      plugins = [ "git" ];
-      theme = "robbyrussell";
-    };
-  };
-}