mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-04 20:21:11 +00:00
switch on darwin
This commit is contained in:
parent
1833b4b46c
commit
98356634cd
42
flake.lock
generated
42
flake.lock
generated
@ -22,11 +22,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741229100,
|
||||
"narHash": "sha256-0HwrTDXp9buEwal/1ymK9uQmzUD5ozIA7CJGqnT/gLs=",
|
||||
"lastModified": 1742013980,
|
||||
"narHash": "sha256-34YbfwABU5nb0F5eaaJE3ujldaNDhmyxw7CWqhXJV08=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "adf5c88ba1fe21af5c083b4d655004431f20c5ab",
|
||||
"rev": "9175b4bb5f127fb7b5784b14f7e01abff24c378f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -43,11 +43,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1740485968,
|
||||
"narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=",
|
||||
"lastModified": 1741786315,
|
||||
"narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940",
|
||||
"rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -155,11 +155,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741378606,
|
||||
"narHash": "sha256-ytDmwV93lZ1f6jswJkxEQz5cBlwje/2rH/yUZDADZNs=",
|
||||
"lastModified": 1741955947,
|
||||
"narHash": "sha256-2lbURKclgKqBNm7hVRtWh0A7NrdsibD0EaWhahUVhhY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "95711f926676018d279ba09fe7530d03b5d5b3e2",
|
||||
"rev": "4e12151c9e014e2449e0beca2c0e9534b96a26b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -304,11 +304,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1741246872,
|
||||
"narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=",
|
||||
"lastModified": 1742069588,
|
||||
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "10069ef4cf863633f57238f179a0297de84bd8d3",
|
||||
"rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -343,11 +343,11 @@
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741383898,
|
||||
"narHash": "sha256-hIiLfvj0qZjBLhk5eBhIv8SZJ+bI8d06Hxp480mJ1aI=",
|
||||
"lastModified": 1742145955,
|
||||
"narHash": "sha256-ju1J45e22ebpLH3eSm0ZZYg7WHkN01ryTFv+4UNwCOA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "54352c3c3110f34e71a2ae9a0210aa6955555760",
|
||||
"rev": "d6ba59dd58ebe6c184f955e1d3a4bbca9484c018",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -432,11 +432,11 @@
|
||||
"tree-sitter-ini": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1725233451,
|
||||
"narHash": "sha256-G11Aynq2rnkRwdkhspjYqtBD/h5k4aD+NvuE0QfploU=",
|
||||
"lastModified": 1741697356,
|
||||
"narHash": "sha256-kWCaOIC81GP5EHCqzPZP9EUgYy39CZ6/8TVS6soB6Wo=",
|
||||
"owner": "justinmk",
|
||||
"repo": "tree-sitter-ini",
|
||||
"rev": "962568c9efa71d25720ab42c5d36e222626ef3a6",
|
||||
"rev": "32b31863f222bf22eb43b07d4e9be8017e36fb31",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -556,11 +556,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741192150,
|
||||
"narHash": "sha256-wB140alXVla1Rw/kENerUoma2qO1Jy5IYWbmiSqmJu0=",
|
||||
"lastModified": 1741870048,
|
||||
"narHash": "sha256-odXRdNZGdXg1LmwlAeWL85kgy/FVHsgKlDwrvbR2BsU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "0e4ccdb8181da2c6193c047b50ffee5f1a3b6dc1",
|
||||
"rev": "5d76001e33ee19644a598ad80e7318ab0957b122",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
11
flake.nix
11
flake.nix
@ -267,12 +267,23 @@
|
||||
) hosts
|
||||
) lib.linuxHosts;
|
||||
|
||||
# darwinConfigurations = {
|
||||
# aarch64-darwin = {
|
||||
# lookingglass = lib.buildDarwin {
|
||||
# system = "aarch64-darwin";
|
||||
# module = { };
|
||||
# specialArgs = { };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
darwinConfigurations = builtins.mapAttrs (
|
||||
system: hosts:
|
||||
builtins.mapAttrs (
|
||||
name: module:
|
||||
lib.buildDarwin {
|
||||
inherit system module;
|
||||
specialArgs = { inherit (globals) hostnames; };
|
||||
}
|
||||
) hosts
|
||||
) lib.darwinHosts;
|
||||
|
@ -33,5 +33,8 @@ rec {
|
||||
name = "Noah-Masur_1701";
|
||||
email = "${nmasur.settings.username}@take2games.com";
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
system.stateVersion = 5;
|
||||
}
|
||||
|
@ -138,6 +138,7 @@ lib
|
||||
specialArgs,
|
||||
}:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
pkgs = pkgsBySystem.${system};
|
||||
modules = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
@ -153,19 +154,31 @@ lib
|
||||
} // homeModule.home-manager;
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
} // specialArgs;
|
||||
};
|
||||
|
||||
buildDarwin =
|
||||
{ system, module }:
|
||||
{
|
||||
system,
|
||||
module,
|
||||
specialArgs,
|
||||
}:
|
||||
inputs.darwin.lib.darwinSystem {
|
||||
pkgs = pkgsBySystem.${system};
|
||||
inherit system specialArgs;
|
||||
modules = [
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
inputs.mac-app-util.darwinModules.default
|
||||
{ imports = (nixFiles ../platforms/nix-darwin); }
|
||||
{
|
||||
imports = (nixFiles ../platforms/nix-darwin);
|
||||
nixpkgs.pkgs = pkgsBySystem.${system};
|
||||
}
|
||||
module
|
||||
{
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit colorscheme;
|
||||
} // specialArgs;
|
||||
} // homeModule.home-manager;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
inputs: _final: prev: {
|
||||
|
||||
# Based on:
|
||||
# https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/default.nix#L34
|
||||
|
||||
bypass-paywalls-clean =
|
||||
let
|
||||
addonId = "magnolia@12.34";
|
||||
in
|
||||
prev.stdenv.mkDerivation rec {
|
||||
pname = "bypass-paywalls-clean";
|
||||
version = "4.0.6.0";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://gitflic.ru/project/magnolia1234/bpc_uploads.git";
|
||||
# owner = "magnolia1234";
|
||||
# repo = "bpc_uploads";
|
||||
ref = "main";
|
||||
rev = "a3012f84bad9719760150832803f2ea07af8dae3";
|
||||
# sha256 = "0000000000000000000000000000000000000000000000000000";
|
||||
};
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
buildCommand = ''
|
||||
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
mkdir -p "$dst"
|
||||
install -v -m644 "${src}" "$dst/${addonId}.xpi"
|
||||
'';
|
||||
};
|
||||
}
|
@ -5,11 +5,11 @@
|
||||
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "bypass-paywalls-clean";
|
||||
version = "4.0.6.0";
|
||||
version = "4.0.6.1";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://gitflic.ru/project/magnolia1234/bpc_uploads.git";
|
||||
ref = "main";
|
||||
rev = "a3012f84bad9719760150832803f2ea07af8dae3";
|
||||
rev = "85a367220f5ae2181354f65fb1093e2f1ac9e417";
|
||||
};
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
|
@ -23,7 +23,7 @@ in
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
|
||||
package = if pkgs.stdenv.isDarwin then pkgs.firefox-unwrapped else pkgs.firefox;
|
||||
profiles.default = {
|
||||
id = 0;
|
||||
name = "default";
|
||||
|
@ -52,7 +52,7 @@ in
|
||||
};
|
||||
|
||||
# Personal git config
|
||||
xdg.configFile."git/personal".text = pkgs.formats.gitIni {
|
||||
xdg.configFile."git/personal".text = lib.generators.toGitINI {
|
||||
user = {
|
||||
name = cfg.personal.name;
|
||||
email = cfg.personal.email;
|
||||
|
@ -15,8 +15,8 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
nmasur.presets.programs = {
|
||||
fish = lib.mkDefault true;
|
||||
homebrew = lib.mkDefault true;
|
||||
fish.enable = lib.mkDefault true;
|
||||
homebrew.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
homebrew.brews = [
|
||||
@ -27,18 +27,5 @@ in
|
||||
"notunes" # Don't launch Apple Music with the play button
|
||||
];
|
||||
|
||||
# Include home-manager config in nix-darwin
|
||||
home-manager = {
|
||||
sharedModules = [ ../../../../home-manager ];
|
||||
|
||||
# Use the system-level nixpkgs instead of Home Manager's
|
||||
useGlobalPkgs = lib.mkDefault true;
|
||||
|
||||
# Install packages to /etc/profiles instead of ~/.nix-profile, useful when
|
||||
# using multiple profiles for one user
|
||||
useUserPackages = lib.mkDefault true;
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user