Skip to content

Commit

Permalink
feat: Add work role, delete vpn client module, add snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitawootten committed Jul 29, 2024
1 parent 0a4cedf commit 9ad90e6
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 61 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.json]
indent_size = 2
indent_style = space
38 changes: 38 additions & 0 deletions .vscode/nix.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
// Place your infra workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Nix Module": {
"prefix": "nix-module",
"scope": "nix",
"isFileTemplate": true,
"body": [
"{ pkgs, config, lib, ... }:",
"let cfg = config.${1};",
"in {",
" options.${1} = {",
" enable = lib.mkEnableOption \"${2}\";",
" };",
"",
" config = lib.mkIf cfg.enable {",
" ${3}",
" };",
"}",
""
],
"description": "Nix Module"
}
}
85 changes: 39 additions & 46 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions homeModules/personal/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ inputs, lib, ... }: {
imports = [
./gnome
./roles
./cluster-admin.nix
./darwin.nix
./direnv.nix
Expand Down
1 change: 1 addition & 0 deletions homeModules/personal/roles/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ ... }: { imports = [ ./work.nix ]; }
27 changes: 27 additions & 0 deletions homeModules/personal/roles/work.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{ pkgs, config, lib, ... }:
let cfg = config.personal.roles.work;
in {
options.personal.roles.work = {
enable = lib.mkEnableOption "Work related software and configuration";
};

config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
httpie-desktop
nomachine-client
# AWS CLI currently pollutes the user PYTHONPATH, causing issues with virtual environments
(writeShellScriptBin "aws" ''
unset PYTHONPATH
exec ${pkgs.awscli2}/bin/aws "$@"
'')
];

xdg.desktopEntries.httpie-desktop = {
name = "HTTPie Desktop";
genericName = "HTTP Client";
exec = "${pkgs.httpie-desktop}/bin/httpie-desktop %u";
terminal = false;
categories = [ "Application" "Network" ];
};
};
}
1 change: 0 additions & 1 deletion hostModules/personal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
./upgrade-diff.nix
./user.nix
./virtualbox.nix
./vpn.nix
./wireshark.nix
./zfs.nix
./zsa.nix
Expand Down
12 changes: 0 additions & 12 deletions hostModules/personal/vpn.nix

This file was deleted.

2 changes: 2 additions & 0 deletions hosts/dionysus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
};

home.sessionVariables.MOZ_ENABLE_WAYLAND = "0";

personal.roles.work.enable = true;
};

programs.nix-ld.enable = true;
Expand Down
4 changes: 2 additions & 2 deletions hosts/voyager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@
personal.flatpak.enable = true;
personal.zsa.enable = true;
personal.virtualbox.enable = true;
personal.vpn.enable = true;

services.fprintd.enable = lib.mkForce false;

home-manager.users.${config.personal.user.name} = {
personal.vscode.enable = true;
personal.gnome.enable = true;
personal.gnome.enablePaperWm = true;
personal.gnome.enableGSConnect = true;
personal.fonts.enable = true;
personal.sectools.enable = true;
personal.firefox.enable = true;
personal.cluster-admin.enable = true;
home.packages = with pkgs; [ tor-browser-bundle-bin ];

personal.roles.work.enable = true;
};

programs.nix-ld.enable = true;
Expand Down

0 comments on commit 9ad90e6

Please sign in to comment.