From 083245002dc35ba9c8b3747901b15a876c7e17a9 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Thu, 27 Jul 2023 09:41:24 -0500 Subject: [PATCH] misc tweaks --- flake.lock | 6 +++--- flake.nix | 39 +++++++++++++++++++++++++++++++++++++-- nix/home/penguin-fw.nix | 2 +- nix/lib/vscode.nix | 11 ++++++----- 4 files changed, 47 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 822f399..8f7795d 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1690271650, - "narHash": "sha256-qwdsW8DBY1qH+9luliIH7VzgwvL+ZGI3LZWC0LTiDMI=", + "lastModified": 1690370995, + "narHash": "sha256-9z//23jGegLJrf3ITStLwVf715O39dq5u48Kr/XW14U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6dc93f0daec55ee2f441da385aaf143863e3d671", + "rev": "f3fbbc36b4e179a5985b9ab12624e9dfe7989341", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a00de21..d59ef8d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,21 @@ description = "A Very Flakey Home Manager"; inputs = { + # Nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + # You can access packages and modules from different nixpkgs revs + # at the same time. Here's a working example: nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + # Also see the 'unstable-packages' overlay at 'nix/overlays/default.nix'. + + # Home manager home-manager = { url = "github:nix-community/home-manager/release-23.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # TODO: Add any other flake you might need + # hardware.url = "github.com/nixos/nixos-hardware"; }; outputs = { self, nixpkgs, home-manager, ... }@inputs: @@ -19,29 +28,42 @@ ]; in rec { + # Your custom packages + # Accessible through 'nix build', 'nix shell', etc packages = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in import ./nix/pkgs { inherit pkgs; } ); - + # Devshell for bootstrapping + # Accessible through 'nix develop' or 'nix-shell' (legacy) devShells = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in import ./nix/shell.nix { inherit pkgs; } ); + # Your custom packages and modifications, exported as overlays overlays = import ./nix/overlays { inherit inputs; }; + # Reusable nixos modules you might want to export + # These are usually stuff you would upstream into nixpkgs nixosModules = import ./nix/modules/nixos; + # Reusable home-manager modules you might want to export + # These are usually stuff you would upstream into home-manager homeManagerModules = import ./nix/modules/home-manager; + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { pixnix = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs outputs; }; modules = [ + # > Our main nixos configuration file < ./nix/nixos/configuration.nix ]; }; }; + # Standalone home-manager configuration entrypoint + # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { "john@penguin-fw" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; @@ -56,6 +78,19 @@ } ]; }; + "john@penguin-duet" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.aarch64-linux; + extraSpecialArgs = { inherit inputs outputs; }; + modules = [ + ./nix/home/penguin-duet.nix + { + home = { + username = "john"; + homeDirectory = "/home/john"; + }; + } + ]; + }; }; }; -} \ No newline at end of file +} diff --git a/nix/home/penguin-fw.nix b/nix/home/penguin-fw.nix index d75b34c..f119e1b 100644 --- a/nix/home/penguin-fw.nix +++ b/nix/home/penguin-fw.nix @@ -1,7 +1,7 @@ { pkgs, lib, config, ... }: { imports = [ ./common.nix - ../lib/vscode.nix + ../lib/vscode.nix ]; nixpkgs.config = { diff --git a/nix/lib/vscode.nix b/nix/lib/vscode.nix index 356c096..b0667f9 100644 --- a/nix/lib/vscode.nix +++ b/nix/lib/vscode.nix @@ -1,8 +1,10 @@ -{ pkgs, lib, ... }: { +{ outputs, pkgs, lib, ... }: { - nixpkgs.config = { - allowUnfree = true; - allowUnfreePredicate = (_: true); + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; }; programs.vscode = { @@ -55,6 +57,5 @@ }; }; - services.gnome-keyring.enable = true; }