diff --git a/.gitignore b/.gitignore index b66a0b1..67c498b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ -# Secret variables shouldn't get committed! -secret-variables.nix +*.sw* +vim-files/vim/bundle +vim-files/vim/plugged/ +vim-files/vim/undofiles/ +.youcompletemesetup +vim-files/vim/.init.vim-rplugin~ +vim-files/vim/.netrwhist diff --git a/nix/system/worktop/README.md b/nix/system/worktop/README.md deleted file mode 100644 index b187f0f..0000000 --- a/nix/system/worktop/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Symlink the flake file into `/etc/nix-darwin/flake.nix` before initializing the -system! - -You'll also need to populate the hostname in a `secret-variables.nix` file with -the output of `scutil --get LocalHostName` diff --git a/nix/system/worktop/darwin-configuration.nix b/nix/system/worktop/darwin-configuration.nix index 144d59e..b964df5 100644 --- a/nix/system/worktop/darwin-configuration.nix +++ b/nix/system/worktop/darwin-configuration.nix @@ -62,8 +62,8 @@ let }; in { + imports = [ ]; - nixpkgs.hostPlatform = "aarch64-darwin"; nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget @@ -73,10 +73,10 @@ in pkgs.obsidian pkgs.syncthing pkgs.slack - pkgs._1password-cli - pkgs._1password-gui + pkgs._1password + # pkgs._1password-gui pkgs.tailscale - #whatsapp + whatsapp obs-studio vlc keycastr @@ -99,9 +99,16 @@ in # have to do this to play nicely with home-manager: # https://github.com/nix-community/home-manager/issues/4026 users.users.haak.home = "/Users/haak/"; + home-manager.users.haak.imports = [ + ../../home/commandline.nix + ../../home/programs/alacritty + ]; + + # nix.package = pkgs.nix; # Create /etc/bashrc that loads the nix-darwin environment. programs.zsh.enable = true; # default shell on catalina + # programs.fish.enable = true; system.primaryUser = "haak"; @@ -109,14 +116,12 @@ in # by nix-darwin system.activationScripts.applications.text = pkgs.lib.mkForce ( '' - userDir="${config.users.users.haak.home}Applications/Nix Apps" + userDir="$HOME/Applications/Nix Apps" echo "setting up $userDir" - rm -rf "$userDir" - mkdir -p "$userDir" - chown haak "$userDir" - find ${config.system.build.applications}/Applications -maxdepth 1 -type l -exec sh -c ' - userDir="${config.users.users.haak.home}Applications/Nix Apps" - app=$1 + rm -rf $userDir + mkdir -p $userDir + chown haak $userDir + for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do src="$(/usr/bin/stat -f%Y "$app")" dst="$userDir/$(basename $src)" echo "app: $app, src: $src, dst: $dst" @@ -124,7 +129,7 @@ in echo "Linking $app" ln -s "$app" "$dst" fi - ' sh {} \; + done '' ); @@ -257,7 +262,4 @@ in # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog system.stateVersion = 4; - - # something odd about the migration from 4 to 5, or to Lix? - ids.gids.nixbld = 350; } diff --git a/nix/system/worktop/flake.lock b/nix/system/worktop/flake.lock deleted file mode 100644 index b936e2b..0000000 --- a/nix/system/worktop/flake.lock +++ /dev/null @@ -1,83 +0,0 @@ -{ - "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1774379316, - "narHash": "sha256-0nGNxWDUH2Hzlj/R3Zf4FEK6fsFNB/dvewuboSRZqiI=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "1eb0549a1ab3fe3f5acf86668249be15fa0e64f7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1773000227, - "narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=", - "owner": "nix-darwin", - "repo": "nix-darwin", - "rev": "da529ac9e46f25ed5616fd634079a5f3c579135f", - "type": "github" - }, - "original": { - "owner": "nix-darwin", - "ref": "master", - "repo": "nix-darwin", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1774218495, - "narHash": "sha256-5g/jjDqSwZ0cbUpUTJ/ip/otL3P7O9Q6fUg3Z3eBKt4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "03e95ed5e97dce71ef304ef35954593dd988e4b6", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "home-manager": "home-manager", - "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs", - "variables": "variables" - } - }, - "variables": { - "flake": false, - "locked": { - "path": "./secret-variables.nix", - "type": "path" - }, - "original": { - "path": "./secret-variables.nix", - "type": "path" - }, - "parent": [] - } - }, - "root": "root", - "version": 7 -} diff --git a/nix/system/worktop/flake.nix b/nix/system/worktop/flake.nix deleted file mode 100644 index 01c6086..0000000 --- a/nix/system/worktop/flake.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - description = "Worktop darwin system"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - - nix-darwin.url = "github:nix-darwin/nix-darwin/master"; - nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; - - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - - variables = { - url = "./secret-variables.nix"; - flake = false; - }; - }; - - outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, variables }: - let - vars = import variables; - in { - darwinConfigurations."${vars.hostname}" = nix-darwin.lib.darwinSystem { - modules = [ - ./darwin-configuration.nix - - home-manager.darwinModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.haak = { - imports = [ - ../../home/commandline.nix - ../../home/programs/alacritty - ]; - }; - } - ]; - }; - }; -}