Skip to content

Commit

Permalink
Refactor hosts and some modules
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Jul 27, 2024
1 parent 6d21f66 commit 91bfa40
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 36 deletions.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
rpi_export = pkgs.callPackage ./pkgs/rpi_export {};
headscale-alpha = pkgs.callPackage ./pkgs/headscale {};
};

formatter =
inputs.treefmt-nix.lib.mkWrapper
pkgs
Expand Down
8 changes: 7 additions & 1 deletion home-modules/common.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{pkgs, ...}: {
home.stateVersion = "23.11";
programs.home-manager.enable = true;
dconf.enable = true;
nixpkgs.config.allowUnfree = true;
systemd.user.startServices = "sd-switch";

services = {
udiskie.enable = true;
};

dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
};

home.packages = with pkgs; [
# development
python3
Expand Down
7 changes: 0 additions & 7 deletions home-modules/dark-mode.nix

This file was deleted.

2 changes: 0 additions & 2 deletions home-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ rec {
polybar = import ./polybar;
xmonad = import ./xmonad;
common = import ./common.nix;
dark-mode = import ./dark-mode.nix;
discord = import ./discord.nix;
dunst = import ./dunst.nix;
firefox = import ./firefox.nix;
Expand Down Expand Up @@ -36,7 +35,6 @@ rec {
polybar
xmonad
common
dark-mode
discord
dunst
firefox
Expand Down
3 changes: 3 additions & 0 deletions home-modules/ssh-personal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
hostname = "65.21.184.54";
user = "captain";
};
apollo = {
hostname = "65.21.249.145";
};
};
};
}
2 changes: 1 addition & 1 deletion home-modules/zathura.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
render-loading-fg = background;
render-loading-bg = foreground;

recolor = true;
recolor = false;
recolor-lightcolor = invisible;
recolor-darkcolor = foreground;

Expand Down
21 changes: 3 additions & 18 deletions home-modules/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,11 @@
imports = [
inputs.nix-index-database.hmModules.nix-index
];
# show what package provides a commands when it's not found
programs = {
nix-index = {
enable = true;
enableZshIntegration = true;
};

# run commands without installing them
# , <cmd>
programs = {
# run commands without installing them with `, <cmd>`
nix-index-database.comma.enable = true;
fzf = {
enable = true;
enableZshIntegration = true;
};
fzf.enable = true;
};

programs.zsh = {
Expand All @@ -28,13 +19,7 @@
dotDir = ".config/zsh";
autosuggestion.enable = true;
enableCompletion = true;

syntaxHighlighting.enable = true;
historySubstringSearch = {
enable = true;
searchUpKey = ["^[j" "^[[A"];
searchDownKey = ["^[k" "^[[B"];
};

shellAliases = {
ls = "ls --color=auto --hyperlink";
Expand Down
6 changes: 3 additions & 3 deletions hosts/hetzner/apollo/default.nix → hosts/apollo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ in {
inputs.disko.nixosModules.disko
inputs.sops-nix.nixosModules.sops
inputs.attic.nixosModules.atticd
(import ../disk-root.nix {
(import ../../disko/hetzner-osdisk.nix {
pci = "0000:06:00.0";
})
(import ../disk-block-storage.nix {
(import ../../disko/hetzner-block-storage.nix {
id = "100958858";
mountpoint = volumePath;
})
Expand Down Expand Up @@ -155,7 +155,7 @@ in {
services.headscale = {
enable = true;
port = 8085;
package = pkgs.callPackage ../../../pkgs/headscale {};
package = pkgs.callPackage ../../pkgs/headscale {};
settings = {
server_url = "https://portal.joinemm.dev";
metrics_listen_addr = "127.0.0.1:8095";
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ in {
};
apollo = lib.nixosSystem {
inherit specialArgs;
modules = [./hetzner/apollo];
modules = [./apollo];
};
monitoring = lib.nixosSystem {
inherit specialArgs;
modules = [./hetzner/monitoring];
modules = [./monitoring];
};
archimedes = lib.nixosSystem {
inherit specialArgs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ in {
ssh-access
])
inputs.disko.nixosModules.disko
(import ../disk-root.nix {
(import ../../disko/hetzner-osdisk.nix {
pci = "0000:00:04.0";
})
];

nixpkgs.hostPlatform = "x86_64-linux";

networking.hostName = "monitoring";

environment.systemPackages = with pkgs; [
Expand Down

0 comments on commit 91bfa40

Please sign in to comment.