├── root ├── .bashrc ├── .vimrc └── .zshrc ├── .gitignore ├── dep ├── nixpkgs │ ├── default.nix │ ├── github.json │ └── thunk.nix ├── obelisk │ ├── default.nix │ ├── github.json │ └── thunk.nix ├── home-manager │ ├── default.nix │ ├── github.json │ └── thunk.nix ├── spacemacs │ ├── default.nix │ ├── github.json │ └── thunk.nix ├── nixos-hardware │ ├── default.nix │ ├── github.json │ └── thunk.nix └── nixpkgs-mozilla │ ├── default.nix │ ├── github.json │ └── thunk.nix ├── user ├── home-manager.nix ├── work.nix ├── video-games.nix ├── fish │ ├── functions │ │ ├── git-filter-sed.fish │ │ └── notify.fish │ ├── default.nix │ └── fish_prompt.fish ├── misc-dev.nix ├── nixpkgs │ ├── default.nix │ └── config.nix ├── textual.nix ├── .environment ├── aws.nix ├── bash │ └── default.nix ├── graphical │ ├── redshift.nix │ ├── x.nix │ ├── common.nix │ ├── taffybar.hs │ ├── wayland.nix │ └── xmonad.hs ├── haskell.nix ├── default.nix ├── secrets.nix ├── nvim │ ├── default.nix │ └── init.vim ├── dark-mode.nix ├── git │ └── default.nix ├── .zshrc ├── emacs │ ├── default.nix │ ├── init.el │ └── .spacemacs └── helix │ └── default.nix ├── hosts ├── jcericson-2006-nixos │ ├── wireless.nix │ ├── default.nix │ └── boot-and-fs.nix ├── work-ssh │ └── home.nix ├── work-ssh-no-ambient-nix │ └── home.nix ├── jcericson-2016-nixos │ ├── home.nix │ ├── hardware-configuration.nix │ └── default.nix ├── jcericson-2025-nixos │ ├── home.nix │ ├── hardware-configuration.nix │ └── default.nix ├── jcericson-2023-nixos │ ├── home.nix │ ├── hardware-configuration.nix │ ├── home-assistant.nix │ └── default.nix ├── jcericson-obsidian-2018 │ ├── home.nix │ ├── hardware-configuration.nix │ └── default.nix ├── virtualbox │ └── default.nix └── apple-macbook-pro-10-1 │ └── default.nix ├── nixos-entry.nix ├── home-manager-entry.nix ├── system ├── video-games.nix ├── install.nix ├── libinput.nix ├── yubikey.nix ├── libvirt.nix ├── graphical │ ├── wayland.nix │ ├── x.nix │ └── common.nix ├── synaptics.nix ├── packages.nix ├── pubkeys.nix └── common.nix ├── .editorconfig ├── README.md └── LICENSE /root/.bashrc: -------------------------------------------------------------------------------- 1 | ../user/.bashrc -------------------------------------------------------------------------------- /root/.vimrc: -------------------------------------------------------------------------------- 1 | ../user/.vimrc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | 3 | passwd.nix 4 | /configuration.nix 5 | 6 | result 7 | -------------------------------------------------------------------------------- /dep/nixpkgs/default.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | import (import ./thunk.nix) -------------------------------------------------------------------------------- /dep/obelisk/default.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | import (import ./thunk.nix) -------------------------------------------------------------------------------- /dep/home-manager/default.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | import (import ./thunk.nix) -------------------------------------------------------------------------------- /dep/spacemacs/default.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | import (import ./thunk.nix) -------------------------------------------------------------------------------- /dep/nixos-hardware/default.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | import (import ./thunk.nix) -------------------------------------------------------------------------------- /dep/nixpkgs-mozilla/default.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | import (import ./thunk.nix) -------------------------------------------------------------------------------- /user/home-manager.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.home-manager.enable = true; 5 | } 6 | -------------------------------------------------------------------------------- /user/work.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | programs.git.settings.user.email = "John.Ericson@Obsidian.Systems"; 5 | } 6 | -------------------------------------------------------------------------------- /hosts/jcericson-2006-nixos/wireless.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | networking.enableB43Firmware = true; 5 | } 6 | -------------------------------------------------------------------------------- /root/.zshrc: -------------------------------------------------------------------------------- 1 | # Bootstrap off user .zshrc` 2 | source $(dirname $(readlink -f ${(%):-%N}))/../user/.zshrc 3 | prompt adam1 red 4 | -------------------------------------------------------------------------------- /nixos-entry.nix: -------------------------------------------------------------------------------- 1 | import (import ./dep/nixpkgs/thunk.nix + "/nixos") { 2 | configuration = /etc/nixos/configuration.nix; 3 | } 4 | -------------------------------------------------------------------------------- /user/video-games.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | home.packages = with pkgs; [ 5 | steam 6 | #minecraft 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /user/fish/functions/git-filter-sed.fish: -------------------------------------------------------------------------------- 1 | function git-filter-sed 2 | git grep -l -E $argv[1] $$argv[3] | xargs sed -i -E -e "s#$argv[1]#$argv[2]#g" 3 | end 4 | -------------------------------------------------------------------------------- /user/misc-dev.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.jq.enable = true; 5 | 6 | home.packages = with pkgs; [ 7 | nix-diff 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /home-manager-entry.nix: -------------------------------------------------------------------------------- 1 | import (import ./dep/home-manager/thunk.nix + "/home-manager/home-manager.nix") { 2 | pkgs = import ./dep/nixpkgs {}; 3 | confPath = ~/.config/home-manager/home.nix; 4 | } 5 | -------------------------------------------------------------------------------- /system/video-games.nix: -------------------------------------------------------------------------------- 1 | # Based on https://nixos.org/wiki/Steam 2 | { config, pkgs, ... }: 3 | 4 | { 5 | hardware.graphics.enable32Bit = true; 6 | services.pulseaudio.support32Bit = true; 7 | } 8 | -------------------------------------------------------------------------------- /user/fish/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.fish.enable = true; 5 | programs.fish.interactiveShellInit = builtins.readFile ./fish_prompt.fish; 6 | xdg.configFile."fish/functions".source = ./functions; 7 | } 8 | -------------------------------------------------------------------------------- /user/nixpkgs/default.nix: -------------------------------------------------------------------------------- 1 | { options, ... }: 2 | 3 | { 4 | nixpkgs.overlays = [ 5 | (import (import ../../dep/nixpkgs-mozilla/thunk.nix + "/rust-overlay.nix")) 6 | ]; 7 | 8 | nixpkgs.config = import ./config.nix; 9 | } 10 | -------------------------------------------------------------------------------- /user/textual.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | home.packages = with pkgs; [ 5 | alacritty.terminfo 6 | ]; 7 | 8 | home.sessionVariables = { 9 | TERMINFO_DIRS = "\${HOME}/.nix-profile/share/terminfo:\${TERMINFO_DIRS}"; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /dep/nixpkgs/github.json: -------------------------------------------------------------------------------- 1 | { 2 | "owner": "NixOS", 3 | "repo": "nixpkgs", 4 | "branch": "nixos-25.11", 5 | "private": false, 6 | "rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b", 7 | "sha256": "02hdh4r0cc5h78cmymndb8clfhkn6phbrkrv6s8kvyfspqwzj84r" 8 | } 9 | -------------------------------------------------------------------------------- /dep/obelisk/github.json: -------------------------------------------------------------------------------- 1 | { 2 | "owner": "obsidiansystems", 3 | "repo": "obelisk", 4 | "branch": "master", 5 | "private": false, 6 | "rev": "135bfd7422b856c146b5cd5dacfe584f0621825e", 7 | "sha256": "0dr0pl9isim1pvvzqlwrzrlqn5w1iwyxj05ygcqbsxgzrc0ww70v" 8 | } 9 | -------------------------------------------------------------------------------- /dep/spacemacs/github.json: -------------------------------------------------------------------------------- 1 | { 2 | "owner": "syl20bnr", 3 | "repo": "spacemacs", 4 | "branch": "master", 5 | "private": false, 6 | "rev": "491e17ba9cdcb253a3292a3049abb8767c91b9bb", 7 | "sha256": "0pgigrfgh20fbad2rwy38i9iic3pjq89xcgn37l6xxxnb2aayhhc" 8 | } 9 | -------------------------------------------------------------------------------- /dep/nixos-hardware/github.json: -------------------------------------------------------------------------------- 1 | { 2 | "owner": "NixOS", 3 | "repo": "nixos-hardware", 4 | "branch": "master", 5 | "private": false, 6 | "rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3", 7 | "sha256": "1vmlcda7864ya2byxivnpzkqf41cavj9ms5hjh6i0h8anls56lk6" 8 | } 9 | -------------------------------------------------------------------------------- /dep/nixpkgs-mozilla/github.json: -------------------------------------------------------------------------------- 1 | { 2 | "owner": "mozilla", 3 | "repo": "nixpkgs-mozilla", 4 | "branch": "master", 5 | "private": false, 6 | "rev": "80c058cf774c198fb838fc3549806b232dd3e320", 7 | "sha256": "0xxhiads5fd4jwbr685k1m527za50sl5z4bliigz99ciqxvzyf0z" 8 | } 9 | -------------------------------------------------------------------------------- /hosts/work-ssh/home.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../user 6 | ../../user/work.nix 7 | ../../user/textual.nix 8 | ]; 9 | 10 | home.packages = with pkgs; [ 11 | tig 12 | ]; 13 | 14 | home.stateVersion = "22.05"; 15 | } 16 | -------------------------------------------------------------------------------- /dep/home-manager/github.json: -------------------------------------------------------------------------------- 1 | { 2 | "owner": "nix-community", 3 | "repo": "home-manager", 4 | "branch": "release-25.11", 5 | "private": false, 6 | "rev": "44777152652bc9eacf8876976fa72cc77ca8b9d8", 7 | "sha256": "06irakwl3l32sqp3j0334g849bxvbbscqqbrzgp9xmfnka86vq8n" 8 | } 9 | -------------------------------------------------------------------------------- /user/fish/functions/notify.fish: -------------------------------------------------------------------------------- 1 | function notify 2 | eval "$argv" 3 | set -l stat $status 4 | curl -s -F token=(cat ~/.config/pushover/token) -F user=(cat ~/.config/pushover/user) -F title=Terminal -F "message=($stat) $argv" https://api.pushover.net/1/messages.json > /dev/null 2>&1 5 | end 6 | -------------------------------------------------------------------------------- /system/install.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = [ ]; 5 | networking.networkmanager.enable = true; 6 | 7 | nixpkgs.config.allowUnfree = true; 8 | boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; 9 | } 10 | -------------------------------------------------------------------------------- /user/.environment: -------------------------------------------------------------------------------- 1 | EDITOR=vim 2 | #VISUAL=emacs 3 | 4 | alias nixpaste="curl -F 'text=<-' http://nixpaste.lbr.uno" 5 | alias nix-shell-callPackage="nix-shell -E '(import {}).callPackage ./. {}'" 6 | alias nix-build-callPackage="nix-build -E '(import {}).callPackage ./. {}'" 7 | 8 | source $HOME/.private-environment 9 | -------------------------------------------------------------------------------- /user/aws.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.ssh.matchBlocks."i-* mi-*" = { 5 | proxyCommand = "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"; 6 | }; 7 | 8 | home.packages = with pkgs; [ 9 | awscli 10 | ssm-session-manager-plugin 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /user/bash/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | # I don't like bash, but I want history in nix shell. 5 | programs.bash = { 6 | enable = true; 7 | historyControl = [ 8 | "erasedups" 9 | "ignorespace" 10 | ]; 11 | historyFileSize = 10000000; 12 | historySize = 10000000; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /hosts/work-ssh-no-ambient-nix/home.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | 3 | { 4 | imports = [ 5 | ../work-ssh/home.nix 6 | ]; 7 | 8 | programs.bash.profileExtra = '' 9 | if [ -e /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then 10 | . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh 11 | fi 12 | ''; 13 | } 14 | -------------------------------------------------------------------------------- /user/graphical/redshift.nix: -------------------------------------------------------------------------------- 1 | { 2 | enable = true; 3 | provider = "manual"; 4 | #provider = "geoclue2"; 5 | # South of New York, for less seasonal variation 6 | latitude = "27"; 7 | #longitude = "0.0"; # London 8 | longitude = "-74.0060"; # New York 9 | #longitude = "-122.4194"; # San Francisco 10 | temperature.night = 1500; 11 | } 12 | -------------------------------------------------------------------------------- /system/libinput.nix: -------------------------------------------------------------------------------- 1 | # Sane defaults if the libinput driver is to be used 2 | { config, pkgs, ... }: 3 | 4 | { 5 | services.libinput = { 6 | enable = true; 7 | 8 | touchpad = { 9 | #accelSpeed = "0.0"; 10 | accelProfile = "adaptive"; 11 | 12 | naturalScrolling = true; 13 | 14 | tapping = false; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /system/yubikey.nix: -------------------------------------------------------------------------------- 1 | # Driver support, etc for Yubikeys 2 | { config, pkgs, ... }: 3 | 4 | { 5 | environment.systemPackages = with pkgs; [ 6 | opensc pcsctools libu2f-host yubikey-personalization 7 | (openvpn.override { pkcs11Support = true; }) 8 | ]; 9 | services.pcscd.enable = true; 10 | services.udev.packages = [ 11 | pkgs.libu2f-host 12 | pkgs.yubikey-personalization 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /hosts/jcericson-2016-nixos/home.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../user 6 | ../../user/graphical/wayland.nix 7 | ../../user/video-games.nix 8 | ]; 9 | 10 | xresources.properties = { 11 | "*.dpi" = 150; 12 | }; 13 | 14 | # TODO get alacritty to respect the above, and remove this. 15 | programs.alacritty.settings.font.size = 23; 16 | 17 | home.stateVersion = "20.09"; 18 | } 19 | -------------------------------------------------------------------------------- /user/haskell.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | home.packages = [ 5 | (import ../dep/obelisk {}).command 6 | ] ++ (with pkgs; [ 7 | cabal-install 8 | haskellPackages.ghcid 9 | haskellPackages.hasktags 10 | haskellPackages.nix-thunk 11 | ]); 12 | 13 | programs.git.ignores = [ 14 | "cabal.project.local" 15 | "dist-newstyle" 16 | ]; 17 | 18 | #home.file.".ghci".source = ../../../../dotfiles/ghci; 19 | } 20 | -------------------------------------------------------------------------------- /hosts/jcericson-2025-nixos/home.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ../../user 6 | ../../user/graphical/wayland.nix 7 | ../../user/video-games.nix 8 | ../../user/work.nix 9 | ]; 10 | 11 | xresources.properties = { 12 | "*.dpi" = 150; 13 | }; 14 | 15 | # TODO get alacritty to respect the above, and remove this. 16 | programs.alacritty.settings.font.size = 23; 17 | 18 | home.stateVersion = "20.09"; 19 | } 20 | -------------------------------------------------------------------------------- /system/libvirt.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | virtualisation.libvirtd = { 5 | enable = true; 6 | qemu = { 7 | package = pkgs.qemu_kvm; 8 | swtpm.enable = true; 9 | ovmf = { 10 | packages = [ 11 | (pkgs.OVMF.override { 12 | secureBoot = true; 13 | tpmSupport = true; 14 | }).fd 15 | ]; 16 | }; 17 | }; 18 | }; 19 | users.groups.libvirtd.members = [ "jcericson" ]; 20 | } 21 | -------------------------------------------------------------------------------- /hosts/jcericson-2023-nixos/home.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../user 6 | ../../user/graphical/wayland.nix 7 | ../../user/video-games.nix 8 | ../../user/work.nix 9 | ]; 10 | 11 | xresources.properties = { 12 | "*.dpi" = 120; 13 | }; 14 | 15 | home.packages = with pkgs; [ 16 | ]; 17 | 18 | # TODO get alacritty to respect the above, and remove this. 19 | programs.alacritty.settings.font.size = 13; 20 | 21 | home.stateVersion = "20.09"; 22 | } 23 | -------------------------------------------------------------------------------- /hosts/jcericson-obsidian-2018/home.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../user 6 | ../../user/graphical/wayland.nix 7 | ../../user/video-games.nix 8 | ../../user/work.nix 9 | ]; 10 | 11 | xresources.properties = { 12 | "*.dpi" = 120; 13 | }; 14 | 15 | home.packages = with pkgs; [ 16 | ]; 17 | 18 | # TODO get alacritty to respect the above, and remove this. 19 | programs.alacritty.settings.font.size = 23; 20 | 21 | home.stateVersion = "20.09"; 22 | } 23 | -------------------------------------------------------------------------------- /user/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ./emacs 6 | ./bash 7 | ./fish 8 | ./git 9 | ./haskell.nix 10 | ./helix 11 | ./home-manager.nix 12 | ./nixpkgs 13 | ./nvim 14 | ./misc-dev.nix 15 | ./secrets.nix 16 | ./aws.nix 17 | ./dark-mode.nix 18 | ]; 19 | 20 | systemd.user.startServices = true; 21 | 22 | home.username = "jcericson"; 23 | home.homeDirectory = "/${if pkgs.stdenv.isDarwin then "Users" else "home"}/${config.home.username}"; 24 | } 25 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig configuration for nix 2 | # http://EditorConfig.org 3 | 4 | # Top-most EditorConfig file 5 | root = true 6 | 7 | # Unix-style newlines with a newline ending every file, UTF-8 charset 8 | [*] 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | charset = utf-8 13 | 14 | # Match Nix files, set indent to spaces with width of two 15 | [*.nix] 16 | indent_style = space 17 | indent_size = 2 18 | 19 | # Match diffs, avoid to trim trailing whitespace 20 | [*.{diff,patch}] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nixos-configuration 2 | 3 | Much better than a .dotfiles repo 4 | 5 | ## Home manager 6 | 7 | ```sh 8 | "$(nix-build home-manager-entry.nix --no-out-link)/activate" 9 | ``` 10 | 11 | ## NixOS 12 | 13 | ```sh 14 | sudo nix-env \ 15 | --profile /nix/var/nix/profiles/system \ 16 | --set "$(nix-build nixos-entry.nix -A system --no-out-link)" 17 | sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch 18 | ``` 19 | 20 | Also 21 | 22 | ```sh 23 | nixos-option \ 24 | --options_expr '(import ./nixos-entry.nix).options' \ 25 | --config_expr '(import ./nixos-entry.nix).config' 26 | ``` 27 | -------------------------------------------------------------------------------- /user/secrets.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.gpg = { 5 | enable = true; 6 | }; 7 | 8 | services.gpg-agent = { 9 | enable = pkgs.stdenv.isLinux; 10 | enableSshSupport = true; 11 | }; 12 | 13 | programs.ssh = { 14 | enable = true; 15 | enableDefaultConfig = false; 16 | matchBlocks = { 17 | "*" = { 18 | controlMaster = "auto"; 19 | controlPath = "~/.ssh/master-%C"; 20 | }; 21 | "bitbucket.com".user = "git"; 22 | "bitbucket.org".user = "git"; 23 | "github.com".user = "git"; 24 | "gitlab.com".user = "git"; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /system/graphical/wayland.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ./common.nix 6 | ]; 7 | 8 | # Enable screensharing 9 | xdg.portal = { 10 | enable = true; 11 | extraPortals = with pkgs; [ 12 | xdg-desktop-portal-gtk 13 | ]; 14 | config = { 15 | common.default = [ "gtk" ]; 16 | sway.default = [ "gtk" "wlr" ]; 17 | }; 18 | wlr = { 19 | enable = true; 20 | settings = { 21 | screencast = { 22 | Max_fps = 60; 23 | #Output_name = "DP-1"; 24 | Chooser_type = "default"; 25 | }; 26 | }; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /user/nvim/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.neovim = { 5 | enable = true; 6 | vimAlias = true; 7 | extraConfig = builtins.readFile ./init.vim; 8 | plugins = with pkgs.vimPlugins; [ 9 | nvim-lspconfig 10 | nvim-treesitter.withAllGrammars 11 | ]; 12 | # The leading newline makes the generated code not be one big line, 13 | # which does seem to be valid Lua, but is hard for me to read. 14 | extraLuaConfig = '' 15 | 16 | require('lspconfig').clangd.setup({}) 17 | ''; 18 | }; 19 | 20 | # TODO include other neovim settings 21 | home.file.".vimrc".source = ./init.vim; 22 | } 23 | -------------------------------------------------------------------------------- /system/synaptics.nix: -------------------------------------------------------------------------------- 1 | # Sane defaults if the synaptics driver is to be used 2 | { config, pkgs, ... }: 3 | 4 | { 5 | services.xserver.synaptics = { 6 | enable = true; 7 | 8 | minSpeed = "0.1"; 9 | maxSpeed = "15"; 10 | accelFactor = "0.8"; 11 | 12 | tapButtons = false; 13 | palmDetect = true; 14 | 15 | twoFingerScroll = true; 16 | vertEdgeScroll = false; 17 | horizontalScroll = true; 18 | 19 | additionalOptions = '' 20 | # "Natural" scrolling 21 | Option "VertScrollDelta" "-30" 22 | Option "HorizScrollDelta" "-30" 23 | 24 | Option "EmulateMidButtonTime" "100" 25 | ''; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /dep/nixpkgs/thunk.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: 3 | if !fetchSubmodules && !private then builtins.fetchTarball { 4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; 5 | } else (import (builtins.fetchTarball { 6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz"; 7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr"; 8 | }) {}).fetchFromGitHub { 9 | inherit owner repo rev sha256 fetchSubmodules private; 10 | }; 11 | json = builtins.fromJSON (builtins.readFile ./github.json); 12 | in fetch json -------------------------------------------------------------------------------- /dep/obelisk/thunk.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: 3 | if !fetchSubmodules && !private then builtins.fetchTarball { 4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; 5 | } else (import (builtins.fetchTarball { 6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz"; 7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr"; 8 | }) {}).fetchFromGitHub { 9 | inherit owner repo rev sha256 fetchSubmodules private; 10 | }; 11 | json = builtins.fromJSON (builtins.readFile ./github.json); 12 | in fetch json -------------------------------------------------------------------------------- /dep/home-manager/thunk.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: 3 | if !fetchSubmodules && !private then builtins.fetchTarball { 4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; 5 | } else (import (builtins.fetchTarball { 6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz"; 7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr"; 8 | }) {}).fetchFromGitHub { 9 | inherit owner repo rev sha256 fetchSubmodules private; 10 | }; 11 | json = builtins.fromJSON (builtins.readFile ./github.json); 12 | in fetch json -------------------------------------------------------------------------------- /dep/spacemacs/thunk.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: 3 | if !fetchSubmodules && !private then builtins.fetchTarball { 4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; 5 | } else (import (builtins.fetchTarball { 6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz"; 7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr"; 8 | }) {}).fetchFromGitHub { 9 | inherit owner repo rev sha256 fetchSubmodules private; 10 | }; 11 | json = builtins.fromJSON (builtins.readFile ./github.json); 12 | in fetch json -------------------------------------------------------------------------------- /dep/nixos-hardware/thunk.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: 3 | if !fetchSubmodules && !private then builtins.fetchTarball { 4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; 5 | } else (import (builtins.fetchTarball { 6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz"; 7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr"; 8 | }) {}).fetchFromGitHub { 9 | inherit owner repo rev sha256 fetchSubmodules private; 10 | }; 11 | json = builtins.fromJSON (builtins.readFile ./github.json); 12 | in fetch json -------------------------------------------------------------------------------- /dep/nixpkgs-mozilla/thunk.nix: -------------------------------------------------------------------------------- 1 | # DO NOT HAND-EDIT THIS FILE 2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: 3 | if !fetchSubmodules && !private then builtins.fetchTarball { 4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; 5 | } else (import (builtins.fetchTarball { 6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz"; 7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr"; 8 | }) {}).fetchFromGitHub { 9 | inherit owner repo rev sha256 fetchSubmodules private; 10 | }; 11 | json = builtins.fromJSON (builtins.readFile ./github.json); 12 | in fetch json -------------------------------------------------------------------------------- /user/dark-mode.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | gtk = { 5 | enable = true; 6 | theme.name = "Adwaita-dark"; 7 | gtk2.extraConfig = '' 8 | gtk-application-prefer-dark-theme = true; 9 | ''; 10 | gtk3.extraConfig = { 11 | gtk-application-prefer-dark-theme = true; 12 | }; 13 | gtk4.extraConfig = { 14 | gtk-application-prefer-dark-theme = true; 15 | }; 16 | }; 17 | dconf = { 18 | enable = pkgs.stdenv.isLinux; 19 | settings = { 20 | "org/gnome/desktop/interface" = { 21 | color-scheme = "prefer-dark"; 22 | }; 23 | "org/freedesktop/appearance" = { 24 | color-scheme = 1; 25 | }; 26 | }; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /user/nvim/init.vim: -------------------------------------------------------------------------------- 1 | noremap ; : 2 | noremap i 3 | noremap i 4 | noremap j h 5 | noremap i k 6 | noremap k j 7 | imap 8 | imap 9 | 10 | colorscheme desert 11 | syntax on 12 | set hlsearch 13 | set mouse=a 14 | set nobackup 15 | set noswapfile 16 | set number 17 | set tabstop=4 18 | set shiftwidth=4 19 | set smartcase 20 | set autoindent 21 | set copyindent 22 | set virtualedit=onemore 23 | set gdefault 24 | set ruler 25 | 26 | au BufEnter *.arr set syntax=pyret 27 | au BufEnter *.arr set expandtab 28 | 29 | au BufEnter *.hs set shiftwidth=2 30 | au BufEnter *.hs set softtabstop=2 31 | au BufEnter *.hs set expandtab 32 | 33 | " au BufEnter *.nix set syntax=nix 34 | -------------------------------------------------------------------------------- /hosts/virtualbox/default.nix: -------------------------------------------------------------------------------- 1 | { config, options, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../system/common.nix 6 | ../../../hardware-configuration.nix # Include the results of the hardware scan. 7 | ]; 8 | 9 | boot.loader.systemd-boot.enable = true; 10 | boot.loader.efi.canTouchEfiVariables = true; 11 | 12 | networking.hostName = "John-VirtualBox-NixOS"; # Define your hostname. 13 | 14 | environment.systemPackages = with pkgs; [ 15 | git 16 | ]; 17 | 18 | users.users.jcericson.extraGroups = [ "vboxsf" ]; 19 | 20 | nix.nixPath = options.nix.nixPath.default ++ [ 21 | ("ssh-config-file=" + pkgs.writeText "ssh_config" '' 22 | Host github.com 23 | IdentityFile /etc/ssh/ssh_host_rsa_key 24 | StrictHostKeyChecking=no 25 | '') 26 | ]; 27 | } 28 | -------------------------------------------------------------------------------- /user/graphical/x.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ./common.nix 6 | ]; 7 | 8 | xsession = { 9 | enable = true; 10 | 11 | windowManager.xmonad = { 12 | enable = true; 13 | # TODO: Patch xmonad-contrib to fix 14 | # https://github.com/xmonad/xmonad-contrib/issues/280 15 | enableContribAndExtras = true; 16 | config = ./xmonad.hs; 17 | #extraPackages = p: with p; [ taffybar ]; 18 | }; 19 | }; 20 | 21 | home.pointerCursor.x11.enable = true; 22 | 23 | #services.taffybar.enable = true; 24 | xdg.configFile."taffybar/taffybar.hs".source = ./taffybar.hs; 25 | 26 | xresources.properties = { 27 | # A nice desktop size 28 | #"*.dpi" = 120; 29 | # A nice laptop size: 30 | #"*.dpi" = 150; 31 | # Double pixels: 32 | #"*.dpi" = 192; 33 | }; 34 | 35 | home.packages = with pkgs; [ 36 | dmenu 37 | ]; 38 | 39 | services.redshift = import ./redshift.nix; 40 | } 41 | -------------------------------------------------------------------------------- /user/graphical/common.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | home.packages = with pkgs; [ 5 | gimp 6 | #gimpPlugins.resynthesizer 7 | 8 | #hexchat 9 | 10 | #musescore 11 | 12 | libreoffice 13 | dbeaver-bin 14 | meld 15 | 16 | qemu 17 | gdb 18 | 19 | ncdu 20 | #unison_2_40 21 | htop 22 | 23 | xsel 24 | 25 | p7zip 26 | unzip 27 | unrar 28 | 29 | chromium 30 | 31 | #thunderbird 32 | 33 | element-desktop 34 | signal-desktop 35 | telegram-desktop 36 | 37 | pavucontrol 38 | 39 | # Bits of Gnome 40 | # gnome3.gnome_terminal 41 | evince 42 | 43 | zoom-us 44 | ]; 45 | 46 | home.pointerCursor = { 47 | name = "Vanilla-DMZ"; 48 | package = pkgs.vanilla-dmz; 49 | }; 50 | 51 | programs.alacritty = { 52 | enable = true; 53 | }; 54 | 55 | home.sessionVariables = { 56 | TERMINAL = "alacritty"; 57 | }; 58 | 59 | programs.firefox.enable = true; 60 | } 61 | -------------------------------------------------------------------------------- /system/packages.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | environment.systemPackages = with pkgs; [ 5 | # Editors 6 | (neovim.override { vimAlias = true; }) 7 | # emacs # in user config, due to customization 8 | 9 | # Development 10 | tig 11 | 12 | # Admin 13 | acpi 14 | file 15 | gptfdisk 16 | gparted 17 | htop 18 | pciutils 19 | tree 20 | wget 21 | 22 | # Nix 23 | nix-prefetch-scripts 24 | nixos-option 25 | ]; 26 | 27 | nix = { 28 | # Dogfooding master! 🫡 29 | package = pkgs.nixVersions.git; 30 | 31 | settings = { 32 | sandbox = true; 33 | substituters = [ 34 | "https://cache.nixos.org/" 35 | "https://nixcache.reflex-frp.org" 36 | ]; 37 | trusted-substituters = [ 38 | "https://hydra.nixos.org/" 39 | "https://hydra.cryp.to" 40 | ]; 41 | trusted-public-keys = [ 42 | "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=" 43 | ]; 44 | }; 45 | channel.enable = false; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /user/graphical/taffybar.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | import System.Taffybar 3 | import System.Taffybar.Information.CPU 4 | import System.Taffybar.SimpleConfig 5 | import System.Taffybar.Widget 6 | import System.Taffybar.Widget.Generic.Graph 7 | import System.Taffybar.Widget.Generic.PollingGraph 8 | 9 | cpuCallback = do 10 | (_, systemLoad, totalLoad) <- cpuLoad 11 | return [ totalLoad, systemLoad ] 12 | 13 | main = do 14 | let cpuCfg = defaultGraphConfig { graphDataColors = [ (0, 1, 0, 1), (1, 0, 1, 0.5)] 15 | , graphLabel = Just "cpu" 16 | } 17 | clock = textClockNew Nothing "%a %b %_d %H:%M" 1 18 | cpu = pollingGraphNew cpuCfg 0.5 cpuCallback 19 | workspaces = workspacesNew defaultWorkspacesConfig 20 | simpleConfig = defaultSimpleTaffyConfig 21 | { startWidgets = [ workspaces ] 22 | , endWidgets = [ {-sniTrayNew,-} clock, cpu ] 23 | } 24 | startTaffybar $ toTaffyConfig simpleConfig 25 | -------------------------------------------------------------------------------- /system/graphical/x.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ./common.nix 6 | ]; 7 | 8 | # Enable the X11 windowing system. 9 | services.xserver = { 10 | enable = true; 11 | xkb.layout = "us"; 12 | xkb.options = "eurosign:e"; #,caps:escape"; 13 | autorun = true; 14 | 15 | # Enable the Light Desktop Manager 16 | displayManager.lightdm.enable = true; 17 | 18 | desktopManager.wallpaper.mode = "fill"; 19 | 20 | # Needed by home manager, workaround for 21 | # https://github.com/NixOS/nixpkgs/issues/70142 22 | # https://github.com/nix-community/home-manager/issues/1116 23 | desktopManager.xterm.enable = true; 24 | 25 | # Enable the Plasma 5 Desktop Environment. 26 | # displayManager.sddm.enable = true; 27 | # desktopManager.plasma5.enable = true; 28 | 29 | # Enable the GNOME Desktop Environment. 30 | # displayManager.gdm.enable = true; 31 | # desktopManager.gnome3.enable = true; 32 | 33 | # Enable XMonad 34 | # windowManager.xmonad.enable = true; 35 | 36 | displayManager.defaultSession = "xterm"; 37 | }; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /hosts/jcericson-obsidian-2018/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "rpool/root"; 18 | fsType = "zfs"; 19 | }; 20 | 21 | fileSystems."/nix" = 22 | { device = "rpool/nix"; 23 | fsType = "zfs"; 24 | }; 25 | 26 | fileSystems."/home" = 27 | { device = "rpool/home"; 28 | fsType = "zfs"; 29 | }; 30 | 31 | fileSystems."/boot" = 32 | { device = "/dev/disk/by-uuid/566B-3088"; 33 | fsType = "vfat"; 34 | }; 35 | 36 | swapDevices = [ ]; 37 | 38 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 39 | } 40 | -------------------------------------------------------------------------------- /hosts/jcericson-2016-nixos/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/hardware/network/broadcom-43xx.nix") 9 | (modulesPath + "/installer/scan/not-detected.nix") 10 | ]; 11 | 12 | boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "rtsx_pci_sdmmc" ]; 13 | boot.initrd.kernelModules = [ ]; 14 | boot.kernelModules = [ "kvm-intel" ]; 15 | boot.extraModulePackages = [ ]; 16 | 17 | fileSystems."/" = 18 | { device = "rpool/root"; 19 | fsType = "zfs"; 20 | }; 21 | 22 | fileSystems."/nix" = 23 | { device = "rpool/nix"; 24 | fsType = "zfs"; 25 | }; 26 | 27 | fileSystems."/home" = 28 | { device = "rpool/home"; 29 | fsType = "zfs"; 30 | }; 31 | 32 | fileSystems."/boot" = 33 | { device = "/dev/disk/by-uuid/DE1F-4474"; 34 | fsType = "vfat"; 35 | }; 36 | 37 | swapDevices = [ ]; 38 | 39 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 40 | } 41 | -------------------------------------------------------------------------------- /user/fish/fish_prompt.fish: -------------------------------------------------------------------------------- 1 | function fish_prompt --description 'Write out the prompt' 2 | set stat $status 3 | 4 | # Just calculate these once, to save a few cycles when displaying the prompt 5 | if not set -q __fish_prompt_hostname 6 | set -g __fish_prompt_hostname (hostname|cut -d . -f 1) 7 | end 8 | 9 | if not set -q __fish_prompt_normal 10 | set -g __fish_prompt_normal (set_color normal) 11 | end 12 | 13 | if not set -q __fish_prompt_color 14 | set -g __fish_prompt_color (set_color -o (hostname | md5sum | head -c 6)) 15 | end 16 | 17 | #Set the color for the status depending on the value 18 | set __fish_color_status (set_color -o green) 19 | if test $stat -gt 0 20 | set __fish_color_status (set_color -o red) 21 | end 22 | 23 | set -l display_pwd (pwd | sed "s|^$HOME|~|") 24 | 25 | printf '%s(%s)%s ' "$__fish_color_status" "$stat" "$__fish_prompt_normal" 26 | 27 | printf '%s%s@%s%s ' "$__fish_prompt_color" "$USER" "$__fish_prompt_hostname" "$__fish_prompt_normal" 28 | 29 | printf '%s%s ' "$display_pwd" (__fish_git_prompt) 30 | 31 | if set -q IN_NIX_SHELL 32 | if not set -q __fish_color_red 33 | set -g __fish_color_red (set_color -o red) 34 | end 35 | printf "%s%s " "$__fish_color_red" "$__fish_prompt_normal" 36 | end 37 | 38 | printf '\f\r $ ' 39 | end 40 | -------------------------------------------------------------------------------- /system/pubkeys.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | users.users.jcericson = { 5 | openssh.authorizedKeys.keys = [ 6 | "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCOU1ZtW8Xs5jXt3wpx8gVRNqfQVLK9bE26Kc1+3DZnm7Jfc4BuiIyAV8oQo+SPBE8g28hq1KA1gw0VMQTpci82zNV13yFVxH9/bqQ7kIXQNC69RsGTzX1FWDKjILyKDEAiwy6N/uYg6MBhabZO3AUwCGMVvR8BoQk/N5xu5rhdEIK7fmz7oTeACWp8D8Q/u33JJiinVKThSpbZRb7isdByAQZcfnTrJmBVg7c/ESDBQiY50Iu57V1Lle+EPkZcF2FC9yfl/UWQVRquJOinBDzDyInnhubjP5WnaEsaEkBS5MYjZ0fohOmcAWbgxc0xZ60Jfrb5yULeC/vI2rcThgB john@John-2016-NixOS" 7 | "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNPvn7k33PxgX1pQHpHb31/iAgN+UiekFMGQ+dwFRUW3SxpNqOzM7S1vlMItlwy8kvE7omuMyuzOa3owQ5H3PSMHAe5oIb4UmbONvqE12fcXz+22v/JlJOh0Z1VgBJ5iD9ir6re5JZUEsnCDkX74RemKwpzyf9tbolN4WBQIpRM4QC4TjY7jzKIPfo36vbcKzAzcmsyt8QJotH6fz5u7Maxc3Pf3Jy1BxrUtIuGLfZzYS6Bn5JaHImRMH1U1bNIFL8aFholyZIZ5LsWQfSEn1LMaidSkbrDhChZSvWZaehqj5DaX3r9ZmCYNuKYEDzjzyDk85xGRtn7tfrGcKKOFPV jcericson@jcericson-2016-nixos" 8 | "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdof+fSLyz3FV5t/yE9LBk/hgR8iNfdz/DRigvh4pP6+E4VPpPKSeA0a8r4CLMWvy9ZZ3Gqa04NdJnMmo8gBSIlo87JPq66GnC5QmeDJX2NLlliSeNQqUQKJ2VVcsVerz8O/RvVfvU2MIdW8VExx/DxeZbMnwRcWfUC0nby0NotWGNeS3NOcWWQq9z4E0sDSJ+QXSIMXWSeMda5sBadUK+YERTLYE/+ZVUPiXkXCmnwuRFHpZsqlRVad+kgXsZIwNEPUEqmEablg2C0NjvEbs75Yu9WUXXPJNhwaFbVXaWUM8UWO/n39jMM8aepalZbMhdFh129cAH35SjzIYjHxTP jcericson@john-obsidian-2018" 9 | ]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /hosts/jcericson-2006-nixos/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../system/common.nix 6 | ../../system/graphical/x.nix 7 | ../../system/synaptics.nix 8 | ./wireless.nix 9 | ./touchpad.nix 10 | ]; 11 | 12 | networking.hostName = "jcericson-2006-nixos"; 13 | 14 | # This option defines the first version of NixOS you have installed on this particular machine, 15 | # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 16 | # 17 | # Most users should NEVER change this value after the initial install, for any reason, 18 | # even if you've upgraded your system to a new NixOS release. 19 | # 20 | # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, 21 | # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how 22 | # to actually do that. 23 | # 24 | # This value being lower than the current NixOS release does NOT mean your system is 25 | # out of date, out of support, or vulnerable. 26 | # 27 | # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, 28 | # and migrated your data accordingly. 29 | # 30 | # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . 31 | system.stateVersion = "16.03"; 32 | 33 | nix.maxJobs = 2; 34 | } 35 | -------------------------------------------------------------------------------- /user/git/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, ... }: 2 | 3 | { 4 | programs.git.enable = true; 5 | programs.git.ignores = [ 6 | "*~" 7 | ]; 8 | 9 | # TODO multiple "insteadOf" 10 | programs.git.settings.user.name = "John Ericson"; 11 | 12 | # Need to override on work machines 13 | programs.git.settings.user.email = lib.mkDefault "git@JohnEricson.me"; 14 | 15 | programs.git.iniContent = { 16 | "push" = { 17 | default = "simple"; 18 | }; 19 | "merge" = { 20 | conflictstyle = "diff3"; 21 | }; 22 | "rerere" = { 23 | enabled = true; 24 | }; 25 | "url \"ssh://git@gist.github.com\"" = { 26 | insteadOf = git://gist.github.com; 27 | "insteadOf " = https://gist.github.com; 28 | "insteadOf " = http://gist.github.com; 29 | }; 30 | "url \"ssh://git@github.com\"" = { 31 | insteadOf = git://github.com; 32 | "insteadOf " = https://github.com; 33 | "insteadOf " = http://github.com; 34 | }; 35 | "url \"ssh://git@gitlab.\"" = { 36 | insteadOf = git://gitlab.; 37 | "insteadOf " = https://gitlab.; 38 | "insteadOf " = http://gitlab.; 39 | }; 40 | "url \"ssh://git@bitbucket.com\"" = { 41 | insteadOf = git://bitbucket.com; 42 | "insteadOf " = https://bitbucket.com; 43 | "insteadOf " = http://bitbucket.com; 44 | }; 45 | "sendemail" = { 46 | smtpEncryption = "tls"; 47 | smtpServer = "smtp.fastmail.com"; 48 | smtpUser = "mail@JohnEricson.me"; 49 | smtpServerPort = 587; 50 | }; 51 | }; 52 | programs.git.package = pkgs.gitFull.override { guiSupport = true; }; 53 | } 54 | -------------------------------------------------------------------------------- /hosts/jcericson-2025-nixos/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "rpool/root"; 18 | fsType = "zfs"; 19 | }; 20 | 21 | fileSystems."/nix" = 22 | { device = "rpool/nix"; 23 | fsType = "zfs"; 24 | }; 25 | 26 | fileSystems."/home" = 27 | { device = "rpool/home"; 28 | fsType = "zfs"; 29 | }; 30 | 31 | fileSystems."/boot" = 32 | { device = "/dev/disk/by-uuid/DE1F-4474"; 33 | fsType = "vfat"; 34 | }; 35 | 36 | swapDevices = [ ]; 37 | 38 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 39 | # (the default) this is the recommended approach. When using systemd-networkd it's 40 | # still possible to use this option, but it's recommended to use it in conjunction 41 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 42 | networking.useDHCP = lib.mkDefault true; 43 | # networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true; 44 | 45 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 46 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 47 | } 48 | -------------------------------------------------------------------------------- /system/graphical/common.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | nixpkgs.config.firefox = { 5 | #enableGnomeExtensions = true; 6 | #enableGoogleTalkPlugin = true; 7 | enableAdobeFlash = true; 8 | }; 9 | 10 | security.rtkit.enable = true; # for pipewire 11 | 12 | services.pipewire = { 13 | enable = true; 14 | alsa.enable = true; 15 | alsa.support32Bit = true; 16 | pulse.enable = true; 17 | jack.enable = true; 18 | 19 | # use the example session manager (no others are packaged yet so this is enabled by default, 20 | # no need to redefine it in your config for now) 21 | #media-session.enable = true; 22 | }; 23 | 24 | hardware = { 25 | bluetooth.enable = true; 26 | graphics.enable = true; 27 | }; 28 | 29 | programs.dconf.enable = true; 30 | 31 | services.hardware.bolt.enable = true; 32 | 33 | services.upower.enable = true; 34 | 35 | # No acidental shutdowns. 36 | 37 | # These are now the default 38 | # services.logind.lidSwitch = "suspend"; 39 | # services.logind.lidSwitchDocked = "ignore"; 40 | # services.logind.lidSwitchExternalPower = "suspend"; 41 | 42 | services.logind.settings.Login.HandlePowerKey = "suspend"; 43 | 44 | # locks X and text vtys. 45 | services.physlock.enable = true; 46 | services.physlock.allowAnyUser = true; 47 | 48 | # Media Keys 49 | services.actkbd.bindings = [ 50 | { keys = [ 224 ]; events = [ "key" "rep" ]; command = "${pkgs.light}/bin/light -U 4"; } 51 | { keys = [ 225 ]; events = [ "key" "rep" ]; command = "${pkgs.light}/bin/light -A 4"; } 52 | { keys = [ 229 ]; events = [ "key" "rep" ]; command = "${pkgs.kbdlight}/bin/kbdlight down"; } 53 | { keys = [ 230 ]; events = [ "key" "rep" ]; command = "${pkgs.kbdlight}/bin/kbdlight up"; } 54 | ]; 55 | } 56 | -------------------------------------------------------------------------------- /hosts/jcericson-2023-nixos/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-amd" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "rpool/root"; 18 | fsType = "zfs"; 19 | }; 20 | 21 | fileSystems."/nix" = 22 | { device = "rpool/nix"; 23 | fsType = "zfs"; 24 | }; 25 | 26 | fileSystems."/home" = 27 | { device = "rpool/home"; 28 | fsType = "zfs"; 29 | }; 30 | 31 | fileSystems."/boot" = 32 | { device = "/dev/disk/by-uuid/566B-3088"; 33 | fsType = "vfat"; 34 | }; 35 | 36 | swapDevices = [ ]; 37 | 38 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 39 | # (the default) this is the recommended approach. When using systemd-networkd it's 40 | # still possible to use this option, but it's recommended to use it in conjunction 41 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 42 | networking.useDHCP = lib.mkDefault true; 43 | # networking.interfaces.enp22s0f3u2.useDHCP = lib.mkDefault true; 44 | # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; 45 | # networking.interfaces.wlp11s0.useDHCP = lib.mkDefault true; 46 | 47 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 48 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 49 | } 50 | -------------------------------------------------------------------------------- /hosts/jcericson-2023-nixos/home-assistant.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | 3 | let 4 | server_port = config.services.home-assistant.config.http.server_port; 5 | host = "home.johnericson.me"; 6 | in 7 | 8 | { 9 | services.home-assistant = { 10 | enable = true; 11 | extraComponents = [ 12 | # Components required to complete the onboarding 13 | "esphome" 14 | "met" 15 | "radio_browser" 16 | 17 | # For My Window AC 18 | "matter" 19 | ]; 20 | config = { 21 | # Includes dependencies for a basic setup 22 | # https://www.home-assistant.io/integrations/default_config/ 23 | default_config = {}; 24 | http = { 25 | server_host = "::1"; 26 | trusted_proxies = [ "::1" ]; 27 | use_x_forwarded_for = true; 28 | }; 29 | }; 30 | }; 31 | 32 | services.avahi = { 33 | nssmdns4 = true; 34 | enable = true; 35 | ipv4 = true; 36 | ipv6 = true; 37 | publish = { 38 | enable = true; 39 | addresses = true; 40 | workstation = true; 41 | }; 42 | }; 43 | 44 | services.matter-server.enable = true; 45 | 46 | security.acme = { 47 | acceptTerms = true; 48 | defaults.email = "webmaster@JohnEricson.me"; 49 | }; 50 | 51 | services.nginx = { 52 | enable = true; 53 | recommendedProxySettings = true; 54 | virtualHosts.${host} = { 55 | forceSSL = true; 56 | enableACME = true; 57 | extraConfig = '' 58 | proxy_buffering off; 59 | ''; 60 | locations."/" = { 61 | proxyPass = "http://[::1]:${toString server_port}"; 62 | proxyWebsockets = true; 63 | }; 64 | }; 65 | }; 66 | 67 | networking.firewall.allowedTCPPorts = [ 68 | # Only needs to be open when initialzing with Let's Encrypt 69 | # config.services.nginx.defaultHTTPListenPort 70 | config.services.nginx.defaultSSLListenPort 71 | ]; 72 | } 73 | -------------------------------------------------------------------------------- /user/nixpkgs/config.nix: -------------------------------------------------------------------------------- 1 | let 2 | projectsRoot = "/home/jcericson/Code/git/"; 3 | 4 | clashProjects = self: super: let 5 | clashRoot = projectsRoot + "clash/"; 6 | in { 7 | wl-pprint-text-class = self.callPackage (clashRoot + "wl-pprint-text-class") {}; 8 | 9 | clash-lib = self.callPackage (clashRoot + "clash2/clash-lib") {}; 10 | clash-vhdl = self.callPackage (clashRoot + "clash2/clash-vhdl") {}; 11 | clash-systemverilog = self.callPackage (clashRoot + "clash2/clash-verilog") {}; 12 | clash-ghc = self.callPackage (clashRoot + "clash2/clash-ghc") {}; 13 | 14 | verilog-ast = self.callPackage (clashRoot + "verilog/ast") {}; 15 | verilog-pretty-print = self.callPackage (clashRoot + "verilog/pretty-print") {}; 16 | }; 17 | 18 | cncProjects = self: super: let 19 | cncRoot = projectsRoot + "cnc/"; 20 | in { 21 | petool = self.callPackage (cncRoot + "petool") {}; 22 | engine1 = self.callPackage (cncRoot + "engine1") {}; 23 | engine2 = self.callPackage (cncRoot + "engine2") {}; 24 | dune2k = self.callPackage (cncRoot + "dune2k") {}; 25 | }; 26 | in 27 | { 28 | allowUnfree = true; 29 | 30 | android_sdk.accept_license = true; 31 | 32 | packageOverrides = super: let self = super.pkgs; in { 33 | unison_2_40 = self.lib.overrideDerivation self.unison (old: rec { 34 | name = "unison-2.40.102"; 35 | src = self.fetchurl { 36 | url = "http://www.seas.upenn.edu/~bcpierce/unison/download/releases/stable/${name}.tar.gz"; 37 | sha256 = "0m78q5vnsric1virvkmxxx32ipaq0cnj0kbirdbg36395gq94jix"; 38 | }; 39 | }); 40 | 41 | haskellPackages = super.haskellPackages.override { 42 | overrides = self: super: { 43 | } 44 | #// (clashProjects self super) 45 | ; 46 | }; 47 | } 48 | #// (cncProjects self super) 49 | ; 50 | } 51 | -------------------------------------------------------------------------------- /user/.zshrc: -------------------------------------------------------------------------------- 1 | # Set up the prompt 2 | 3 | autoload -Uz promptinit 4 | promptinit 5 | prompt adam1 6 | 7 | # Load personal environment settings. 8 | source $HOME/.environment 9 | 10 | # Use emacs keybindings even if our EDITOR is set to vi 11 | bindkey -e 12 | 13 | setopt HIST_IGNORE_ALL_DUPS # don't add multiple 'cd ..', etc in a row? 14 | setopt HIST_IGNORE_SPACE # initial space makes private 15 | setopt HIST_EXPIRE_DUPS_FIRST # save unique hist entries longer 16 | setopt HIST_VERIFY # edit recalled history before running 17 | setopt SHARE_HISTORY # Reloads the history whenever you use it 18 | setopt INC_APPEND_HISTORY # add commands to .history immediately 19 | setopt EXTENDED_HISTORY # save timestamp on history entries 20 | 21 | # Keep 1000 lines of history within the shell and save it to ~/.zsh_history: 22 | HISTSIZE=10000000 23 | SAVEHIST=10000000 24 | HISTFILE=~/.zsh_history 25 | 26 | # Use modern completion system 27 | autoload -Uz compinit 28 | compinit 29 | 30 | zstyle ':completion:*' auto-description 'specify: %d' 31 | zstyle ':completion:*' completer _expand _complete _correct _approximate 32 | zstyle ':completion:*' format 'Completing %d' 33 | zstyle ':completion:*' group-name '' 34 | zstyle ':completion:*' menu select=2 35 | eval "$(dircolors -b)" 36 | zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} 37 | zstyle ':completion:*' list-colors '' 38 | zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s 39 | zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' 40 | zstyle ':completion:*' menu select=long 41 | zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s 42 | zstyle ':completion:*' use-compctl false 43 | zstyle ':completion:*' verbose true 44 | 45 | zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' 46 | zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' 47 | -------------------------------------------------------------------------------- /hosts/jcericson-2016-nixos/default.nix: -------------------------------------------------------------------------------- 1 | { config, options, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../system/common.nix 6 | ../../system/graphical/wayland.nix 7 | ../../system/libinput.nix 8 | ../../system/video-games.nix 9 | ./hardware-configuration.nix # Include the results of the hardware scan. 10 | (import ../../dep/nixos-hardware/thunk.nix + "/dell/xps/15-9550/nvidia") 11 | ]; 12 | 13 | networking = { 14 | hostName = "jcericson-2016-nixos"; # Define your hostname. 15 | 16 | hostId = "a22fc14c"; 17 | }; 18 | 19 | # The luk partitions isn't autodetected 20 | boot.initrd.luks.devices."luksroot" = { 21 | device = "/dev/disk/by-uuid/ae41d6e7-5a97-4c3e-9f63-71f297bdc0fe"; 22 | preLVM = true; 23 | allowDiscards = true; 24 | }; 25 | 26 | nix.settings.max-jobs = 2; 27 | nix.settings.build-cores = 8; 28 | 29 | # This option defines the first version of NixOS you have installed on this particular machine, 30 | # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 31 | # 32 | # Most users should NEVER change this value after the initial install, for any reason, 33 | # even if you've upgraded your system to a new NixOS release. 34 | # 35 | # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, 36 | # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how 37 | # to actually do that. 38 | # 39 | # This value being lower than the current NixOS release does NOT mean your system is 40 | # out of date, out of support, or vulnerable. 41 | # 42 | # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, 43 | # and migrated your data accordingly. 44 | # 45 | # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . 46 | system.stateVersion = "16.03"; 47 | } 48 | -------------------------------------------------------------------------------- /hosts/jcericson-2006-nixos/boot-and-fs.nix: -------------------------------------------------------------------------------- 1 | # Everything releated to booting and filesystems 2 | { config, pkgs, ... }: 3 | 4 | { 5 | imports = 6 | [ 7 | ]; 8 | 9 | boot.initrd.availableKernelModules = [ 10 | "uhci_hcd" 11 | "ehci_pci" 12 | "ata_piix" 13 | "firewire_ohci" 14 | "usb_storage" 15 | "sd_mod" 16 | "sr_mod" 17 | ]; 18 | 19 | boot.initrd.kernelModules = [ 20 | # Specify all kernel modules that are necessary for mounting the root 21 | # filesystem. 22 | "btrfs" # "ata_piix" 23 | ]; 24 | 25 | boot.loader.grub = { 26 | enable = true; # Enable Grub 27 | version = 2; # Use the GRUB 2 boot loader 28 | device = "/dev/sda"; # Define on which hard drive you want to install Grub. 29 | 30 | extraEntries = '' 31 | 32 | set gfxmode=1680x1050,1400x1050,640x480 33 | 34 | menuentry 'Windows Vista (loader)' --class windows --class os { 35 | insmod part_msdos 36 | insmod ntfs 37 | set root='hd0,msdos1' 38 | # parttool $ {root} hidden- 39 | chainloader +1 40 | } 41 | ''; 42 | }; 43 | 44 | # Add filesystem entries for each partition that you want to see 45 | # mounted at boot time. This should include at least the root 46 | # filesystem. 47 | 48 | fileSystems."/" = { # where you want to mount the device 49 | device = "/dev/disk/by-label/nixos"; # the device 50 | fsType = "btrfs"; # the type of the partition 51 | # options = "data=journal"; 52 | }; 53 | 54 | fileSystems."/winhome/" = { # where you want to mount the device 55 | device = "/dev/disk/by-label/home"; # the device 56 | fsType = "ntfs"; # the type of the partition 57 | # options = "data=journal"; 58 | }; 59 | 60 | 61 | # List swap partitions activated at boot time. 62 | swapDevices = [ 63 | { device = "/dev/disk/by-label/swap"; } 64 | ]; 65 | } 66 | -------------------------------------------------------------------------------- /hosts/jcericson-2025-nixos/default.nix: -------------------------------------------------------------------------------- 1 | { config, options, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../system/common.nix 6 | ../../system/graphical/wayland.nix 7 | ../../system/libinput.nix 8 | ../../system/video-games.nix 9 | ./hardware-configuration.nix # Include the results of the hardware scan. 10 | (import ../../dep/nixos-hardware/thunk.nix + "/framework/13-inch/12th-gen-intel") 11 | ]; 12 | 13 | boot.loader.systemd-boot.enable = true; 14 | boot.loader.efi.canTouchEfiVariables = true; 15 | 16 | networking = { 17 | hostName = "jcericson-2025-nixos"; # Define your hostname. 18 | 19 | hostId = "a22fc14c"; 20 | }; 21 | 22 | # The luk partitions isn't autodetected 23 | boot.initrd.luks.devices."luksroot" = { 24 | device = "/dev/disk/by-uuid/ae41d6e7-5a97-4c3e-9f63-71f297bdc0fe"; 25 | preLVM = true; 26 | allowDiscards = true; 27 | }; 28 | 29 | nix.settings.max-jobs = 3; 30 | nix.settings.build-cores = 7; 31 | 32 | # This option defines the first version of NixOS you have installed on this particular machine, 33 | # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 34 | # 35 | # Most users should NEVER change this value after the initial install, for any reason, 36 | # even if you've upgraded your system to a new NixOS release. 37 | # 38 | # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, 39 | # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how 40 | # to actually do that. 41 | # 42 | # This value being lower than the current NixOS release does NOT mean your system is 43 | # out of date, out of support, or vulnerable. 44 | # 45 | # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, 46 | # and migrated your data accordingly. 47 | # 48 | # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . 49 | system.stateVersion = "16.03"; 50 | } 51 | -------------------------------------------------------------------------------- /hosts/apple-macbook-pro-10-1/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../system/common.nix 6 | ../../system/graphical/x.nix 7 | ../../system/libinput.nix 8 | ../../system/yubikey.nix 9 | ../../../hardware-configuration.nix # Include the results of the hardware scan. 10 | (import ../../dep/nixos-hardware/thunk.nix + "/apple/macbook-pro/10-1") 11 | ]; 12 | 13 | # For Broadcom chip 14 | boot.kernelPackages = pkgs.linuxPackages_latest; 15 | 16 | # Supposed to get PTYs back, but didn't 17 | #boot.blacklistedKernelModules = [ "i915" ]; 18 | 19 | networking.hostName = "John-Galois-NixOS"; # Define your hostname. 20 | 21 | # Hardware config generater currently ignores mountpoints using FUSE 22 | fileSystems."/exchange" = { 23 | device = "/dev/disk/by-partlabel/exchange"; 24 | fsType = "exfat"; 25 | }; 26 | 27 | # No more accidental shutdowns! 28 | services.logind.extraConfig = '' 29 | HandlePowerKey=ignore 30 | ''; 31 | 32 | # This option defines the first version of NixOS you have installed on this particular machine, 33 | # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 34 | # 35 | # Most users should NEVER change this value after the initial install, for any reason, 36 | # even if you've upgraded your system to a new NixOS release. 37 | # 38 | # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, 39 | # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how 40 | # to actually do that. 41 | # 42 | # This value being lower than the current NixOS release does NOT mean your system is 43 | # out of date, out of support, or vulnerable. 44 | # 45 | # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, 46 | # and migrated your data accordingly. 47 | # 48 | # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . 49 | system.stateVersion = "17.03"; 50 | } 51 | -------------------------------------------------------------------------------- /user/emacs/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | programs.emacs.enable = true; 5 | programs.emacs.extraPackages = epkgs: with epkgs; [ 6 | #agda2-mode 7 | 8 | (trivialBuild { 9 | pname = "nix-docbook-mode"; 10 | version = "1970-01-01"; 11 | src = let 12 | schemas = pkgs.writeText "schemas.xml" '' 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ''; 21 | in pkgs.writeText "default.el" '' 22 | (eval-after-load 'rng-loc 23 | '(add-to-list 'rng-schema-locating-files "${schemas}")) 24 | (global-set-key (kbd "") 'nxml-complete) 25 | ''; 26 | }) 27 | 28 | caml 29 | tuareg 30 | 31 | haskell-mode 32 | #structured-haskell-mode 33 | 34 | ott-mode 35 | 36 | idris-mode 37 | nix-mode 38 | markdown-mode 39 | #rust-mode 40 | 41 | #scala-mode 42 | #sbt-mode 43 | 44 | dash 45 | #hexrgb 46 | #oneonone 47 | 48 | #ace-jump-mode 49 | #exec-path-from-shell 50 | flycheck 51 | #flycheck-pos-tip 52 | #gnus 53 | pkgs.aspell # not emacs pkg 54 | pkgs.aspellDicts.en # not emacs pkg 55 | #magit 56 | #projectile 57 | #switch-window 58 | #smart-mode-line 59 | #undo-tree 60 | #use-package 61 | ]; 62 | #home.sessionVariables.VISUAL = "emacsclient --create-frame --tty"; 63 | 64 | #home.file.".spacemacs".source = ./.spacemacs; 65 | home.file.".emacs.d/spacemacs".source = import ../../dep/spacemacs/thunk.nix; 66 | home.file.".emacs.d/init.el".source = ./init.el; 67 | 68 | services.emacs = { 69 | enable = pkgs.stdenv.isLinux; 70 | socketActivation.enable = pkgs.stdenv.isLinux; 71 | }; 72 | } 73 | -------------------------------------------------------------------------------- /user/graphical/wayland.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, config, options, ... }: 2 | 3 | { 4 | imports = [ 5 | ./common.nix 6 | ]; 7 | 8 | wayland.windowManager.sway = { 9 | enable = true; 10 | wrapperFeatures.gtk = true; # so that gtk works properly 11 | config = { 12 | terminal = "alacritty"; 13 | menu = "sirula"; 14 | 15 | up = "i"; 16 | down = "k"; 17 | left = "j"; 18 | right = "l"; 19 | 20 | modifier = "Mod4"; 21 | 22 | output = { 23 | "eDP-1" = { 24 | scale = "1"; 25 | }; 26 | }; 27 | 28 | floating.criteria = [ 29 | { 30 | "title" = "Firefox — Sharing Indicator"; 31 | } 32 | ]; 33 | 34 | window.commands = [ 35 | { 36 | criteria = { 37 | "title" = "Firefox — Sharing Indicator"; 38 | }; 39 | command = "nofocus"; 40 | } 41 | ]; 42 | 43 | keybindings = let 44 | cfg = config.wayland.windowManager.sway; 45 | in lib.mkOptionDefault { 46 | "${cfg.config.modifier}+Shift+Return" = "exec ${cfg.config.terminal}"; 47 | "${cfg.config.modifier}+Shift+c" = "kill"; 48 | "${cfg.config.modifier}+p" = "exec ${cfg.config.menu}"; 49 | "${cfg.config.modifier}+q" = "reload"; 50 | "${cfg.config.modifier}+a" = "exec autorandr -c"; 51 | "${cfg.config.modifier}+s" = "exec systemctl suspend"; 52 | "${cfg.config.modifier}+d" = "exec physlock"; 53 | "${cfg.config.modifier}+f" = "exec emacsclient --create-frame"; 54 | "${cfg.config.modifier}+Shift+q" = 55 | "exec swaynag -t warning -m 'Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; 56 | "${cfg.config.modifier}+0" = "workspace number 10"; 57 | "${cfg.config.modifier}+Shift+0" = 58 | "move container to workspace number 10"; 59 | }; 60 | }; 61 | systemd.enable = true; 62 | }; 63 | 64 | xdg.configFile."sirula/config.toml".source = (pkgs.formats.toml {}).generate "sirula-config" { 65 | # Switch to left side 66 | anchor_left = true; 67 | anchor_right = false; 68 | }; 69 | 70 | home.sessionVariables = { 71 | NIXOS_OZONE_WL = "1"; 72 | MOZ_ENABLE_WAYLAND = "1"; 73 | }; 74 | 75 | home.packages = with pkgs; [ 76 | #swaylock 77 | #iswayidle 78 | wl-clipboard 79 | mako # notification daemon 80 | alacritty # Alacritty is the default terminal in the config 81 | wofi 82 | sirula # Launcher 83 | niri # Considering using instead of Sway 84 | ]; 85 | 86 | services.gammastep = import ./redshift.nix; 87 | } 88 | -------------------------------------------------------------------------------- /hosts/jcericson-2023-nixos/default.nix: -------------------------------------------------------------------------------- 1 | { config, options, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../system/common.nix 6 | ../../system/graphical/wayland.nix 7 | ../../system/libinput.nix 8 | ../../system/libvirt.nix 9 | ../../system/video-games.nix 10 | ./hardware-configuration.nix # Include the results of the hardware scan. 11 | ./home-assistant.nix 12 | ]; 13 | 14 | boot.loader.systemd-boot.enable = true; 15 | boot.loader.efi.canTouchEfiVariables = true; 16 | 17 | networking = { 18 | hostName = "jcericson-2023-nixos"; # Define your hostname. 19 | hostId = "2a5d5725"; 20 | 21 | #interfaces.wlp2s0.useDHCP = true; 22 | #interfaces.enp0s20f0u4u2.useDHCP = true; 23 | }; 24 | 25 | # The luk partitions isn't autodetected 26 | boot.initrd.luks.devices."luksroot" = { 27 | device = "/dev/disk/by-partuuid/86b51f08-155e-43c3-91c8-c18b63e3d983"; 28 | preLVM = true; 29 | allowDiscards = true; 30 | }; 31 | 32 | #virtualisation.virtualbox.host.enable = true; 33 | #users.groups.vboxusers.members = [ "jcericson" ]; 34 | #virtualisation.docker.enable = true; 35 | #users.groups.docker.members = [ "jcericson" ]; 36 | 37 | #networking.firewall.allowedUDPPortRanges = [ 38 | # { from = 6112; to = 6119; } 39 | #]; 40 | 41 | programs.adb.enable = true; 42 | 43 | # This option defines the first version of NixOS you have installed on this particular machine, 44 | # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 45 | # 46 | # Most users should NEVER change this value after the initial install, for any reason, 47 | # even if you've upgraded your system to a new NixOS release. 48 | # 49 | # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, 50 | # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how 51 | # to actually do that. 52 | # 53 | # This value being lower than the current NixOS release does NOT mean your system is 54 | # out of date, out of support, or vulnerable. 55 | # 56 | # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, 57 | # and migrated your data accordingly. 58 | # 59 | # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . 60 | system.stateVersion = "20.09"; 61 | 62 | # Unfortunately needed to get drivers 63 | services.xserver = { 64 | enable = true; 65 | displayManager.gdm.enable = false; 66 | displayManager.xpra.enable = false; 67 | displayManager.sx.enable = false; 68 | displayManager.startx.enable = false; 69 | }; 70 | services.displayManager.sddm.enable = false; 71 | systemd.services.display-manager.enable = false; 72 | } 73 | -------------------------------------------------------------------------------- /hosts/jcericson-obsidian-2018/default.nix: -------------------------------------------------------------------------------- 1 | { config, options, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../system/common.nix 6 | ../../system/graphical/wayland.nix 7 | ../../system/libinput.nix 8 | ../../system/video-games.nix 9 | ./hardware-configuration.nix # Include the results of the hardware scan. 10 | (import ../../dep/nixos-hardware/thunk.nix + "/dell/xps/15-9550/nvidia") 11 | ]; 12 | 13 | networking = { 14 | hostName = "jcericson-obsidian-2018"; # Define your hostname. 15 | hostId = "2a5d5725"; 16 | 17 | #interfaces.wlp2s0.useDHCP = true; 18 | #interfaces.enp0s20f0u4u2.useDHCP = true; 19 | }; 20 | 21 | # The luk partitions isn't autodetected 22 | boot.initrd.luks.devices."luksroot" = { 23 | device = "/dev/disk/by-partuuid/13608ae1-f65b-449b-8e6e-67e2dc7b2ffd"; 24 | preLVM = true; 25 | allowDiscards = true; 26 | }; 27 | 28 | # Avoid log spam after resume. See 29 | # https://bugzilla.kernel.org/show_bug.cgi?id=201857 for details. 30 | boot.blacklistedKernelModules = [ "i2c_hid" ]; 31 | 32 | virtualisation.virtualbox.host.enable = true; 33 | users.groups.vboxusers.members = [ "jcericson" ]; 34 | ##virtualisation.docker.enable = true; 35 | #users.groups.docker.members = [ "jcericson" ]; 36 | 37 | #networking.firewall.allowedUDPPortRanges = [ 38 | # { from = 6112; to = 6119; } 39 | #]; 40 | 41 | programs.adb.enable = true; 42 | 43 | # This option defines the first version of NixOS you have installed on this particular machine, 44 | # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 45 | # 46 | # Most users should NEVER change this value after the initial install, for any reason, 47 | # even if you've upgraded your system to a new NixOS release. 48 | # 49 | # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, 50 | # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how 51 | # to actually do that. 52 | # 53 | # This value being lower than the current NixOS release does NOT mean your system is 54 | # out of date, out of support, or vulnerable. 55 | # 56 | # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, 57 | # and migrated your data accordingly. 58 | # 59 | # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . 60 | system.stateVersion = "18.09"; 61 | 62 | # hardware.nvidia.powerManagement.enable = true; 63 | # hardware.nvidia.powerManagement.finegrained = true; 64 | 65 | # Unfortunately needed to get drivers 66 | services.xserver = { 67 | enable = true; 68 | displayManager.gdm.enable = false; 69 | displayManager.sddm.enable = false; 70 | displayManager.xpra.enable = false; 71 | displayManager.sx.enable = false; 72 | displayManager.startx.enable = false; 73 | }; 74 | systemd.services.display-manager.enable = false; 75 | } 76 | -------------------------------------------------------------------------------- /user/graphical/xmonad.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | {-# LANGUAGE FlexibleContexts #-} 3 | import qualified Data.Map as M 4 | -- import System.Taffybar.Support.PagerHints (pagerHints) 5 | import XMonad 6 | import XMonad.Config.Gnome 7 | import XMonad.Hooks.EwmhDesktops (ewmh) 8 | import XMonad.Hooks.ManageDocks 9 | import XMonad.Hooks.ManageDocks 10 | import XMonad.Hooks.ManageHelpers 11 | import XMonad.Layout.LayoutModifier 12 | import XMonad.Layout.NoBorders 13 | import XMonad.Layout.ThreeColumns 14 | import XMonad.Util.EZConfig (additionalKeysP) 15 | import qualified XMonad.StackSet as W 16 | 17 | myManageHook = manageDocks <+> composeAll 18 | [ (className =? "Gnome-panel" <&&> title =? "Run Application") --> doCenterFloat 19 | --, (className =? "Gcr-prompter") --> doCenterFloat 20 | --, (className =? "Xfce4-notifyd" --> doIgnore) 21 | , isFullscreen --> doFullFloat 22 | ] 23 | 24 | myWorkspaces = 25 | [ ("1", xK_1) 26 | , ("2", xK_2) 27 | , ("3", xK_3) 28 | , ("4", xK_4) 29 | , ("5", xK_5) 30 | , ("6", xK_6) 31 | , ("7", xK_7) 32 | , ("8", xK_8) 33 | , ("9", xK_9) 34 | , ("0", xK_0) 35 | ] 36 | 37 | myKeys (conf@(XConfig {XMonad.modMask = modm})) = M.fromList $ 38 | [ ((modm, xK_p), spawn "dmenu_run") 39 | , ((modm, xK_F12), sendMessage ToggleStruts) 40 | 41 | , ((modm, xK_a), spawn "autorandr -c") 42 | , ((modm, xK_s), spawn "systemctl suspend") 43 | , ((modm, xK_d), spawn "physlock") 44 | , ((modm, xK_f), spawn "emacsclient --create-frame") 45 | ] 46 | ++ 47 | [ ((m .|. modm, k), windows $ f i) -- Replace 'mod1Mask' with your mod key of choice. 48 | | (i, k) <- myWorkspaces 49 | , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)] 50 | ] 51 | 52 | main :: IO () 53 | main = xmonad 54 | -- docks allows xmonad to handle taffybar 55 | $ docks 56 | -- ewmh allows taffybar access to the state of xmonad/x11 57 | $ ewmh 58 | -- -- pagerHints supplies additional state that is not supplied by ewmh 59 | -- $ pagerHints 60 | $ extend defaultConfig -- gnomeConfig 61 | where extend :: forall w 62 | . LayoutClass w Window 63 | => XConfig w 64 | -> XConfig (ModifiedLayout SmartBorder (Choose ThreeCol (Choose ThreeCol w))) 65 | extend self = self 66 | { modMask = mod4Mask 67 | , workspaces = fst <$> myWorkspaces 68 | , terminal = "alacritty" 69 | , layoutHook = smartBorders $ ThreeColMid 1 (3/100) (1/2) ||| ThreeCol 1 (3/100) (1/2) ||| layoutHook self 70 | , keys = myKeys <+> keys self 71 | --, borderWidth = 2 72 | --, normalBorderColor = "#cccccc" 73 | --, focusedBorderColor = "#3300ff" 74 | , manageHook = myManageHook <+> manageHook self 75 | } 76 | -------------------------------------------------------------------------------- /user/helix/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | let 4 | normal-keys = type: { 5 | space = { 6 | c = "toggle_comments"; 7 | l.c = ":lsp-workspace-command"; 8 | l.r = ":lsp-restart"; 9 | l.s = ":lsp-stop"; 10 | m.a = ":reload-all"; 11 | m.c = ":config-reload"; 12 | #m.f = ":yank-filepath-relative"; 13 | #m.C-f = ":clipboard-yank-filepath-relative"; 14 | m.r = ":reload"; 15 | q.a = ":quit-all"; 16 | q.C-a = ":quit-all!"; 17 | q.q = ":quit"; 18 | q.C-q = ":quit!"; 19 | w.d = "wclose"; 20 | space = "command_palette"; 21 | ";" = "command_mode"; 22 | }; 23 | 24 | # Put old 'i' here 25 | f = "insert_mode"; 26 | 27 | # Put old 'f' here 28 | h = "find_next_char"; 29 | 30 | # 2nd player arrows 31 | i = "${type}_line_up"; 32 | k = "${type}_line_down"; 33 | j = "${type}_char_left"; 34 | l = "${type}_char_right"; 35 | 36 | C-c = "keep_primary_selection"; 37 | "," = "toggle_comments"; 38 | }; 39 | 40 | # Common User Access 41 | # https://en.wikipedia.org/wiki/IBM_Common_User_Access 42 | cua = type: { 43 | "up" = "${type}_line_up"; 44 | "down" = "${type}_line_down"; 45 | "left" = "${type}_char_left"; 46 | "right" = "${type}_char_right"; 47 | "C-up" = "goto_prev_paragraph"; 48 | "C-down" = "goto_next_paragraph"; 49 | "C-left" = "${type}_prev_word_start"; 50 | "C-right" = "${type}_next_word_start"; 51 | }; 52 | 53 | in { 54 | programs.helix.enable = true; 55 | programs.helix.defaultEditor = true; 56 | 57 | #programs.helix.package = pkgs.helix.overrideAttrs { 58 | # src = source.helix; 59 | #}; 60 | 61 | programs.helix.settings = { 62 | theme = "github_dark"; 63 | 64 | editor.color-modes = true; 65 | editor.idle-timeout = 100; 66 | editor.lsp.display-messages = true; 67 | editor.soft-wrap.enable = true; 68 | editor.true-color = true; 69 | #editor.whitespace.render = "trailing"; 70 | 71 | editor.cursor-shape = { 72 | insert = "bar"; 73 | select = "bar"; 74 | }; 75 | 76 | keys.normal = normal-keys "move" 77 | // cua "move" 78 | // lib.mapAttrs' 79 | (name: value: lib.nameValuePair ("S-" + name) value) 80 | (cua "extend"); 81 | keys.select = normal-keys "extend" 82 | // cua "extend"; 83 | 84 | keys.insert = { 85 | C-c = "normal_mode"; 86 | }; 87 | }; 88 | 89 | programs.helix.languages = { 90 | language-server = { 91 | pyright = { 92 | command = "pyright-langserver"; 93 | args = [ "--stdio" ]; 94 | config = {}; 95 | }; 96 | }; 97 | language = [ 98 | { 99 | name = "python"; 100 | language-servers = ["pyright"]; 101 | } 102 | ]; 103 | }; 104 | 105 | home.packages = [ 106 | pkgs.nil 107 | pkgs.nodePackages.bash-language-server 108 | #pkgs.nodePackages.dockerfile-language-server-nodejs 109 | pkgs.nodePackages.typescript-language-server 110 | pkgs.pyright 111 | ]; 112 | } 113 | -------------------------------------------------------------------------------- /system/common.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | # Moved out cause it is big 6 | ./pubkeys.nix 7 | 8 | # Portable nice to haves 9 | ./packages.nix 10 | ]; 11 | 12 | # Faster, nicer input for LUKS 13 | boot.initrd.systemd.enable = true; 14 | 15 | # Allow unfree 16 | nixpkgs.config.allowUnfree = true; 17 | 18 | # Enable firmware update manager service 19 | services.fwupd.enable = true; 20 | 21 | networking = { 22 | # Pick only one of the below networking options. 23 | # wireless.enable = true; # Enables wireless support via wpa_supplicant. 24 | networkmanager.enable = true; # Easiest to use and most distros use this by default. 25 | }; 26 | 27 | # Set your time zone. 28 | time.timeZone = "America/New_York"; 29 | 30 | # Configure network proxy if necessary 31 | # networking.proxy.default = "http://user:password@proxy:port/"; 32 | # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 33 | 34 | # Select internationalisation properties. 35 | i18n.defaultLocale = "en_US.UTF-8"; 36 | # Don't set, let the "hidpi" module do this 37 | #console = { 38 | # font = "Lat2-Terminus16"; 39 | # keyMap = "us"; 40 | # useXkbConfig = true; # use xkb.options in tty. 41 | #}; 42 | 43 | # Extra Fonts 44 | fonts = { 45 | #enableFontDir = true; 46 | #enableGhostscriptFonts = true; 47 | packages = with pkgs; [ 48 | corefonts # Micrsoft free fonts 49 | inconsolata # monospaced 50 | ubuntu-classic # Ubuntu fonts 51 | unifont # some international languages 52 | source-code-pro 53 | 54 | source-han-sans # Adobe Source Han Sans 55 | ]; 56 | }; 57 | 58 | # Some programs need SUID wrappers, can be configured further or are 59 | # started in user sessions. 60 | # programs.mtr.enable = true; 61 | # programs.gnupg.agent = { 62 | # enable = true; 63 | # enableSSHSupport = true; 64 | # }; 65 | # programs.ssh.startAgent = true; 66 | 67 | # List services that you want to enable: 68 | 69 | # Enable the OpenSSH daemon. 70 | services.openssh = { 71 | enable = true; 72 | settings = { 73 | X11Forwarding = true; 74 | PermitRootLogin = "no"; 75 | PasswordAuthentication = false; 76 | }; 77 | }; 78 | 79 | # Open ports in the firewall. 80 | # networking.firewall.allowedTCPPorts = [ ... ]; 81 | # networking.firewall.allowedUDPPorts = [ ... ]; 82 | # Or disable the firewall altogether. 83 | # networking.firewall.enable = false; 84 | 85 | # Enable CUPS to print documents. 86 | services.printing = { 87 | enable = true; 88 | drivers = [ pkgs.gutenprint pkgs.hplip ]; 89 | #clientConf = '' 90 | # ServerName printhost.cs.brown.edu 91 | #''; 92 | }; 93 | 94 | # Extra shells allowed as login shells. Also helps with rysnc, 95 | # unison, etc over SSH 96 | programs.fish.enable = true; 97 | programs.zsh.enable = true; 98 | 99 | # Users 100 | users.defaultUserShell = "/var/run/current-system/sw/bin/fish"; 101 | users.mutableUsers = false; 102 | users.users.root = { 103 | #hashedPassword = null; 104 | hashedPassword = config.users.users.jcericson.hashedPassword; 105 | }; 106 | users.users.jcericson = { 107 | uid = 1000; 108 | createHome = true; 109 | description = "John Cotton Ericson"; 110 | extraGroups = [ 111 | "jcericson" 112 | "networkmanager" 113 | "wheel" 114 | config.services.kubo.group 115 | ]; 116 | # packages = with pkgs; [ 117 | # tree 118 | # ]; 119 | isSystemUser = false; 120 | isNormalUser = true; 121 | useDefaultShell = true; 122 | }; 123 | 124 | services.kubo = { 125 | #package = pkgs.kubo_latest; 126 | enable = true; 127 | settings.Addresses.API = ["/ip4/127.0.0.1/tcp/5001"]; 128 | }; 129 | networking.firewall.allowedTCPPorts = [ 4001 ]; 130 | networking.firewall.allowedUDPPorts = [ 4001 ]; 131 | 132 | # Copy the NixOS configuration file and link it from the resulting system 133 | # (/run/current-system/configuration.nix). This is useful in case you 134 | # accidentally delete configuration.nix. 135 | # system.copySystemConfiguration = true; 136 | } 137 | -------------------------------------------------------------------------------- /user/emacs/init.el: -------------------------------------------------------------------------------- 1 | (require 'package) 2 | ;(require 'agda2) 3 | (require 'tls) 4 | ;(require 'nix-docbook-mode) 5 | 6 | ;;(setq package-archives 7 | ;; '( 8 | ;;; ("geiser" . "http://gnu.mirrors.pair.com/savannah/savannah/geiser/packages/") 9 | ;;; ("haxney" . "http://dl.dropbox.com/u/19422084/elpa-haxney/") 10 | ;;; ("marmalade" . "http://marmalade-repo.org/packages/") 11 | ;; ("melpa" . "http://melpa.milkbox.net/packages/") 12 | ;; ("gnu" . "http://elpa.gnu.org/packages/"))) 13 | ;;;; Refresh the packages descriptions 14 | ;;(package-initialize) 15 | ;;(unless package-archive-contents 16 | ;; (package-refresh-contents)) 17 | ;;;; List of packages to load 18 | ;;(setq package-load-list '(all)) 19 | ;;;; List of packages to install 20 | ;;(mapc (lambda (x) (unless (package-installed-p x) 21 | ;; (package-install x))) 22 | ;; '( 23 | ;; ;fasm-mode 24 | ;; iasm-mode 25 | ;; 26 | ;; haskell-mode 27 | ;; 28 | ;; nix-mode 29 | ;; 30 | ;; rust-mode 31 | ;; 32 | ;; scala-mode 33 | ;; sbt-mode 34 | ;; 35 | ;; tuareg 36 | ;; dirtree 37 | ;; )) 38 | 39 | (setq rust-indent-offset 2) 40 | 41 | (define-key global-map (kbd "RET") 'newline-and-indent) 42 | 43 | (global-set-key [f9] 'count-words) 44 | (global-set-key [f10] 'whitespace-cleanup) 45 | (global-set-key [f11] 'align-regexp) 46 | (global-set-key [f12] 'compile) 47 | 48 | (setq latex-run-command "xelatex") 49 | 50 | (column-number-mode) 51 | 52 | (load-file "~/.emacs.d/rtf-mode.el") 53 | ;;(require 'dirtree) 54 | 55 | 56 | ;; Assembly, Nasm 57 | (autoload 'nasm-mode "~/.emacs.d/nasm-mode.el" "" t) 58 | (add-to-list 'auto-mode-alist '("\\.\\(asm\\|inc\\)$" . nasm-mode)) 59 | (setq nasm-basic-offset 4) 60 | ;(add-to-list 'align-rules-list 61 | ; '(nasm 62 | ; (regexp . "\\(\\S-+\\)") 63 | ; (modes nasm-mode) 64 | ; (tab-stop) 65 | ; (repeat . t) 66 | ; (group . 2))) 67 | 68 | ;; C programming langauge 69 | (setq c-default-style "linux" 70 | c-basic-offset 2) 71 | 72 | ;; Racket 73 | (add-to-list 'auto-mode-alist '("\\.rkt$" . scheme-mode)) 74 | (add-to-list 'auto-mode-alist '("\\.scrbl$" . scheme-mode)) 75 | (add-to-list 'magic-mode-alist '("#lang racket" . scheme-mode)) 76 | 77 | ;; haskell 78 | ;(add-hook 'haskell-mode-hook 'structured-haskell-mode) 79 | (add-hook 'haskell-mode-hook 'haskell-indentation-mode) 80 | (add-hook 'haskell-mode-hook 'interactive-haskell-mode) 81 | (add-hook 'haskell-mode-hook 'haskell-doc-mode) 82 | (add-hook 'haskell-mode-hook 'haskell-decl-scan-mode) 83 | 84 | ;(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload) 85 | ;(define-key haskell-mode-map (kbd "C-`") 'haskell-interactive-bring) 86 | ;(define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type) 87 | ;(define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info) 88 | ;(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build) 89 | ;(define-key haskell-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear) 90 | ;(define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal) 91 | ;(define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space) 92 | 93 | ;;; IDO mode 94 | ;(setq ido-enable-flex-matching t) 95 | ;(setq ido-everywhere t) 96 | ;(ido-mode 1) 97 | 98 | ;; Laptop-specific 99 | 100 | ;; pyret 101 | (ignore-errors 102 | (add-to-list 'load-path (expand-file-name "~/Code/git/pyret-lang/tools/emacs/")) 103 | (require 'pyret) 104 | (add-to-list 'auto-mode-alist '("\\.arr$" . pyret-mode)) 105 | (add-to-list 'magic-mode-alist '("#lang pyret" . pyret-mode)) 106 | (add-to-list 'magic-mode-alist (cons "#lang bootstrap" '(lambda () (pyret-mode) (bootstrap-mode)))) 107 | (add-to-list 'file-coding-system-alist '("\\.arr\\'" . utf-8-unix))) 108 | 109 | 110 | (custom-set-faces 111 | ;; custom-set-faces was added by Custom. 112 | ;; If you edit it by hand, you could mess it up, so be careful. 113 | ;; Your init file should contain only one such instance. 114 | ;; If there is more than one, they won't work right. 115 | ) 116 | (put 'downcase-region 'disabled nil) 117 | 118 | (defun protect-window () 119 | "make unsplittable" 120 | (interactive) 121 | (set-frame-parameter nil 'unsplittable t) 122 | (set-window-dedicated-p (selected-window) t)) 123 | 124 | ;;(require 'oneonone) 125 | ;; 126 | ;;(remove-hook 'same-window-regexps "\\*info\\*\\(\\|<[0-9]+>\\)") 127 | ;;(remove-hook 'same-window-regexps "\\`\\*Customiz.*\\*\\'") 128 | ;; 129 | ;;(define-key minibuffer-local-map "\C-o" 130 | ;; '1on1-fit-minibuffer-frame) 131 | ;;(define-key minibuffer-local-must-match-map "\C-o" 132 | ;; '1on1-fit-minibuffer-frame) 133 | ;;(define-key minibuffer-local-completion-map "\C-o" 134 | ;; '1on1-fit-minibuffer-frame) 135 | ;; 136 | ;;(1on1-emacs) 137 | (put 'upcase-region 'disabled nil) 138 | 139 | (setq spacemacs-start-directory "~/.emacs.d/spacemacs/") 140 | (load-file (concat spacemacs-start-directory "init.el")) 141 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | -------------------------------------------------------------------------------- /user/emacs/.spacemacs: -------------------------------------------------------------------------------- 1 | ;; -*- mode: emacs-lisp -*- 2 | ;; This file is loaded by Spacemacs at startup. 3 | ;; It must be stored in your home directory. 4 | 5 | (defun dotspacemacs/layers () 6 | "Configuration Layers declaration. 7 | You should not put any user code in this function besides modifying the variable 8 | values." 9 | (setq-default 10 | ;; Base distribution to use. This is a layer contained in the directory 11 | ;; `+distribution'. For now available distributions are `spacemacs-base' 12 | ;; or `spacemacs'. (default 'spacemacs) 13 | dotspacemacs-distribution 'spacemacs 14 | ;; Lazy installation of layers (i.e. layers are installed only when a file 15 | ;; with a supported type is opened). Possible values are `all', `unused' 16 | ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers 17 | ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will 18 | ;; lazy install any layer that support lazy installation even the layers 19 | ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy 20 | ;; installation feature and you have to explicitly list a layer in the 21 | ;; variable `dotspacemacs-configuration-layers' to install it. 22 | ;; (default 'unused) 23 | dotspacemacs-enable-lazy-installation 'unused 24 | ;; If non-nil then Spacemacs will ask for confirmation before installing 25 | ;; a layer lazily. (default t) 26 | dotspacemacs-ask-for-lazy-installation t 27 | ;; If non-nil layers with lazy install support are lazy installed. 28 | ;; List of additional paths where to look for configuration layers. 29 | ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') 30 | dotspacemacs-configuration-layer-path '() 31 | ;; List of configuration layers to load. 32 | dotspacemacs-configuration-layers 33 | '( 34 | haskell 35 | javascript 36 | markdown 37 | python 38 | rust 39 | sql 40 | yaml 41 | ;; ---------------------------------------------------------------- 42 | ;; Example of useful layers you may want to use right away. 43 | ;; Uncomment some layer names and press (Vim style) or 44 | ;; (Emacs style) to install them. 45 | ;; ---------------------------------------------------------------- 46 | helm 47 | ;; auto-completion 48 | ;; better-defaults 49 | emacs-lisp 50 | git 51 | markdown 52 | ;; org 53 | ;; (shell :variables 54 | ;; shell-default-height 30 55 | ;; shell-default-position 'bottom) 56 | spell-checking 57 | ;; syntax-checking 58 | version-control 59 | ) 60 | ;; List of additional packages that will be installed without being 61 | ;; wrapped in a layer. If you need some configuration for these 62 | ;; packages, then consider creating a layer. You can also put the 63 | ;; configuration in `dotspacemacs/user-config'. 64 | dotspacemacs-additional-packages '() 65 | ;; A list of packages that cannot be updated. 66 | dotspacemacs-frozen-packages '() 67 | ;; A list of packages that will not be installed and loaded. 68 | dotspacemacs-excluded-packages '() 69 | ;; Defines the behaviour of Spacemacs when installing packages. 70 | ;; Possible values are `used-only', `used-but-keep-unused' and `all'. 71 | ;; `used-only' installs only explicitly used packages and uninstall any 72 | ;; unused packages as well as their unused dependencies. 73 | ;; `used-but-keep-unused' installs only the used packages but won't uninstall 74 | ;; them if they become unused. `all' installs *all* packages supported by 75 | ;; Spacemacs and never uninstall them. (default is `used-only') 76 | dotspacemacs-install-packages 'used-but-keep-unused)) 77 | 78 | (defun dotspacemacs/init () 79 | "Initialization function. 80 | This function is called at the very startup of Spacemacs initialization 81 | before layers configuration. 82 | You should not put any user code in there besides modifying the variable 83 | values." 84 | ;; This setq-default sexp is an exhaustive list of all the supported 85 | ;; spacemacs settings. 86 | (setq-default 87 | ;; If non nil ELPA repositories are contacted via HTTPS whenever it's 88 | ;; possible. Set it to nil if you have no way to use HTTPS in your 89 | ;; environment, otherwise it is strongly recommended to let it set to t. 90 | ;; This variable has no effect if Emacs is launched with the parameter 91 | ;; `--insecure' which forces the value of this variable to nil. 92 | ;; (default t) 93 | dotspacemacs-elpa-https t 94 | ;; Maximum allowed time in seconds to contact an ELPA repository. 95 | dotspacemacs-elpa-timeout 5 96 | ;; If non nil then spacemacs will check for updates at startup 97 | ;; when the current branch is not `develop'. Note that checking for 98 | ;; new versions works via git commands, thus it calls GitHub services 99 | ;; whenever you start Emacs. (default nil) 100 | dotspacemacs-check-for-update nil 101 | ;; If non-nil, a form that evaluates to a package directory. For example, to 102 | ;; use different package directories for different Emacs versions, set this 103 | ;; to `emacs-version'. 104 | dotspacemacs-elpa-subdirectory nil 105 | ;; One of `vim', `emacs' or `hybrid'. 106 | ;; `hybrid' is like `vim' except that `insert state' is replaced by the 107 | ;; `hybrid state' with `emacs' key bindings. The value can also be a list 108 | ;; with `:variables' keyword (similar to layers). Check the editing styles 109 | ;; section of the documentation for details on available variables. 110 | ;; (default 'vim) 111 | dotspacemacs-editing-style 'emacs 112 | ;; If non nil output loading progress in `*Messages*' buffer. (default nil) 113 | dotspacemacs-verbose-loading nil 114 | ;; Specify the startup banner. Default value is `official', it displays 115 | ;; the official spacemacs logo. An integer value is the index of text 116 | ;; banner, `random' chooses a random text banner in `core/banners' 117 | ;; directory. A string value must be a path to an image format supported 118 | ;; by your Emacs build. 119 | ;; If the value is nil then no banner is displayed. (default 'official) 120 | dotspacemacs-startup-banner 'official 121 | ;; List of items to show in startup buffer or an association list of 122 | ;; the form `(list-type . list-size)`. If nil then it is disabled. 123 | ;; Possible values for list-type are: 124 | ;; `recents' `bookmarks' `projects' `agenda' `todos'." 125 | ;; List sizes may be nil, in which case 126 | ;; `spacemacs-buffer-startup-lists-length' takes effect. 127 | dotspacemacs-startup-lists '((recents . 5) 128 | (projects . 7)) 129 | ;; True if the home buffer should respond to resize events. 130 | dotspacemacs-startup-buffer-responsive t 131 | ;; Default major mode of the scratch buffer (default `text-mode') 132 | dotspacemacs-scratch-mode 'text-mode 133 | ;; List of themes, the first of the list is loaded when spacemacs starts. 134 | ;; Press T n to cycle to the next theme in the list (works great 135 | ;; with 2 themes variants, one dark and one light) 136 | dotspacemacs-themes '(spacemacs-dark 137 | spacemacs-light) 138 | ;; If non nil the cursor color matches the state color in GUI Emacs. 139 | dotspacemacs-colorize-cursor-according-to-state t 140 | ;; Default font, or prioritized list of fonts. `powerline-scale' allows to 141 | ;; quickly tweak the mode-line size to make separators look not too crappy. 142 | dotspacemacs-default-font '() 143 | ;;; dotspacemacs-default-font '("Source Code Pro" 144 | ;;; ;; :size 18 145 | ;;; :weight normal 146 | ;;; :width normal 147 | ;;; :powerline-scale 1.1 148 | ;;; ) 149 | ;; The leader key 150 | dotspacemacs-leader-key "SPC" 151 | ;; The key used for Emacs commands (M-x) (after pressing on the leader key). 152 | ;; (default "SPC") 153 | dotspacemacs-emacs-command-key "SPC" 154 | ;; The key used for Vim Ex commands (default ":") 155 | dotspacemacs-ex-command-key ":" 156 | ;; The leader key accessible in `emacs state' and `insert state' 157 | ;; (default "M-m") 158 | dotspacemacs-emacs-leader-key "M-m" 159 | ;; Major mode leader key is a shortcut key which is the equivalent of 160 | ;; pressing ` m`. Set it to `nil` to disable it. (default ",") 161 | dotspacemacs-major-mode-leader-key "," 162 | ;; Major mode leader key accessible in `emacs state' and `insert state'. 163 | ;; (default "C-M-m") 164 | dotspacemacs-major-mode-emacs-leader-key "C-M-m" 165 | ;; These variables control whether separate commands are bound in the GUI to 166 | ;; the key pairs C-i, TAB and C-m, RET. 167 | ;; Setting it to a non-nil value, allows for separate commands under 168 | ;; and TAB or and RET. 169 | ;; In the terminal, these pairs are generally indistinguishable, so this only 170 | ;; works in the GUI. (default nil) 171 | dotspacemacs-distinguish-gui-tab nil 172 | ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil) 173 | dotspacemacs-remap-Y-to-y$ nil 174 | ;; If non-nil, the shift mappings `<' and `>' retain visual state if used 175 | ;; there. (default t) 176 | dotspacemacs-retain-visual-state-on-shift t 177 | ;; If non-nil, J and K move lines up and down when in visual mode. 178 | ;; (default nil) 179 | dotspacemacs-visual-line-move-text nil 180 | ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command. 181 | ;; (default nil) 182 | dotspacemacs-ex-substitute-global nil 183 | ;; Name of the default layout (default "Default") 184 | dotspacemacs-default-layout-name "Default" 185 | ;; If non nil the default layout name is displayed in the mode-line. 186 | ;; (default nil) 187 | dotspacemacs-display-default-layout nil 188 | ;; If non nil then the last auto saved layouts are resume automatically upon 189 | ;; start. (default nil) 190 | dotspacemacs-auto-resume-layouts nil 191 | ;; Size (in MB) above which spacemacs will prompt to open the large file 192 | ;; literally to avoid performance issues. Opening a file literally means that 193 | ;; no major mode or minor modes are active. (default is 1) 194 | dotspacemacs-large-file-size 1 195 | ;; Location where to auto-save files. Possible values are `original' to 196 | ;; auto-save the file in-place, `cache' to auto-save the file to another 197 | ;; file stored in the cache directory and `nil' to disable auto-saving. 198 | ;; (default 'cache) 199 | dotspacemacs-auto-save-file-location 'cache 200 | ;; Maximum number of rollback slots to keep in the cache. (default 5) 201 | dotspacemacs-max-rollback-slots 5 202 | ;; If non nil, `helm' will try to minimize the space it uses. (default nil) 203 | dotspacemacs-helm-resize nil 204 | ;; if non nil, the helm header is hidden when there is only one source. 205 | ;; (default nil) 206 | dotspacemacs-helm-no-header nil 207 | ;; define the position to display `helm', options are `bottom', `top', 208 | ;; `left', or `right'. (default 'bottom) 209 | dotspacemacs-helm-position 'bottom 210 | ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching 211 | ;; in all non-asynchronous sources. If set to `source', preserve individual 212 | ;; source settings. Else, disable fuzzy matching in all sources. 213 | ;; (default 'always) 214 | dotspacemacs-helm-use-fuzzy 'always 215 | ;; If non nil the paste micro-state is enabled. When enabled pressing `p` 216 | ;; several times cycle between the kill ring content. (default nil) 217 | dotspacemacs-enable-paste-transient-state nil 218 | ;; Which-key delay in seconds. The which-key buffer is the popup listing 219 | ;; the commands bound to the current keystroke sequence. (default 0.4) 220 | dotspacemacs-which-key-delay 0.4 221 | ;; Which-key frame position. Possible values are `right', `bottom' and 222 | ;; `right-then-bottom'. right-then-bottom tries to display the frame to the 223 | ;; right; if there is insufficient space it displays it at the bottom. 224 | ;; (default 'bottom) 225 | dotspacemacs-which-key-position 'bottom 226 | ;; If non nil a progress bar is displayed when spacemacs is loading. This 227 | ;; may increase the boot time on some systems and emacs builds, set it to 228 | ;; nil to boost the loading time. (default t) 229 | dotspacemacs-loading-progress-bar t 230 | ;; If non nil the frame is fullscreen when Emacs starts up. (default nil) 231 | ;; (Emacs 24.4+ only) 232 | dotspacemacs-fullscreen-at-startup nil 233 | ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen. 234 | ;; Use to disable fullscreen animations in OSX. (default nil) 235 | dotspacemacs-fullscreen-use-non-native nil 236 | ;; If non nil the frame is maximized when Emacs starts up. 237 | ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil. 238 | ;; (default nil) (Emacs 24.4+ only) 239 | dotspacemacs-maximized-at-startup nil 240 | ;; A value from the range (0..100), in increasing opacity, which describes 241 | ;; the transparency level of a frame when it's active or selected. 242 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 243 | dotspacemacs-active-transparency 90 244 | ;; A value from the range (0..100), in increasing opacity, which describes 245 | ;; the transparency level of a frame when it's inactive or deselected. 246 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 247 | dotspacemacs-inactive-transparency 90 248 | ;; If non nil show the titles of transient states. (default t) 249 | dotspacemacs-show-transient-state-title t 250 | ;; If non nil show the color guide hint for transient state keys. (default t) 251 | dotspacemacs-show-transient-state-color-guide t 252 | ;; If non nil unicode symbols are displayed in the mode line. (default t) 253 | dotspacemacs-mode-line-unicode-symbols t 254 | ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth 255 | ;; scrolling overrides the default behavior of Emacs which recenters point 256 | ;; when it reaches the top or bottom of the screen. (default t) 257 | dotspacemacs-smooth-scrolling t 258 | ;; Control line numbers activation. 259 | ;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and 260 | ;; `text-mode' derivatives. If set to `relative', line numbers are relative. 261 | ;; This variable can also be set to a property list for finer control: 262 | ;; '(:relative nil 263 | ;; :disabled-for-modes dired-mode 264 | ;; doc-view-mode 265 | ;; markdown-mode 266 | ;; org-mode 267 | ;; pdf-view-mode 268 | ;; text-mode 269 | ;; :size-limit-kb 1000) 270 | ;; (default nil) 271 | dotspacemacs-line-numbers nil 272 | ;; Code folding method. Possible values are `evil' and `origami'. 273 | ;; (default 'evil) 274 | dotspacemacs-folding-method 'evil 275 | ;; If non-nil smartparens-strict-mode will be enabled in programming modes. 276 | ;; (default nil) 277 | dotspacemacs-smartparens-strict-mode nil 278 | ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes 279 | ;; over any automatically added closing parenthesis, bracket, quote, etc… 280 | ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil) 281 | dotspacemacs-smart-closing-parenthesis nil 282 | ;; Select a scope to highlight delimiters. Possible values are `any', 283 | ;; `current', `all' or `nil'. Default is `all' (highlight any scope and 284 | ;; emphasis the current one). (default 'all) 285 | dotspacemacs-highlight-delimiters 'all 286 | ;; If non nil, advise quit functions to keep server open when quitting. 287 | ;; (default nil) 288 | dotspacemacs-persistent-server nil 289 | ;; List of search tool executable names. Spacemacs uses the first installed 290 | ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'. 291 | ;; (default '("ag" "pt" "ack" "grep")) 292 | dotspacemacs-search-tools '("ag" "pt" "ack" "grep") 293 | ;; The default package repository used if no explicit repository has been 294 | ;; specified with an installed package. 295 | ;; Not used for now. (default nil) 296 | dotspacemacs-default-package-repository nil 297 | ;; Delete whitespace while saving buffer. Possible values are `all' 298 | ;; to aggressively delete empty line and long sequences of whitespace, 299 | ;; `trailing' to delete only the whitespace at end of lines, `changed'to 300 | ;; delete only whitespace for changed lines or `nil' to disable cleanup. 301 | ;; (default nil) 302 | dotspacemacs-whitespace-cleanup nil 303 | )) 304 | 305 | (defun dotspacemacs/user-init () 306 | "Initialization function for user code. 307 | It is called immediately after `dotspacemacs/init', before layer configuration 308 | executes. 309 | This function is mostly useful for variables that need to be set 310 | before packages are loaded. If you are unsure, you should try in setting them in 311 | `dotspacemacs/user-config' first." 312 | ) 313 | 314 | (defun dotspacemacs/user-config () 315 | "Configuration function for user code. 316 | This function is called at the very end of Spacemacs initialization after 317 | layers configuration. 318 | This is the place where most of your configurations should be done. Unless it is 319 | explicitly specified that a variable should be set before a package is loaded, 320 | you should place your code here." 321 | 322 | (define-key evil-normal-state-map "\C-y" 'yank) 323 | (define-key evil-insert-state-map "\C-y" 'yank) 324 | (define-key evil-visual-state-map "\C-y" 'yank) 325 | (define-key evil-normal-state-map "\C-e" 'end-of-line) 326 | (define-key evil-insert-state-map "\C-e" 'end-of-line) 327 | (define-key evil-normal-state-map "\C-w" 'evil-delete) 328 | (define-key evil-insert-state-map "\C-w" 'evil-delete) 329 | (define-key evil-normal-state-map "\C-r" 'search-backward) 330 | (define-key evil-insert-state-map "\C-r" 'search-backward) 331 | (define-key evil-visual-state-map "\C-w" 'evil-delete) 332 | (define-key evil-normal-state-map (kbd "S-") 333 | (lambda () 334 | (interactive) 335 | (evil-visual-char) 336 | (backward-char))) 337 | (define-key evil-normal-state-map (kbd "S-") 338 | (lambda () 339 | (interactive) 340 | (evil-visual-char) 341 | (forward-char))) 342 | (define-key evil-visual-state-map (kbd "S-") 343 | #'backward-char) 344 | (define-key evil-visual-state-map (kbd "S-") 345 | #'forward-char) 346 | ) 347 | 348 | ;; Do not write anything past this comment. This is where Emacs will 349 | ;; auto-generate custom variable definitions. 350 | (custom-set-variables 351 | ;; custom-set-variables was added by Custom. 352 | ;; If you edit it by hand, you could mess it up, so be careful. 353 | ;; Your init file should contain only one such instance. 354 | ;; If there is more than one, they won't work right. 355 | '(cursor-type 'bar) 356 | '(evil-move-beyond-eol t) 357 | '(frame-background-mode 'dark) 358 | '(haskell-process-args-cabal-new-repl 359 | '("--ghc-option=-ferror-spans" "--ghc-option=-fdiagnostics-color=always")) 360 | '(haskell-process-auto-import-loaded-modules t t) 361 | '(haskell-process-log t) 362 | '(haskell-process-suggest-remove-import-lines t t) 363 | '(haskell-process-type 'cabal-new-repl) 364 | '(haskell-process-wrapper-function 'identity) 365 | '(indent-tabs-mode nil) 366 | '(inhibit-startup-echo-area-message t) 367 | '(inhibit-startup-screen t) 368 | '(nix-indent-function 'nix-indent-line)) 369 | (custom-set-faces 370 | ;; custom-set-faces was added by Custom. 371 | ;; If you edit it by hand, you could mess it up, so be careful. 372 | ;; Your init file should contain only one such instance. 373 | ;; If there is more than one, they won't work right. 374 | ) 375 | --------------------------------------------------------------------------------