Skip to content

Instantly share code, notes, and snippets.

@blissdev
Forked from boj/config
Created February 4, 2021 23:20
Show Gist options
  • Save blissdev/0d0260a88fbb1798b2d314a0ac308c05 to your computer and use it in GitHub Desktop.
Save blissdev/0d0260a88fbb1798b2d314a0ac308c05 to your computer and use it in GitHub Desktop.

Revisions

  1. @boj boj revised this gist Jun 17, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions configuration.nix
    Original file line number Diff line number Diff line change
    @@ -24,6 +24,8 @@

    environment.systemPackages = with pkgs; [
    # system
    gcc
    gnumake
    usbutils

    # virtualization
  2. @boj boj revised this gist Jun 17, 2016. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions configuration.nix
    Original file line number Diff line number Diff line change
    @@ -38,8 +38,11 @@
    vim

    # development
    ansible2
    git
    kubernetes
    stack
    terraform

    # pgp
    gnupg
    @@ -56,6 +59,7 @@

    # misc
    aspell
    aspellDicts.en
    curl
    dmenu
    htop
  3. @boj boj revised this gist Jun 17, 2016. 6 changed files with 12 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions config
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    // .config/termite/config

    [options]
    font = Liberation Mono 10

    2 changes: 2 additions & 0 deletions config.fish
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    // .config/fish/config.fish

    set -x LC_ALL en_US.UTF-8
    set -x LANG en_US.UTF-8

    2 changes: 2 additions & 0 deletions configuration.nix
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    // /etc/nixos/configuration.nix

    { config, pkgs, ... }:

    {
    2 changes: 2 additions & 0 deletions gpg-agent.conf
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    // .gnupg/gpg-agent.conf

    pinentry-program /nix/store/yy175j90bils8674gi9j5r3kwgvg9964-system-path/bin/pinentry
    enable-ssh-support
    default-cache-ttl 600
    2 changes: 2 additions & 0 deletions gpg.conf
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    // .gnupg/gpg.conf

    require-cross-certification
    use-agent
    keyserver hkps://hkps.pool.sks-keyservers.net
    2 changes: 2 additions & 0 deletions xmonad.hs
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    // .xmonad/xmonad.hs

    import XMonad
    import XMonad.Layout.Spacing

  4. @boj boj revised this gist Jun 17, 2016. 2 changed files with 11 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions gpg-agent.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    pinentry-program /nix/store/yy175j90bils8674gi9j5r3kwgvg9964-system-path/bin/pinentry
    enable-ssh-support
    default-cache-ttl 600
    max-cache-ttl 7200
    7 changes: 7 additions & 0 deletions gpg.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    require-cross-certification
    use-agent
    keyserver hkps://hkps.pool.sks-keyservers.net
    personal-cipher-preferences AES256 AES192 AES CAST5
    personal-digest-preferences SHA512 SHA384 SHA256 SHA224
    cert-digest-algo SHA512
    default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
  5. @boj boj revised this gist Jun 17, 2016. 2 changed files with 18 additions and 9 deletions.
    19 changes: 16 additions & 3 deletions config.fish
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,17 @@
    set -x LC_ALL en_US.UTF-8
    set -x LANG en_US.UTF-8

    uncl

    xset r rate 200 30
    if not pgrep -x unclutter > /dev/null
    unclutter -idle 1 -root &
    end

    if not pgrep -x gpg-agent > /dev/null
    gpg-agent --homedir /home/bojo/.gnupg --daemon --enable-ssh-support
    else
    gpg-connect-agent updatestartuptty /bye > /dev/null
    end

    set -u SSH_AGENT_PID
    set -x GPG_TTY (tty)
    set -x GPG_AGENT_INFO $HOME/.gnupg/S.gpg-agent
    set -x SSH_AUTH_SOCK $HOME/.gnupg/S.gpg-agent.ssh
    8 changes: 2 additions & 6 deletions configuration.nix
    Original file line number Diff line number Diff line change
    @@ -41,9 +41,10 @@

    # pgp
    gnupg
    libu2f-host
    opensc
    pcsctools
    libu2f-host
    pinentry_ncurses
    yubikey-personalization

    # terminal
    @@ -80,11 +81,6 @@
    enable = true;
    user = "bojo";
    };
    sessionCommands = ''
    gpg-connect-agent /bye
    GPG_TTY=$(tty)
    export GPG_TTY
    '';
    };
    };
    };
  6. @boj boj revised this gist Jun 17, 2016. 1 changed file with 11 additions and 2 deletions.
    13 changes: 11 additions & 2 deletions configuration.nix
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,6 @@
    emacs
    vim


    # editor
    emacs
    vim
    @@ -88,8 +87,18 @@
    '';
    };
    };

    };

    fonts = {
    enableFontDir = true;
    enableGhostscriptFonts = true;
    fonts = with pkgs; [
    hack-font
    source-code-pro
    unifont
    ];
    };


    virtualisation = {
    docker.enable = true;
  7. @boj boj revised this gist Jun 16, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions config.fish
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    xset r rate 200 30
    if not pgrep -x unclutter > /dev/null
    unclutter -idle 1 -root &
    end
  8. @boj boj created this gist Jun 16, 2016.
    6 changes: 6 additions & 0 deletions config
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    [options]
    font = Liberation Mono 10

    [colors]
    foreground = #FFFFFF
    background = #000000
    3 changes: 3 additions & 0 deletions config.fish
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    if not pgrep -x unclutter > /dev/null
    unclutter -idle 1 -root &
    end
    106 changes: 106 additions & 0 deletions configuration.nix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,106 @@
    { config, pkgs, ... }:

    {
    imports =
    [
    ./hardware-configuration.nix
    ];

    boot.loader.grub.enable = true;
    boot.loader.grub.version = 2;
    boot.loader.grub.device = "/dev/sda";

    networking.hostName = "ahoyana";

    i18n = {
    consoleFont = "Lat2-Terminus16";
    consoleKeyMap = "jp106";
    defaultLocale = "en_US.UTF-8";
    };

    time.timeZone = "Asia/Tokyo";

    environment.systemPackages = with pkgs; [
    # system
    usbutils

    # virtualization
    open-vm-tools

    # editor
    emacs
    vim


    # editor
    emacs
    vim

    # development
    git
    kubernetes

    # pgp
    gnupg
    opensc
    pcsctools
    libu2f-host
    yubikey-personalization

    # terminal
    fish
    termite
    tmux

    # misc
    aspell
    curl
    dmenu
    htop
    unclutter
    wget
    ];

    services = {
    pcscd.enable = true;

    vmwareGuest.enable = true;

    # openssh.enable = true;

    xserver = {
    enable = true;
    layout = "jp";
    windowManager.xmonad.enable = true;
    windowManager.default = "xmonad";
    windowManager.xmonad.enableContribAndExtras = true;
    desktopManager.xterm.enable = false;
    desktopManager.default = "none";
    displayManager = {
    auto = {
    enable = true;
    user = "bojo";
    };
    sessionCommands = ''
    gpg-connect-agent /bye
    GPG_TTY=$(tty)
    export GPG_TTY
    '';
    };
    };

    };

    virtualisation = {
    docker.enable = true;
    };

    users.extraUsers.bojo = {
    isNormalUser = true;
    extraGroups = ["wheel" "input" "audio" "video" "docker"];
    uid = 1000;
    };

    system.stateVersion = "16.03";

    }
    19 changes: 19 additions & 0 deletions xmonad.hs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    import XMonad
    import XMonad.Layout.Spacing

    myTerminal = "termite -e fish"

    myLayoutHook = spacing 2 $ Tall 1 (3 / 100) (1/2)

    myNormalBorderColor = "#3BB9FF"

    myFocusedBorderColor = "#FFA62F"


    main = xmonad defaultConfig
    { terminal = myTerminal
    , layoutHook = myLayoutHook
    , normalBorderColor = myNormalBorderColor
    , focusedBorderColor = myFocusedBorderColor
    , focusFollowsMouse = False
    }