working darwin system

main
Carsten Kragelund 2023-06-16 10:38:12 +02:00
parent d7dd5f2236
commit 856d6caa9d
Signed by: nyx
GPG Key ID: CADDADEEC9F753C0
11 changed files with 60 additions and 79 deletions

@ -5,7 +5,7 @@
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
@ -213,7 +213,7 @@
"inputs": {
"crane": "crane_2",
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs"
],
"wezterm-src": "wezterm-src"
},
@ -304,22 +304,6 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1686828063,
"narHash": "sha256-Cv0Sx1N5+3xBDF5OnmFU3Qoh9OqZmXDBKg1fgXlXTWs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "683f2f5ba2ea54abb633d0b17bc9f7f6dede5799",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1686892756,
@ -344,7 +328,6 @@
"nix-darwin": "nix-darwin",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur",
"sanctureplicum-nur": "sanctureplicum-nur",
"sops-nix": "sops-nix"
@ -405,7 +388,7 @@
"sanctureplicum-nur": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs"
]
},
"locked": {
@ -425,7 +408,7 @@
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs"
],
"nixpkgs-stable": [
"nixpkgs"

@ -1,15 +1,14 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nur.url = "github:nix-community/nur";
sanctureplicum-nur = {
url = "git+https://gitea.pid1.sh/sanctureplicum/nur";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
};
nekowinston-nur = {
url = "github:nekowinston/nur";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
@ -18,7 +17,7 @@
sops-nix = {
url = "github:Mic92/sops-nix";
inputs = {
nixpkgs.follows = "nixpkgs-unstable";
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
};
@ -32,7 +31,7 @@
};
crane = {
url = "github:ipetkov/crane/v0.11.3";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
@ -43,7 +42,6 @@
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
nur,
sanctureplicum-nur,
nekowinston-nur,
@ -57,24 +55,24 @@
} @ inputs: let
overlays = [
(import emacs-overlay)
(final: prev: let
unstable = import nixpkgs-unstable {
system = prev.system;
config.allowUnfree = true;
};
in {
(final: prev:
# let unstable = import nixpkgs-unstable {
# system = prev.system;
# config.allowUnfree = true;
# }; in
{
nur = import nur {
nurpkgs = unstable;
pkgs = unstable;
nurpkgs = prev;
pkgs = prev;
repoOverrides = {
nekowinston = import nekowinston-nur {pkgs = unstable;};
nekowinston = import nekowinston-nur {pkgs = prev;};
sanctureplicum = import sanctureplicum-nur {
pkgs = unstable;
system = unstable.system;
pkgs = prev;
system = prev.system;
};
};
};
inherit unstable;
#inherit unstable;
})
];
in {

@ -1,5 +1,16 @@
{ config, lib, ... }: {
{ config, lib, pkgs, ... }: {
security.pam.enableSudoTouchIdAuth = true;
services.nix-daemon.enable = true;
homebrew = {
enable = true;
casks = [
"discord"
"firefox-developer-edition"
"alfred"
"ukelele"
];
taps = ["homebrew/cask" "homebrew/cask-versions" ];
};
}

@ -23,9 +23,6 @@ with pkgs; {
# Maximum number of jobs that Nix will try to build in parallel
max-jobs = "auto";
# Perform builds in a sandboxed environment
sandbox = true;
# Enable flakes
experimental-features = ["nix-command" "flakes"];

@ -8,6 +8,7 @@
../common
];
users.users.carsten.home = "/Users/carsten";
nix.settings.build-cores = 8;
networking.hostName = "hawk";

@ -3,8 +3,8 @@
sessionPath = [ "${config.xdg.configHome}/emacs/bin" ];
sessionVariables = {
DOOMDIR = "${config.xdg.configHome}/doom";
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
DOOMPROFILELOADFILE = "${config.xdg.configHome}/doom-local/profiles.el";
DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
DOOMPROFILELOADFILE = "${config.xdg.dataHome}/doom/profiles.el";
};
};
systemd.user.sessionVariables = config.home.sessionVariables;
@ -17,25 +17,14 @@
];
xdg.configFile = {
"doom" = {
source = ./doom;
onChange = "${pkgs.writeShellScript "doom-change" ''
export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
export PATH="${lib.makeBinPath [ pkgs.git ]}:$PATH"
export EMACS="${toString config.home.path}/bin/emacs"
if [ ! -d "$DOOMLOCALDIR" ]; then
${config.xdg.configHome}/emacs/bin/doom install
else
${config.xdg.configHome}/emacs/bin/doom sync -e
fi
''}";
};
"doom/config.el".source = config.lib.file.mkOutOfStoreSymlink (./doom + "/config.el");
"doom/init.el".source = config.lib.file.mkOutOfStoreSymlink (./doom + "/init.el");
"doom/packages.el".source = config.lib.file.mkOutOfStoreSymlink (./doom + "/packages.el");
"emacs" = {
source = pkgs.fetchgit {
url = "https://github.com/doomemacs/doomemacs";
rev = "4e105a95af9c4c7e86471e5566eb7a5ff776ec92";
sha256 = "sha256-X6kCIc1PU0AZBSDhlyJ2Az3jgC6ZHiAfB2yuHDvIpQ4=";
rev = "07fca786154551f90f36535bfb21f8ca4abd5027";
sha256 = "sha256-qAI2FbELXIYDMsgMjn19MhYS9WaOxzpcWrATgQW+RP8=";
};
onChange = "${pkgs.writeShellScript "doom-change" ''
export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"

@ -86,6 +86,7 @@
"extensions.shield-recipe-client.api_url" = "";
"extensions.shield-recipe-client.enabled" = false;
"extensions.webservice.discoverURL" = "";
"full-screen-api.ignore-widgets" = true;
"media.autoplay.default" = 1;
"media.autoplay.enabled" = false;
"media.eme.enabled" = false;

@ -5,21 +5,8 @@
...
}: {
imports = [];
users.users.carsten = {
home = if pkgs.stdenv.isDarwin then "/Users/carsten" else "/home/carsten";
} // lib.mkIf pkgs.stdenv.isLinux {
isNormalUser = true;
description = "Carsten Kragelund";
hashedPassword = "$y$j9T$oL/jNqI1yz65OuUnJvpCn1$MC7.xSyvprru7QmqQVsGyBKZf2b4w7R7U.TmfzSBY39";
shell = pkgs.bash;
packages = [];
extraGroups = [
"networkmanager" # Use networks
"wheel" # Sudoer
"vboxusers" # VirtualBox
"docker" # Containers
];
users.users.carten = {
home = if lib.traceVal pkgs.stdenv.isLinux then "/home/carsten" else lib.traceVal "/Users/carsten";
};
@ -31,7 +18,7 @@
home = {
stateVersion = builtins.trace config.users.users.carsten.home "23.05";
homeDirectory = lib.mkIf pkgs.stdenv.isLinux "/home/carsten";
homeDirectory = if pkgs.stdenv.isLinux then "/home/carsten" else lib.mkForce "/Users/carsten";
username = "carsten";
};
};

@ -0,0 +1,14 @@
{ pkgs, lib, ... }: {
config.users.users.carsten = lib.mkIf pkgs.stdenv.isLinux {
isNormalUser = true;
description = "Carsten Kragelund";
hashedPassword = "$y$j9T$oL/jNqI1yz65OuUnJvpCn1$MC7.xSyvprru7QmqQVsGyBKZf2b4w7R7U.TmfzSBY39";
shell = pkgs.bash;
extraGroups = [
"networkmanager" # Use networks
"wheel" # Sudoer
"vboxusers" # VirtualBox
"docker" # Containers
];
};
}

@ -52,7 +52,6 @@
rust-analyzer
]
++ lib.lists.optionals (osConfig.graphical or true) [
(discord.override {withOpenASAR = true;})
recursive
# Local
(callPackage ./areon-pro {})
@ -60,6 +59,7 @@
pkgs.nur.repos.sanctureplicum.rec-mono-nyx
] ++ lib.lists.optionals (osConfig.graphical or true && pkgs.stdenv.isLinux) [
(discord.override {withOpenASAR = true;})
catppuccin-gtk
pavucontrol
dconf

@ -2,6 +2,6 @@
programs.neovim.enable = true;
programs.emacs = {
enable = true;
package = pkgs.emacsUnstable;
package = pkgs.emacs;
};
}