diff --git a/README.md b/README.md index e4ecd86..b32ffb8 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ _now mostly focused on my Mac Machines_ Started with a configuration generated from [this nixos config template](https://github.com/dustinlyons/nixos-config/) +Installed nix with `--nix-build-group-id 30000` + Created the full verion with secret-management: ``` diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e34f19f --- /dev/null +++ b/flake.lock @@ -0,0 +1,453 @@ +{ + "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1745630506, + "narHash": "sha256-bHCFgGeu8XjWlVuaWzi3QONjDW3coZDqSHvnd4l7xus=", + "owner": "ryantm", + "repo": "agenix", + "rev": "96e078c646b711aee04b82ba01aefbff87004ded", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "brew-src": { + "flake": false, + "locked": { + "lastModified": 1745912035, + "narHash": "sha256-qwLrR5iOcQMlwS0yrkcd0NRQvrmAXPOaiL6vxxzyIVA=", + "owner": "Homebrew", + "repo": "brew", + "rev": "3332d3331b56e0aff675d3816d8ebfe564075299", + "type": "github" + }, + "original": { + "owner": "Homebrew", + "ref": "4.5.0", + "repo": "brew", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "darwin_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1746254942, + "narHash": "sha256-Y062AuRx6l+TJNX8wxZcT59SSLsqD9EedAY0mqgTtQE=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "760a11c87009155afa0140d55c40e7c336d62d7a", + "type": "github" + }, + "original": { + "owner": "LnL7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1746411114, + "narHash": "sha256-mLlkVX1kKbAa/Ns5u26wDYw4YW4ziMFM21fhtRmfirU=", + "owner": "nix-community", + "repo": "disko", + "rev": "b5d1320ebc2f34dbea4655f95167f55e2130cdb3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-root": { + "locked": { + "lastModified": 1723604017, + "narHash": "sha256-rBtQ8gg+Dn4Sx/s+pvjdq3CB2wQNzx9XGFq/JVGCB6k=", + "owner": "srid", + "repo": "flake-root", + "rev": "b759a56851e10cb13f6b8e5698af7b59c44be26e", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "flake-root", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1746413188, + "narHash": "sha256-i6BoiQP0PasExESQHszC0reQHfO6D4aI2GzOwZMOI20=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "8a318641ac13d3bc0a53651feaee9560f9b2d89a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "homebrew-bundle": { + "flake": false, + "locked": { + "lastModified": 1745335228, + "narHash": "sha256-TIKR2UgtyUmHLNZp255/vLs+1I10hXe+sciMEbAGFwE=", + "owner": "homebrew", + "repo": "homebrew-bundle", + "rev": "a3265c84b232e13048ecbf6fc18a2eedfadbeb08", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-bundle", + "type": "github" + } + }, + "homebrew-cask": { + "flake": false, + "locked": { + "lastModified": 1746548041, + "narHash": "sha256-NXuqVAuVvROa2zsPkAu2U0UmuY5W8xMAp+sh0a5X97s=", + "owner": "homebrew", + "repo": "homebrew-cask", + "rev": "ff11e6f73408740acd6801d948bdd80bdc016987", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-cask", + "type": "github" + } + }, + "homebrew-core": { + "flake": false, + "locked": { + "lastModified": 1746547508, + "narHash": "sha256-OKwD7bSvV5VKYI29GDpVJEKJG8B5CvrfWH12/lEtHeg=", + "owner": "homebrew", + "repo": "homebrew-core", + "rev": "1374116546707e91081660fd3815637f6134a8ce", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-core", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1716329735, + "narHash": "sha256-ap51w+VqG21vuzyQ04WrhI2YbWHd3UGz0e7dc/QQmoA=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "eac4f25028c1975a939c8f8fba95c12f8a25e01c", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-homebrew": { + "inputs": { + "brew-src": "brew-src", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1746464788, + "narHash": "sha256-57lVFGLEGoKXQVSaQQQC+DFDYagUIG4rtEbc4S1nvH8=", + "owner": "zhaofengli-wip", + "repo": "nix-homebrew", + "rev": "20e4702906fb0a8de16902621689cafef445a35d", + "type": "github" + }, + "original": { + "owner": "zhaofengli-wip", + "repo": "nix-homebrew", + "type": "github" + } + }, + "nixd": { + "inputs": { + "flake-parts": "flake-parts", + "flake-root": "flake-root", + "nixpkgs": "nixpkgs_5", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1746347862, + "narHash": "sha256-ZYWReI0/q3Qc9IsKqgyi1xQj0yVEYexhfVkRbMkrROI=", + "owner": "nix-community", + "repo": "nixd", + "rev": "ec9d9968cb9da694eb5e5093e68463b888d7d0f1", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixd", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1745391562, + "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1733096140, + "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1746232882, + "narHash": "sha256-MHmBH2rS8KkRRdoU/feC/dKbdlMkcNkB5mwkuipVHeQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7a2622e2c0dbad5c4493cb268aba12896e28b008", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1687274257, + "narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=", + "path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source", + "rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1746328495, + "narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1744174375, + "narHash": "sha256-oxI9TLgnQbQ/WL0tIwVSIooLbXq4PW1QUhf5aQmXFgk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ef3a956f697525883b77192cbe208233ea0f8f79", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1746328495, + "narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "agenix": "agenix", + "darwin": "darwin_2", + "disko": "disko", + "home-manager": "home-manager_2", + "homebrew-bundle": "homebrew-bundle", + "homebrew-cask": "homebrew-cask", + "homebrew-core": "homebrew-core", + "nix-homebrew": "nix-homebrew", + "nixd": "nixd", + "nixpkgs": "nixpkgs_6", + "secrets": "secrets" + } + }, + "secrets": { + "flake": false, + "locked": { + "path": "git@git.kolkman.org:olaf/nix-config-secrets.git", + "type": "path" + }, + "original": { + "path": "git@git.kolkman.org:olaf/nix-config-secrets.git", + "type": "path" + }, + "parent": [] + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixd", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1734704479, + "narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index df9e003..4d625c9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,18 @@ { description = "Starter Configuration with secrets for MacOS and NixOS"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - agenix.url = "github:ryantm/agenix"; - home-manager.url = "github:nix-community/home-manager"; + nixpkgs = { + url = "github:nixos/nixpkgs/nixos-unstable"; + }; + agenix = { + url = "github:ryantm/agenix"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + }; + nixd = { + url = "github:nix-community/nixd"; + }; darwin = { url = "github:LnL7/nix-darwin/master"; inputs.nixpkgs.follows = "nixpkgs"; @@ -22,34 +31,75 @@ homebrew-cask = { url = "github:homebrew/homebrew-cask"; flake = false; - }; + }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; + secrets = { + url = "git@git.kolkman.org:olaf/nix-config-secrets.git"; + flake = false; + }; }; - outputs = { self, darwin, nix-homebrew, homebrew-bundle, homebrew-core, homebrew-cask, home-manager, nixpkgs, disko, agenix } @inputs: + outputs = + { + self, + darwin, + nix-homebrew, + homebrew-bundle, + homebrew-core, + homebrew-cask, + home-manager, + nixpkgs, + disko, + agenix, + secrets, + nixd, + }@inputs: let - user = "%USER%"; - linuxSystems = [ "x86_64-linux" "aarch64-linux" ]; - darwinSystems = [ "aarch64-darwin" "x86_64-darwin" ]; + user = "olaf"; + linuxSystems = [ + "x86_64-linux" + "aarch64-linux" + ]; + darwinSystems = [ + "aarch64-darwin" + "x86_64-darwin" + ]; forAllSystems = f: nixpkgs.lib.genAttrs (linuxSystems ++ darwinSystems) f; - devShell = system: let pkgs = nixpkgs.legacyPackages.${system}; in { - default = with pkgs; mkShell { - nativeBuildInputs = with pkgs; [ bashInteractive git age age-plugin-yubikey ]; - shellHook = with pkgs; '' - export EDITOR=vim - ''; + devShell = + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + default = + with pkgs; + mkShell { + nativeBuildInputs = with pkgs; [ + bashInteractive + git + age + age-plugin-yubikey + ]; + shellHook = with pkgs; '' + export EDITOR=vim + ''; + buildInputs = with pkgs; [ + rnix-lsp + ]; + }; }; - }; mkApp = scriptName: system: { type = "app"; - program = "${(nixpkgs.legacyPackages.${system}.writeScriptBin scriptName '' - #!/usr/bin/env bash - PATH=${nixpkgs.legacyPackages.${system}.git}/bin:$PATH - echo "Running ${scriptName} for ${system}" - exec ${self}/apps/${system}/${scriptName} - '')}/bin/${scriptName}"; + program = "${ + (nixpkgs.legacyPackages.${system}.writeScriptBin scriptName '' + #!/usr/bin/env bash + PATH=${nixpkgs.legacyPackages.${system}.git}/bin:$PATH + echo "Running ${scriptName} for ${system}" + exec ${self}/apps/${system}/${scriptName} + '') + }/bin/${scriptName}"; }; mkLinuxApps = system: { "apply" = mkApp "apply" system; @@ -72,9 +122,12 @@ in { devShells = forAllSystems devShell; - apps = nixpkgs.lib.genAttrs linuxSystems mkLinuxApps // nixpkgs.lib.genAttrs darwinSystems mkDarwinApps; + apps = + nixpkgs.lib.genAttrs linuxSystems mkLinuxApps + // nixpkgs.lib.genAttrs darwinSystems mkDarwinApps; - darwinConfigurations = nixpkgs.lib.genAttrs darwinSystems (system: + darwinConfigurations = nixpkgs.lib.genAttrs darwinSystems ( + system: darwin.lib.darwinSystem { inherit system; specialArgs = inputs; @@ -99,20 +152,24 @@ } ); - nixosConfigurations = nixpkgs.lib.genAttrs linuxSystems (system: nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = inputs; - modules = [ - disko.nixosModules.disko - home-manager.nixosModules.home-manager { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.${user} = import ./modules/nixos/home-manager.nix; - }; - } - ./hosts/nixos - ]; - }); - }; + nixosConfigurations = nixpkgs.lib.genAttrs linuxSystems ( + system: + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = inputs; + modules = [ + disko.nixosModules.disko + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.${user} = import ./modules/nixos/home-manager.nix; + }; + } + ./hosts/nixos + ]; + } + ); + }; } diff --git a/hosts/darwin/default.nix b/hosts/darwin/default.nix index fcffaa8..041d26d 100644 --- a/hosts/darwin/default.nix +++ b/hosts/darwin/default.nix @@ -1,9 +1,19 @@ { agenix, config, pkgs, ... }: -let user = "%USER%"; in +let user = "olaf"; in { +security = { + pam = { + services ={ + sudo_local ={ + touchIdAuth = true; + }; + }; + }; +}; + imports = [ ../../modules/darwin/secrets.nix ../../modules/darwin/home-manager.nix @@ -39,6 +49,7 @@ let user = "%USER%"; in environment.systemPackages = with pkgs; [ emacs-unstable agenix.packages."${pkgs.system}".default + nixd ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; }); launchd.user.agents.emacs.path = [ config.environment.systemPath ]; diff --git a/hosts/nixos/default.nix b/hosts/nixos/default.nix index 229fb6a..8e7434f 100644 --- a/hosts/nixos/default.nix +++ b/hosts/nixos/default.nix @@ -1,6 +1,6 @@ { config, inputs, pkgs, agenix, ... }: -let user = "%USER%"; +let user = "olaf"; keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOk8iAnIaa1deoc7jw8YACPNVka1ZFJxhnU4G74TmS+p" ]; in { imports = [ @@ -303,5 +303,6 @@ let user = "%USER%"; inetutils ]; + system.stateVersion = "21.05"; # Don't change this } diff --git a/modules/darwin/casks.nix b/modules/darwin/casks.nix index 98f15c3..c472fbb 100644 --- a/modules/darwin/casks.nix +++ b/modules/darwin/casks.nix @@ -4,23 +4,48 @@ _: # Development Tools "homebrew/cask/docker" "visual-studio-code" + "iterm2" + + # Creatative tools + "spotify" + "blender" + "gimp" + "inkscape" + "vcv-rack" + # Communication Tools "discord" "notion" "slack" - "telegram" + "signal" + "whatsapp" "zoom" + "webex" + # Utility Tools "syncthing" + "blackhole-16ch" + "blackhole-2ch" + "box-drive" + "synology-drive" + "spamsieve" # Entertainment Tools "vlc" + "jellyfin-media-player" # Productivity Tools "raycast" + "1Password" + "zotero" + "gpg-suite" + "home-assistant" + "Fantastical" + "Remarkable" # Browsers "google-chrome" + "firefox" ] diff --git a/modules/darwin/home-manager.nix b/modules/darwin/home-manager.nix index 5a33ef5..7164863 100644 --- a/modules/darwin/home-manager.nix +++ b/modules/darwin/home-manager.nix @@ -1,7 +1,7 @@ { config, pkgs, lib, home-manager, ... }: let - user = "%USER%"; + user = "olaf"; # Define the content of your file as a derivation myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" '' #!/bin/sh @@ -73,19 +73,37 @@ in dock = { enable = true; entries = [ + { path = "/System/Applications/Mail.app/"; } + { path = "/Applications/1Password.app/"; } + { path = "/Applications/Firefox.app/"; } { path = "/Applications/Slack.app/"; } + { path = "/Applications/zoom.us.app/"; + options = " -l Zooom" ; + } { path = "/System/Applications/Messages.app/"; } - { path = "/System/Applications/Facetime.app/"; } - { path = "${pkgs.alacritty}/Applications/Alacritty.app/"; } - { path = "/System/Applications/Music.app/"; } - { path = "/System/Applications/News.app/"; } + + { path = "/Applications/iTerm.app/"; } + { path = "/Applications/Fantastical.app/"; } +# { path = "${pkgs.alacritty}/Applications/Alacritty.app/"; } + { path = "/Applications/Spotify.app/"; } + { path = "/Applications/Safari.app/"; } { path = "/System/Applications/Photos.app/"; } - { path = "/System/Applications/Photo Booth.app/"; } - { path = "/System/Applications/TV.app/"; } - { path = "/System/Applications/Home.app/"; } + { path = "/System/Applications/System Settings.app/"; } + { path = "/Applications/Jellyfin Media Player.app/"; + options= "-l Jellyfin"; + } + { path = "/Applications/Visual Studio Code.app/"; } + { path = "/Applications//Home Assistant.app/"; } + { path = "/Applications//Remarkable.app/"; } + { + path = "/Applications/"; + section = "others"; + options = "--sort name --view grid --display stack"; + } { path = toString myEmacsLauncher; section = "others"; + options = "-l EmacsLauncher"; } { path = "${config.users.users.${user}.home}/.local/share/"; @@ -93,10 +111,12 @@ in options = "--sort name --view grid --display folder"; } { - path = "${config.users.users.${user}.home}/.local/share/downloads"; +# path = "${config.users.users.${user}.home}/.local/share/downloads"; + path = "${config.users.users.${user}.home}/Downloads"; section = "others"; options = "--sort name --view grid --display stack"; } + ]; }; }; diff --git a/modules/darwin/secrets.nix b/modules/darwin/secrets.nix index 2dccd91..fa7de6b 100644 --- a/modules/darwin/secrets.nix +++ b/modules/darwin/secrets.nix @@ -1,6 +1,6 @@ { config, pkgs, agenix, secrets, ... }: -let user = "%USER%"; in +let user = "olaf"; in { age.identityPaths = [ "/Users/${user}/.ssh/id_ed25519" diff --git a/modules/nixos/home-manager.nix b/modules/nixos/home-manager.nix index 530e78a..5e231d3 100644 --- a/modules/nixos/home-manager.nix +++ b/modules/nixos/home-manager.nix @@ -1,7 +1,7 @@ { config, pkgs, lib, ... }: let - user = "%USER%"; + user = "olaf"; xdg_configHome = "/home/${user}/.config"; shared-programs = import ../shared/home-manager.nix { inherit config pkgs lib; }; shared-files = import ../shared/files.nix { inherit config pkgs; }; diff --git a/modules/nixos/secrets.nix b/modules/nixos/secrets.nix index 56f3e17..dfd3628 100644 --- a/modules/nixos/secrets.nix +++ b/modules/nixos/secrets.nix @@ -1,6 +1,6 @@ { config, pkgs, agenix, secrets, ... }: -let user = "%USER%"; in +let user = "olaf"; in { age.identityPaths = [ "/home/${user}/.ssh/id_ed25519" diff --git a/modules/shared/default.nix b/modules/shared/default.nix index e45e878..85ec1fb 100644 --- a/modules/shared/default.nix +++ b/modules/shared/default.nix @@ -4,7 +4,7 @@ let emacsOverlaySha256 = "06413w510jmld20i4lik9b36cfafm501864yq8k4vxl5r4hn0j0h"; in { - + home-manager.backupFileExtension = "nix-backup"; nixpkgs = { config = { allowUnfree = true; diff --git a/modules/shared/home-manager.nix b/modules/shared/home-manager.nix index a957a33..e6fcf2b 100644 --- a/modules/shared/home-manager.nix +++ b/modules/shared/home-manager.nix @@ -1,8 +1,7 @@ { config, pkgs, lib, ... }: - -let name = "%NAME%"; - user = "%USER%"; - email = "%EMAIL%"; in +let name = "olaf"; + user = "olaf"; + email = "github@dacht.net"; in { # Shared shell configuration zsh = { @@ -270,12 +269,14 @@ let name = "%NAME%"; ) ]; matchBlocks = { + "Host *" = { + identityAgent="\"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock\""; + }; "github.com" = { identitiesOnly = true; identityFile = [ (lib.mkIf pkgs.stdenv.hostPlatform.isLinux - "/home/${user}/.ssh/id_github" - ) + "/home/${user}/.ssh/id_github" ) (lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/id_github" ) diff --git a/modules/shared/packages.nix b/modules/shared/packages.nix index ea1f213..039a565 100644 --- a/modules/shared/packages.nix +++ b/modules/shared/packages.nix @@ -2,7 +2,7 @@ with pkgs; [ # General packages for development and system management - alacritty + #alacritty aspell aspellDicts.en bash-completion @@ -15,6 +15,9 @@ with pkgs; [ sqlite wget zip + htop + ncdu + nixfmt-rfc-style # Encryption and security tools age @@ -58,4 +61,7 @@ with pkgs; [ # Python packages python3 virtualenv + + # Development + ]