summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-10-14 20:38:36 -0400
committerRaghuram Subramani <raghus2247@gmail.com>2025-10-14 20:38:36 -0400
commit38f367edeb21e222cbc185b21fdc14b2b86de4c1 (patch)
tree788c87dd187471c15b86a1ebda6204162b5478c5
parentb2187654d3b7670ae8dd9038b4391435d8ced6e1 (diff)
add owo
-rw-r--r--flake.nix10
-rw-r--r--machines/owo/configuration.nix35
-rw-r--r--machines/owo/hardware-configuration.nix56
-rw-r--r--machines/owo/home.nix28
-rw-r--r--machines/oxo/home.nix10
-rw-r--r--machines/x/configuration.nix2
-rw-r--r--modules/sshfs-owo.nix14
7 files changed, 145 insertions, 10 deletions
diff --git a/flake.nix b/flake.nix
index b9fa965..c762054 100644
--- a/flake.nix
+++ b/flake.nix
@@ -59,6 +59,16 @@
];
};
+ owo = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ specialArgs = { inherit inputs; };
+ modules = [
+ ./machines/owo/configuration.nix
+
+ inputs.home-manager.nixosModules.default
+ ];
+ };
+
};
};
}
diff --git a/machines/owo/configuration.nix b/machines/owo/configuration.nix
new file mode 100644
index 0000000..162fa63
--- /dev/null
+++ b/machines/owo/configuration.nix
@@ -0,0 +1,35 @@
+{ lib, inputs, pkgs, ... }:
+
+{
+ imports = [
+ ./hardware-configuration.nix
+ inputs.home-manager.nixosModules.default
+ ] ++ (map (path: ../../modules/${path}) [
+ "core/global.nix"
+ "ssh.nix"
+ "compromyse.nix"
+ ]);
+
+ networking.hostName = "owo";
+
+ boot.loader.grub = {
+ enable = true;
+ forceInstall = true;
+ device = "/dev/sda";
+ };
+
+ networking.firewall = {
+ enable = lib.mkForce true;
+ allowedTCPPorts = [ 80 443 22 ];
+ };
+
+ programs.fuse.userAllowOther = true;
+ home-manager = {
+ extraSpecialArgs = { inherit inputs; };
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ users = {
+ compromyse = import ./home.nix;
+ };
+ };
+}
diff --git a/machines/owo/hardware-configuration.nix b/machines/owo/hardware-configuration.nix
new file mode 100644
index 0000000..b10d174
--- /dev/null
+++ b/machines/owo/hardware-configuration.nix
@@ -0,0 +1,56 @@
+# Do not modify this file! It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations. Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+ imports =
+ [ (modulesPath + "/profiles/qemu-guest.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6";
+ fsType = "btrfs";
+ options = [ "subvol=root" ];
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6";
+ fsType = "btrfs";
+ options = [ "subvol=boot" ];
+ };
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6";
+ fsType = "btrfs";
+ options = [ "subvol=home" ];
+ };
+
+ fileSystems."/nix" =
+ { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6";
+ fsType = "btrfs";
+ options = [ "subvol=nix" ];
+ };
+
+ fileSystems."/config" =
+ { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6";
+ fsType = "btrfs";
+ options = [ "subvol=config" ];
+ };
+
+ swapDevices = [ ];
+
+ # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+ # (the default) this is the recommended approach. When using systemd-networkd it's
+ # still possible to use this option, but it's recommended to use it in conjunction
+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+}
diff --git a/machines/owo/home.nix b/machines/owo/home.nix
new file mode 100644
index 0000000..647aed2
--- /dev/null
+++ b/machines/owo/home.nix
@@ -0,0 +1,28 @@
+{ inputs, pkgs, ... }:
+
+{
+ home = {
+ username = "compromyse";
+ homeDirectory = "/home/compromyse";
+ };
+
+ home.packages = with pkgs; [
+ tmux
+ fzf
+ fd
+ ripgrep
+ jq
+
+ unzip
+ zip
+ ];
+
+ imports = (map (path: ../../config/${path}) [
+ "bash.nix"
+ "dotfiles.nix"
+ "git"
+ "nvim"
+ ]);
+
+ home.stateVersion = "23.11";
+}
diff --git a/machines/oxo/home.nix b/machines/oxo/home.nix
index c43b9b0..647aed2 100644
--- a/machines/oxo/home.nix
+++ b/machines/oxo/home.nix
@@ -17,16 +17,6 @@
zip
];
- programs = {
- direnv = {
- enable = true;
- enableBashIntegration = true;
- nix-direnv.enable = true;
- };
-
- bash.enable = true;
- };
-
imports = (map (path: ../../config/${path}) [
"bash.nix"
"dotfiles.nix"
diff --git a/machines/x/configuration.nix b/machines/x/configuration.nix
index 7cdab8e..b566aa8 100644
--- a/machines/x/configuration.nix
+++ b/machines/x/configuration.nix
@@ -33,6 +33,8 @@ in {
# "xfce.nix"
"wm_utils.nix"
"polkit.nix"
+
+ # "sshfs-owo.nix"
]);
boot.loader = {
diff --git a/modules/sshfs-owo.nix b/modules/sshfs-owo.nix
new file mode 100644
index 0000000..7014751
--- /dev/null
+++ b/modules/sshfs-owo.nix
@@ -0,0 +1,14 @@
+{ pkgs, ... }:
+
+{
+ fileSystems."/data" = {
+ device = "compromyse@owo.compromyse.xyz:data";
+ fsType = "sshfs";
+ options = [
+ "nodev"
+ "noatime"
+ "allow_other"
+ "IdentityFile=/home/compromyse/.ssh/id_rsa"
+ ];
+ };
+}