From 0d1ba3415549946942bd80467877a4bc9e887234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Thu, 13 Jun 2024 13:14:56 +0200 Subject: [PATCH] Rename NixOS to NixVM --- home/NixVM.nix | 7 +++ home/nixos.nix | 18 ------ home/utils/desktop.nix | 60 +++++++++++++++++++ hosts/Common/default.nix | 58 ------------------ hosts/NixVM/default.nix | 8 +++ .../hardware-configuration.nix | 0 hosts/nixos/default.nix | 1 - 7 files changed, 75 insertions(+), 77 deletions(-) create mode 100644 home/NixVM.nix delete mode 100644 home/nixos.nix create mode 100644 hosts/NixVM/default.nix rename hosts/{nixos => NixVM}/hardware-configuration.nix (100%) delete mode 100644 hosts/nixos/default.nix diff --git a/home/NixVM.nix b/home/NixVM.nix new file mode 100644 index 0000000..497c26c --- /dev/null +++ b/home/NixVM.nix @@ -0,0 +1,7 @@ +{ inputs, config, pkgs, ... }: + +{ + imports = [ + (import ./utils/common.nix { inherit inputs config pkgs; }) + ]; +} diff --git a/home/nixos.nix b/home/nixos.nix deleted file mode 100644 index bfb8d58..0000000 --- a/home/nixos.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ inputs, config, pkgs, ... }: - -{ - imports = [ - (import ./common.nix { inherit inputs config pkgs; }) - (import ./hyprland { inherit inputs pkgs; }) - (import ./waybar { inherit inputs pkgs; }) - ./rofi - ]; - - services.hyprpaper = { - settings = { - wallpaper = [ "Virtual-1,${./hyprland/files/wallpaper.png}" ]; - }; - }; - - programs.waybar = { settings = { mainBar = { output = "Virtual-1"; }; }; }; -} diff --git a/home/utils/desktop.nix b/home/utils/desktop.nix index 13ecd28..01f600b 100644 --- a/home/utils/desktop.nix +++ b/home/utils/desktop.nix @@ -20,4 +20,64 @@ evince loupe ]; + + services.greetd = { + enable = true; + settings = rec { + initial_session = { + command = "Hyprland"; + user = "user"; + }; + default_session = initial_session; + }; + }; + + fonts.packages = with pkgs; [ + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + iosevka + nerdfonts + roboto + font-awesome + ]; + + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + hardware.bluetooth.settings = { + General = { + Experimental = true; + }; + }; + + # Calendar + # Add the server using gnome-online-accounts: + # nix-shell -p gnome.gnome-control-center --run "gnome-control-center" + # Just add the main webdav server and gnome-calendar will automatically pick up all available calendars. + programs.dconf.enable = true; + services.gnome.evolution-data-server.enable = true; + services.gnome.gnome-online-accounts.enable = true; + services.gnome.gnome-keyring.enable = true; + + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + services.blueman.enable = true; + systemd.user.services.mpris-proxy = { + description = "Mpris proxy"; + after = [ "network.target" "sound.target" ]; + wantedBy = [ "default.target" ]; + serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; + }; } diff --git a/hosts/Common/default.nix b/hosts/Common/default.nix index 5886f8e..e939bb0 100644 --- a/hosts/Common/default.nix +++ b/hosts/Common/default.nix @@ -12,12 +12,6 @@ services.fwupd.enable = true; services.gvfs.enable = true; services.fstrim.enable = true; - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; - programs.zsh.enable = true; services.openssh = { @@ -28,37 +22,9 @@ }; }; - fonts.packages = with pkgs; [ - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - iosevka - nerdfonts - roboto - font-awesome - ]; - networking.firewall.enable = false; - services.greetd = { - enable = true; - settings = rec { - initial_session = { - command = "Hyprland"; - user = "user"; - }; - default_session = initial_session; - }; - }; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; environment.systemPackages = with pkgs; [ wget curl @@ -82,35 +48,11 @@ }; }; - # Calendar - # Add the server using gnome-online-accounts: - # nix-shell -p gnome.gnome-control-center --run "gnome-control-center" - # Just add the main webdav server and gnome-calendar will automatically pick up all available calendars. - programs.dconf.enable = true; - services.gnome.evolution-data-server.enable = true; - services.gnome.gnome-online-accounts.enable = true; - services.gnome.gnome-keyring.enable = true; - services.resolved = { enable = true; fallbackDns = [ "1.1.1.1" "1.0.0.1" ]; }; - hardware.bluetooth.enable = true; - hardware.bluetooth.powerOnBoot = true; - services.blueman.enable = true; - systemd.user.services.mpris-proxy = { - description = "Mpris proxy"; - after = [ "network.target" "sound.target" ]; - wantedBy = [ "default.target" ]; - serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; - }; - hardware.bluetooth.settings = { - General = { - Experimental = true; - }; - }; - fileSystems."/home/server" = { device = "10.1:/home/server"; fsType = "nfs"; diff --git a/hosts/NixVM/default.nix b/hosts/NixVM/default.nix new file mode 100644 index 0000000..4bf5d2b --- /dev/null +++ b/hosts/NixVM/default.nix @@ -0,0 +1,8 @@ +{ inputs, config, pkgs, ... }: +{ + imports = [ + (import ./common.nix { inherit inputs config pkgs; }) + ../ssh + ]; + programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/NixVM/id_ed25519"; +} diff --git a/hosts/nixos/hardware-configuration.nix b/hosts/NixVM/hardware-configuration.nix similarity index 100% rename from hosts/nixos/hardware-configuration.nix rename to hosts/NixVM/hardware-configuration.nix diff --git a/hosts/nixos/default.nix b/hosts/nixos/default.nix deleted file mode 100644 index ffcd441..0000000 --- a/hosts/nixos/default.nix +++ /dev/null @@ -1 +0,0 @@ -{ }