nixos fix, remove cachix and mac gui apps

This commit is contained in:
willemml 2023-06-19 07:51:10 -07:00
parent a81377f547
commit a005df4a40
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
21 changed files with 108 additions and 209 deletions

View file

@ -1,12 +0,0 @@
{
writeShellApplication,
cachix,
stdenv,
}:
writeShellApplication {
name = "cachix";
runtimeInputs = [cachix];
text = ''
exec cachix -d ./cachix -m nixos "$@"
'';
}

View file

@ -1,13 +0,0 @@
# WARN: this file will get overwritten by $ cachix use <name>
{
pkgs,
lib,
...
}: let
folder = ./cachix;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
}

View file

@ -1,12 +0,0 @@
{
nix = {
settings = {
substituters = [
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
};
}

View file

@ -1,12 +0,0 @@
{
nix = {
settings = {
substituters = [
"https://cache.nixos.org/"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
};
};
}

View file

@ -1,12 +0,0 @@
{
nix = {
settings = {
substituters = [
"https://willemml.cachix.org"
];
trusted-public-keys = [
"willemml.cachix.org-1:A8M1pBOuBmA6f4Pq4+VNO0r4Joi2I3DZI72V3U+YnKg="
];
};
};
}

View file

@ -32,8 +32,6 @@
home.sessionVariables.NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
nix.registry.nixpkgs.flake = inputs.nixpkgs;
};
nix-useCachix = ../../cachix/cachix.nix;
}
// modules;
}

View file

