Started working on darwin integration

This commit is contained in:
Andrea Ciceri 2021-10-05 20:20:51 +02:00
parent ce354185e8
commit 64342dd5c2
No known key found for this signature in database
GPG key ID: AAFD2423608B645B
5 changed files with 66 additions and 1 deletions

View file

@ -52,6 +52,7 @@
, nixos , nixos
, home , home
, nixos-hardware , nixos-hardware
, darwin
, pinebook-pro , pinebook-pro
, pinebook-pro-kernel-latest , pinebook-pro-kernel-latest
, nixpkgs-wayland , nixpkgs-wayland
@ -119,6 +120,7 @@
]; ];
}; };
hosts = { hosts = {
# mbp is added bypassing Digga's mkFlake and adding a specific output to this flake
pc = { pc = {
system = "x86_64-linux"; system = "x86_64-linux";
}; };
@ -179,5 +181,12 @@
// { // {
budModules = { devos = import ./bud; }; budModules = { devos = import ./bud; };
# checks.aarch64-linux = { }; # this line will be uncommented by Github Action in order since it can't build aarch64 derivations # checks.aarch64-linux = { }; # this line will be uncommented by Github Action in order since it can't build aarch64 derivations
}
// {
darwinConfigurations."mbp" = darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [ home.darwinModules.home-manager ./hosts/mbp ];
inputs = { inherit darwin; };
};
}; };
} }

View file

@ -0,0 +1,30 @@
{pkgs, home-manager, ...}:
{
imports = [
../../users/andreaciceri
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes flakes ca-references
keep-derivations = true
keep-outputs = true
'';
gc = {
automatic = false;
user = "andreaciceri";
options = "--delete-older-than 3d";
};
};
}

8
hosts/mbp/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ pkgs, ...}:
{
imports = [
./configuration.nix
];
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }: {
home-manager.users."andreaciceri" = {...}: {
imports = [
../profiles/bat
../profiles/fzf
../profiles/zsh
../profiles/direnv
../profiles/exa
];
home.packages = with pkgs; [
yarn
];
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, config, ... }:
{ {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@ -55,5 +55,8 @@
PROMPT = "\\\${IN_NIX_SHELL:+[nix-shell] }$PROMPT"; PROMPT = "\\\${IN_NIX_SHELL:+[nix-shell] }$PROMPT";
}; };
loginExtra = "[[ -z $DISPLAY && $TTY = /dev/tty1 ]] && exec sway"; loginExtra = "[[ -z $DISPLAY && $TTY = /dev/tty1 ]] && exec sway";
initExtra = if pkgs.system == "x86_64-darwin"
then "if test -e /etc/static/bashrc; then source /etc/static/bashrc > /dev/null 2>&1; fi"
else "";
}; };
} }