summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/default.nix63
-rw-r--r--common/home/alacritty/default.nix79
-rw-r--r--common/home/btop/default.nix9
-rw-r--r--common/home/default.nix98
-rw-r--r--common/home/firefox/default.nix69
-rw-r--r--common/home/git/default.nix6
-rw-r--r--common/home/gpg-agent/default.nix5
-rw-r--r--common/home/gpg/default.nix5
-rw-r--r--common/home/hyprland/default.nix101
-rw-r--r--common/home/hyprlock/default.nix48
-rw-r--r--common/home/hyprpaper/default.nix12
-rw-r--r--common/home/nixvim/default.nix209
-rw-r--r--common/home/password-store/default.nix7
-rw-r--r--common/home/ssh/default.nix5
-rw-r--r--common/home/syncthing/default.nix4
-rw-r--r--common/home/waybar/default.nix44
-rw-r--r--common/home/waybar/style.css88
-rw-r--r--common/home/wofi/default.nix5
-rw-r--r--common/home/wofi/style.css47
-rw-r--r--common/home/zsh/default.nix27
-rw-r--r--common/programs/default.nix18
-rw-r--r--common/programs/neovim.nix6
-rw-r--r--common/services/default.nix13
-rw-r--r--common/services/greetd.nix14
-rw-r--r--common/services/pipewire.nix7
-rw-r--r--common/users.nix11
-rw-r--r--flake.lock342
-rw-r--r--flake.nix60
-rw-r--r--hosts/nixedo/default.nix64
-rw-r--r--hosts/nixedo/hardware.nix42
-rw-r--r--hosts/template/default.nix26
-rw-r--r--hosts/template/hardware.nix31
-rw-r--r--modules/hyprland/monitor.nix101
-rw-r--r--modules/waybar/default.nix16
34 files changed, 1682 insertions, 0 deletions
diff --git a/common/default.nix b/common/default.nix
new file mode 100644
index 0000000..1641316
--- /dev/null
+++ b/common/default.nix
@@ -0,0 +1,63 @@
+{
+ config,
+ pkgs,
+ home-manager,
+ nixvim,
+ webtray,
+ ...
+}:
+{
+ imports = [
+ home-manager.nixosModules.default
+ webtray.outputs.nixosModules.default
+ ];
+
+ environment.systemPackages = with pkgs; [
+ pciutils
+ usbutils
+ acpi
+ cargo
+ rustc
+ rustfmt
+ nixfmt-rfc-style
+ blueberry
+ gimp
+ inkscape
+ hicolor-icon-theme
+ ];
+
+ fonts.packages = with pkgs; [ nerdfonts ];
+
+ networking.networkmanager.enable = true;
+
+ time.timeZone = "Europe/Zurich";
+
+ i18n.defaultLocale = "en_US.UTF-8";
+ console = {
+ font = "Lat2-Terminus16";
+ keyMap = "us";
+ };
+
+ users = import ./users.nix { inherit pkgs; };
+ programs = import ./programs { inherit pkgs; };
+ services = import ./services { inherit pkgs; };
+ home-manager = import ./home {
+ inherit pkgs;
+ inherit nixvim;
+ inherit config;
+ };
+
+ security.pam.services.hyprlock = { };
+ security.rtkit.enable = true;
+
+ hardware.bluetooth.enable = true;
+
+ environment.shellAliases = {
+ dmenu-wl = "wofi --show dmenu";
+ };
+
+ nix.settings.experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
+}
diff --git a/common/home/alacritty/default.nix b/common/home/alacritty/default.nix
new file mode 100644
index 0000000..85b539f
--- /dev/null
+++ b/common/home/alacritty/default.nix
@@ -0,0 +1,79 @@
+{ ... }:
+{
+ enable = true;
+
+ settings = {
+ colors = {
+ primary = {
+ background = "#282828";
+ foreground = "#ebdbb2";
+ };
+
+ search = {
+ focused_match = {
+ background = "#689d6a";
+ foreground = "#ebdbb2";
+ };
+
+ matches = {
+ background = "#3c3836";
+ foreground = "#ebdbb2";
+ };
+ };
+
+ bright = {
+ black = "#928374";
+ blue = "#83a598";
+ cyan = "#8ec07c";
+ green = "#b8bb26";
+ magenta = "#d3869b";
+ red = "#fb4934";
+ white = "#fbf1c7";
+ yellow = "#fadb2f";
+ };
+
+ normal = {
+ black = "#282828";
+ blue = "#458588";
+ cyan = "#689d6a";
+ green = "#98971a";
+ magenta = "#b16286";
+ red = "#cc241d";
+ white = "#ebdbb2";
+ yellow = "#d79921";
+ };
+ };
+
+ font = {
+ size = 11.0;
+
+ normal = {
+ family = "SauceCodePro NF";
+ style = "Regular";
+ };
+
+ bold = {
+ family = "SauceCodePro NF";
+ style = "Bold";
+ };
+
+ italic = {
+ family = "SauceCodePro NF";
+ style = "Italic";
+ };
+
+ bold_italic = {
+ family = "SauceCodePro NF";
+ style = "Bold Italic";
+ };
+ };
+
+ window = {
+ dynamic_title = true;
+ padding = {
+ x = 5;
+ y = 5;
+ };
+ };
+ };
+}
diff --git a/common/home/btop/default.nix b/common/home/btop/default.nix
new file mode 100644
index 0000000..949b5f8
--- /dev/null
+++ b/common/home/btop/default.nix
@@ -0,0 +1,9 @@
+{ ... }:
+{
+ enable = true;
+ settings = {
+ color_theme = "Default";
+ truecolor = true;
+ update_ms = 100;
+ };
+}
diff --git a/common/home/default.nix b/common/home/default.nix
new file mode 100644
index 0000000..9b3eb31
--- /dev/null
+++ b/common/home/default.nix
@@ -0,0 +1,98 @@
+{
+ config,
+ pkgs,
+ nixvim,
+ ...
+}:
+let
+ programs = [
+ "git"
+ "alacritty"
+ "firefox"
+ "nixvim"
+ "hyprlock"
+ "waybar"
+ "zsh"
+ "btop"
+ "wofi"
+ "password-store"
+ "gpg"
+ "ssh"
+ ];
+ services = [
+ "syncthing"
+ "hyprpaper"
+ "network-manager-applet"
+ "gpg-agent"
+ ];
+ packages = [
+ pkgs.networkmanagerapplet
+ pkgs.pavucontrol
+ pkgs.wl-clipboard
+ pkgs.virt-manager
+ ];
+in
+{
+ users.n8 = {
+ programs = builtins.listToAttrs (
+ map (n: {
+ name = n;
+ value =
+ if builtins.pathExists ./${n}/default.nix then
+ (import ./${n} {
+ inherit pkgs;
+ home = config.home-manager.users.n8.home;
+ })
+ else
+ { enable = true; };
+ }) programs
+ );
+
+ services = builtins.listToAttrs (
+ map (n: {
+ name = n;
+ value =
+ if builtins.pathExists ./${n}/default.nix then
+ (import ./${n} { inherit pkgs; })
+ else
+ { enable = true; };
+ }) services
+ );
+
+ wayland.windowManager.hyprland = import ./hyprland;
+
+ home.packages = packages;
+
+ home.pointerCursor = {
+ gtk.enable = true;
+ package = pkgs.bibata-cursors;
+ name = "Bibata-Modern-Classic";
+ size = 24;
+ };
+
+ gtk = {
+ enable = true;
+
+ theme = {
+ package = pkgs.gruvbox-dark-gtk;
+ name = "gruvbox-dark";
+ };
+
+ iconTheme = {
+ package = pkgs.gnome.adwaita-icon-theme;
+ name = "adwaita-icon-theme";
+ };
+
+ font = {
+ name = "SauceCodePro NF";
+ size = 11;
+ };
+ };
+
+ home.stateVersion = "24.05";
+
+ };
+
+ backupFileExtension = "backup";
+ sharedModules = [ nixvim.homeManagerModules.nixvim ];
+}
diff --git a/common/home/firefox/default.nix b/common/home/firefox/default.nix
new file mode 100644
index 0000000..674384f
--- /dev/null
+++ b/common/home/firefox/default.nix
@@ -0,0 +1,69 @@
+{ ... }:
+let
+ lock-false = {
+ Value = false;
+ Status = "locked";
+ };
+ lock-true = {
+ Value = true;
+ Status = "locked";
+ };
+in
+{
+ enable = true;
+
+ policies = {
+ DisableTelemetry = true;
+ DisableFirefoxStudies = true;
+ EnableTrackingProtection = {
+ Value = true;
+ Locked = true;
+ Cryptomining = true;
+ Fingerprinting = true;
+ };
+ DisablePocket = true;
+ DisableFirefoxAccounts = true;
+ DisableAccounts = true;
+ DisableFirefoxScreenshots = true;
+ OverrideFirstRunPage = "";
+ OverridePostUpdatePage = "";
+ DontCheckDefaultBrowser = true;
+ DisplayBookmarksToolbar = "never";
+ DisplayMenuBar = "default-off";
+ SearchBar = "unified";
+
+ ExtensionSettings = {
+ "*".installation_mode = "blocked";
+ "uBlock0@raymondhill.net" = {
+ install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
+ installation_mode = "force_installed";
+ };
+ };
+
+ Preferences = {
+ "browser.contentblocking.category" = {
+ Value = "strict";
+ Status = "locked";
+ };
+ "extensions.pocket.enabled" = lock-false;
+ "extensions.screenshots.disabled" = lock-true;
+ "browser.topsites.contile.enabled" = lock-false;
+ "browser.formfill.enable" = lock-false;
+ "browser.search.suggest.enabled" = lock-false;
+ "browser.search.suggest.enabled.private" = lock-false;
+ "browser.search.defaultenginename" = "DuckDuckGo";
+ "browser.search.order.1" = "DuckDuckGo";
+ "browser.urlbar.suggest.searches" = lock-false;
+ "browser.urlbar.showSearchSuggestionsFirst" = lock-false;
+ "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
+ "browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
+ "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
+ "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
+ "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
+ "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
+ "browser.newtabpage.activity-stream.showSponsored" = lock-false;
+ "browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
+ "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
+ };
+ };
+}
diff --git a/common/home/git/default.nix b/common/home/git/default.nix
new file mode 100644
index 0000000..91878ea
--- /dev/null
+++ b/common/home/git/default.nix
@@ -0,0 +1,6 @@
+{ ... }:
+{
+ enable = true;
+ userEmail = "nathan@nathanreiner.xyz";
+ userName = "Nathan Reiner";
+}
diff --git a/common/home/gpg-agent/default.nix b/common/home/gpg-agent/default.nix
new file mode 100644
index 0000000..d29f924
--- /dev/null
+++ b/common/home/gpg-agent/default.nix
@@ -0,0 +1,5 @@
+{ pkgs, ... }:
+{
+ enable = true;
+ pinentryPackage = pkgs.pinentry-qt;
+}
diff --git a/common/home/gpg/default.nix b/common/home/gpg/default.nix
new file mode 100644
index 0000000..2c1ec57
--- /dev/null
+++ b/common/home/gpg/default.nix
@@ -0,0 +1,5 @@
+{ home, ... }:
+{
+ enable = true;
+ homedir = "${home.homeDirectory}/global/.local/share/gnupg";
+}
diff --git a/common/home/hyprland/default.nix b/common/home/hyprland/default.nix
new file mode 100644
index 0000000..a3c132e
--- /dev/null
+++ b/common/home/hyprland/default.nix
@@ -0,0 +1,101 @@
+{
+ enable = true;
+ systemd.variables = [ "--all" ];
+ xwayland.enable = true;
+ settings = {
+ "$mod" = "SUPER";
+ bind = [
+ "$mod+Shift, Return, exec, alacritty"
+ "$mod+Shift, Q, exit"
+ "$mod+Shift, B, exec, firefox"
+ "$mod, Escape, exec, hyprlock"
+ "$mod, Space, exec, wofi --show run"
+ "$mod, C, killactive,"
+
+ "$mod, h, movefocus, l"
+ "$mod, l, movefocus, r"
+ "$mod, k, movefocus, u"
+ "$mod, j, movefocus, d"
+
+ "$mod+Shift, h, movewindow, l"
+ "$mod+Shift, l, movewindow, r"
+ "$mod+Shift, k, movewindow, u"
+ "$mod+Shift, j, movewindow, d"
+
+ "$mod, 1, workspace, 1"
+ "$mod, 2, workspace, 2"
+ "$mod, 3, workspace, 3"
+ "$mod, 4, workspace, 4"
+ "$mod, 5, workspace, 5"
+ "$mod, 6, workspace, 6"
+ "$mod, 7, workspace, 7"
+ "$mod, 8, workspace, 8"
+ "$mod, 9, workspace, 9"
+ "$mod, 0, workspace, 10"
+
+ "$mod+Shift, 1, movetoworkspace, 1"
+ "$mod+Shift, 2, movetoworkspace, 2"
+ "$mod+Shift, 3, movetoworkspace, 3"
+ "$mod+Shift, 4, movetoworkspace, 4"
+ "$mod+Shift, 5, movetoworkspace, 5"
+ "$mod+Shift, 6, movetoworkspace, 6"
+ "$mod+Shift, 7, movetoworkspace, 7"
+ "$mod+Shift, 8, movetoworkspace, 8"
+ "$mod+Shift, 9, movetoworkspace, 9"
+ "$mod+Shift, 0, movetoworkspace, 10"
+ ];
+
+ general = {
+ gaps_in = 10;
+ gaps_out = 10;
+ layout = "dwindle";
+ };
+
+ decoration = {
+ rounding = 5;
+ drop_shadow = true;
+ shadow_range = 4;
+ shadow_render_power = 3;
+ };
+
+ animations = {
+ enabled = true;
+ bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
+ animation = [
+ "windows, 1, 3, myBezier"
+ "windowsOut, 1, 3, default, popin 80%"
+ "border, 1, 10, default"
+ "borderangle, 1, 8, default"
+ "fade, 1, 3, default"
+ "workspaces, 1, 3, default"
+ ];
+ };
+
+ dwindle = {
+ pseudotile = true;
+ preserve_split = true;
+ };
+
+ input = {
+ kb_options = "caps:escape";
+
+ touchpad = {
+ natural_scroll = true;
+ clickfinger_behavior = true;
+ };
+ };
+
+ gestures = {
+ workspace_swipe = true;
+ workspace_swipe_fingers = 4;
+ };
+
+ misc = {
+ disable_hyprland_logo = true;
+ disable_splash_rendering = true;
+ enable_swallow = false;
+ swallow_regex = "^(Alacritty)$";
+ animate_manual_resizes = true;
+ };
+ };
+}
diff --git a/common/home/hyprlock/default.nix b/common/home/hyprlock/default.nix
new file mode 100644
index 0000000..91a28ea
--- /dev/null
+++ b/common/home/hyprlock/default.nix
@@ -0,0 +1,48 @@
+{ ... }:
+{
+ enable = true;
+ settings = {
+ general = {
+ disable_loading_bar = false;
+ hide_cursor = true;
+ no_fade_in = true;
+ };
+
+ background = [
+ {
+ blur_passes = 3;
+ blur_size = 8;
+ }
+ ];
+
+ input-field = [
+ {
+ size = "250, 50";
+ position = "0, -80";
+ monitor = "";
+ dots_center = true;
+ fade_on_empty = false;
+ font_color = "rgb(235, 219, 178)";
+ inner_color = "rgb(40, 40, 40)";
+ outer_color = "rgb(177, 98, 134)";
+ outline_thickness = 2;
+ placeholder_text = "<span foreground='##ebbdb2'>/password/</span>";
+ shadow_passes = 2;
+ }
+ ];
+
+ label = [
+ {
+ text = "$USER";
+ text_algin = "center";
+ position = "0, 60";
+ font_color = "rgb(235, 219, 178)";
+ font_size = 70;
+ font_family = "SauceCodePro NF";
+ rotate = 0;
+ halign = "center";
+ valign = "center";
+ }
+ ];
+ };
+}
diff --git a/common/home/hyprpaper/default.nix b/common/home/hyprpaper/default.nix
new file mode 100644
index 0000000..56a11e1
--- /dev/null
+++ b/common/home/hyprpaper/default.nix
@@ -0,0 +1,12 @@
+{ ... }:
+{
+ enable = true;
+ settings = {
+ ipc = "on";
+ splash = false;
+ splash_offset = 2.0;
+
+ preload = [ "~/global/media/photos/wallpapers/gruvbox.png" ];
+ wallpaper = [ ",~/global/media/photos/wallpapers/gruvbox.png" ];
+ };
+}
diff --git a/common/home/nixvim/default.nix b/common/home/nixvim/default.nix
new file mode 100644
index 0000000..047768d
--- /dev/null
+++ b/common/home/nixvim/default.nix
@@ -0,0 +1,209 @@
+{ pkgs, ... }:
+{
+ enable = true;
+ defaultEditor = true;
+
+ enableMan = true;
+
+ package = pkgs.unstable.neovim-unwrapped;
+
+ extraConfigLua = ''
+ local signs = { Error = "󰀨 ", Warn = " ", Hint = " ", Info = " " }
+ for type, icon in pairs(signs) do
+ local hl = "DiagnosticSign" .. type
+ vim.fn.sign_define(hl, { text = icon, texthl= hl, numhl = hl })
+ end'';
+
+ diagnostics = {
+ virtual_text = {
+ prefix = "󰬨";
+ };
+ };
+
+ opts = {
+ mouse = "a";
+ number = true;
+ softtabstop = 0;
+ expandtab = false;
+ tabstop = 2;
+ shiftwidth = 2;
+ smartindent = true;
+ list = true;
+ listchars = {
+ tab = "> ";
+ eol = "¬";
+ trail = "·";
+ nbsp = "•";
+ };
+ splitright = true;
+ splitbelow = true;
+ showcmd = true;
+ wildmenu = true;
+ hlsearch = true;
+ autoread = true;
+ swapfile = false;
+ };
+
+ clipboard = {
+ register = "unnamedplus";
+ providers.wl-copy.enable = true;
+ };
+
+ colorschemes.base16 = {
+ enable = true;
+ colorscheme = "gruvbox-dark-pale";
+ };
+
+ plugins = {
+ nvim-tree = {
+ enable = true;
+ autoClose = true;
+ disableNetrw = true;
+ hijackCursor = true;
+ };
+
+ telescope = {
+ enable = true;
+ };
+
+ lualine = {
+ enable = true;
+ };
+
+ treesitter = {
+ enable = true;
+ settings = {
+ auto_install = false;
+ ensure_installed = "all";
+ highlight = {
+ additional_vim_regex_highlighting = true;
+ enable = true;
+ };
+ ignore_install = [ "rust" ];
+ incremental_selection = {
+ enable = true;
+ keymaps = {
+ init_selection = false;
+ node_decremental = "grm";
+ node_incremental = "grn";
+ scope_incremental = "grc";
+ };
+ };
+ indent = {
+ enable = true;
+ };
+ sync_install = false;
+ };
+ };
+
+ luasnip = {
+ enable = true;
+ };
+
+ friendly-snippets = {
+ enable = true;
+ };
+
+ cmp = {
+ enable = true;
+ autoEnableSources = true;
+ settings = {
+ mapping = {
+ "<C-b>" = "cmp.mapping.scroll_docs(-4)";
+ "<C-f>" = "cmp.mapping.scroll_docs(4)";
+ "<C-Space>" = "cmp.mapping.complete()";
+ "<C-e>" = "cmp.mapping.abort()";
+ "<CR>" = "cmp.mapping.confirm({ select = true })";
+ "<Tab>" = ''
+ cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_next_item()
+ elseif require("luasnip").expand_or_jumpable() then
+ vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plugin>luasnip-expand-or-jump", true, true, true), "")
+ else
+ fallback()
+ end
+ end, { "i", "s" })
+ '';
+ "<S-Tab>" = ''
+ cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_prev_item()
+ elseif require("luasnip").jumpable(-1) then
+ vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plugin>luasnip-jump-prev", true, true, true), "")
+ else
+ fallback()
+ end
+ end, { "i", "s" })
+ '';
+ };
+ snippet = {
+ expand = "function(args) require('luasnip').lsp_expand(args.body) end";
+ };
+ sources = [
+ { name = "nvim_lsp"; }
+ { name = "luasnip"; }
+ { name = "path"; }
+ { name = "buffer"; }
+ ];
+ };
+ };
+
+ lsp = {
+ enable = true;
+ servers = {
+ bashls = {
+ enable = true;
+ package = pkgs.unstable.bash-language-server;
+ };
+ clangd.enable = true;
+ nixd = {
+ enable = true;
+ settings.formatting.command = [ "nixfmt" ];
+ };
+ rust-analyzer = {
+ enable = true;
+ installCargo = true;
+ installRustc = true;
+ };
+ pyright.enable = true;
+ };
+ keymaps.lspBuf = {
+ "gd" = "definition";
+ "gD" = "references";
+ "gt" = "type_definition";
+ "gi" = "implementation";
+ "K" = "hover";
+ "rn" = "rename";
+ "<space>ca" = "code_action";
+ "<space>f" = "format";
+ };
+ };
+
+ lsp-format = {
+ enable = true;
+ };
+ };
+
+ globals = {
+ mapleader = ",";
+ };
+
+ keymaps = [
+ {
+ key = "<leader>tf";
+ action = "<cmd>NvimTreeToggle<cr>";
+ mode = "n";
+ }
+ {
+ key = "<leader>f";
+ action = "<cmd>lua require('telescope.builtin').find_files()<cr>";
+ mode = "n";
+ }
+ {
+ key = "<space>d";
+ action = "<cmd>lua vim.diagnostic.open_float()<cr>";
+ mode = "n";
+ }
+ ];
+}
diff --git a/common/home/password-store/default.nix b/common/home/password-store/default.nix
new file mode 100644
index 0000000..29bbfb3
--- /dev/null
+++ b/common/home/password-store/default.nix
@@ -0,0 +1,7 @@
+{ ... }:
+{
+ enable = true;
+ settings = {
+ PASSWORD_STORE_DIR = "$HOME/global/.local/share/pass/";
+ };
+}
diff --git a/common/home/ssh/default.nix b/common/home/ssh/default.nix
new file mode 100644
index 0000000..da761d5
--- /dev/null
+++ b/common/home/ssh/default.nix
@@ -0,0 +1,5 @@
+{ home, ... }:
+{
+ enable = true;
+ includes = [ "${home.homeDirectory}/global/.ssh/config" ];
+}
diff --git a/common/home/syncthing/default.nix b/common/home/syncthing/default.nix
new file mode 100644
index 0000000..3887830
--- /dev/null
+++ b/common/home/syncthing/default.nix
@@ -0,0 +1,4 @@
+{ ... }:
+{
+ enable = true;
+}
diff --git a/common/home/waybar/default.nix b/common/home/waybar/default.nix
new file mode 100644
index 0000000..7e59bf2
--- /dev/null
+++ b/common/home/waybar/default.nix
@@ -0,0 +1,44 @@
+{ ... }:
+{
+ enable = true;
+ systemd.enable = true;
+ settings = {
+ mainBar = {
+ layer = "top";
+ position = "left";
+ width = 50;
+ outputs = "*";
+ spacing = 10;
+ modules-left = [ "hyprland/workspaces" ];
+ modules-center = [ ];
+ modules-right = [
+ "bluetooth"
+ "battery"
+ "tray"
+ ];
+
+ "hyprland/workspaces" = {
+ format = "{icon}";
+ };
+
+ "hyprland/window" = {
+ separate-outputs = true;
+ };
+
+ bluetooth = {
+ format = "";
+ format-disabled = "󰂲";
+ format-off = "󰂲";
+ format-on = "";
+ format-connected = "󰂱";
+ on-click = "blueberry";
+ };
+
+ tray = {
+ icon-size = 15;
+ spacing = 10;
+ };
+ };
+ };
+ style = ./style.css;
+}
diff --git a/common/home/waybar/style.css b/common/home/waybar/style.css
new file mode 100644
index 0000000..d3dc7a1
--- /dev/null
+++ b/common/home/waybar/style.css
@@ -0,0 +1,88 @@
+* {
+ font-family: 'SauceCodePro NF';
+}
+
+window {
+ background: transparent;
+}
+
+#workspaces {
+ background: #282828;
+ border-radius: 5px;
+ margin-left: 10px;
+ padding: 5px;
+}
+
+#workspaces button {
+ border: 5px solid #282828;
+ padding: 0px;
+}
+
+#workspaces button.active {
+ border-right: 5px solid #b16286;
+ border-radius: 0px;
+}
+
+#workspaces button:hover {
+ border-radius: 20px;
+ border: 5px solid #1d2021;
+ background: #1d2021;
+ padding: 0px;
+}
+
+#workspaces button.active:hover {
+ border: 5px solid #1d2021;
+ border-right: 5px solid #b16286;
+ border-radius: 20px;
+ background: #1d2021;
+ padding: 0px;
+}
+
+#tray, #bluetooth {
+ background: #282828;
+ border-radius: 5px;
+ margin-left: 10px;
+ padding: 10px 5px;
+}
+
+#tray window {
+ border-radius: 5px;
+}
+
+#battery {
+ background: #458588;
+ color: #282828;
+ border-radius: 5px;
+ margin-left: 10px;
+ padding: 10px 5px;
+}
+
+#battery.charging {
+ background: #689d6a;
+}
+
+#battery.warning:not(.charging) {
+ background: #cc241d;
+}
+
+.modules-left {
+ margin-top: 10px;
+}
+
+.modules-right {
+ margin-bottom: 10px;
+}
+
+.popup menu {
+ border: 3px solid #3c3836;
+ border-radius: 10px;
+ padding: 10px;
+}
+
+.popup menu menuitem {
+ border-radius: 5px;
+}
+
+.popup decoration {
+ background: transparent;
+}
diff --git a/common/home/wofi/default.nix b/common/home/wofi/default.nix
new file mode 100644
index 0000000..d8cf5a9
--- /dev/null
+++ b/common/home/wofi/default.nix
@@ -0,0 +1,5 @@
+{ ... }:
+{
+ enable = true;
+ style = builtins.readFile ./style.css;
+}
diff --git a/common/home/wofi/style.css b/common/home/wofi/style.css
new file mode 100644
index 0000000..7e38346
--- /dev/null
+++ b/common/home/wofi/style.css
@@ -0,0 +1,47 @@
+* {
+ font-family: "SauceCodePro NF";
+}
+
+window {
+ background: transparent;
+ color: #ebdbb2;
+}
+
+#outer-box {
+ border-radius: 10px;
+ background: transparent;
+}
+
+entry#input {
+ background: #1d2021;
+ border: 2px solid #b16286;
+ margin-bottom: 10px;
+ padding: 10px;
+ border-radius: 10px;
+}
+#scroll {
+ border-radius: 10px;
+ border: 2px solid #3c3836;
+ background: #1d2021;
+}
+
+#entry {
+ border: none;
+ background: transparent;
+}
+
+.entry {
+ border-radius: 5px;
+ border: none;
+ padding: 8px;
+ margin: 2px;
+}
+
+.entry#selected {
+ border: none;
+ background: #b16286;
+}
+
+.entry#selected label {
+ background: #b16286;
+}
diff --git a/common/home/zsh/default.nix b/common/home/zsh/default.nix
new file mode 100644
index 0000000..ef08f7f
--- /dev/null
+++ b/common/home/zsh/default.nix
@@ -0,0 +1,27 @@
+{ ... }:
+{
+ enable = true;
+ syntaxHighlighting.enable = true;
+ enableCompletion = true;
+ defaultKeymap = "viins";
+ autocd = true;
+ shellAliases = {
+ v = "nvim";
+ };
+ initExtra = ''
+ prompt_git_status() {
+ if [ -n "$(git branch 2>/dev/null)" ]; then
+ sign="";
+ [[ -n "$(git status -s)" ]] && sign="";
+ git_branch=$(git branch);
+ echo "%F{5}%f%F{0}%K{5}''${sign} ''${git_branch##*\* }%k%F{5}%k";
+ fi;
+ }
+
+ update_prompt() {
+ export RPROMPT="$(prompt_git_status)"
+ }
+
+ PROMPT="%F{cyan}%F{0}%K{cyan}%n%k%f%F{cyan}%k%f %F{cyan}%f%k%K{cyan}%F{0}%m%k%f%F{cyan}%k %f%k%F{magenta}%F{0}%K{magenta}%~%f%k%F{magenta}%k%f "
+ '';
+}
diff --git a/common/programs/default.nix b/common/programs/default.nix
new file mode 100644
index 0000000..9768774
--- /dev/null
+++ b/common/programs/default.nix
@@ -0,0 +1,18 @@
+{ pkgs, ... }:
+let
+ programs = [
+ "hyprland"
+ "neovim"
+ "zsh"
+ ];
+in
+builtins.listToAttrs (
+ map (n: {
+ name = n;
+ value =
+ if builtins.pathExists ./${n}.nix then
+ (import ./${n}.nix { inherit pkgs; })
+ else
+ { enable = true; };
+ }) programs
+)
diff --git a/common/programs/neovim.nix b/common/programs/neovim.nix
new file mode 100644
index 0000000..f64c706
--- /dev/null
+++ b/common/programs/neovim.nix
@@ -0,0 +1,6 @@
+{ pkgs, ... }:
+{
+ enable = true;
+ package = pkgs.unstable.neovim-unwrapped;
+ defaultEditor = true;
+}
diff --git a/common/services/default.nix b/common/services/default.nix
new file mode 100644
index 0000000..2b1b73a
--- /dev/null
+++ b/common/services/default.nix
@@ -0,0 +1,13 @@
+{ pkgs, ... }:
+let
+ services = [
+ "greetd"
+ "pipewire"
+ ];
+in
+builtins.listToAttrs (
+ map (n: {
+ name = n;
+ value = import ./${n}.nix { inherit pkgs; };
+ }) services
+)
diff --git a/common/services/greetd.nix b/common/services/greetd.nix
new file mode 100644
index 0000000..2a59cbc
--- /dev/null
+++ b/common/services/greetd.nix
@@ -0,0 +1,14 @@
+{ pkgs, ... }:
+{
+ enable = true;
+ settings = {
+ initial_session = {
+ command = "${pkgs.hyprland}/bin/Hyprland";
+ user = "n8";
+ };
+ default_session = {
+ command = "${pkgs.greetd.tuigreet}/bin/tuigreet --greeting 'Welcome to NixOS!' --asterisks --remember --remember-user-session --time --cmd ${pkgs.hyprland}/bin/Hyprland";
+ user = "greeter";
+ };
+ };
+}
diff --git a/common/services/pipewire.nix b/common/services/pipewire.nix
new file mode 100644
index 0000000..d6efd73
--- /dev/null
+++ b/common/services/pipewire.nix
@@ -0,0 +1,7 @@
+{ ... }:
+{
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+}
diff --git a/common/users.nix b/common/users.nix
new file mode 100644
index 0000000..5046d0a
--- /dev/null
+++ b/common/users.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+{
+ users.n8 = {
+ isNormalUser = true;
+ extraGroups = [
+ "wheel"
+ "networkmanager"
+ ];
+ shell = pkgs.zsh;
+ };
+}
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..1a17943
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,342 @@
+{
+ "nodes": {
+ "devshell": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1722113426,
+ "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
+ "owner": "numtide",
+ "repo": "devshell",
+ "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "devshell",
+ "type": "github"
+ }
+ },
+ "flake-compat": {
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "revCount": 57,
+ "type": "tarball",
+ "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
+ },
+ "original": {
+ "type": "tarball",
+ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
+ }
+ },
+ "flake-parts": {
+ "inputs": {
+ "nixpkgs-lib": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1726153070,
+ "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "git-hooks": {
+ "inputs": {
+ "flake-compat": [
+ "nixvim",
+ "flake-compat"
+ ],
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1725513492,
+ "narHash": "sha256-tyMUA6NgJSvvQuzB7A1Sf8+0XCHyfSPRx/b00o6K0uo=",
+ "owner": "cachix",
+ "repo": "git-hooks.nix",
+ "rev": "7570de7b9b504cfe92025dd1be797bf546f66528",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "git-hooks.nix",
+ "type": "github"
+ }
+ },
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "git-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709087332,
+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
+ "home-manager": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1725703823,
+ "narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "ref": "release-24.05",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
+ "home-manager_2": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1726357542,
+ "narHash": "sha256-p4OrJL2weh0TRtaeu1fmNYP6+TOp/W2qdaIJxxQay4c=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "e524c57b1fa55d6ca9d8354c6ce1e538d2a1f47f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
+ "nix-darwin": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1726188813,
+ "narHash": "sha256-Vop/VRi6uCiScg/Ic+YlwsdIrLabWUJc57dNczp0eBc=",
+ "owner": "lnl7",
+ "repo": "nix-darwin",
+ "rev": "21fe31f26473c180390cfa81e3ea81aca0204c80",
+ "type": "github"
+ },
+ "original": {
+ "owner": "lnl7",
+ "repo": "nix-darwin",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1726320982,
+ "narHash": "sha256-RuVXUwcYwaUeks6h3OLrEmg14z9aFXdWppTWPMTwdQw=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "8f7492cce28977fbf8bd12c72af08b1f6c7c3e49",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-24.05",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-unstable": {
+ "locked": {
+ "lastModified": 1726243404,
+ "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixvim": {
+ "inputs": {
+ "devshell": "devshell",
+ "flake-compat": "flake-compat",
+ "flake-parts": "flake-parts",
+ "git-hooks": "git-hooks",
+ "home-manager": "home-manager_2",
+ "nix-darwin": "nix-darwin",
+ "nixpkgs": [
+ "nixpkgs-unstable"
+ ],
+ "nuschtosSearch": "nuschtosSearch",
+ "treefmt-nix": "treefmt-nix"
+ },
+ "locked": {
+ "lastModified": 1726502324,
+ "narHash": "sha256-I/WFSIBeIjlY3CgSJ6IRYxP2aEJ6b42Y1HAeATlBh48=",
+ "owner": "nix-community",
+ "repo": "nixvim",
+ "rev": "2e3083e42509c399b224239f6d7fa17976b18536",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixvim",
+ "type": "github"
+ }
+ },
+ "nuschtosSearch": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1726392886,
+ "narHash": "sha256-9RtOuG7V8KG8IU8nZje5EQ1WSM/inr7+zb3tAgTiHDM=",
+ "owner": "NuschtOS",
+ "repo": "search",
+ "rev": "97d34b70deed4878fcb2449ac89dab717d72efa1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NuschtOS",
+ "repo": "search",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "home-manager": "home-manager",
+ "nixpkgs": "nixpkgs",
+ "nixpkgs-unstable": "nixpkgs-unstable",
+ "nixvim": "nixvim",
+ "webtray": "webtray"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "treefmt-nix": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1725271838,
+ "narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=",
+ "owner": "numtide",
+ "repo": "treefmt-nix",
+ "rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "treefmt-nix",
+ "type": "github"
+ }
+ },
+ "webtray": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs-unstable"
+ ]
+ },
+ "locked": {
+ "lastModified": 1726525937,
+ "narHash": "sha256-2MBwb5p/J8rYUV915ibWBRTQZfIwQcppDd/vopFjZZQ=",
+ "ref": "refs/heads/master",
+ "rev": "5756b833718d8b7bc8db378dd9dbebc52aa61220",
+ "revCount": 28,
+ "type": "git",
+ "url": "https://git.nathanreiner.xyz/webtray"
+ },
+ "original": {
+ "type": "git",
+ "url": "https://git.nathanreiner.xyz/webtray"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..6076255
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,60 @@
+{
+ description = "n8 NixOS Configuration Flake";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
+ nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
+ home-manager = {
+ url = "github:/nix-community/home-manager/release-24.05";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ nixvim = {
+ url = "github:/nix-community/nixvim";
+ inputs.nixpkgs.follows = "nixpkgs-unstable";
+ };
+ webtray = {
+ url = "git+https://git.nathanreiner.xyz/webtray";
+ inputs.nixpkgs.follows = "nixpkgs-unstable";
+ };
+ };
+
+ outputs =
+ { nixpkgs, nixpkgs-unstable, ... }@attrs:
+ let
+ system = "x86_64-linux";
+ overlay-unstable = final: prev: {
+ unstable = import nixpkgs-unstable {
+ inherit system;
+ config.allowUnfree = true;
+ };
+ };
+ host-config =
+ name:
+ nixpkgs.lib.nixosSystem {
+ inherit system;
+ specialArgs = attrs;
+ modules = [
+ (
+ { ... }:
+ {
+ nixpkgs.overlays = [ overlay-unstable ];
+ }
+ )
+ ./hosts/${name}
+ ./common
+ ];
+ };
+ hosts = [
+ "template"
+ "nixedo"
+ ];
+ in
+ {
+ nixosConfigurations = builtins.listToAttrs (
+ map (n: {
+ name = n;
+ value = host-config n;
+ }) hosts
+ );
+ };
+}
diff --git a/hosts/nixedo/default.nix b/hosts/nixedo/default.nix
new file mode 100644
index 0000000..2b422d2
--- /dev/null
+++ b/hosts/nixedo/default.nix
@@ -0,0 +1,64 @@
+{ lib, pkgs, ... }:
+{
+ imports = [
+ ./hardware.nix
+ ../../modules/hyprland/monitor.nix
+ ];
+
+ networking.hostName = "nixedo";
+
+ boot.loader = {
+ efi.canTouchEfiVariables = true;
+ grub = {
+ enable = true;
+ device = "nodev";
+ efiSupport = true;
+ };
+ };
+
+ hyprland.monitors = {
+ default = {
+ resolution = "preferred";
+ position = "auto";
+ scale = 1;
+ };
+
+ eDP-1 = {
+ resolution = "preferred";
+ position = "auto";
+ scale = 1;
+ bar.enable = true;
+ };
+ };
+
+ webtray.instances = {
+ element = {
+ url = "https://chat.nathanreiner.xyz";
+ autoStart = true;
+ openInWindow = false;
+ };
+ syncthing-tray = {
+ url = "http://localhost:8384";
+ autoStart = true;
+ openInWindow = false;
+ };
+ };
+
+ networking.networkmanager.fccUnlockScripts = [
+ {
+ id = "105b:e0ab";
+ path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/105b:e0ab";
+ }
+ ];
+
+ systemd.services.ModemManager = {
+ enable = lib.mkForce true;
+ path = [ pkgs.libqmi ];
+ wantedBy = [
+ "multi-user.target"
+ "network.target"
+ ];
+ };
+
+ system.stateVersion = "24.05";
+}
diff --git a/hosts/nixedo/hardware.nix b/hosts/nixedo/hardware.nix
new file mode 100644
index 0000000..82d6b9e
--- /dev/null
+++ b/hosts/nixedo/hardware.nix
@@ -0,0 +1,42 @@
+# 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 + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/5701475d-62a8-4db1-afa6-68ed94c62fc5";
+ fsType = "btrfs";
+ };
+
+ boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/96f26456-b3da-4e96-b922-8ca24d842d60";
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/9FFE-8996";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ 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.enp2s0f1.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wwp0s20f0u6c2.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/hosts/template/default.nix b/hosts/template/default.nix
new file mode 100644
index 0000000..0433557
--- /dev/null
+++ b/hosts/template/default.nix
@@ -0,0 +1,26 @@
+{ ... }:
+{
+ imports = [
+ ./hardware.nix
+ ../../modules/hyprland/monitor.nix
+ ];
+
+ networking.hostName = "template";
+
+ boot.loader = {
+ grub = {
+ enable = true;
+ device = "/dev/vda";
+ };
+ };
+
+ hyprland.monitors = {
+ default = {
+ resolution = "preferred";
+ position = "auto";
+ scale = 1;
+ };
+ };
+
+ system.stateVersion = "24.05";
+}
diff --git a/hosts/template/hardware.nix b/hosts/template/hardware.nix
new file mode 100644
index 0000000..0705cb6
--- /dev/null
+++ b/hosts/template/hardware.nix
@@ -0,0 +1,31 @@
+# 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" "sr_mod" "virtio_blk" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/ca998991-940e-4566-a005-0047b6a246fa";
+ fsType = "btrfs";
+ };
+
+ 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/modules/hyprland/monitor.nix b/modules/hyprland/monitor.nix
new file mode 100644
index 0000000..7aafb7f
--- /dev/null
+++ b/modules/hyprland/monitor.nix
@@ -0,0 +1,101 @@
+{ config, lib, ... }:
+let
+ cfg = config.hyprland.monitors;
+in
+{
+ imports = [ ../waybar ];
+
+ options.hyprland.monitors =
+ with lib;
+ mkOption {
+ description = "Hyprland Monitor Configuration";
+ type = types.attrsOf (
+ types.submodule {
+ options = {
+ resolution = mkOption {
+ description = "Monitor Resolution";
+ type = types.strMatching "[:digit:]+x[:digit:]+|preferred";
+ default = "preferred";
+ };
+ position = mkOption {
+ description = "Monitor Position";
+ type = types.strMatching "-?[:digit:]+x-?[:digit:]+|auto";
+ default = "auto";
+ };
+ scale = mkOption {
+ description = "Monitor Scale";
+ type = types.numbers.positive;
+ default = 1;
+ };
+ transform = mkOption {
+ description = "Hyprland Monitor Transform";
+ type = types.submodule {
+ options = {
+ flipped = mkOption {
+ description = "Hyprland Flip Monitor";
+ type = types.bool;
+ default = false;
+ };
+ rotation = mkOption {
+ description = "Hyprland Monitor Rotation";
+ type = types.enum [
+ 0
+ 90
+ 180
+ 270
+ ];
+ default = 0;
+ };
+ };
+ };
+ default = {
+ flipped = false;
+ rotation = 0;
+ };
+ };
+ bar = mkOption {
+ description = "Waybar Settings";
+ type = types.submodule {
+ options = {
+ enable = mkOption {
+ description = "Enable Waybar for this Monitor";
+ type = types.bool;
+ default = false;
+ };
+ };
+ };
+ default = {
+ enable = false;
+ };
+ };
+ };
+ }
+ );
+ default = {
+ default = { };
+ };
+ };
+
+ config = {
+ home-manager.users.n8.wayland.windowManager.hyprland.settings.monitor =
+ lib.attrsets.mapAttrsToList
+ (
+ name: value:
+ "${if name == "default" then "" else name},${value.resolution},"
+ + "${value.position},"
+ + "${toString value.scale},"
+ + "transform,"
+ + "${toString ((value.transform.rotation / 90) + (if value.transform.flipped then 4 else 0))}"
+ )
+ cfg;
+
+ bar = builtins.map (m: m.name) (
+ builtins.filter (m: m.enable) (
+ lib.attrsets.mapAttrsToList (name: value: {
+ name = name;
+ enable = value.bar.enable;
+ }) cfg
+ )
+ );
+ };
+}
diff --git a/modules/waybar/default.nix b/modules/waybar/default.nix
new file mode 100644
index 0000000..c6ecfb3
--- /dev/null
+++ b/modules/waybar/default.nix
@@ -0,0 +1,16 @@
+{ config, lib, ... }:
+{
+ options.bar =
+ with lib;
+ mkOption {
+ description = "Bar Configuration";
+ type = types.listOf types.str;
+ default = [ "default" ];
+ };
+
+ config = {
+ home-manager.users.n8.programs.waybar.settings.mainBar.output = (
+ builtins.map (o: if o == "default" then "*" else toString o) config.bar
+ );
+ };
+}