@ -8,19 +8,18 @@
homeManagerModules.user-willem = {
imports = [
self.homeManagerModules.default
self.homeManagerModules.nix-useCachix
self.homeManagerModules.nixpkgs-useFlakeNixpkgs
self.homeManagerModules.nixpkgs-config
];
home.username = "willem";
home.stateVersion = "22.11";
home.stateVersion = "23.11";
};
homeManagerModules.user-willem-darwin = {
imports = [
self.homeManagerModules.darwin
self.homeManagerModules.user-willem
self.homeManagerModules.nixpkgs-config
self.homeManagerModules.nixpkgs-useFlakeNixpkgs
];
home.homeDirectory = "/Users/willem";

View file

@ -7,27 +7,23 @@
nixosModules.base = {config, ...}: {
imports = [
../../nixos/profiles/common.nix
../../nixos/profiles/linux-common.nix
../../nixos/profiles/linux/base.nix
inputs.home-manager.nixosModules.home-manager
self.nixosModules.default
self.nixosModules.home-manager-integration
self.nixosModules.nix-useCachix
self.nixosModules.nixpkgs-useFlakeNixpkgs
];
nixpkgs.overlays = builtins.attrValues self.overlays;
nixpkgs.config.allowUnfree = true;
home-manager = {
sharedModules = [self.homeManagerModules.user-willem-linux];
};
home-manager.users.willem = self.homeManagerModules.user-willem-linux;
};
darwinModules.base = {config, ...}: {
imports = [
../../nixos/profiles/common.nix
inputs.home-manager.darwinModules.home-manager
self.nixosModules.custom-linkNixInputs
self.nixosModules.linkNixInputs
self.nixosModules.home-manager-integration
self.nixosModules.nix-useCachix
self.nixosModules.nixpkgs-useFlakeNixpkgs
@ -36,9 +32,7 @@
nixpkgs.overlays = builtins.attrValues self.overlays;
nixpkgs.config.allowUnfree = true;
home-manager = {
sharedModules = [self.homeManagerModules.user-willem-darwin];
};
home-manager.users.willem = self.homeManagerModules.user-willem-darwin;
};
nixosConfigurations.zeusvm = inputs.nixpkgs.lib.nixosSystem {

View file

@ -25,8 +25,6 @@
nix.registry.nixpkgs.flake = inputs.nixpkgs;
};
nix-useCachix = ../../cachix/cachix.nix;
home-manager-integration = {
config.home-manager = {
useGlobalPkgs = true;

108
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1685559570,
"narHash": "sha256-MNIQvLRoq92isMLR/ordKNCl+aXNiuwBM4QyqmS8d00=",
"lastModified": 1687110393,
"narHash": "sha256-SnkdWeZ8PZd3Dc74iFF8xiE7qDp5+z3Yps2mE79tsM0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4338bc869e9874d54a4c89539af72f16666b2abe",
"rev": "8a5af0da9d8dab8a188436750489e304ac682085",
"type": "github"
},
"original": {
@ -29,11 +29,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1685787331,
"narHash": "sha256-th38r/V0uUDeflZ8cfiXX5rv/ioZhicBW9M0y8r4KMU=",
"lastModified": 1687144148,
"narHash": "sha256-mma7NnNyWsREy0S3wW2BBmhYfgKUyAiSpIq9Ij3ID0k=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "fbbf354bceb8d42d1e0eef8116b66e9947c84017",
"rev": "37ab2cb6a09245809e862dde7ed9adcd5b83d62d",
"type": "github"
},
"original": {
@ -48,11 +48,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1685773231,
"narHash": "sha256-UXX8dNzmZFqQhvHKPoarLxgTUll+knUHLW1W71gwnEQ=",
"lastModified": 1687140903,
"narHash": "sha256-GyeqHmNthCQmAj/lRaIG3RoTw1GN7ED/ozAWGUsUKOo=",
"owner": "nix-community",
"repo": "fenix",
"rev": "09380d8560af38fffc04d95951b981f5b754ff48",
"rev": "950eeb21cb03d4e4cd312175b801ffda55836b58",
"type": "github"
},
"original": {
@ -114,12 +114,15 @@
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
@ -171,11 +174,11 @@
]
},
"locked": {
"lastModified": 1685721552,
"narHash": "sha256-ifvq/zlO7lck8q+YkC5uom/h8/MVdMcQEldOL3cDQW0=",
"lastModified": 1687098182,
"narHash": "sha256-kBys+Cwmcxzh7UNVWTrunOgaR02zl2XN3feA8fSlqVo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "29519461834c08395b35f840811faf8c23e3b61c",
"rev": "0480dabc99e1b669ebe909949180fa2786e733cd",
"type": "github"
},
"original": {
@ -192,11 +195,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1683434835,
"narHash": "sha256-idBmY6LKkB5hTcTFroUi1oQdCK1/fDfJA+qNaivl1Wk=",
"lastModified": 1686889638,
"narHash": "sha256-fmMniETOJoDolXiGJP8NnwZ/rCNftFYjech7E1Yonsw=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "ef6f0de57ef175e0de8c7e846a95481ac6f4ce58",
"rev": "002d7e27b1de5885b14c2b2ed3be13c9ad862d23",
"type": "github"
},
"original": {
@ -207,11 +210,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1685655444,
"narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=",
"lastModified": 1686960236,
"narHash": "sha256-AYCC9rXNLpUWzD9hm+askOfpliLEC9kwAo7ITJc4HIw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e635192892f5abbc2289eaac3a73cdb249abaefd",
"rev": "04af42f3b31dba0ef742d254456dc4c14eedac86",
"type": "github"
},
"original": {
@ -241,43 +244,43 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685650716,
"narHash": "sha256-sDd7QIcMbIb37nuqMrJElvuyE5eVgWuKGtIPP8IWwCc=",
"lastModified": 1686921029,
"narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f7c1500e2eefa58f3c80dd046cba256e10440201",
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1685655444,
"narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=",
"lastModified": 1686960236,
"narHash": "sha256-AYCC9rXNLpUWzD9hm+askOfpliLEC9kwAo7ITJc4HIw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e635192892f5abbc2289eaac3a73cdb249abaefd",
"rev": "04af42f3b31dba0ef742d254456dc4c14eedac86",
"type": "github"
},
"original": {
@ -314,11 +317,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1685361114,
"narHash": "sha256-4RjrlSb+OO+e1nzTExKW58o3WRwVGpXwj97iCta8aj4=",
"lastModified": 1686668298,
"narHash": "sha256-AADh9NqHh6X2LOem4BvI7oCkMm+JPCSCE7iIw5nn0VA=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "ca2fdbf3edda2a38140184da6381d49f8206eaf4",
"rev": "5b6b54d3f722aa95cbf4ddbe35390a0af8c0015a",
"type": "github"
},
"original": {
@ -343,11 +346,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1685736988,
"narHash": "sha256-2Z9Auifh8bTp4gw+rySAUSVq0B0cEKJyoV3Znb8wfcQ=",
"lastModified": 1686992290,
"narHash": "sha256-VJ/OYQPULSaMGPqUDaDKJUb3DrI7xMzuiSYMmljtpQo=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "7f3bfc6ae75a47e1fd8d79b4dde79956cdd98093",
"rev": "fcfc6afe0526123ff43086990356bf175664fdfa",
"type": "github"
},
"original": {
@ -360,11 +363,11 @@
"rust-overlay": {
"flake": false,
"locked": {
"lastModified": 1675132198,
"narHash": "sha256-izOVjdIfdv0OzcfO9rXX0lfGkQn4tdJ0eNm3P3LYo/o=",
"lastModified": 1686795910,
"narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "48b1403150c3f5a9aeee8bc4c77c8926f29c6501",
"rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
"type": "github"
},
"original": {
@ -380,11 +383,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1685782576,
"narHash": "sha256-1y68FRGC8nM6/068OewrAsz86SUjLg+kHUw0OmsN1Mo=",
"lastModified": 1686864707,
"narHash": "sha256-A0gSnFrSqwVLBVvs8pEBrlz3bxrhYuIS+CaIOFvTx+g=",
"ref": "refs/heads/master",
"rev": "1f021c34953ecfd8b916df9427a69973b465c1dc",
"revCount": 2897,
"rev": "bb673b0f4466554e82565b3fdb9139c99d9c6df4",
"revCount": 2929,
"type": "git",
"url": "https://git.sr.ht/~rycee/nur-expressions?dir=pkgs%2ffirefox-addons"
},
@ -408,6 +411,21 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View file

@ -35,18 +35,15 @@ in {
// lib.attrsets.mapAttrs (name: value: "open -a '" + value + "'") appCommands;
programs.chromium.package = pkgs.chromium-mac;
programs.firefox.package = pkgs.firefox-mac;
home.packages = with pkgs;
[
colima
iterm2
pinentry-mac
pinentry-touchid
pngpaste
qbittorrent-mac
spoof-mac
utm
vlc-mac
]
++ (let
pkgs_x86_only = pkgs // {system = "x86_64-darwin";};

View file

@ -23,28 +23,6 @@ in {
};
};
agents.firefox = {
enable = true;
config = {
ProgramArguments = ["${config.programs.firefox.package}/bin/firefox"];
KeepAlive = true;
ProcessType = "Interactive";
StandardOutPath = logFile "firefox";
StandardErrorPath = logFile "firefox";
};
};
agents.iterm2 = {
enable = true;
config = {
ProgramArguments = ["${pkgs.iterm2}/Applications/iTerm2.app/Contents/MacOS/iTerm2"];
KeepAlive = true;
ProcessType = "Interactive";
StandardOutPath = logFile "iterm2";
StandardErrorPath = logFile "iterm2";
};
};
agents.offlineimap = {
enable = true;
config = {

View file

@ -78,7 +78,6 @@ in {
bash
bat
black
cachix
clang-tools
cmake
comma
@ -126,9 +125,7 @@ in {
unp
unrar
unzip
vkquake
wget
xquartz
yq
zsh-completions
]

View file

@ -1,54 +1,11 @@
{
config,
lib,
pkgs,
...
}: {
programs.firefox = {
enable = true;
package = pkgs.stdenv.mkDerivation {
name = "firefox-with-policies";
src =
if pkgs.stdenv.isDarwin
then pkgs.firefox-mac
else pkgs.firefox;
policiesJson =
/*
json
*/
''
{
"policies": {
"DisableFirefoxAccounts": true,
"DisableFirefoxStudies": true,
"DisableTelemetry": true,
"DisablePocket": true,
"DontCheckDefaultBrowser": true,
"PasswordManagerEnabled": false
}
}
'';
buildPhase =
/*
sh
*/
''
#
mkdir -p $out/bin
cp -r $src/Applications $out/Applications
export RESOURCESDIR="$out/Applications/Firefox.app/Contents/Resources"
chmod +w $RESOURCESDIR
mkdir $RESOURCESDIR/distribution
echo $policiesJson > $RESOURCESDIR/distribution/policies.json
chmod -w $RESOURCESDIR
cat <<EOF>>$out/bin/firefox
#! ${pkgs.bash}/bin/bash -e
exec "$out/Applications/Firefox.app/Contents/MacOS/Firefox" "\$@"
EOF
chmod +x $out/bin/firefox
'';
};
profiles.primary = {
id = 0;
isDefault = true;
@ -125,12 +82,8 @@
};
extensions = with pkgs.rycee-firefox-addons; [
browserpass
#bypass-paywalls-clean
clearurls
don-t-fuck-with-paste
#dracula-dark-colorscheme
#edit-with-emacs
#fastforward
i-dont-care-about-cookies
musescore-downloader
offline-qr-code-generator

View file

@ -1,13 +1,38 @@
{pkgs, ...}: {
imports = [../profiles/linux-common.nix ../profiles/gnome.nix];
{
config,
inputs,
lib,
modulesPath,
pkgs,
...
}: {
imports = [../profiles/linux/gnome.nix];
boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
device = "/dev/disk/by-uuid/47408b5a-efcf-47b7-abd6-591b890fb1f3";
fsType = "ext4";
};
networking.hostName = "zeus-asahi";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/315C-14F5";
fsType = "vfat";
};
hardware.asahi.extractPeripheralFirmware = false;
swapDevices = [];
networking.useDHCP = lib.mkDefault true;
networking.hostName = "zeusasahi";
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}

View file

@ -1,6 +1,12 @@
{pkgs, ...}: {
imports = [../profiles/common.nix];
nix = {
generateNixPathFromInputs = true;
generateRegistryFromInputs = true;
linkInputs = true;
};
environment.etc."nix/user-sandbox.sb".text = ''
(version 1)
(allow default)

View file

@ -9,9 +9,6 @@
environment.variables.SHELL = "${pkgs.zsh}/bin/zsh";
nix = {
generateNixPathFromInputs = true;
generateRegistryFromInputs = true;
linkInputs = true;
package = pkgs.nix;
settings.experimental-features = ["nix-command" "flakes" "repl-flake"];
settings.trusted-users = ["root" "willem"];

View file

@ -17,7 +17,7 @@
services.udev.enable = true;
system.stateVersion = "22.11";
system.stateVersion = "23.11";
users.users.willem = {
isNormalUser = true;