Merge remote-tracking branch 'enklave/master' into 19.09
This commit is contained in:
commit
a707ca0e2e
jeschli
|
@ -14,6 +14,7 @@ in
|
|||
<stockholm/jeschli/2configs/urxvt.nix>
|
||||
<stockholm/jeschli/2configs/i3.nix>
|
||||
<stockholm/jeschli/2configs/emacs.nix>
|
||||
<stockholm/jeschli/2configs/rust.nix>
|
||||
];
|
||||
|
||||
krebs.build.host = config.krebs.hosts.bolide;
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
with pkgs;
|
||||
let
|
||||
rebuild_script = pkgs.writeTextFile {
|
||||
name="rebuild";
|
||||
text=''
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
sudo cp -r /etc/nixos ~/old-nixos
|
||||
sudo cp -r $HOME/nixos /etc/
|
||||
sudo nixos-rebuild switch
|
||||
'';
|
||||
executable=true;
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
<stockholm/jeschli>
|
||||
<stockholm/jeschli/2configs/emacs.nix>
|
||||
<stockholm/jeschli/2configs/python.nix>
|
||||
./desktop.nix
|
||||
./i3-configuration.nix
|
||||
./hardware-configuration.nix
|
||||
|
@ -27,7 +15,7 @@ in
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# Wireless network with network manager
|
||||
krebs.build.host = config.krebs.hosts.brauerei;
|
||||
krebs.build.host = config.krebs.hosts.reagenzglas;
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
|
@ -49,14 +37,9 @@ in
|
|||
wget vim git
|
||||
firefox
|
||||
rofi
|
||||
ag
|
||||
];
|
||||
|
||||
# How I rebuild the system
|
||||
environment.shellAliases = {
|
||||
rebuild = rebuild_script;
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.ombi = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
pkgsWithOverlay = import <nixpkgs-unstable> {
|
||||
overlays = [
|
||||
(import (builtins.fetchTarball {
|
||||
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
|
||||
}))
|
||||
];
|
||||
};
|
||||
|
||||
orgAgendaView = import ./emacs-org-agenda.nix;
|
||||
|
||||
packageRepos = ''
|
||||
|
@ -47,6 +55,9 @@ let
|
|||
|
||||
magit = ''
|
||||
(global-set-key (kbd "C-x g") 'magit-status) ; "Most Magit commands are commonly invoked from the status buffer"
|
||||
|
||||
(with-eval-after-load 'magit
|
||||
(require 'forge))
|
||||
'';
|
||||
|
||||
windowCosmetics = ''
|
||||
|
@ -145,8 +156,6 @@ let
|
|||
(global-set-key (kbd "<f8>") 'delete-other-windows)
|
||||
'';
|
||||
|
||||
|
||||
|
||||
dotEmacs = pkgs.writeText "dot-emacs" ''
|
||||
${packageRepos}
|
||||
|
||||
|
@ -164,9 +173,11 @@ let
|
|||
${myFunctionKeys}
|
||||
'';
|
||||
|
||||
emacsWithCustomPackages = (pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [
|
||||
#emacsWithCustomPackages
|
||||
emacsPkgs= epkgs: [
|
||||
#testing
|
||||
epkgs.melpaPackages.gitlab
|
||||
epkgs.melpaPackages.forge
|
||||
|
||||
# emacs convenience
|
||||
epkgs.melpaPackages.ag
|
||||
|
@ -177,7 +188,7 @@ let
|
|||
epkgs.melpaPackages.monokai-alt-theme
|
||||
|
||||
# development
|
||||
epkgs.melpaStablePackages.magit
|
||||
epkgs.melpaPackages.magit
|
||||
epkgs.melpaPackages.nix-mode
|
||||
epkgs.melpaPackages.go-mode
|
||||
epkgs.melpaPackages.haskell-mode
|
||||
|
@ -196,20 +207,26 @@ let
|
|||
epkgs.melpaPackages.org-mime
|
||||
|
||||
epkgs.elpaPackages.which-key
|
||||
]);
|
||||
];
|
||||
emacsWithOverlay = (pkgsWithOverlay.emacsWithPackagesFromUsePackage {
|
||||
config = builtins.readFile dotEmacs; # builtins.readFile ./emacs.el;
|
||||
# Package is optional, defaults to pkgs.emacs
|
||||
package = pkgsWithOverlay.emacsGit;
|
||||
# Optionally provide extra packages not in the configuration file
|
||||
extraEmacsPackages = emacsPkgs;
|
||||
});
|
||||
|
||||
myEmacs = pkgs.writeDashBin "my-emacs" ''
|
||||
exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} "$@"
|
||||
exec ${emacsWithOverlay}/bin/emacs -q -l ${dotEmacs} "$@"
|
||||
'';
|
||||
|
||||
myEmacsWithDaemon = pkgs.writeDashBin "my-emacs-daemon" ''
|
||||
exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} --daemon
|
||||
exec ${emacsWithOverlay}/bin/emacs -q -l ${dotEmacs} --daemon
|
||||
'';
|
||||
|
||||
myEmacsClient = pkgs.writeDashBin "meclient" ''
|
||||
exec ${emacsWithCustomPackages}/bin/emacsclient --create-frame
|
||||
exec ${emacsWithOverlay}/bin/emacsclient --create-frame
|
||||
'';
|
||||
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
myEmacs myEmacsWithDaemon myEmacsClient
|
||||
|
|
9
jeschli/2configs/python.nix
Normal file
9
jeschli/2configs/python.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
python37
|
||||
python37Packages.pip
|
||||
pipenv
|
||||
];
|
||||
}
|
7
jeschli/2configs/rust.nix
Normal file
7
jeschli/2configs/rust.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
rustup
|
||||
];
|
||||
}
|
|
@ -29,9 +29,9 @@
|
|||
|
||||
in {
|
||||
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
|
||||
deploy = pkgs.krops.writeDeploy "${name}-deploy" {
|
||||
deploy = { target ? "root@${name}/var/src" }: pkgs.krops.writeDeploy "${name}-deploy" {
|
||||
source = source { test = false; };
|
||||
target = "root@${name}/var/src";
|
||||
inherit target;
|
||||
};
|
||||
|
||||
# usage: $(nix-build --no-out-link --argstr name HOSTNAME --argstr target PATH -A test)
|
||||
|
|
Loading…
Reference in a new issue