Skip to content

Commit

Permalink
feat: add nostale dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuciael committed May 19, 2024
1 parent 2551462 commit aa9d16f
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ jobs:
uses: DeterminateSystems/flake-checker-action@v5
- name: Intall Nix
uses: DeterminateSystems/nix-installer-action@v10
with:
github-token: ${{ secrets.PAT }}
- name: Check repository
run: nix flake check
2 changes: 2 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
uses: actions/checkout@v4
- name: Intall Nix
uses: DeterminateSystems/nix-installer-action@v10
with:
github-token: ${{ secrets.PAT }}
- name: Update flake.lock file
uses: DeterminateSystems/update-flake-lock@v21
with:
Expand Down
17 changes: 14 additions & 3 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
trusted-public-keys = [
"cache.thalheim.io-1:R7msbosLEZKrxk/lKxf9BTjOOH7Ax3H0Qj0/6wiHOgc="
];
experimental-features = ["nix-command" "flakes"];
};
extraOptions = ''
experimental-features = nix-command flakes
!include ${config.sops.secrets."nix/access-tokens".path}
'';
package = pkgs.nixFlakes;
};

Expand Down Expand Up @@ -89,13 +92,21 @@
};
};

# SOPS
sops.secrets = {
"users/${username}/password".neededForUsers = true;
"nix/access-tokens" = {
mode = "0440";
group = config.users.groups.keys.name;
};
};

# User settings
sops.secrets."users/${username}/password".neededForUsers = true;
users.users.${username} = {
isNormalUser = true;
hashedPasswordFile = config.sops.secrets."users/${username}/password".path;
description = "Krzysztof Saczuk";
extraGroups = ["wheel"];
extraGroups = ["wheel" config.users.groups.keys.name];
};

# Home-manager
Expand Down
57 changes: 56 additions & 1 deletion flake.lock

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

9 changes: 9 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
url = "github:zakuciael/rofi-jetbrains";
inputs.nixpkgs.follows = "nixpkgs";
};
nostale-dev-env = {
url = "github:zakuciael/nostale-dev-env";
inputs.nixpkgs.follows = "nixpkgs";
};
nixd.url = "github:nix-community/nixd";
nil.url = "github:oxalica/nil";
nix-colors.url = "github:misterio77/nix-colors";
Expand Down Expand Up @@ -64,6 +68,9 @@
nixd = flakeInputs.nixd.packages.${system};
alejandra = flakeInputs.alejandra.packages.${system};
rofi-jetbrains = flakeInputs.rofi-jetbrains.packages.${system};
nostale-dev-env =
flakeInputs.nostale-dev-env
// {packages = flakeInputs.nostale-dev-env.packages.${system};};
age-plugin-op =
flakeInputs.age-plugin-op.packages.${system}
// {
Expand All @@ -84,5 +91,7 @@
mappedHosts = builtins.mapAttrs (n: v: mkHost {name = n;}) hosts;
in
mappedHosts;

inherit pkgs lib;
};
}
8 changes: 7 additions & 1 deletion hosts/pc/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ with lib.my; {
gnome-keyring.enable = true;
wallpaper.enable = true;
};
dev.ides = ["rust-rover" "webstorm" "idea-ultimate"];
dev = {
ides = ["rust-rover" "webstorm" "idea-ultimate"];
nostale = {
enable = true;
installPath = "/media/games/linux/Other/NosTale";
};
};
};
}
6 changes: 4 additions & 2 deletions hosts/pc/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
nix:
access-tokens: ENC[AES256_GCM,data:8I9bYvMatUnSg4V7xQY2Eps6i2UpTGlq2vmCVkbFqRYmHzk1hZb+Pb/u/tzB82Iojb24l/PhDujOMTI8NSzwgceLy/ZHq9j3j0ZkqVgGM6/qiJJapriGayZiPOZ3Szgkv6ZzDvX5Sj/n5kkZpaUrDUmxPcZDrgO+,iv:i0P36ksNqbRiyoSL72cbIeEtBNWZqaDgvydVNH66psk=,tag:skKoNvgE5I+0o0d5dBULoQ==,type:str]
users:
zakuciael:
password: ENC[AES256_GCM,data:WjOX2hCNy9Ca8We+Phbv7bmKNJGwtTCzk2s4FK8Es7GX28S37PzfAQr+EHH9u5EEeVZNJwY3LgpdQpFwy/lco09LbmMgwjEXsA==,iv:0BoaxSJWaCZ2Ux6OsbLkyJFeg2Cju7Gxfxkz7z8yF+o=,tag:FEzVnkLlkgBpP6kmEVBvFQ==,type:str]
Expand All @@ -16,8 +18,8 @@ sops:
cXY0Q0c1c1RTeE55UmR4UXQ3WUF5REEKmWCz1p1a4XiLYEXjjQDf3AymsJarAREr
7sEzo5NgODyowqylz4OYUKo++kSfmrbd9EKNQRWVZnxQ2eNDZak3Gg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-05-07T14:30:52Z"
mac: ENC[AES256_GCM,data:sj+9jsIGbY29zw8eePcjmo/O7ACfsuEsAos7lgHLMz0wK4q1r/YNiP118TohjCT8vF5gcPIPm8HopB6QQtMXGsSLIo6x4ohbyYFHuOZC4Fh3F6nRegYUBDpZ2tX9soQCKr7kx444wj7KQSMbNaJ8hX8lDRNijKhWbspykJyVss4=,iv:vtRnA7rn3viRw17gWbz3e8Rb7WzHp0LQrTOzj6aOcRE=,tag:odLrA9hsa75dKbl6YgphJA==,type:str]
lastmodified: "2024-05-19T06:53:44Z"
mac: ENC[AES256_GCM,data:gqnrBRhjiNQ+udm1/fYu3krrU2XldSrXJracY4fTr7PLl2oh28uxJGQ3D53fiE6QboVsZ6Ge9RFbP15gRULfEpS/ihIytAN8WmxwMChDWvqCebC1p/VqLz4iBPqCioFyGzrkFf89E5HvgBu/Oe/Ukx5J5RaXPd4+lXXnl5XR0VI=,iv:eWT/RjzEnyvT5YwYL1dpWZbd2WyB6B5cpaUKjDHFWOA=,tag:gFfde24K++MBpjipzjJmSA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1
3 changes: 3 additions & 0 deletions modules/desktop/apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ in {
gnome.eog
sops
age
imhex
mongodb-tools
mongodb-compass
];
};
};
Expand Down
32 changes: 32 additions & 0 deletions modules/dev/nostale.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
config,
lib,
inputs,
username,
...
}:
with lib;
with lib.my; let
cfg = config.modules.dev.nostale;
in {
options.modules.dev.nostale = {
enable = mkEnableOption "NosTale Dev Env";
installPath = mkOption {
description = "A path to where NosTale is installed.";
example = "$HOME/.steam/steam/steamapps/common/NosTale";
type = types.str;
};
};

config = mkIf (cfg.enable) {
home-manager.users.${username} = {
home.packages = with inputs.nostale-dev-env.packages; [
DevTaleGUI
proton
(nostale-dev.override {
nostale-path = cfg.installPath;
})
];
};
};
}

0 comments on commit aa9d16f

Please sign in to comment.