Beginnings of config for Darwin machines
Split out a platforms/ directory with a linux.nix and darwin.nix, and starting splitting things out between the two
This commit is contained in:
parent
86b5f58ca5
commit
9036dc7c32
10 changed files with 300 additions and 183 deletions
107
home/home.nix
107
home/home.nix
|
@ -1,28 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let machine = ./machines/chupacabra.nix; in
|
||||
{
|
||||
imports = [
|
||||
./modules/alacritty.nix
|
||||
./modules/alsi.nix
|
||||
./modules/development.nix
|
||||
./modules/emacs.nix
|
||||
./modules/email.nix
|
||||
./modules/firefox.nix
|
||||
./modules/games.nix
|
||||
./modules/i3.nix
|
||||
./modules/shell.nix
|
||||
./modules/tarsnap.nix
|
||||
./modules/vim.nix
|
||||
|
||||
~/code/urb/urbos/home
|
||||
|
||||
machine
|
||||
(throw "Pick a machine from ./machines")
|
||||
];
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
xsession.enable = true;
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
|
@ -33,93 +17,4 @@ let machine = ./machines/chupacabra.nix; in
|
|||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "19.09";
|
||||
|
||||
# for when hacking
|
||||
programs.home-manager.path = "/home/grfn/code/home-manager";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(import (fetchTarball "https://github.com/ashkitten/nixpkgs/archive/init-glimpse.tar.gz") {}).glimpse
|
||||
|
||||
# Desktop stuff
|
||||
arandr
|
||||
firefox
|
||||
feh
|
||||
chromium
|
||||
xclip
|
||||
xorg.xev
|
||||
picom
|
||||
peek
|
||||
signal-desktop
|
||||
apvlv # pdf viewer
|
||||
vlc
|
||||
irssi
|
||||
gnutls
|
||||
pandoc
|
||||
barrier
|
||||
|
||||
# System utilities
|
||||
htop
|
||||
powertop
|
||||
usbutils
|
||||
pciutils
|
||||
killall
|
||||
gdmap
|
||||
bind
|
||||
lsof
|
||||
zip
|
||||
tree
|
||||
ncat
|
||||
unzip
|
||||
|
||||
# Security
|
||||
gnupg
|
||||
keybase
|
||||
openssl
|
||||
|
||||
# Spotify...etc
|
||||
spotify
|
||||
playerctl
|
||||
|
||||
# Nix things
|
||||
nixfmt
|
||||
nix-prefetch-github
|
||||
nix-review
|
||||
cachix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
programs.password-store.enable = true;
|
||||
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
provider = "geoclue2";
|
||||
};
|
||||
|
||||
services.pasystray.enable = true;
|
||||
|
||||
impure.clonedRepos.passwordStore = {
|
||||
github = "glittershark/pass";
|
||||
path = ".local/share/password-store";
|
||||
};
|
||||
|
||||
urbint.projectPath = "code/urb";
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.bookmarks = [
|
||||
"file:///home/grfn/code"
|
||||
];
|
||||
};
|
||||
|
||||
programs.tarsnap = {
|
||||
enable = true;
|
||||
keyfile = "/home/grfn/.private/tarsnap.key";
|
||||
printStats = true;
|
||||
humanizeNumbers = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
let
|
||||
laptopKeyboardId = "25";
|
||||
in {
|
||||
imports = [
|
||||
../platforms/linux.nix
|
||||
|
||||
../modules/common.nix
|
||||
../modules/games.nix
|
||||
];
|
||||
|
||||
system.machine = {
|
||||
wirelessInterface = "wlp59s0";
|
||||
i3FontSize = 9;
|
||||
|
|
17
home/machines/dobharchu.nix
Normal file
17
home/machines/dobharchu.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../platforms/darwin.nix
|
||||
../modules/common.nix
|
||||
../modules/games.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
coreutils
|
||||
gnupg
|
||||
nix-prefetch-github
|
||||
pass
|
||||
pinentry_mac
|
||||
];
|
||||
}
|
|
@ -1,29 +1,30 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let alsi = pkgs.callPackage ../../pkgs/alsi {};
|
||||
let alsi = pkgs.callPackage ~/code/system/pkgs/alsi {};
|
||||
in
|
||||
{
|
||||
home.packages = [ alsi ];
|
||||
|
||||
home.file.".config/alsi/alsi.logo" = {
|
||||
xdg.configFile."alsi/alsi.logo" = {
|
||||
source = ./nixos-logo.txt;
|
||||
force = true;
|
||||
};
|
||||
|
||||
home.file.".config/alsi/alsi.conf" = {
|
||||
xdg.configFile."alsi/alsi.conf" = {
|
||||
force = true;
|
||||
text = ''
|
||||
#!${pkgs.perl}/bin/perl
|
||||
|
||||
scalar {
|
||||
ALSI_VERSION => "0.4.8",
|
||||
COLORS_FILE => "/home/grfn/.config/alsi/alsi.colors",
|
||||
DE_FILE => "/home/grfn/.config/alsi/alsi.de",
|
||||
COLORS_FILE => "/${config.home.homeDirectory}/.config/alsi/alsi.colors",
|
||||
DE_FILE => "/${config.home.homeDirectory}/.config/alsi/alsi.de",
|
||||
DEFAULT_COLOR_BOLD => "blue",
|
||||
DEFAULT_COLOR_NORMAL => "blue",
|
||||
DF_COMMAND => "df -Th -x sys -x tmpfs -x devtmpfs &>/dev/stdout",
|
||||
GTK2_RC_FILE => "/home/grfn/.gtkrc-2.0",
|
||||
GTK3_RC_FILE => "/home/grfn/.config/gtk-3.0/settings.ini",
|
||||
LOGO_FILE => "/home/grfn/.config/alsi/alsi.logo",
|
||||
OUTPUT_FILE => "/home/grfn/.config/alsi/alsi.output",
|
||||
GTK2_RC_FILE => "/${config.home.homeDirectory}/.gtkrc-2.0",
|
||||
GTK3_RC_FILE => "/${config.home.homeDirectory}/.config/gtk-3.0/settings.ini",
|
||||
LOGO_FILE => "/${config.home.homeDirectory}/.config/alsi/alsi.logo",
|
||||
OUTPUT_FILE => "/${config.home.homeDirectory}/.config/alsi/alsi.output",
|
||||
# PACKAGES_PATH => "/var/lib/pacman/local/",
|
||||
PS_COMMAND => "ps -A",
|
||||
USAGE_COLORS => 0,
|
||||
|
@ -33,9 +34,27 @@ in
|
|||
USAGE_PRECENT_YELLOW => 85,
|
||||
USE_LOGO_FROM_FILE => 1,
|
||||
USE_VALUES_COLOR => 0,
|
||||
WM_FILE => "/home/grfn/.config/alsi/alsi.wm",
|
||||
WM_FILE => "/${config.home.homeDirectory}/.config/alsi/alsi.wm",
|
||||
}
|
||||
'';
|
||||
force = true;
|
||||
};
|
||||
|
||||
xdg.configFile."alsi/alsi.colors".text = ''
|
||||
#!${pkgs.perl}/bin/perl
|
||||
|
||||
# Colors for alsi
|
||||
|
||||
scalar {
|
||||
black => {normal => "\e[0;30m", bold => "\e[1;30m"},
|
||||
red => {normal => "\e[0;31m", bold => "\e[1;31m"},
|
||||
green => {normal => "\e[0;32m", bold => "\e[1;32m"},
|
||||
yellow => {normal => "\e[0;33m", bold => "\e[1;33m"},
|
||||
default => {normal => "\e[0;34m", bold => "\e[1;34m"},
|
||||
blue => {normal => "\e[0;34m", bold => "\e[1;34m"},
|
||||
purple => {normal => "\e[0;35m", bold => "\e[1;35m"},
|
||||
cyan => {normal => "\e[0;36m", bold => "\e[1;36m"},
|
||||
white => {normal => "\e[0;37m", bold => "\e[1;37m"},
|
||||
reset => "\e[0m",
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
38
home/modules/common.nix
Normal file
38
home/modules/common.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../modules/shell.nix
|
||||
../modules/development.nix
|
||||
../modules/emacs.nix
|
||||
../modules/vim.nix
|
||||
../modules/tarsnap.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.password-store.enable = true;
|
||||
|
||||
impure.clonedRepos.passwordStore = {
|
||||
github = "glittershark/pass";
|
||||
path = ".local/share/password-store";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
htop
|
||||
killall
|
||||
bind
|
||||
zip unzip
|
||||
tree
|
||||
ncat
|
||||
|
||||
gnupg
|
||||
keybase
|
||||
openssl
|
||||
|
||||
# Nix things
|
||||
nixfmt
|
||||
nix-prefetch-github
|
||||
nix-review
|
||||
cachix
|
||||
];
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [
|
||||
./development/kube.nix
|
||||
|
@ -21,14 +23,14 @@
|
|||
rev = "9e7279edde2a4e0f5ec04c53f5cd64440a27a1ae";
|
||||
sha256 = "0zz2lrwn3y3rb8gzaiwxgz02dvy3s552zc70zvfqc0zh5dhydgn7";
|
||||
}) { inherit pkgs; }).yarn2nix
|
||||
julia
|
||||
(pkgs.callPackage (pkgs.fetchFromGitHub {
|
||||
owner = "hlolli";
|
||||
repo = "clj2nix";
|
||||
rev = "3ab3480a25e850b35d1f532a5e4e7b3202232383";
|
||||
sha256 = "1lry026mlpxp1j563qs13nhxf37i2zpl7lh0lgfdwc44afybqka6";
|
||||
}) {})
|
||||
];
|
||||
] ++
|
||||
optional (stdenv.isLinux) julia;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
# doom-emacs = pkgs.callPackage (builtins.fetchTarball {
|
||||
# url = https://github.com/vlaci/nix-doom-emacs/archive/master.tar.gz;
|
||||
|
@ -8,7 +10,7 @@ let
|
|||
# # and packages.el files
|
||||
# };
|
||||
in {
|
||||
# imports = [ ./lib/cloneRepo.nix ];
|
||||
imports = [ ./lib/cloneRepo.nix ];
|
||||
|
||||
# home.packages = [ doom-emacs ];
|
||||
# home.file.".emacs.d/init.el".text = ''
|
||||
|
@ -16,61 +18,67 @@ in {
|
|||
# '';
|
||||
#
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# haskellPackages.Agda BROKEN
|
||||
config = mkMerge [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
haskellPackages.Agda
|
||||
|
||||
# LaTeX (for org export)
|
||||
(pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive)
|
||||
scheme-basic collection-fontsrecommended ulem
|
||||
fncychap titlesec tabulary varwidth framed fancyvrb float parskip
|
||||
wrapfig upquote capt-of needspace;
|
||||
# LaTeX (for org export)
|
||||
(pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive)
|
||||
scheme-basic collection-fontsrecommended ulem
|
||||
fncychap titlesec tabulary varwidth framed fancyvrb float parskip
|
||||
wrapfig upquote capt-of needspace;
|
||||
})
|
||||
|
||||
ispell
|
||||
|
||||
ripgrep
|
||||
coreutils
|
||||
fd
|
||||
clang
|
||||
gnutls
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(import (builtins.fetchTarball {
|
||||
url = "https://github.com/nix-community/emacs-overlay/archive/54afb061bdd12c61bbfcc13bad98b7a3aab7d8d3.tar.gz";
|
||||
sha256 = "0hrbg65d5h0cb0nky7a46md7vlvhajq1hf0328l2f7ln9hznqz6j";
|
||||
}))
|
||||
];
|
||||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacsUnstable;
|
||||
};
|
||||
|
||||
impure.clonedRepos = {
|
||||
orgClubhouse = {
|
||||
github = "glittershark/org-clubhouse";
|
||||
path = "code/org-clubhouse";
|
||||
};
|
||||
|
||||
doomEmacs = {
|
||||
github = "hlissner/doom-emacs";
|
||||
path = ".emacs.d";
|
||||
after = ["emacs.d"];
|
||||
onClone = "bin/doom install";
|
||||
};
|
||||
|
||||
"emacs.d" = {
|
||||
github = "glittershark/emacs.d";
|
||||
path = ".doom.d";
|
||||
after = ["orgClubhouse"];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
(mkIf pkgs.stdenv.isLinux {
|
||||
# Notes
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray = true;
|
||||
};
|
||||
})
|
||||
|
||||
ispell
|
||||
|
||||
ripgrep
|
||||
coreutils
|
||||
fd
|
||||
clang
|
||||
gnutls
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(import (builtins.fetchTarball {
|
||||
url = "https://github.com/nix-community/emacs-overlay/archive/54afb061bdd12c61bbfcc13bad98b7a3aab7d8d3.tar.gz";
|
||||
sha256 = "0hrbg65d5h0cb0nky7a46md7vlvhajq1hf0328l2f7ln9hznqz6j";
|
||||
}))
|
||||
];
|
||||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacsUnstable;
|
||||
};
|
||||
|
||||
impure.clonedRepos = {
|
||||
orgClubhouse = {
|
||||
github = "glittershark/org-clubhouse";
|
||||
path = "code/org-clubhouse";
|
||||
};
|
||||
|
||||
doomEmacs = {
|
||||
github = "hlissner/doom-emacs";
|
||||
path = ".emacs.d";
|
||||
after = ["emacs.d"];
|
||||
onClone = "bin/doom install";
|
||||
};
|
||||
|
||||
"emacs.d" = {
|
||||
github = "glittershark/emacs.d";
|
||||
path = ".doom.d";
|
||||
after = ["orgClubhouse"];
|
||||
};
|
||||
};
|
||||
|
||||
# Notes
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with pkgs;
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
|
@ -42,13 +43,16 @@ let
|
|||
chmod +x $out/bin/dwarf-fortress
|
||||
'';
|
||||
|
||||
in {
|
||||
imports = [
|
||||
./obs.nix
|
||||
];
|
||||
in mkMerge [
|
||||
{
|
||||
home.packages = [
|
||||
crawl
|
||||
];
|
||||
}
|
||||
(mkIf stdenv.isLinux {
|
||||
home.packages = [
|
||||
df
|
||||
];
|
||||
})
|
||||
]
|
||||
|
||||
home.packages = [
|
||||
crawl
|
||||
df
|
||||
];
|
||||
}
|
||||
|
|
24
home/platforms/darwin.nix
Normal file
24
home/platforms/darwin.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
coreutils
|
||||
gnupg
|
||||
pinentry_mac
|
||||
];
|
||||
|
||||
home.activation.linkApplications = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
$DRY_RUN_CMD ln -sf $VERBOSE_ARG \
|
||||
~/.nix-profile/Applications/* ~/Applications/
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
export NIX_PATH=$HOME/.nix-defexpr/channels:$NIX_PATH
|
||||
|
||||
if [[ "$TERM" == "alacritty" ]]; then
|
||||
export TERM="xterm-256color"
|
||||
fi
|
||||
'';
|
||||
}
|
103
home/platforms/linux.nix
Normal file
103
home/platforms/linux.nix
Normal file
|
@ -0,0 +1,103 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../modules/alacritty.nix
|
||||
../modules/alsi.nix
|
||||
../modules/development.nix
|
||||
../modules/emacs.nix
|
||||
../modules/email.nix
|
||||
../modules/firefox.nix
|
||||
../modules/games.nix
|
||||
../modules/obs.nix
|
||||
../modules/i3.nix
|
||||
../modules/shell.nix
|
||||
../modules/tarsnap.nix
|
||||
../modules/vim.nix
|
||||
|
||||
~/code/urb/urbos/home
|
||||
|
||||
machine
|
||||
];
|
||||
|
||||
xsession.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(import (fetchTarball "https://github.com/ashkitten/nixpkgs/archive/init-glimpse.tar.gz") {}).glimpse
|
||||
|
||||
# Desktop stuff
|
||||
arandr
|
||||
firefox
|
||||
feh
|
||||
chromium
|
||||
xclip
|
||||
xorg.xev
|
||||
picom
|
||||
peek
|
||||
signal-desktop
|
||||
apvlv # pdf viewer
|
||||
vlc
|
||||
irssi
|
||||
gnutls
|
||||
pandoc
|
||||
barrier
|
||||
|
||||
# System utilities
|
||||
powertop
|
||||
usbutils
|
||||
pciutils
|
||||
gdmap
|
||||
lsof
|
||||
tree
|
||||
ncat
|
||||
|
||||
# Security
|
||||
gnupg
|
||||
keybase
|
||||
openssl
|
||||
|
||||
# Spotify...etc
|
||||
spotify
|
||||
playerctl
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
programs.password-store.enable = true;
|
||||
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
provider = "geoclue2";
|
||||
};
|
||||
|
||||
services.pasystray.enable = true;
|
||||
|
||||
impure.clonedRepos.passwordStore = {
|
||||
github = "glittershark/pass";
|
||||
path = ".local/share/password-store";
|
||||
};
|
||||
|
||||
urbint.projectPath = "code/urb";
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.bookmarks = [
|
||||
"file:///home/grfn/code"
|
||||
];
|
||||
};
|
||||
|
||||
programs.tarsnap = {
|
||||
enable = true;
|
||||
keyfile = "/home/grfn/.private/tarsnap.key";
|
||||
printStats = true;
|
||||
humanizeNumbers = true;
|
||||
};
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
[[ ! $IN_NIX_SHELL ]] && alsi -l
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue