dotnix @main -
refs -
log -
-
https://git.jolheiser.com/dotnix.git
My nix dotfiles
feat: dragonwell
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmTxW94ACgkQuFOtpdp7
v3rn1BAAnZ0xqMXFF0bNVCSl7ks6Y8AFeqQZxA4VpJrm8tPA1+u7pZKVYCdD4rp6
CpA8vw/p+OdlyHnh5Ac/5O0QF6KPvRCDajqjPGa1DsdIkR59dvgKkw8iaPAEHqwa
9I/yORLpU3BoOOvqlNo04ePJT1UcTVBodKsu76BKkPxWE2rmzKctSxSksWw5Epbz
1/lzr6A7X0M8SbMaK60mG3i1/x0paiEVoT4xLVgtBk59GegkcMSCvEiMw7izvqON
Xjg2QSZ3EvoBbqq1BQ93iDfNz6oz5ke3DpgTdgr0Xbjta8oJgXPOesiu2O3Ena5S
h25ZZvjO3K8ChgR22GAITQ4pvBjlXga1pjpO9hm5XeUr2oozWQ2ELKzYZO7IIvZC
9vVMIvtH21CtfDQfSwD/QcN0s8ooXxQ4TUBdpYI7ImhRY6Zgd7MwZmNiPHh+b6Sq
cti+AhtgOj5sENyHqOD8eaQYBiD/5yHG4o34e4ZswVa54hzTVl9arN/HBIE47HOp
yjcAIayzvXImyNB1oo+prSvX3uX+QLlx1xQ5DCmTowAhoildrKYikGp2WkaKtoYo
CrjAgOPByISOXl6MFCx2cX+XsanBc0b1b6+8uojDoARUsu0Mddz0OKix5WZGB66M
cht63f0ekgYE3wBmCs9f/5z9TdJAZ9oigxq1DSjAHEtRQMGfdrg=
=jzLB
-----END PGP SIGNATURE-----
5 changed files, 148 additions(+), 60 deletions(-)
diff --git a/apps/common.nix b/apps/common.nix
new file mode 100644
index 0000000000000000000000000000000000000000..aa971bd3d1b83547455fd326f6a86442f94a03c5
--- /dev/null
+++ b/apps/common.nix
@@ -0,0 +1,46 @@
+{
+ pkgs,
+ config,
+ ...
+}: {
+ imports = [
+ ./bat.nix
+ ./bottom.nix
+ ./exa.nix
+ ./fzf.nix
+ ./gpg.nix
+ ./git.nix
+ ./helix.nix
+ ./jq.nix
+ ./lazygit.nix
+ ./nushell.nix
+ ./oh-my-posh.nix
+ ./ssh.nix
+ ./xdg.nix
+ ./zoxide.nix
+ ];
+ home = {
+ packages = with pkgs; [
+ # Tools
+ age
+ bitwarden-cli
+ duf
+ du-dust
+ fd
+ just
+ ripgrep
+
+ # LSPs
+ nil
+
+ # Formatters
+ alejandra
+ ];
+ activation.report-changes = config.lib.dag.entryAnywhere ''
+ ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff $oldGenPath $newGenPath
+ '';
+ stateVersion = "22.11";
+ };
+
+ programs = {home-manager.enable = true;};
+}
diff --git a/apps/default.nix b/apps/default.nix
index 35a50ecb8f6bd421220ad6d554098253133c27ce..08c7d47fd76bd9ef409eb7af9ee5002503f403b0 100644
--- a/apps/default.nix
+++ b/apps/default.nix
@@ -1,72 +1,39 @@
-{
+ ./bat.nix
pkgs,
- config,
- ...
-}: {
imports = [
./bat.nix
- ./bottom.nix
+ config,
- ./exa.nix
+
./firefox.nix
{
-{
- ./gpg.nix
- ./git.nix
-{
...
./gtk.nix
- ./helix.nix
- ./jq.nix
- ./lazygit.nix
- ./nushell.nix
- ./oh-my-posh.nix
./spotifyd.nix
pkgs,
- pkgs,
- pkgs,
config,
./wezterm.nix
pkgs,
-}: {
- ./zoxide.nix
- pkgs,
./bat.nix
home = {
packages = with pkgs; [
# Tools
config,
-{
- bitwarden-cli
- config,
config,
discord
config,
-}: {
- du-dust
- fd
- just
- config,
./exa.nix
spotify-tui
...
-{
- usql
- ...
config,
# LSPs
gopls
lua-language-server
marksman
...
- ./bottom.nix
- ...
./exa.nix
# Formatters
alejandra
- black
- gofumpt
- nodePackages.lua-fmt
# IDEs
jetbrains.goland
@@ -80,12 +47,5 @@ nur.repos.jolheiser.tclip
nur.repos.jolheiser.tmpl
];
imports = [
-}: {
- ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff $oldGenPath $newGenPath
- '';
- stateVersion = "22.11";
- imports = [
./exa.nix
-
- programs = {home-manager.enable = true;};
}
diff --git a/flake.nix b/flake.nix
index 6b4d8ebe9073a83d5b567efe0e7d26890a900fa2..8d631b9b473de2ef9a330bdeedaa3be3e762487a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,7 +36,7 @@ jolheiser = import jolheiser-nur {pkgs = prev;};
};
};
};
- commonConfig = {
+ commonConfig = {server ? false}: {
config,
pkgs,
...
@@ -46,36 +46,47 @@ file = path;
owner = username;
};
in {
- config = {
- inputs = {
+ nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
- inputs = {
+ nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
- inputs = {
+ nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
- inputs = {
+ nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
- inputs = {
+ nixpkgs.follows = "nixpkgs";
agenix.inputs = {
- nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ darwin.follows = "";
- nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ darwin.follows = "";
{
- nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ darwin.follows = "";
description = "jolheiser's nixos config";
-
+ darwin.follows = "";
+ else [./apps/common.nix];
+ darwin.follows = "";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
-
+ flakePath = "/home/${username}/.config/nixpkgs";
+ };
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ description = "jolheiser's nixos config";
+ }
+ // (
+ if !server
+ then {
+ age.secrets = {
+ ssh-config = userSecret ./secrets/shared/ssh-config.age;
+ };
inputs = {
- nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ };
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
- nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ };
home-manager.url = "github:nix-community/home-manager";
- nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ darwin.follows = "";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
- };
+ }
- };
+ else {}
+ );
};
username = "jolheiser";
in
@@ -124,6 +135,14 @@ agenix.nixosModules.default
./machines/common
./machines/matcha
commonConfig
+ ];
+ };
+ "dragonwell" = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ modules = [
+ home-manager.nixosModules.home-manager
+ ./machines/dragonwell
+ (commonConfig {server = true;})
];
};
};
diff --git a/machines/dragonwell/default.nix b/machines/dragonwell/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..589e707bc4db59f6690d203d6987a0f41a607960
--- /dev/null
+++ b/machines/dragonwell/default.nix
@@ -0,0 +1,53 @@
+{pkgs, ...}: let
+ username = "jolheiser";
+in {
+ imports = [./hardware.nix];
+
+ nixpkgs.config.allowUnfree = true;
+
+ nix = {
+ gc.automatic = true;
+ package = pkgs.nixVersions.nix_2_15;
+ settings = {
+ experimental-features = ["flakes" "nix-command" "repl-flake"];
+ auto-optimise-store = true;
+ warn-dirty = false;
+ };
+ };
+
+ system.activationScripts.diff = {
+ supportsDryActivation = true;
+ text = ''
+ ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
+ '';
+ };
+
+ boot.tmp.cleanOnBoot = true;
+ zramSwap.enable = true;
+
+ networking = {
+ hostName = "dragonwell";
+
+ firewall.enable = true;
+ };
+
+ services = {
+ openssh = {
+ enable = true;
+ };
+
+ tailscale.enable = true;
+ };
+
+ virtualisation.docker.enable = true;
+
+ users.users."${username}" = {
+ extraGroups = ["wheel" "docker" "storage"];
+ isNormalUser = true;
+ openssh.authorizedKeys.keys = [
+ ''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfKqCWtDlS3tgvfT6hQN+ii8UtabIZ+ZNmYN+bLwIa8PHOEW5MbfaqXSlhKkSi4+7SfQDCHphw0SMfhsQ4qMEcoywZ+4niDgKlQEVkl+S/VGbLuPe92NRStkyreZBLPr3Rh7ScNlGHcmHmoV9v7725fMnsMmabGVhpGO84PwNHOfJyv2tx2h6LxFbAV8S44UQu2lc8YLWCK2UvKuRnBerBXLnDQThUUX8UuCFzb786gQzD5XDU0MENbByxiy0XdVGAC+tFXEiSIgFZlFbFYyShgdTP9MzX2MOglEi+ae+1UIFncraW7ptUey7qHFJylpHWWWvE+GTwsg2G50i0FvFj jolheiser@jolheiser''
+ ];
+ };
+
+ system.stateVersion = "22.11";
+}
diff --git a/machines/dragonwell/hardware.nix b/machines/dragonwell/hardware.nix
new file mode 100644
index 0000000000000000000000000000000000000000..329ed8a5c0c1e4620550260d9f14a5f4de47258e
--- /dev/null
+++ b/machines/dragonwell/hardware.nix
@@ -0,0 +1,10 @@
+{modulesPath, ...}: {
+ imports = [(modulesPath + "/profiles/qemu-guest.nix")];
+ boot.loader.grub.device = "/dev/sda";
+ boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
+ boot.initrd.kernelModules = ["nvme"];
+ fileSystems."/" = {
+ device = "/dev/sda1";
+ fsType = "ext4";
+ };
+}