mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 22:12:56 +00:00
fix build on linux
This commit is contained in:
parent
e22a4f3df2
commit
fdfc66c7ad
@ -26,10 +26,15 @@
|
||||
description = "Base16 color scheme";
|
||||
};
|
||||
};
|
||||
dotfilesPath = mkOption {
|
||||
dotfilesPath = let
|
||||
homePath = if pkgs.stdenv.isDarwin then
|
||||
"/Users/${config.user}"
|
||||
else
|
||||
"/home/${config.user}";
|
||||
in mkOption {
|
||||
type = types.path;
|
||||
description = "Path of dotfiles repository.";
|
||||
default = builtins.toPath "$HOME/dev/personal/dotfiles";
|
||||
default = builtins.toPath "${homePath}/dev/personal/dotfiles";
|
||||
};
|
||||
dotfilesRepo = mkOption {
|
||||
type = types.str;
|
||||
|
@ -16,7 +16,7 @@ nixpkgs.lib.nixosSystem {
|
||||
gui = {
|
||||
enable = true;
|
||||
compositor.enable = true;
|
||||
colorscheme = (import ../modules/colorscheme/gruvbox);
|
||||
colorscheme = (import ../../modules/colorscheme/gruvbox);
|
||||
wallpaper = "${wallpapers}/gruvbox/road.jpg";
|
||||
gtk.theme = { name = "Adwaita-dark"; };
|
||||
};
|
||||
|
@ -4,11 +4,11 @@
|
||||
|
||||
programs.fish = {
|
||||
shellAbbrs = {
|
||||
nr = "rebuild-darwin";
|
||||
nro = "rebuild-darwin offline";
|
||||
nr = lib.mkForce "rebuild-darwin";
|
||||
nro = lib.mkForce "rebuild-darwin offline";
|
||||
};
|
||||
functions = {
|
||||
rebuild-nixos = {
|
||||
rebuild-darwin = {
|
||||
body = ''
|
||||
if test "$argv[1]" = "offline"
|
||||
set option "--option substitute false"
|
||||
@ -16,7 +16,7 @@
|
||||
pushd ${config.dotfilesPath}
|
||||
git add --all
|
||||
popd
|
||||
commandline -r darwin-rebuild switch $option --flake ${config.dotfilesPath}#macbook
|
||||
commandline -r "darwin-rebuild switch $option --flake ${config.dotfilesPath}#macbook"
|
||||
commandline -f execute
|
||||
'';
|
||||
};
|
||||
|
@ -1,8 +1,19 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
users.users."${config.user}" = { # macOS user
|
||||
home = "/Users/${config.user}";
|
||||
shell = pkgs.zsh; # Default shell
|
||||
};
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
accounts.email.accounts.home = {
|
||||
passwordCommand = lib.mkForce
|
||||
"${pkgs.age}/bin/age --decrypt --identity /Users/${config.user}/.ssh/id_ed25519 ${
|
||||
builtins.toString ./mailpass.age
|
||||
}";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
pushd ${config.dotfilesPath}
|
||||
git add --all
|
||||
popd
|
||||
commandline -r doas nixos-rebuild switch $option --flake ${config.dotfilesPath}
|
||||
commandline -r "doas nixos-rebuild switch $option --flake ${config.dotfilesPath}"
|
||||
commandline -f execute
|
||||
'';
|
||||
};
|
||||
|
@ -19,7 +19,7 @@
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = "/Users/${config.user}/mail";
|
||||
maildirBasePath = "$HOME/mail";
|
||||
accounts = {
|
||||
home = let address = "${config.user}@${config.mailServer}";
|
||||
in {
|
||||
@ -68,7 +68,7 @@
|
||||
mu.enable = false;
|
||||
notmuch.enable = false;
|
||||
passwordCommand =
|
||||
"${pkgs.age}/bin/age --decrypt --identity /Users/${config.user}/.ssh/id_ed25519 ${
|
||||
"${pkgs.age}/bin/age --decrypt --identity /home/${config.user}/.ssh/id_ed25519 ${
|
||||
builtins.toString ./mailpass.age
|
||||
}";
|
||||
smtp = {
|
||||
|
Loading…
Reference in New Issue
Block a user