Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
fix: clean up examples (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
bketelsen authored Sep 15, 2023
1 parent 3433974 commit 5c33edb
Show file tree
Hide file tree
Showing 38 changed files with 114 additions and 116 deletions.
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ example NAME:
[ -e "./fleek" ] || just build
@rm -rf examples/{{NAME}}
@mkdir -p examples/{{NAME}}
@./fleek generate --level {{NAME}} -l projects/ublue/fleek/examples/{{NAME}}
@./fleek generate --level {{NAME}} -l workspace/fleek/examples/{{NAME}}

default-env:
cp .env.template .env
Expand Down
21 changes: 11 additions & 10 deletions examples/default/.fleek.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
aliases:
apply-fleekdev: nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev
fleeks: cd ~/projects/ublue/fleek/examples/default
apply-coder-bjk-fleek: nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@coder-bjk-fleek
fleeks: cd ~/workspace/fleek/examples/default
allow_broken: false
bling: default
blocklist:
- vscode
blocklist: []
byo_git: false
ejected: true
flakedir: projects/ublue/fleek/examples/default
flakedir: workspace/fleek/examples/default
git:
autocommit: false
autopull: false
Expand All @@ -25,14 +25,15 @@ programs:
shell: zsh
systems:
- arch: x86_64
hostname: fleekdev
home: ""
hostname: coder-bjk-fleek
os: linux
username: ubuntu
track: nixos-unstable
unfree: true
users:
- email: [email protected]
name: Brian Ketelsen
ssh_private_key_file: ~/.ssh/id_rsa
ssh_public_key_file: ~/.ssh/id_rsa.pub
- email: [email protected]
name: Ubuntu
ssh_private_key_file: ""
ssh_public_key_file: ""
username: ubuntu
1 change: 0 additions & 1 deletion examples/default/.gitignore

This file was deleted.

4 changes: 1 addition & 3 deletions examples/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ $ apply-$(hostname)
```

Your actual aliases are listed below:
apply-fleekdev = "nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev";

fleeks = "cd ~/projects/ublue/fleek/examples/default";
fleeks = "cd ~/workspace/fleek/examples/default";
4 changes: 1 addition & 3 deletions examples/default/aliases.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{ pkgs, misc, ... }: {
# DO NOT EDIT: This file is managed by fleek. Manual changes will be overwritten.
home.shellAliases = {
"apply-fleekdev" = "nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev";

"fleeks" = "cd ~/projects/ublue/fleek/examples/default";
"fleeks" = "cd ~/workspace/fleek/examples/default";
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
graph = "log --decorate --oneline --graph";
add-nowhitespace = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -";
};
userName = "Brian Ketelsen";
userEmail = "[email protected]";
userName = "Ubuntu";
userEmail = "[email protected]";
extraConfig = {
feature.manyFiles = true;
init.defaultBranch = "main";
gpg.format = "ssh";
};

signing = {
key = "~/.ssh/id_rsa";
signByDefault = builtins.stringLength "~/.ssh/id_rsa" > 0;
key = "";
signByDefault = builtins.stringLength "" > 0;
};

lfs.enable = true;
Expand Down
9 changes: 3 additions & 6 deletions examples/default/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

homeConfigurations = {

"ubuntu@fleekdev" = home-manager.lib.homeManagerConfiguration {
"ubuntu@coder-bjk-fleek" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
Expand All @@ -35,14 +35,11 @@
./aliases.nix
./programs.nix
# Host Specific configs
./fleekdev/ubuntu.nix
./fleekdev/host.nix
./coder-bjk-fleek/ubuntu.nix
./coder-bjk-fleek/custom.nix
# self-manage fleek
({
nixpkgs.overlays = [];
home.packages = [
fleek.packages.x86_64-linux.default
];
})

];
Expand Down
4 changes: 4 additions & 0 deletions examples/default/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = (_: true);


};
};


# managed by fleek, modify ~/.fleek.yml to change installed packages

# packages are just installed (no configuration applied)
# programs are installed and configuration applied to dotfiles
home.packages = [
Expand All @@ -25,6 +28,7 @@
pkgs.glab
pkgs.fzf
pkgs.ripgrep
pkgs.vscode
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
];
fonts.fontconfig.enable = true;
Expand Down
5 changes: 4 additions & 1 deletion examples/default/shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{ pkgs, misc, ... }: {
# DO NOT EDIT: This file is managed by fleek. Manual changes will be overwritten.# zsh
programs.zsh.profileExtra = "[ -r ~/.nix-profile/etc/profile.d/nix.sh ] && source ~/.nix-profile/etc/profile.d/nix.sh";
programs.zsh.profileExtra = ''
[ -r ~/.nix-profile/etc/profile.d/nix.sh ] && source ~/.nix-profile/etc/profile.d/nix.sh
export XCURSOR_PATH=$XCURSOR_PATH:/usr/share/icons:~/.local/share/icons:~/.icons:~/.nix-profile/share/icons
'';
programs.zsh.enableCompletion = true;
programs.zsh.enable = true;
}
21 changes: 11 additions & 10 deletions examples/high/.fleek.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
aliases:
apply-fleekdev: nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev
fleeks: cd ~/projects/ublue/fleek/examples/high
apply-coder-bjk-fleek: nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@coder-bjk-fleek
fleeks: cd ~/workspace/fleek/examples/high
allow_broken: false
bling: high
blocklist:
- vscode
blocklist: []
byo_git: false
ejected: true
flakedir: projects/ublue/fleek/examples/high
flakedir: workspace/fleek/examples/high
git:
autocommit: false
autopull: false
Expand All @@ -25,14 +25,15 @@ programs:
shell: zsh
systems:
- arch: x86_64
hostname: fleekdev
home: ""
hostname: coder-bjk-fleek
os: linux
username: ubuntu
track: nixos-unstable
unfree: true
users:
- email: [email protected]
name: Brian Ketelsen
ssh_private_key_file: ~/.ssh/id_rsa
ssh_public_key_file: ~/.ssh/id_rsa.pub
- email: [email protected]
name: Ubuntu
ssh_private_key_file: ""
ssh_public_key_file: ""
username: ubuntu
1 change: 0 additions & 1 deletion examples/high/.gitignore

This file was deleted.

4 changes: 1 addition & 3 deletions examples/high/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ $ apply-$(hostname)
```

Your actual aliases are listed below:
apply-fleekdev = "nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev";

fleeks = "cd ~/projects/ublue/fleek/examples/high";
fleeks = "cd ~/workspace/fleek/examples/high";
4 changes: 1 addition & 3 deletions examples/high/aliases.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{ pkgs, misc, ... }: {
# DO NOT EDIT: This file is managed by fleek. Manual changes will be overwritten.
home.shellAliases = {
"apply-fleekdev" = "nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev";

"fleeks" = "cd ~/projects/ublue/fleek/examples/high";
"fleeks" = "cd ~/workspace/fleek/examples/high";

# bat --plain for unformatted cat
catp = "bat -P";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
graph = "log --decorate --oneline --graph";
add-nowhitespace = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -";
};
userName = "Brian Ketelsen";
userEmail = "[email protected]";
userName = "Ubuntu";
userEmail = "[email protected]";
extraConfig = {
feature.manyFiles = true;
init.defaultBranch = "main";
gpg.format = "ssh";
};

signing = {
key = "~/.ssh/id_rsa";
signByDefault = builtins.stringLength "~/.ssh/id_rsa" > 0;
key = "";
signByDefault = builtins.stringLength "" > 0;
};

lfs.enable = true;
Expand Down
9 changes: 3 additions & 6 deletions examples/high/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

homeConfigurations = {

"ubuntu@fleekdev" = home-manager.lib.homeManagerConfiguration {
"ubuntu@coder-bjk-fleek" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
Expand All @@ -35,14 +35,11 @@
./aliases.nix
./programs.nix
# Host Specific configs
./fleekdev/ubuntu.nix
./fleekdev/host.nix
./coder-bjk-fleek/ubuntu.nix
./coder-bjk-fleek/custom.nix
# self-manage fleek
({
nixpkgs.overlays = [];
home.packages = [
fleek.packages.x86_64-linux.default
];
})

];
Expand Down
4 changes: 4 additions & 0 deletions examples/high/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = (_: true);


};
};


# managed by fleek, modify ~/.fleek.yml to change installed packages

# packages are just installed (no configuration applied)
# programs are installed and configuration applied to dotfiles
home.packages = [
Expand All @@ -25,6 +28,7 @@
pkgs.glab
pkgs.fzf
pkgs.ripgrep
pkgs.vscode
pkgs.lazygit
pkgs.jq
pkgs.yq
Expand Down
2 changes: 1 addition & 1 deletion examples/high/programs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# add your personalized program configuration in ./user.nix

# Bling supplied programs
programs.exa.enable = true;
programs.eza.enable = true;
programs.bat.enable = true;
programs.atuin.enable = true;
programs.zoxide.enable = true;
Expand Down
9 changes: 6 additions & 3 deletions examples/high/shell.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ pkgs, misc, ... }: {
# DO NOT EDIT: This file is managed by fleek. Manual changes will be overwritten.
programs.exa.enableAliases = true;
programs.eza.enableAliases = true;

programs.exa.extraOptions = [
programs.eza.extraOptions = [
"--group-directories-first"
"--header"
];
Expand All @@ -11,7 +11,10 @@
theme = "TwoDark";
};
# zsh
programs.zsh.profileExtra = "[ -r ~/.nix-profile/etc/profile.d/nix.sh ] && source ~/.nix-profile/etc/profile.d/nix.sh";
programs.zsh.profileExtra = ''
[ -r ~/.nix-profile/etc/profile.d/nix.sh ] && source ~/.nix-profile/etc/profile.d/nix.sh
export XCURSOR_PATH=$XCURSOR_PATH:/usr/share/icons:~/.local/share/icons:~/.icons:~/.nix-profile/share/icons
'';
programs.zsh.enableCompletion = true;
programs.zsh.enable = true;
}
21 changes: 11 additions & 10 deletions examples/low/.fleek.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
aliases:
apply-fleekdev: nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev
fleeks: cd ~/projects/ublue/fleek/examples/low
apply-coder-bjk-fleek: nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@coder-bjk-fleek
fleeks: cd ~/workspace/fleek/examples/low
allow_broken: false
bling: low
blocklist:
- vscode
blocklist: []
byo_git: false
ejected: true
flakedir: projects/ublue/fleek/examples/low
flakedir: workspace/fleek/examples/low
git:
autocommit: false
autopull: false
Expand All @@ -25,14 +25,15 @@ programs:
shell: zsh
systems:
- arch: x86_64
hostname: fleekdev
home: ""
hostname: coder-bjk-fleek
os: linux
username: ubuntu
track: nixos-unstable
unfree: true
users:
- email: [email protected]
name: Brian Ketelsen
ssh_private_key_file: ~/.ssh/id_rsa
ssh_public_key_file: ~/.ssh/id_rsa.pub
- email: [email protected]
name: Ubuntu
ssh_private_key_file: ""
ssh_public_key_file: ""
username: ubuntu
1 change: 0 additions & 1 deletion examples/low/.gitignore

This file was deleted.

4 changes: 1 addition & 3 deletions examples/low/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ $ apply-$(hostname)
```

Your actual aliases are listed below:
apply-fleekdev = "nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev";

fleeks = "cd ~/projects/ublue/fleek/examples/low";
fleeks = "cd ~/workspace/fleek/examples/low";
4 changes: 1 addition & 3 deletions examples/low/aliases.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{ pkgs, misc, ... }: {
# DO NOT EDIT: This file is managed by fleek. Manual changes will be overwritten.
home.shellAliases = {
"apply-fleekdev" = "nix run --impure home-manager/master -- -b bak switch --flake .#ubuntu@fleekdev";

"fleeks" = "cd ~/projects/ublue/fleek/examples/low";
"fleeks" = "cd ~/workspace/fleek/examples/low";
};
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
graph = "log --decorate --oneline --graph";
add-nowhitespace = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -";
};
userName = "Brian Ketelsen";
userEmail = "[email protected]";
userName = "Ubuntu";
userEmail = "[email protected]";
extraConfig = {
feature.manyFiles = true;
init.defaultBranch = "main";
gpg.format = "ssh";
};

signing = {
key = "~/.ssh/id_rsa";
signByDefault = builtins.stringLength "~/.ssh/id_rsa" > 0;
key = "";
signByDefault = builtins.stringLength "" > 0;
};

lfs.enable = true;
Expand Down
Loading

0 comments on commit 5c33edb

Please sign in to comment.