From a9207d6844fbf59a8a85506c93af4fac2363dec1 Mon Sep 17 00:00:00 2001 From: Vivian Date: Sun, 7 Jul 2024 10:58:58 +0200 Subject: [PATCH] initial setup --- common/hm-modules/nvim/default.nix | 50 ++++++++------------ common/modules/gnome/default.nix | 14 +++--- flake.nix | 1 + hosts/olympus/bastion/containers/common.nix | 3 +- hosts/olympus/bastion/containers/default.nix | 33 +++++++++---- hosts/olympus/bastion/containers/dns.nix | 8 ---- hosts/thalassa/aoife/hardware.nix | 2 +- hosts/thalassa/aoife/home/hyprland.nix | 29 ++---------- 8 files changed, 58 insertions(+), 82 deletions(-) delete mode 100644 hosts/olympus/bastion/containers/dns.nix diff --git a/common/hm-modules/nvim/default.nix b/common/hm-modules/nvim/default.nix index 8463cac3..dbb56629 100644 --- a/common/hm-modules/nvim/default.nix +++ b/common/hm-modules/nvim/default.nix @@ -24,7 +24,7 @@ with lib; config = mkIf cfg.enable { home.packages = with pkgs; [ fd ]; home.file.".config/nvim/lua".source = ./lua; - programs.nixvim = { + programs.nixvim = {helpers, ...}: { enable = true; package = pkgs.neovim-unwrapped; vimAlias = true; @@ -32,7 +32,7 @@ with lib; globals.mapleader = " "; - options = { + opts = { number = true; conceallevel = 2; expandtab = true; @@ -44,7 +44,7 @@ with lib; clipboard.providers.wl-copy.enable = true; - keymaps = [ + keymaps = with helpers; [ # General { mode = "n"; @@ -65,8 +65,7 @@ with lib; { mode = "n"; key = "fg"; - action = "require('telescope.builtin').live_grep"; - lua = true; + action = mkRaw "require('telescope.builtin').live_grep"; } { mode = "n"; @@ -86,20 +85,18 @@ with lib; { mode = "n"; key = "ob"; - action = "require('obsidian_picker').obsidian_picker"; - lua = true; + action = mkRaw "require('obsidian_picker').obsidian_picker"; } # Commenting { mode = "n"; key = ""; - action = "require('Comment.api').toggle.linewise.current"; - lua = true; + action = mkRaw "require('Comment.api').toggle.linewise.current"; } { mode = "x"; key = ""; - action = '' + action = mkRaw '' function() local esc = vim.api.nvim_replace_termcodes( '', true, false, true @@ -108,7 +105,6 @@ with lib; require('Comment.api').toggle.linewise(vim.fn.visualmode()) end ''; - lua = true; } # Float Term { @@ -119,8 +115,7 @@ with lib; { mode = "t"; key = ""; - action = "function() vim.cmd(':FloatermToggle myfloat') end"; - lua = true; + action = mkRaw "function() vim.cmd(':FloatermToggle myfloat') end"; } # Switch buffers { @@ -163,26 +158,22 @@ with lib; { mode = "n"; key = "nr"; - lua = true; - action = "require('neotest').run.run"; + action = mkRaw "require('neotest').run.run"; } { mode = "n"; key = "no"; - lua = true; - action = "require('neotest').output.open"; + action = mkRaw "require('neotest').output.open"; } { mode = "n"; key = "ns"; - lua = true; - action = "require('neotest').run.stop"; + action = mkRaw "require('neotest').run.stop"; } { mode = "n"; key = "nf"; - lua = true; - action = "function() require('neotest').run.run(vim.fn.expand('%')) end"; + action = mkRaw "function() require('neotest').run.run(vim.fn.expand('%')) end"; } # LSP { @@ -205,7 +196,7 @@ with lib; colorschemes.catppuccin = { enable = true; - flavour = "frappe"; + settings.flavour = "frappe"; }; plugins = { @@ -300,18 +291,19 @@ with lib; telescope = { enable = true; - defaults.preview.ls_short = true; + settings.defaults.preview.ls_short = true; extensions.file-browser = { enable = true; - hijackNetrw = true; - dirIcon = ""; + settings = { + hijack_netrw = true; + dir_icon = ""; + }; }; extensions.fzf-native.enable = true; - extensions.fzf-native.fuzzy = true; + extensions.fzf-native.settings.fuzzy = true; extensions.frecency.enable = true; - extraOptions = { }; }; - comment-nvim.enable = true; + comment.enable = true; none-ls = { enable = true; sources = { @@ -341,7 +333,7 @@ with lib; }; servers = { cssls.enable = true; - nil_ls.enable = true; #NixOS + nil-ls.enable = true; #NixOS dockerls.enable = true; rust-analyzer = { enable = true; diff --git a/common/modules/gnome/default.nix b/common/modules/gnome/default.nix index 333229ed..27902f6e 100644 --- a/common/modules/gnome/default.nix +++ b/common/modules/gnome/default.nix @@ -60,25 +60,25 @@ in gnome-photos gnome-tour gnome-connections + gnome-calendar + epiphany # web browser + geary # email reader + simple-scan # document scanner + totem # video player + gnome-terminal ]) ++ (with pkgs.gnome; [ atomix # puzzle game - epiphany # web browser - geary # email reader pkgs.gedit # text editor - gnome-calendar gnome-clocks gnome-contacts gnome-maps gnome-music gnome-notes - gnome-terminal gnome-weather hitori # sudoku game iagno # go game - simple-scan # document scanner tali # poker game - totem # video player ]); # Services required for gnome @@ -86,7 +86,7 @@ in # Extra gnome packages environment.systemPackages = with pkgs; [ - gnome.gnome-tweaks + gnome-tweaks gnome.gnome-boxes ]; }; diff --git a/flake.nix b/flake.nix index 417fb581..addfec6c 100644 --- a/flake.nix +++ b/flake.nix @@ -160,6 +160,7 @@ jq fup-repl nh + nixfmt-rfc-style ]; }; }; diff --git a/hosts/olympus/bastion/containers/common.nix b/hosts/olympus/bastion/containers/common.nix index e8cae95a..6807b60d 100644 --- a/hosts/olympus/bastion/containers/common.nix +++ b/hosts/olympus/bastion/containers/common.nix @@ -1,8 +1,7 @@ # common container config { lib, ... }: { imports = [ - # ../../../../common/modules - # home-manager.nixosModules.home-manager # TODO: I don't like this + ../../../../common ]; # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686 networking.useHostResolvConf = lib.mkForce false; diff --git a/hosts/olympus/bastion/containers/default.nix b/hosts/olympus/bastion/containers/default.nix index 11757ebb..1d1cf4ae 100644 --- a/hosts/olympus/bastion/containers/default.nix +++ b/hosts/olympus/bastion/containers/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, inputs, ... }: let hostAddress = "10.42.99.1"; hostAddress6 = "fc00::1"; @@ -21,13 +21,28 @@ in { # * fc00:x containers = { - # dns = { - # autoStart = true; - # inherit hostAddress hostAddress6; - # localAddress = "10.42.99.1"; - # localAddress6 = "fc00::2"; - # - # config = ./dns.nix; - # }; + dns = { + autoStart = true; + inherit hostAddress hostAddress6; + localAddress = "10.42.99.1"; + localAddress6 = "fc00::2"; + + specialArgs = { inherit inputs; }; + + config = {pkgs, ...}: { + imports = [ + ./common.nix + inputs.home-manager.nixosModules.home-manager + inputs.gnome-autounlock-keyring.nixosModules.default + inputs.catppuccin.nixosModules.catppuccin + ]; + + services.v.dns = { + enable = true; + openFirewall = true; + mode = "server"; + }; + }; + }; }; } diff --git a/hosts/olympus/bastion/containers/dns.nix b/hosts/olympus/bastion/containers/dns.nix deleted file mode 100644 index b165cd06..00000000 --- a/hosts/olympus/bastion/containers/dns.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: { - imports = [ ./common.nix ]; - services.v.dns = { - enable = true; - openFirewall = true; - mode = "server"; - }; -} diff --git a/hosts/thalassa/aoife/hardware.nix b/hosts/thalassa/aoife/hardware.nix index 54fff359..17adae98 100644 --- a/hosts/thalassa/aoife/hardware.nix +++ b/hosts/thalassa/aoife/hardware.nix @@ -11,7 +11,7 @@ bluetooth.enable = true; # OpenGL + Vulkan - opengl = { + graphics = { enable = true; extraPackages = with pkgs; [ amdvlk diff --git a/hosts/thalassa/aoife/home/hyprland.nix b/hosts/thalassa/aoife/home/hyprland.nix index 9086960a..b9a77d7c 100644 --- a/hosts/thalassa/aoife/home/hyprland.nix +++ b/hosts/thalassa/aoife/home/hyprland.nix @@ -13,30 +13,8 @@ in v.hyprland-workspaces ]; - systemd.user.services.mako = { - Install = { - WantedBy = [ "hyprland-session.target" ]; - }; - Service = { - Type = "dbus"; - BusName = "org.freedesktop.Notifications"; - - ExecCondition = '' - ${pkgs.bash}/bin/bash -c '[ -n "$WAYLAND_DISPLAY" ]' - ''; - - ExecStart = '' - ${pkgs.mako}/bin/mako - ''; - - ExecReload = '' - ${pkgs.mako}/bin/makoctl reload - ''; - - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; + services = { + mako.enable = true; }; programs = { @@ -49,7 +27,6 @@ in # configDir = ./eww; # }; - mako.enable = true; waybar = { enable = true; @@ -173,7 +150,7 @@ in wpctl = "${pkgs.wireplumber}/bin/wpctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; menu = "${config.programs.wofi.package}/bin/wofi --show run,drun"; - fileManager = "${pkgs.gnome.nautilus}/bin/nautilus"; + fileManager = "${pkgs.nautilus}/bin/nautilus"; in { "$mod" = "SUPER";