diff --git a/flake.lock b/flake.lock index 06847cf..ff795fc 100644 --- a/flake.lock +++ b/flake.lock @@ -39,6 +39,24 @@ "type": "github" } }, + "ffmac": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1666832804, + "narHash": "sha256-RodK149KQi2k5JtmjtFaPDSKvklRyTR3+DhWFTZNn2k=", + "owner": "bandithedoge", + "repo": "nixpkgs-firefox-darwin", + "rev": "19b6537ac95a2402e850799a52e3c8ed62f2db2a", + "type": "github" + }, + "original": { + "owner": "bandithedoge", + "repo": "nixpkgs-firefox-darwin", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -76,6 +94,22 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1639237670, + "narHash": "sha256-RTdL4rEQcgaZGpvtDgkp3oK/V+1LM3I53n0ACPSroAQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "edfb969386ebe6c3cf8f878775a7975cd88f926d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, "nixunstable": { "locked": { "lastModified": 1665848363, @@ -111,6 +145,7 @@ "inputs": { "agenix": "agenix", "darwin": "darwin", + "ffmac": "ffmac", "home-manager": "home-manager", "nixunstable": "nixunstable", "nurpkgs": "nurpkgs", diff --git a/flake.nix b/flake.nix index 5c8eb9b..9423ee0 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ inputs.nixpkgs.follows = "nixunstable"; }; nurpkgs.url = "github:nix-community/NUR"; + ffmac.url = "github:bandithedoge/nixpkgs-firefox-darwin"; }; outputs = {stable, nixunstable, agenix, home-manager, nurpkgs, self, ...}@inputs: @@ -26,14 +27,7 @@ agenix.overlay local_overlay nurpkgs.overlay - ]; - - darwinMods = hostname: [ - { stable.overlays = overlays; } - inputs.agenix.nixosModule - ./modules-all - ./modules-darwin - ./hosts/${hostname} + inputs.ffmac.overlay ]; machine = { @@ -84,11 +78,24 @@ "iso" = machine { name = "iso"; }; }; - darwinConfigurations = { + darwinConfigurations = + let + nixpkgs = stable { + overlays = overlays; + }; + in { "C02G48H8MD6R" = inputs.darwin.lib.darwinSystem { system = "x86_64-darwin"; - specialArgs = inputs; - modules = darwinMods "work"; + specialArgs = { + nixpkgs = stable; + }; + modules = [ + { nixpkgs.overlays = overlays; } + inputs.agenix.nixosModule + ./modules-all + ./modules-darwin + ./hosts/work + ]; }; }; @@ -97,7 +104,7 @@ homeConfigurations = ( import ./home { - inherit nixunstable agenix home-manager nurpkgs; + inherit nixunstable agenix home-manager overlays; nixpkgs = nixunstable; } ); diff --git a/home/default.nix b/home/default.nix index e27b5af..5544d26 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,4 +1,10 @@ -{ nixpkgs, nurpkgs, home-manager, username ? builtins.getEnv "USER", ... }: +{ + nixpkgs, + overlays, + home-manager, + username ? builtins.getEnv "USER", + ... +}: let home = system: @@ -12,25 +18,16 @@ let configDir = "${homeDirectory}/.config"; pkgs = import nixpkgs { + inherit overlays; config.allowUnfree = true; config.xdg.configHome = configDir; - overlays = [ - nurpkgs.overlay - (import ../overlays) - ]; }; - nur = import nurpkgs { - inherit pkgs; - nur = pkgs; - }; - - in home-manager.lib.homeManagerConfiguration rec { inherit pkgs system username homeDirectory; stateVersion = "22.05"; configuration = import ./home.nix username { - inherit nur pkgs gui; + inherit pkgs gui; inherit (pkgs) config lib stdenv; }; }; diff --git a/home/gui/default.nix b/home/gui/default.nix index de81db2..aa6fecc 100644 --- a/home/gui/default.nix +++ b/home/gui/default.nix @@ -10,7 +10,6 @@ home.packages = with pkgs; [ gopls - jellyfin-media-player synology-drive-client zoom-us ] ++ ( if pkgs.system == "x86_64-darwin" then @@ -21,6 +20,7 @@ bitwarden gnucash handbrake + jellyfin-media-player nextcloud-client onlyoffice-bin vlc diff --git a/home/gui/firefox.nix b/home/gui/firefox.nix index 31a2c85..b0223a4 100644 --- a/home/gui/firefox.nix +++ b/home/gui/firefox.nix @@ -3,7 +3,7 @@ let # For now, we ignore this and don't install it ffPkgs = if ( lib.hasSuffix "-darwin" pkgs.system ) - then pkgs.firefox-unwrapped + then pkgs.firefox-bin else pkgs.firefox-wayland.override { cfg.enableGnomeExtensions = true; }; vars = { @@ -13,7 +13,7 @@ let in with lib; { programs.firefox = { - enable = (if (lib.hasSuffix "-darwin" pkgs.system) then false else true); + enable = true; package = ffPkgs; extensions = with pkgs.nur.repos.rycee.firefox-addons; [ bitwarden @@ -25,10 +25,12 @@ in with lib; ]; profiles = { default.settings = { + "app.update.auto" = false; "browser.startup.page" = 3; "browser.startup.homepage" = "https://thehellings.com"; "doh-rollout.doorhanger-decision" = "UIDisabled"; "doh-rollout.doneFirstRun" = true; + "signon.rememberSignons" = false; }; }; }; diff --git a/home/home.nix b/home/home.nix index 252c8f0..60c91da 100644 --- a/home/home.nix +++ b/home/home.nix @@ -4,25 +4,6 @@ let guiImports = if gui then [ ./gui ] else []; - myPackages = pypackages: with pypackages; with pkgs.my-py-addons; [ - black - copier - datadog - datadog-api-client - dateutil - flake8 - ipython - pyyaml - responses - ruamel-yaml - tox - typing-extensions - virtualenv - xonsh-direnv - ]; - - myPython = pkgs.python3.withPackages myPackages; - in { imports = [ ./modules @@ -61,12 +42,12 @@ in { gh git gnupatch + gregpy hms htop jdk11 jq libtheora - myPython nmap nano openssl @@ -76,6 +57,6 @@ in { wget x265 yamllint - yawsso + #yawsso ]; } diff --git a/home/vim.nix b/home/vim.nix index 45e1781..6d7ce0a 100644 --- a/home/vim.nix +++ b/home/vim.nix @@ -75,12 +75,12 @@ let g:ctrlp_working_path_mode = 'arc' let g:ctrlp_switch_buffer = 0 let g:ctrlp_cmd = 'CtrlPMixed' let g:ctrlp_show_hidden = 1 -"let g:ctrlp_user_command = { -" \'types': { -" \1: ['.git', '${pkgs.git}/bin/git ls-files --cached --exclude-standard --others' ], -" \}, -" \'fallback': '${pkgs.findutils}/bin/find . -type f | ${pkgs.gnugrep}/bin/grep -v -e "\.tox/" -e "\.git/"' -"\} +let g:ctrlp_user_command = { + \'types': { + \1: ['.git', '${pkgs.git}/bin/git ls-files --cached --exclude-standard --others' ], + \}, + \'fallback': '${pkgs.findutils}/bin/find . -type f | ${pkgs.gnugrep}/bin/grep -v -e "\.tox/" -e "\.git/"', +\} " let g:ctrpl_match_func = { 'match': 'pymatcher#PyMatch' } " Settings for NerdTree diff --git a/modules-all/automatic/programs.nix b/modules-all/automatic/programs.nix index 8e4aa03..59194ea 100644 --- a/modules-all/automatic/programs.nix +++ b/modules-all/automatic/programs.nix @@ -1,13 +1,6 @@ { pkgs, ... }: -let - myPackages = pypackages: with pypackages; [ - pkgs.my-py-addons.xonsh-direnv - virtualenv - ]; - - myPython = pkgs.python3.withPackages myPackages; -in { +{ # Base packages that need to be in all my hosts environment.systemPackages = with pkgs; [ agenix @@ -16,11 +9,11 @@ in { diffutils git gnupatch + gregpy findutils hms # My own home manager switcher home-manager htop - myPython nano pwgen transcrypt diff --git a/overlays/default.nix b/overlays/default.nix index 99e7334..89b4637 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -3,7 +3,28 @@ self: super: let cp = super.python3.pkgs.callPackage; + myPackages = pypackages: with pypackages; with pkgs.my-py-addons; [ + black + copier + datadog + datadog-api-client + dateutil + flake8 + ipython + pyyaml + responses + ruamel-yaml + tox + typing-extensions + virtualenv + xonsh-direnv + ]; + + myPython = super.python3.withPackages myPackages; + in rec { + gregpy = myPython; + my-py-addons = rec { copier = cp ./copier.nix { inherit iteration-utilities