diff options
-rw-r--r-- | configuration/home-manager/core/shell.nix | 69 | ||||
-rw-r--r-- | flake.lock | bin | 24358 -> 26332 bytes | |||
-rw-r--r-- | flake.nix | 36 | ||||
-rw-r--r-- | modules/core/default.nix (renamed from configuration/core/default.nix) | 0 | ||||
-rw-r--r-- | modules/core/packages.nix (renamed from configuration/core/packages.nix) | 0 | ||||
-rw-r--r-- | modules/core/services.nix (renamed from configuration/core/services.nix) | 0 | ||||
-rw-r--r-- | modules/core/settings.nix (renamed from configuration/core/settings.nix) | 0 | ||||
-rw-r--r-- | modules/core/tailscale.nix (renamed from configuration/core/tailscale.nix) | 0 | ||||
-rw-r--r-- | modules/core/users.nix (renamed from configuration/core/users.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/ansible.nix (renamed from configuration/home-manager/ansible.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/core/default.nix (renamed from configuration/home-manager/core/default.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/core/helix.nix (renamed from configuration/home-manager/core/helix.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/frontend-dev.nix (renamed from configuration/home-manager/frontend-dev.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/hostnet.nix (renamed from configuration/home-manager/hostnet.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/hyprland.nix (renamed from configuration/home-manager/hyprland.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/php.nix (renamed from configuration/home-manager/php.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/python.nix (renamed from configuration/home-manager/python.nix) | 0 | ||||
-rw-r--r-- | modules/home-manager/tarrel.nix (renamed from configuration/home-manager/tarrel.nix) | 0 | ||||
-rw-r--r-- | modules/hyprland.nix (renamed from configuration/hyprland.nix) | 0 | ||||
-rw-r--r-- | modules/snorlax/default.nix (renamed from configuration/snorlax/default.nix) | 2 | ||||
-rw-r--r-- | modules/snorlax/disk-config.nix (renamed from configuration/snorlax/disk-config.nix) | 0 | ||||
-rw-r--r-- | modules/snorlax/facter.json (renamed from configuration/snorlax/facter.json) | 0 | ||||
-rw-r--r-- | modules/snorlax/git.nix (renamed from configuration/snorlax/git.nix) | 0 | ||||
-rw-r--r-- | modules/snorlax/networking.nix | 28 | ||||
-rw-r--r-- | modules/snorlax/nginx.nix (renamed from configuration/snorlax/nginx.nix) | 0 | ||||
-rw-r--r-- | modules/snorlax/samba.nix (renamed from configuration/snorlax/samba.nix) | 0 | ||||
-rw-r--r-- | modules/snorlax/uvm.nix | 6 | ||||
-rw-r--r-- | modules/tarrel/default.nix (renamed from configuration/tarrel/default.nix) | 0 | ||||
-rw-r--r-- | modules/tarrel/hardware-configuration.nix (renamed from configuration/tarrel/hardware-configuration.nix) | 0 | ||||
-rw-r--r-- | modules/tarrel/home-manager.nix (renamed from configuration/tarrel/home-manager.nix) | 0 | ||||
-rw-r--r-- | modules/work/default.nix (renamed from configuration/work/default.nix) | 0 | ||||
-rw-r--r-- | modules/work/hardware-configuration.nix (renamed from configuration/work/hardware-configuration.nix) | 0 | ||||
-rw-r--r-- | modules/work/home-manager.nix (renamed from configuration/work/home-manager.nix) | 0 | ||||
-rw-r--r-- | modules/work/networking.nix (renamed from configuration/work/networking.nix) | 0 | ||||
-rw-r--r-- | modules/work/secrets.nix (renamed from configuration/work/secrets.nix) | 0 |
35 files changed, 55 insertions, 86 deletions
diff --git a/configuration/home-manager/core/shell.nix b/configuration/home-manager/core/shell.nix deleted file mode 100644 index 183b9ae..0000000 --- a/configuration/home-manager/core/shell.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ pkgs, lib, ... }: -{ - programs.zsh = { - enable = true; - defaultKeymap = "emacs"; - initExtra = '' - # https://github.com/jeffreytse/zsh-vi-mode - source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh - ''; - shellAliases = { - g = "git"; - }; - }; - - programs.starship = { - enable = true; - settings = { - directory.style = "blue"; - - format = lib.concatStrings [ - "$username" - "$hostname" - "$directory" - "$git_branch" - "$git_state" - "$git_status" - "$cmd_duration" - "$line_break" - "$python" - "$openstack" - "$character" - ]; - - character = { - success_symbol = "[❯](purple)"; - error_symbol = "[❯](red)"; - vimcmd_symbol = "[❮](green)"; - }; - - git_branch = { - format = "[$branch]($style)"; - style = "bright-black"; - }; - - git_status = { - format = - "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"; - style = "cyan"; - conflicted = ""; - untracked = ""; - modified = ""; - staged = ""; - renamed = ""; - deleted = ""; - stashed = "≡"; - }; - - git_state = { - format = "'([$state( $progress_current/$progress_total)]($style))' "; - style = "bright-black"; - }; - - cmd_duration = { - format = "[$duration]($style) "; - style = "yellow"; - }; - }; - }; -} Binary files differ@@ -2,40 +2,40 @@ description = "NixOS Flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + agenix.url = "github:ryantm/agenix"; + astal-bar.url = "path:/home/jras/projects/astal-bar"; disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; - nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; + helix.url = "github:helix-editor/helix/master"; home-manager.url = "github:nix-community/home-manager/release-24.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - - helix.url = "github:helix-editor/helix/master"; - hyprland.url = "github:hyprwm/Hyprland?submodules=1&ref=v0.45.2-b"; hy3 = { url = "github:outfoxxed/hy3?ref=hl0.45.0"; inputs.hyprland.follows = "hyprland"; }; - agenix.url = "github:ryantm/agenix"; - - update-systemd-resolved.url = "github:jonathanio/update-systemd-resolved"; - update-systemd-resolved.inputs.nixpkgs.follows = "nixpkgs"; + microvm.url = "github:astro/microvm.nix"; + microvm.inputs.nixpkgs.follows = "nixpkgs"; nil.url = "github:oxalica/nil"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; - astal-bar.url = "path:/home/jras/projects/astal-bar"; + update-systemd-resolved.url = "github:jonathanio/update-systemd-resolved"; + update-systemd-resolved.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs@{ self, - nixpkgs, + agenix, disko, - nixos-facter-modules, home-manager, - agenix, + microvm, + nixpkgs, + nixos-facter-modules, update-systemd-resolved, ... }: @@ -53,7 +53,7 @@ home-manager.nixosModules.home-manager agenix.nixosModules.default - ./configuration/work + ./modules/work ]; }; @@ -69,7 +69,7 @@ home-manager.nixosModules.home-manager agenix.nixosModules.default - ./configuration/tarrel + ./modules/tarrel ]; }; @@ -81,8 +81,10 @@ home-manager.nixosModules.home-manager disko.nixosModules.disko nixos-facter-modules.nixosModules.facter - { config.facter.reportPath = ./configuration/snorlax/facter.json; } - ./configuration/snorlax + microvm.nixosModules.host + + { config.facter.reportPath = ./modules/snorlax/facter.json; } + ./modules/snorlax ]; }; }; diff --git a/configuration/core/default.nix b/modules/core/default.nix index 7ec63e4..7ec63e4 100644 --- a/configuration/core/default.nix +++ b/modules/core/default.nix diff --git a/configuration/core/packages.nix b/modules/core/packages.nix index 37d1562..37d1562 100644 --- a/configuration/core/packages.nix +++ b/modules/core/packages.nix diff --git a/configuration/core/services.nix b/modules/core/services.nix index f3d1d24..f3d1d24 100644 --- a/configuration/core/services.nix +++ b/modules/core/services.nix diff --git a/configuration/core/settings.nix b/modules/core/settings.nix index e7a7b2e..e7a7b2e 100644 --- a/configuration/core/settings.nix +++ b/modules/core/settings.nix diff --git a/configuration/core/tailscale.nix b/modules/core/tailscale.nix index 0d7c456..0d7c456 100644 --- a/configuration/core/tailscale.nix +++ b/modules/core/tailscale.nix diff --git a/configuration/core/users.nix b/modules/core/users.nix index b1a30ed..b1a30ed 100644 --- a/configuration/core/users.nix +++ b/modules/core/users.nix diff --git a/configuration/home-manager/ansible.nix b/modules/home-manager/ansible.nix index 67aff1c..67aff1c 100644 --- a/configuration/home-manager/ansible.nix +++ b/modules/home-manager/ansible.nix diff --git a/configuration/home-manager/core/default.nix b/modules/home-manager/core/default.nix index 9c33f66..9c33f66 100644 --- a/configuration/home-manager/core/default.nix +++ b/modules/home-manager/core/default.nix diff --git a/configuration/home-manager/core/helix.nix b/modules/home-manager/core/helix.nix index 42861ce..42861ce 100644 --- a/configuration/home-manager/core/helix.nix +++ b/modules/home-manager/core/helix.nix diff --git a/configuration/home-manager/frontend-dev.nix b/modules/home-manager/frontend-dev.nix index 3a957cd..3a957cd 100644 --- a/configuration/home-manager/frontend-dev.nix +++ b/modules/home-manager/frontend-dev.nix diff --git a/configuration/home-manager/hostnet.nix b/modules/home-manager/hostnet.nix index b8f6418..b8f6418 100644 --- a/configuration/home-manager/hostnet.nix +++ b/modules/home-manager/hostnet.nix diff --git a/configuration/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 77bb675..77bb675 100644 --- a/configuration/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix diff --git a/configuration/home-manager/php.nix b/modules/home-manager/php.nix index ab56f44..ab56f44 100644 --- a/configuration/home-manager/php.nix +++ b/modules/home-manager/php.nix diff --git a/configuration/home-manager/python.nix b/modules/home-manager/python.nix index 464fc39..464fc39 100644 --- a/configuration/home-manager/python.nix +++ b/modules/home-manager/python.nix diff --git a/configuration/home-manager/tarrel.nix b/modules/home-manager/tarrel.nix index a8ddb9f..a8ddb9f 100644 --- a/configuration/home-manager/tarrel.nix +++ b/modules/home-manager/tarrel.nix diff --git a/configuration/hyprland.nix b/modules/hyprland.nix index 92d5ee2..92d5ee2 100644 --- a/configuration/hyprland.nix +++ b/modules/hyprland.nix diff --git a/configuration/snorlax/default.nix b/modules/snorlax/default.nix index 5771eb0..11deb13 100644 --- a/configuration/snorlax/default.nix +++ b/modules/snorlax/default.nix @@ -5,6 +5,8 @@ ./git.nix ./samba.nix ./nginx.nix + ./uvm.nix + ./networking.nix ../core ]; diff --git a/configuration/snorlax/disk-config.nix b/modules/snorlax/disk-config.nix index 9bac5f0..9bac5f0 100644 --- a/configuration/snorlax/disk-config.nix +++ b/modules/snorlax/disk-config.nix diff --git a/configuration/snorlax/facter.json b/modules/snorlax/facter.json index 572dc4c..572dc4c 100644 --- a/configuration/snorlax/facter.json +++ b/modules/snorlax/facter.json diff --git a/configuration/snorlax/git.nix b/modules/snorlax/git.nix index a24c26a..a24c26a 100644 --- a/configuration/snorlax/git.nix +++ b/modules/snorlax/git.nix diff --git a/modules/snorlax/networking.nix b/modules/snorlax/networking.nix new file mode 100644 index 0000000..81683a3 --- /dev/null +++ b/modules/snorlax/networking.nix @@ -0,0 +1,28 @@ +{ ... }: +{ + systemd.network.enable = true; + + systemd.network.networks."10-lan" = { + matchConfig.Name = ["eno1" "vm-*"]; + networkConfig = { + Bridge = "br0"; + }; + }; + + systemd.network.netdevs."br0" = { + netdevConfig = { + Name = "br0"; + Kind = "bridge"; + }; + }; + + systemd.network.networks."10-lan-bridge" = { + matchConfig.Name = "br0"; + networkConfig = { + Address = ["192.168.50.7/24" ]; + Gateway = "192.168.50.1"; + DNS = ["192.168.50.1"]; + }; + linkConfig.RequiredForOnline = "routable"; + }; +} diff --git a/configuration/snorlax/nginx.nix b/modules/snorlax/nginx.nix index cc38496..cc38496 100644 --- a/configuration/snorlax/nginx.nix +++ b/modules/snorlax/nginx.nix diff --git a/configuration/snorlax/samba.nix b/modules/snorlax/samba.nix index 44a4be9..44a4be9 100644 --- a/configuration/snorlax/samba.nix +++ b/modules/snorlax/samba.nix diff --git a/modules/snorlax/uvm.nix b/modules/snorlax/uvm.nix new file mode 100644 index 0000000..9abd85a --- /dev/null +++ b/modules/snorlax/uvm.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + microvm.autostart = [ + "test1" + ]; +} diff --git a/configuration/tarrel/default.nix b/modules/tarrel/default.nix index 9741d28..9741d28 100644 --- a/configuration/tarrel/default.nix +++ b/modules/tarrel/default.nix diff --git a/configuration/tarrel/hardware-configuration.nix b/modules/tarrel/hardware-configuration.nix index 4604fcd..4604fcd 100644 --- a/configuration/tarrel/hardware-configuration.nix +++ b/modules/tarrel/hardware-configuration.nix diff --git a/configuration/tarrel/home-manager.nix b/modules/tarrel/home-manager.nix index 9709129..9709129 100644 --- a/configuration/tarrel/home-manager.nix +++ b/modules/tarrel/home-manager.nix diff --git a/configuration/work/default.nix b/modules/work/default.nix index 2073ea5..2073ea5 100644 --- a/configuration/work/default.nix +++ b/modules/work/default.nix diff --git a/configuration/work/hardware-configuration.nix b/modules/work/hardware-configuration.nix index 9c8c4b1..9c8c4b1 100644 --- a/configuration/work/hardware-configuration.nix +++ b/modules/work/hardware-configuration.nix diff --git a/configuration/work/home-manager.nix b/modules/work/home-manager.nix index c3ee4d9..c3ee4d9 100644 --- a/configuration/work/home-manager.nix +++ b/modules/work/home-manager.nix diff --git a/configuration/work/networking.nix b/modules/work/networking.nix index 99ba8d7..99ba8d7 100644 --- a/configuration/work/networking.nix +++ b/modules/work/networking.nix diff --git a/configuration/work/secrets.nix b/modules/work/secrets.nix index d13599d..d13599d 100644 --- a/configuration/work/secrets.nix +++ b/modules/work/secrets.nix |