Works on Darwin

This commit is contained in:
greg-compass
2022-09-07 20:01:51 -05:00
parent 16e54a97b4
commit 4a86e70de4
33 changed files with 123 additions and 110 deletions
Generated
+16 -16
View File
@@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1652712410,
"narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=",
"lastModified": 1662241716,
"narHash": "sha256-urqPvSvvGUhkwzTDxUI8N1nsdMysbAfjmBNZaTYBZRU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b",
"rev": "c96da5835b76d3d8e8d99a0fec6fe32f8539ee2e",
"type": "github"
},
"original": {
@@ -21,15 +21,15 @@
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
"nixunstable"
]
},
"locked": {
"lastModified": 1650976225,
"narHash": "sha256-PGM65SQHS63Dd5MmLJo3GJsZP9lJVZmpWxluQoG1Dt8=",
"lastModified": 1662478528,
"narHash": "sha256-Myjd0HPL5lXri3NXOcJ6gP7IKod2eMweQBKM4uxgEGw=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "bb3baef6e115ae47bc2ab4973bd3a486488485b0",
"rev": "3b69bf3cc26ae19de847bfe54d6ab22d7381a90a",
"type": "github"
},
"original": {
@@ -78,11 +78,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1659342832,
"narHash": "sha256-ePnxG4hacRd6oZMk+YeCSYMNUnHCe+qPLI0/+VaTu48=",
"lastModified": 1662099760,
"narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e43cf1748462c81202a32b26294e9f8eefcc3462",
"rev": "67e45078141102f45eff1589a831aeaa3182b41e",
"type": "github"
},
"original": {
@@ -94,11 +94,11 @@
},
"nixunstable": {
"locked": {
"lastModified": 1659219666,
"narHash": "sha256-pzYr5fokQPHv7CmUXioOhhzDy/XyWOIXP4LZvv/T7Mk=",
"lastModified": 1662019588,
"narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7b9be38c7250b22d829ab6effdee90d5e40c6e5c",
"rev": "2da64a81275b68fdad38af669afeda43d401e94b",
"type": "github"
},
"original": {
@@ -110,11 +110,11 @@
},
"nurpkgs": {
"locked": {
"lastModified": 1659423577,
"narHash": "sha256-i2wSHqFqu4xpBJU/o9SRpQblAHknnEtyeN6Kuq/c1JA=",
"lastModified": 1662575201,
"narHash": "sha256-hLWrWQ7PRLiKYzYMgICzktqZSN+r7i7zol6UVebn7Rg=",
"owner": "nix-community",
"repo": "NUR",
"rev": "0bdb7691364dc93c8f04016c0ed395b675bdc50c",
"rev": "8bdab6eab89b870fc90fa0ec766b4e8c0d8c33ba",
"type": "github"
},
"original": {
+6 -3
View File
@@ -14,7 +14,7 @@
};
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixunstable";
};
nurpkgs.url = "github:nix-community/NUR";
};
@@ -26,7 +26,8 @@
mods = hostname: [
{ nixpkgs.overlays = [ nurpkgs.overlay local_overlay ]; }
agenix.nixosModule
./modules
./modules-all
./modules-linux
./hosts/${hostname}
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
@@ -44,8 +45,10 @@
};
darwinMods = hostname: [
{ nixpkgs.overlays = [ nurpkgs.overlay local_overlay ]; }
inputs.agenix.nixosModule
./modules
./modules-all
./modules-darwin
./hosts/${hostname}
];
+5 -4
View File
@@ -1,8 +1,9 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [
home.packages = with pkgs; ( if ( lib.hasSuffix "-darwin" pkgs.system) then
[] else
[
element-desktop
nheko
];
]);
}
+12 -6
View File
@@ -8,11 +8,17 @@
];
home.packages = with pkgs; [
bitwarden
gnucash
handbrake
onlyoffice-bin
synology-drive-client
vlc
];
] ++ ( if pkgs.system == "x86_64-darwin" then
[
libreoffice-bin
] else
[
bitwarden
gnucash
handbrake
onlyoffice-bin
vlc
]
);
}
+6 -9
View File
@@ -1,9 +1,10 @@
{ lib, pkgs, ... }:
let
ffPkgs = wayland: if wayland
then [ pkgs.firefox-wayland ]
else [ pkgs.firefox ];
# For now, we ignore this and don't install it
ffPkgs = if ( lib.hasSuffix "-darwin" pkgs.system )
then pkgs.firefox-unwrapped
else pkgs.firefox-wayland.override { cfg.enableGnomeExtensions = true; };
vars = {
MOZ_ENABLE_WAYLAND = "1";
@@ -12,12 +13,8 @@ let
in with lib;
{
programs.firefox = {
enable = true;
package = pkgs.firefox-wayland.override {
cfg = {
enableGnomeExtensions = true;
};
};
enable = (if (lib.hasSuffix "-darwin" pkgs.system) then false else true);
package = ffPkgs;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
octotree
+2 -2
View File
@@ -1,7 +1,7 @@
{ ... }:
{ lib, pkgs, ... }:
{
programs.gnome-terminal = {
programs.gnome-terminal = lib.mkIf ( pkgs.system != "x86_64-darwin") {
enable = true;
showMenubar = true;
themeVariant = "dark";
-2
View File
@@ -1,6 +1,4 @@
{ pkgs, ... }:
{
services.nix-daemon.enable = true;
greg.darwin = true;
}
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./nix.nix
./programs.nix
];
}
@@ -5,8 +5,6 @@
nix = {
package = pkgs.nixFlakes;
autoOptimiseStore = true;
# Keep freespace available, at a minimum, and enable Flakes
extraOptions = ''
experimental-features = nix-command flakes
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./automatic
./xprograms.nix
];
}
+10
View File
@@ -0,0 +1,10 @@
{ ... }:
{
system.stateVersion = 4;
programs = {
zsh.enable = true;
bash.enable = true;
};
services.nix-daemon.enable = true;
}
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./syncthing.nix
./users.nix
];
}
+22
View File
@@ -0,0 +1,22 @@
{ ... }:
{
imports = [
./automatic
./backup.nix
./gnome.nix
./home.nix
./linode.nix
./linux.nix
./proxy.nix
./rpi4.nix
./tailscale.nix
];
system.stateVersion = "22.05";
# I am a fan of network manager, myself
networking.networkmanager.enable = true;
nix.settings.auto-optimise-store = true;
}
+11
View File
@@ -0,0 +1,11 @@
{ config, lib, ... }:
let
cfg = config.greg.linux;
in with lib; {
options.greg.linux = mkEnableOption "This system is Linux";
config = mkIf cfg {
};
}
-10
View File
@@ -1,10 +0,0 @@
{ ... }:
{
imports = [
./automatic/nix.nix
./automatic/programs.nix
./automatic/syncthing.nix
# Users imported only for Linux machines
];
}
-18
View File
@@ -1,18 +0,0 @@
{ config, lib, ... }:
let
cfg = config.greg.darwin;
in with lib; {
options = {
greg.darwin = mkEnableOption "This system is Darwin";
};
config = mkIf cfg {
system.stateVersion = 4;
programs = {
zsh.enable = true;
bash.enable = true;
};
};
}
-17
View File
@@ -1,17 +0,0 @@
{ ... }:
{
imports = [
./automatic.nix
./backup.nix
./darwin.nix
./home.nix
./gnome.nix
./linode.nix
./linux.nix
./proxy.nix
./rpi4.nix
./tailscale.nix
./xprograms.nix
];
}
-19
View File
@@ -1,19 +0,0 @@
{ config, lib, ... }:
let
cfg = config.greg.linux;
in with lib; {
options.greg.linux = mkEnableOption "This system is Linux";
config = mkIf cfg {
imports = [
./automatic/users.nix
];
system.stateVersion = "22.05";
# I am a fan of network manager, myself
networking.networkmanager.enable = true;
};
}
+8 -1
View File
@@ -9,11 +9,18 @@ else
target="gui"
fi
if [ "$(uname -s)" == "Darwin" ]; then
src="$HOME/.config/nix/"
target=gui
else
src=/etc/nixos
fi
# Build and switch
echo "Building $(uname -m)-$target"
dest=$(mktemp -d)
pushd "$dest" > /dev/null
nix build --impure /etc/nixos#homeConfigurations.$(uname -m)-$target.activationPackage
nix build --impure "$src#homeConfigurations.$(uname -m)-$target.activationPackage"
./result/activate
popd > /dev/null
rm -r "$dest"
+1 -1
View File
@@ -1 +1 @@
/nix/store/crvk81fyaw1jhqlylxnjcd2y90xpgalr-darwin-system-21.11.20220418.7b38b03+darwin4.bb3baef
/nix/store/xz2mcip95r90gdahyff2vn87hilw7lhp-darwin-system-22.05.20220801.e43cf17+darwin4.bb3baef