play with config
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "Starter Configuration with secrets for MacOS and NixOS";
|
description = "Configuration for my macOS laptops and NixOS server";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
@@ -57,12 +57,12 @@
|
|||||||
};
|
};
|
||||||
mkLinuxApps = system: {
|
mkLinuxApps = system: {
|
||||||
"apply" = mkApp "apply" system;
|
"apply" = mkApp "apply" system;
|
||||||
|
"build" = mkApp "build" system;
|
||||||
"build-switch" = mkApp "build-switch" system;
|
"build-switch" = mkApp "build-switch" system;
|
||||||
"copy-keys" = mkApp "copy-keys" system;
|
"copy-keys" = mkApp "copy-keys" system;
|
||||||
"create-keys" = mkApp "create-keys" system;
|
"create-keys" = mkApp "create-keys" system;
|
||||||
"check-keys" = mkApp "check-keys" system;
|
"check-keys" = mkApp "check-keys" system;
|
||||||
"install" = mkApp "install" system;
|
"rollback" = mkApp "rollback" system;
|
||||||
"install-with-secrets" = mkApp "install-with-secrets" system;
|
|
||||||
};
|
};
|
||||||
mkDarwinApps = system: {
|
mkDarwinApps = system: {
|
||||||
"apply" = mkApp "apply" system;
|
"apply" = mkApp "apply" system;
|
||||||
|
|||||||
@@ -1,40 +1,32 @@
|
|||||||
{ agenix, config, pkgs, ... }:
|
{ agenix, config, pkgs, ... }:
|
||||||
|
|
||||||
let user = "cschmatzler"; in
|
let user = "cschmatzler"; in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/darwin/secrets.nix
|
../../modules/darwin/secrets.nix
|
||||||
../../modules/darwin/home-manager.nix
|
../../modules/darwin/home-manager.nix
|
||||||
../../modules/shared
|
../../modules/shared
|
||||||
agenix.darwinModules.default
|
agenix.darwinModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
# Setup user, packages, programs
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nix;
|
package = pkgs.nix;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
trusted-users = [ "@admin" "${user}" ];
|
trusted-users = [ "@admin" "${user}" ];
|
||||||
substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ];
|
substituters = [ "https://nix-community.cachix.org" "https://cache.nixos.org" ];
|
||||||
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
interval = { Weekday = 0; Hour = 2; Minute = 0; };
|
interval = { Weekday = 0; Hour = 2; Minute = 0; };
|
||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Turn off NIX_PATH warnings now that we're using flakes
|
|
||||||
|
|
||||||
# Load configuration that is shared across systems
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
agenix.packages."${pkgs.system}".default
|
agenix.packages."${pkgs.system}".default
|
||||||
] ++ (import ../../modules/shared/packages.nix { inherit pkgs; });
|
] ++ (import ../../modules/shared/packages.nix { inherit pkgs; });
|
||||||
|
|||||||
@@ -1,6 +1,2 @@
|
|||||||
_:
|
_:
|
||||||
|
[]
|
||||||
[
|
|
||||||
"raycast"
|
|
||||||
"1password"
|
|
||||||
]
|
|
||||||
|
|||||||
@@ -21,25 +21,11 @@ in
|
|||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
casks = pkgs.callPackage ./casks.nix {};
|
casks = pkgs.callPackage ./casks.nix {};
|
||||||
# onActivation.cleanup = "uninstall";
|
|
||||||
|
|
||||||
# These app IDs are from using the mas CLI app
|
|
||||||
# mas = mac app store
|
|
||||||
# https://github.com/mas-cli/mas
|
|
||||||
#
|
|
||||||
# $ nix shell nixpkgs#mas
|
|
||||||
# $ mas search <app name>
|
|
||||||
#
|
|
||||||
# If you have previously added these apps to your Mac App Store profile (but not installed them on this system),
|
|
||||||
# you may receive an error message "Redownload Unavailable with This Apple ID".
|
|
||||||
# This message is safe to ignore. (https://github.com/dustinlyons/nixos-config/issues/83)
|
|
||||||
|
|
||||||
masApps = {
|
masApps = {
|
||||||
# "wireguard" = 1451685025;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable home-manager
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
users.${user} = { pkgs, config, lib, ... }:{
|
users.${user} = { pkgs, config, lib, ... }:{
|
||||||
@@ -50,14 +36,9 @@ in
|
|||||||
sharedFiles
|
sharedFiles
|
||||||
additionalFiles
|
additionalFiles
|
||||||
];
|
];
|
||||||
|
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
};
|
};
|
||||||
programs = {} // import ../shared/home-manager.nix { inherit config pkgs lib; };
|
programs = {} // import ../shared/home-manager.nix { inherit config pkgs lib; };
|
||||||
|
|
||||||
# Marked broken Oct 20, 2022 check later to remove this
|
|
||||||
# https://github.com/nix-community/home-manager/issues/3344
|
|
||||||
manual.manpages.enable = false;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,6 @@ with pkgs;
|
|||||||
let shared-packages = import ../shared/packages.nix { inherit pkgs; }; in
|
let shared-packages = import ../shared/packages.nix { inherit pkgs; }; in
|
||||||
shared-packages ++ [
|
shared-packages ++ [
|
||||||
dockutil
|
dockutil
|
||||||
|
_1password-gui
|
||||||
|
raycast
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
@@ -11,7 +9,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
overlays =
|
overlays =
|
||||||
# Apply each overlay found in the /overlays directory
|
|
||||||
let path = ../../overlays; in with builtins;
|
let path = ../../overlays; in with builtins;
|
||||||
map (n: import (path + ("/" + n)))
|
map (n: import (path + ("/" + n)))
|
||||||
(filter (n: match ".*\\.nix" n != null ||
|
(filter (n: match ".*\\.nix" n != null ||
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ let name = "Christoph Schmatzler";
|
|||||||
file = "p10k.zsh";
|
file = "p10k.zsh";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
initExtraFirst = ''
|
initContent = lib.mkBefore ''
|
||||||
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix.sh
|
. /nix/var/nix/profiles/default/etc/profile.d/nix.sh
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ with pkgs; [
|
|||||||
docker-compose
|
docker-compose
|
||||||
gnupg
|
gnupg
|
||||||
iosevka
|
iosevka
|
||||||
|
jujutsu
|
||||||
|
jjui
|
||||||
|
nixfmt
|
||||||
jq
|
jq
|
||||||
killall
|
killall
|
||||||
libfido2
|
libfido2
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
self: super: with super; {
|
|
||||||
|
|
||||||
feather-font = let
|
|
||||||
version = "1.0";
|
|
||||||
pname = "feather-font";
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
name = "${pname}-${version}";
|
|
||||||
|
|
||||||
src = fetchzip {
|
|
||||||
url = "https://github.com/dustinlyons/feather-font/archive/refs/tags/${version}.zip";
|
|
||||||
sha256 = "sha256-Zsz8/qn7XAG6BVp4XdqooEqioFRV7bLH0bQkHZvFbsg=";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ unzip ];
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/fonts/truetype
|
|
||||||
cp $src/feather.ttf $out/share/fonts/truetype/
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "https://www.feathericons.com/";
|
|
||||||
description = "Set of font icons from the open source collection Feather Icons";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = [ maintainers.dlyons ];
|
|
||||||
platforms = [ platforms.x86_64-linux platforms.x86_64-darwin ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
# Overlays
|
# Overlays
|
||||||
|
|
||||||
Files in this directory run automatically as part of each build. Some common ways I've used overlays in the past:
|
Files in this directory run automatically as part of each build.
|
||||||
* Applying patches
|
|
||||||
* Downloading different versions of files (locking to a version or trying a fork)
|
|
||||||
* Workarounds and stuff I need to run temporarily
|
|
||||||
|
|||||||
Reference in New Issue
Block a user