Compare commits

...

3 Commits

@ -1,6 +1,59 @@
{
"nodes": {
"atuinRepo": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1687893509,
"narHash": "sha256-Pe1c1Hgs/xY+ZDN24Jll9KN2+qkom+tDeUTeDjH5+JA=",
"owner": "ellie",
"repo": "atuin",
"rev": "ef88444f212bd05826c430f077e7cfe4394819c1",
"type": "github"
},
"original": {
"owner": "ellie",
"repo": "atuin",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
@ -21,7 +74,7 @@
},
"idyllsPkgs": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"mozilla": "mozilla",
"nixpkgs": [
"nixpkgs"
@ -105,6 +158,7 @@
},
"root": {
"inputs": {
"atuinRepo": "atuinRepo",
"idyllsPkgs": "idyllsPkgs",
"nixpkgs": "nixpkgs",
"nixpkgsUnstable": "nixpkgsUnstable"

@ -6,12 +6,16 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
atuinRepo = {
url = "github:ellie/atuin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgsUnstable, idyllsPkgs }:
outputs = { self, nixpkgs, nixpkgsUnstable, idyllsPkgs, atuinRepo }:
let mkhost = import ./machines/mkhost.nix;
mkhost' = system: args: mkhost system ({
inherit nixpkgs nixpkgsUnstable idyllsPkgs;
inherit nixpkgs nixpkgsUnstable idyllsPkgs atuinRepo;
} // args);
in {
nixosConfigurations.hera = mkhost' "hera" {

@ -83,6 +83,7 @@
};
services.tailscale.enable = true;
services.tailscale.interfaceName = "olympus";
# List packages installed in system profile. To search, run:
# $ nix search wget

@ -1,4 +1,4 @@
name: { nixpkgs, idyllsPkgs, nixpkgsUnstable, system, user }@inputs:
name: { nixpkgs, idyllsPkgs, nixpkgsUnstable, atuinRepo, system, user }@inputs:
let pkgs = import nixpkgs {
inherit system;
@ -6,6 +6,7 @@ let pkgs = import nixpkgs {
};
pkgsUnstable = nixpkgsUnstable.legacyPackages.${system};
pkgsIdylls = idyllsPkgs.packages.${system};
pkgsAtuin = atuinRepo.packages.${system};
in nixpkgs.lib.nixosSystem {
modules = [
./${name}/configuration.nix
@ -14,7 +15,7 @@ in nixpkgs.lib.nixosSystem {
{
config._module.args = {
inherit pkgsUnstable pkgsIdylls;
inherit pkgsUnstable pkgsIdylls pkgsAtuin;
pkgs = nixpkgs.lib.mkForce pkgs;

@ -1,4 +1,4 @@
{ ... }: {
{ pkgs, config, ... }: {
imports = [
./hardware-configuration.nix
];
@ -13,6 +13,54 @@
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG/QDX2Ex5rol7Cxr3paGipIhCBG/T6EsBZfJpwmPrcY Idylls services key''
];
services.tailscale = {
enable = true;
interfaceName = "olympus";
};
services.headscale = {
enable = true;
address = "127.0.0.1";
port = 8777;
settings = {
server_url = "https://headscale.idylls.net";
dns_config.base_domain = "olympus.wg";
};
};
services.caddy = {
enable = true;
virtualHosts = {
"headscale.idylls.net" = {
extraConfig = ''
reverse_proxy ${config.services.headscale.address}:${builtins.toString config.services.headscale.port}
'';
};
"atuin.idylls.net" = {
extraConfig = ''
reverse_proxy ${config.services.atuin.host}:${builtins.toString config.services.atuin.port}
'';
};
};
};
services.atuin = {
enable = true;
openRegistration = true;
host = "127.0.0.1";
};
networking.firewall = {
trustedInterfaces = [ config.services.tailscale.interfaceName ];
allowedUDPPorts = [ config.services.headscale.port ];
allowedTCPPorts = [ config.services.headscale.port 80 443 ];
};
environment.systemPackages = with pkgs; [
tailscale
headscale
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "23.05";
}

@ -1,4 +1,4 @@
{ pkgs, pkgsUnstable, pkgsIdylls, ... }:
{ pkgs, pkgsUnstable, pkgsIdylls, pkgsAtuin, ... }:
{
programs.fish.enable = true;
@ -17,7 +17,7 @@
packages = [
# Dev Tools
pkgs.git pkgsIdylls.emacs pkgs.kitty pkgs.fd pkgsIdylls.eww pkgs.deno
pkgs.ripgrep
pkgs.ripgrep pkgsAtuin.atuin pkgs.stow
# Desktop
pkgs.rofi pkgs.i3 pkgs.sxhkd pkgs.keepassxc pkgs.dunst pkgs.slock

Loading…
Cancel
Save