Skip to content

Commit 3a7bfca

Browse files
authored
Merge pull request #83 from sasaplus1/to-nix
to nix
2 parents 7ea616b + 21e30c1 commit 3a7bfca

4 files changed

Lines changed: 59 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ jobs:
2222
- run: make deploy
2323
- run: make test
2424
- run: test "$(make test)" = 'done.'
25+
home-manager:
26+
name: home-manager
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
os:
31+
- macos-latest
32+
- ubuntu-latest
33+
runs-on: ${{ matrix.os }}
34+
steps:
35+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36+
- uses: cachix/install-nix-action@19effe9fe722874e6d46dd7182e4b8b7a43c4a99 # v31.10.0
37+
with:
38+
nix_path: nixpkgs=channel:nixos-unstable
39+
- run: nix build ./home-manager --impure
2540
shellcheck:
2641
name: shellcheck
2742
runs-on: ubuntu-latest

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
### Generated by gibo (https://github.com/simonwhitaker/gibo)
2+
### https://raw.github.com/github/gitignore/b4105e73e493bb7a20b5d7ea35efd5780ca44938/Nix.gitignore
3+
4+
# Ignore build outputs from performing a nix-build or `nix build` command
5+
result
6+
result-*
7+
8+
# Ignore automatically generated direnv output
9+
.direnv
10+
111
# repository local binaries
212
/.bin/*
313

home-manager/flake.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
let
1818
system = builtins.currentSystem;
1919
pkgs = nixpkgs.legacyPackages.${system};
20-
in
21-
{
22-
homeConfigurations.${builtins.getEnv "USER"} = home-manager.lib.homeManagerConfiguration {
20+
homeConfig = home-manager.lib.homeManagerConfiguration {
2321
inherit pkgs;
2422

2523
# Specify your home configuration modules here, for example,
@@ -29,5 +27,9 @@
2927
# Optionally use extraSpecialArgs
3028
# to pass through arguments to home.nix
3129
};
30+
in
31+
{
32+
homeConfigurations.${builtins.getEnv "USER"} = homeConfig;
33+
packages.${system}.default = homeConfig.activationPackage;
3234
};
3335
}

home-manager/home.nix

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ config, pkgs, ... }:
1+
{ config, lib, pkgs, ... }:
22

33
# NOTE: need --impure
44
# $ home-manager switch --flake . --impure
@@ -37,9 +37,37 @@
3737
# echo "Hello, ${config.home.username}!"
3838
# '')
3939

40+
pkgs.age
41+
pkgs.ast-grep
42+
pkgs.bash
43+
pkgs.bash-completion
4044
pkgs.bat
45+
pkgs.bitwarden-cli
46+
pkgs.curl
47+
pkgs.delta
48+
pkgs.direnv
4149
pkgs.fac
50+
pkgs.fd
51+
pkgs.fswatch
52+
pkgs.fzf
53+
pkgs.gh
54+
pkgs.ghq
55+
pkgs.git
56+
pkgs.gitleaks
57+
pkgs.glow
58+
pkgs.gron
59+
pkgs.jq
60+
pkgs.mmv-go
61+
pkgs.neovim
4262
pkgs.ripgrep
63+
pkgs.rsync
64+
pkgs.sops
65+
pkgs.tig
66+
pkgs.tmux
67+
pkgs.vim
68+
pkgs.zoxide
69+
] ++ lib.optionals pkgs.stdenv.isDarwin [
70+
pkgs.mas
4371
];
4472

4573
# Home Manager is pretty good at managing dotfiles. The primary way to manage

0 commit comments

Comments
 (0)