mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-22 01:12:19 +00:00
Compare commits
6 commits
013112f692
...
b42951f307
Author | SHA1 | Date | |
---|---|---|---|
b42951f307 | |||
f5f09b982f | |||
f5bd49f172 | |||
d4a8e60fa5 | |||
b8b6b9854c | |||
5a05fa411c |
6 changed files with 113 additions and 19 deletions
19
flake.lock
19
flake.lock
|
@ -36,10 +36,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-23_05": {
|
||||
"locked": {
|
||||
"lastModified": 1689956312,
|
||||
"narHash": "sha256-NV9yamMhE5jgz+ZSM2IgXeYqOvmGIbIIJ+AFIhfD7Ek=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6da4bc6cb07cba1b8e53d139cbf1d2fb8061d967",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-23_05": "nixpkgs-23_05"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
85
flake.nix
85
flake.nix
|
@ -3,27 +3,90 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs-23_05.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, home-manager, ...}:
|
||||
outputs = {nixpkgs, home-manager, ...} @inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
defaultPackage.${system} = home-manager.defaultPackage.${system};
|
||||
# Overlays enable you to customize the Nixpkgs attribute set
|
||||
overlays = [
|
||||
(self: super:
|
||||
let
|
||||
system = self.stdenv.system;
|
||||
in {
|
||||
pkgs_2305 = inputs.nixpkgs-23_05.legacyPackages.${system};
|
||||
pkgs_aarch64 = import nixpkgs {
|
||||
system = "aarch64-${builtins.head (builtins.match ".+-([[:lower:]]+)" system)}";
|
||||
};
|
||||
pkgs_x86_64 = nixpkgs.legacyPackages.${"x86_64-${builtins.head (builtins.match ".+-([[:lower:]]+)" system)}"};
|
||||
})
|
||||
];
|
||||
|
||||
# Systems supported
|
||||
allSystems = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
importPkgs = (system: import nixpkgs {
|
||||
inherit overlays system;
|
||||
config.allowUnfree = true;
|
||||
});
|
||||
|
||||
# Helper to provide system-specific attributes
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
||||
inherit system;
|
||||
pkgs = (importPkgs system);
|
||||
});
|
||||
|
||||
in
|
||||
rec {
|
||||
inherit allSystems importPkgs forAllSystems home-manager;
|
||||
|
||||
overlays = { };
|
||||
|
||||
packages = forAllSystems
|
||||
({ pkgs, system }: rec {
|
||||
home-penguin-fw = homeConfigurations."john@penguin-fw".activationPackage;
|
||||
home-penguin-duet = homeConfigurations."john@penguin-duet".activationPackage;
|
||||
home-pixnix = homeConfigurations."john@pixnix".activationPackage;
|
||||
all = pkgs.symlinkJoin {
|
||||
name = "all";
|
||||
paths = [
|
||||
home-penguin-fw
|
||||
home-penguin-duet
|
||||
home-pixnix
|
||||
];
|
||||
};
|
||||
default = all;
|
||||
});
|
||||
|
||||
homeConfigurations = {
|
||||
"john@penguin" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "${system}";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
"john@penguin-fw" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = importPkgs "x86_64-linux";
|
||||
|
||||
modules = [ ./nix/machines/penguin/home.nix ];
|
||||
modules = [
|
||||
./nix/machines/penguin-fw/home.nix
|
||||
];
|
||||
};
|
||||
"john@penguin-duet" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = importPkgs "aarch64-linux";
|
||||
|
||||
modules = [
|
||||
./nix/machines/penguin-duet/home.nix
|
||||
];
|
||||
};
|
||||
"john@pixnix" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = importPkgs "x86_64-linux";
|
||||
|
||||
modules = [
|
||||
./nix/common/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,14 +70,11 @@
|
|||
programs.git = {
|
||||
enable = true;
|
||||
delta.enable = true;
|
||||
userEmail = "john@bowdre.net";
|
||||
userName = "John Bowdre";
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
pull.ff = "only";
|
||||
pull.rebase = false;
|
||||
};
|
||||
};
|
||||
|
||||
# XDG settings
|
||||
xdg.enable = true;
|
||||
xdg.mime.enable = true;
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
enableUpdateCheck = false;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
bbenoist.nix
|
||||
eamodio.gitlens
|
||||
github.copilot
|
||||
golang.go
|
||||
hashicorp.terraform
|
||||
|
|
14
nix/machines/penguin-duet/home.nix
Normal file
14
nix/machines/penguin-duet/home.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
imports = [
|
||||
../../common/home.nix
|
||||
];
|
||||
|
||||
# packages
|
||||
home.packages = with pkgs; [
|
||||
obsidian
|
||||
];
|
||||
|
||||
# XDG settings
|
||||
xdg.enable = true;
|
||||
xdg.mime.enable = true;
|
||||
}
|
|
@ -10,4 +10,8 @@
|
|||
obsidian
|
||||
qFlipper
|
||||
];
|
||||
|
||||
# XDG settings
|
||||
xdg.enable = true;
|
||||
xdg.mime.enable = true;
|
||||
}
|
Loading…
Reference in a new issue