From 7ec6392e68787f3802cd43f757830962a8149bd3 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 6 Feb 2025 22:14:22 +0200 Subject: [PATCH] commit then think --- hosts/dunamis/configuration.nix | 3 +- hosts/dunamis/{system => }/stylix.nix | 2 +- hosts/dunamis/users/user/flatpak.nix | 110 ++++++++++++++++++ .../dunamis/users/user/home-configuration.nix | 1 + hosts/dunamis/users/user/programs.nix | 1 + hosts/sarien/configuration.nix | 3 +- hosts/sarien/{system => }/stylix.nix | 11 +- hosts/sarien/system/main.nix | 9 -- hosts/sarien/system/misc/locale.nix | 29 ----- hosts/sarien/system/misc/main.nix | 7 -- hosts/sarien/system/misc/mullvad-vpn.nix | 6 - hosts/sarien/system/misc/opentabletdriver.nix | 20 ---- hosts/sarien/system/misc/qmk-vial.nix | 17 --- hosts/sarien/system/security/basic.nix | 90 -------------- .../sarien/system/security/dnscrypt-proxy.nix | 49 -------- hosts/sarien/system/security/extensive.nix | 66 ----------- hosts/sarien/system/security/main.nix | 7 -- hosts/sarien/system/virtual/docker.nix | 29 ----- hosts/sarien/system/virtual/libvirt.nix | 35 ------ hosts/sarien/system/virtual/main.nix | 7 -- hosts/sarien/system/virtual/podman.nix | 28 ----- hosts/sarien/system/wireless/bluetooth.nix | 21 ---- hosts/sarien/system/wireless/main.nix | 6 - hosts/sarien/system/wireless/wifi.nix | 29 ----- .../sarien/users/user}/flatpak.nix | 0 .../sarien/users/user/home-configuration.nix | 1 + modules/home/programs/console.nix | 23 ---- modules/home/programs/default.nix | 2 - modules/home/programs/editor/helix.nix | 4 +- .../nixos/system/default.nix | 1 - .../nixos}/system/misc/locale.nix | 0 .../nixos}/system/misc/main.nix | 0 .../nixos}/system/misc/mullvad-vpn.nix | 0 .../nixos}/system/misc/opentabletdriver.nix | 0 .../nixos}/system/misc/qmk-vial.nix | 0 .../nixos}/system/security/basic.nix | 0 .../nixos}/system/security/dnscrypt-proxy.nix | 0 .../nixos}/system/security/extensive.nix | 0 .../nixos}/system/security/main.nix | 0 .../nixos}/system/virtual/docker.nix | 0 .../nixos}/system/virtual/libvirt.nix | 0 .../nixos}/system/virtual/main.nix | 0 .../nixos}/system/virtual/podman.nix | 0 .../nixos}/system/wireless/bluetooth.nix | 0 .../nixos}/system/wireless/main.nix | 0 .../nixos}/system/wireless/wifi.nix | 0 46 files changed, 129 insertions(+), 488 deletions(-) rename hosts/dunamis/{system => }/stylix.nix (95%) create mode 100644 hosts/dunamis/users/user/flatpak.nix rename hosts/sarien/{system => }/stylix.nix (86%) delete mode 100644 hosts/sarien/system/main.nix delete mode 100644 hosts/sarien/system/misc/locale.nix delete mode 100644 hosts/sarien/system/misc/main.nix delete mode 100644 hosts/sarien/system/misc/mullvad-vpn.nix delete mode 100644 hosts/sarien/system/misc/opentabletdriver.nix delete mode 100644 hosts/sarien/system/misc/qmk-vial.nix delete mode 100644 hosts/sarien/system/security/basic.nix delete mode 100644 hosts/sarien/system/security/dnscrypt-proxy.nix delete mode 100644 hosts/sarien/system/security/extensive.nix delete mode 100644 hosts/sarien/system/security/main.nix delete mode 100644 hosts/sarien/system/virtual/docker.nix delete mode 100644 hosts/sarien/system/virtual/libvirt.nix delete mode 100644 hosts/sarien/system/virtual/main.nix delete mode 100644 hosts/sarien/system/virtual/podman.nix delete mode 100644 hosts/sarien/system/wireless/bluetooth.nix delete mode 100644 hosts/sarien/system/wireless/main.nix delete mode 100644 hosts/sarien/system/wireless/wifi.nix rename {modules/home/programs => hosts/sarien/users/user}/flatpak.nix (100%) delete mode 100644 modules/home/programs/console.nix rename hosts/dunamis/system/main.nix => modules/nixos/system/default.nix (87%) rename {hosts/dunamis => modules/nixos}/system/misc/locale.nix (100%) rename {hosts/dunamis => modules/nixos}/system/misc/main.nix (100%) rename {hosts/dunamis => modules/nixos}/system/misc/mullvad-vpn.nix (100%) rename {hosts/dunamis => modules/nixos}/system/misc/opentabletdriver.nix (100%) rename {hosts/dunamis => modules/nixos}/system/misc/qmk-vial.nix (100%) rename {hosts/dunamis => modules/nixos}/system/security/basic.nix (100%) rename {hosts/dunamis => modules/nixos}/system/security/dnscrypt-proxy.nix (100%) rename {hosts/dunamis => modules/nixos}/system/security/extensive.nix (100%) rename {hosts/dunamis => modules/nixos}/system/security/main.nix (100%) rename {hosts/dunamis => modules/nixos}/system/virtual/docker.nix (100%) rename {hosts/dunamis => modules/nixos}/system/virtual/libvirt.nix (100%) rename {hosts/dunamis => modules/nixos}/system/virtual/main.nix (100%) rename {hosts/dunamis => modules/nixos}/system/virtual/podman.nix (100%) rename {hosts/dunamis => modules/nixos}/system/wireless/bluetooth.nix (100%) rename {hosts/dunamis => modules/nixos}/system/wireless/main.nix (100%) rename {hosts/dunamis => modules/nixos}/system/wireless/wifi.nix (100%) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index ecd27a7..3773d59 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -8,10 +8,11 @@ ./hardware-conf.nix ./users.nix ./programs.nix - ./system/main.nix + ./stylix.nix chaotic.nixosModules.default stylix.nixosModules.stylix self.nixosModules.desktop + self.nixosModules.system ]; desktop = { niri.enable = true; diff --git a/hosts/dunamis/system/stylix.nix b/hosts/dunamis/stylix.nix similarity index 95% rename from hosts/dunamis/system/stylix.nix rename to hosts/dunamis/stylix.nix index 660df01..aab900e 100644 --- a/hosts/dunamis/system/stylix.nix +++ b/hosts/dunamis/stylix.nix @@ -12,7 +12,7 @@ name = "Bibata_Tinted"; size = 32; }; - image = ../../../wallpapers/wallhaven-o5p5ql.jpg; + image = ../../wallpapers/wallhaven-o5p5ql.jpg; opacity.terminal = 0.9; fonts = { sizes = { diff --git a/hosts/dunamis/users/user/flatpak.nix b/hosts/dunamis/users/user/flatpak.nix new file mode 100644 index 0000000..9087fd7 --- /dev/null +++ b/hosts/dunamis/users/user/flatpak.nix @@ -0,0 +1,110 @@ +{ + services.flatpak = { + enable = true; + remotes = [ + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + } + { + name = "hero-persson"; + location = "https://hero-persson.github.io/unmojang-flatpak/index.flatpakrepo"; + } + ]; + packages = [ + # misc + "io.github.zen_browser.zen" + "net.mullvad.MullvadBrowser" + "com.obsproject.Studio" + "com.bitwarden.desktop" + "com.github.tchx84.Flatseal" + "org.qbittorrent.qBittorrent" + + # "com.transmissionbt.Transmission" + "com.usebottles.bottles" + "com.logseq.Logseq" + "org.octave.Octave" + "io.github.martchus.syncthingtray" + + # chatting + "org.signal.Signal" + "im.riot.Riot" + "org.telegram.desktop" + "io.github.spacingbat3.webcord" + # "dev.vencord.Vesktop" + "org.mozilla.Thunderbird" + + # media + "org.atheme.audacious" + "io.freetubeapp.FreeTube" + #"io.github.celluloid_player.Celluloid" + # "io.mpv.Mpv" + + # gaming + #"com.github._0negal.Viper" + "com.valvesoftware.Steam" + "net.lutris.Lutris" + "com.heroicgameslauncher.hgl" + { + appId = "org.unmojang.FjordLauncher"; + origin = "hero-persson"; + } + "org.freedesktop.Platform.VulkanLayer.MangoHud//24.08" + "org.freedesktop.Platform.VulkanLayer.gamescope//24.08" + ]; + overrides = { + "global" = { + # Force Wayland by default + Context = { + sockets = ["wayland" "!x11" "!fallback-x11"]; + filesystems = [ + "xdg-run/pipewire-0" + "xdg-config/gtk-3.0:ro" + "xdg-config/gtk-4.0:ro" + # "~/.local/share/fonts:ro" + "~/.local/share/icons:ro" + # "~/.nix-profile/share/icons:ro" + # "~/.nix-profile/share/fonts:ro" + "/nix/store:ro" + ]; + }; + Environment = { + XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; + #GTK_THEME = "adw-gtk3"; + }; + }; + "io.github.martchus.syncthingtray".Context.filesystems = ["/storage/games/heroic/Factorio/game/saves"]; + "org.octave.Octave".Context.sockets = ["x11"]; + "org.octave.Octave".Environment = {QT_QPA_PLATFORM = "xcb";}; + "com.valvesoftware.Steam" = { + Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/steam"]; + }; + Environment = { + STEAM_FORCE_DESKTOPUI_SCALING = "1.3"; + }; + }; + "org.signal.Signal" = { + Environment = { + SIGNAL_PASSWORD_STORE = "gnome-libsecret"; + }; + }; + "net.lutris.Lutris".Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/lutris" "~/games/lutris"]; + }; + "com.heroicgameslauncher.hgl".Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/storage/games/heroic" "~/games/heroic"]; + }; + "com.usebottles.Bottles" = { + Context = { + sockets = ["x11" "wayland"]; + filesystems = ["/home/user/docs/nure/tex-template/assets/BridgeKSG"]; + }; + }; + }; + }; +} diff --git a/hosts/dunamis/users/user/home-configuration.nix b/hosts/dunamis/users/user/home-configuration.nix index 91c7f41..1d64e0a 100644 --- a/hosts/dunamis/users/user/home-configuration.nix +++ b/hosts/dunamis/users/user/home-configuration.nix @@ -6,6 +6,7 @@ self.homeModules.desktop self.homeModules.programs ./programs.nix + ./flatpak.nix ]; home = { stateVersion = "25.05"; diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index b6f265f..075e9db 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -26,6 +26,7 @@ }; home.packages = with pkgs; [ + alejandra flatpak waycheck vial diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index 8a24f77..708163e 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -9,9 +9,10 @@ ./users.nix ./programs.nix ./system/main.nix + ./stylix.nix chaotic.nixosModules.default - stylix.nixosModules.stylix self.nixosModules.desktop + self.nixosModules.system ]; desktop = { hyprland.enable = true; diff --git a/hosts/sarien/system/stylix.nix b/hosts/sarien/stylix.nix similarity index 86% rename from hosts/sarien/system/stylix.nix rename to hosts/sarien/stylix.nix index f2ff468..7371105 100644 --- a/hosts/sarien/system/stylix.nix +++ b/hosts/sarien/stylix.nix @@ -1,4 +1,11 @@ -{pkgs, ...}: { +{ + pkgs, + inputs, + ... +}: { + imports = [ + inputs.stylix.nixosModules.stylix + ]; environment.systemPackages = with pkgs; [ nerd-fonts.iosevka ]; @@ -11,7 +18,7 @@ name = "Bibata-Modern-Ice"; size = 32; }; - image = ../../../wallpapers/wallhaven-p966oj.jpg; + image = ../../wallpapers/wallhaven-p966oj.jpg; opacity.terminal = 0.9; fonts = { sizes = { diff --git a/hosts/sarien/system/main.nix b/hosts/sarien/system/main.nix deleted file mode 100644 index aa8213d..0000000 --- a/hosts/sarien/system/main.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - ./misc/main.nix - ./security/main.nix - ./virtual/main.nix - ./wireless/main.nix - ./stylix.nix - ]; -} diff --git a/hosts/sarien/system/misc/locale.nix b/hosts/sarien/system/misc/locale.nix deleted file mode 100644 index 89209a9..0000000 --- a/hosts/sarien/system/misc/locale.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - ... -}: { - options = { - locale.ukrainian.enable = - lib.mkEnableOption "enables ukrainian locale"; - }; - config = lib.mkIf config.locale.ukrainian.enable { - i18n = { - defaultLocale = "uk_UA.UTF-8"; - extraLocaleSettings = { - LC_CTYPE = "uk_UA.UTF-8"; - LC_NUMERIC = "uk_UA.UTF-8"; - LC_TIME = "uk_UA.UTF-8"; - LC_COLLATE = "en_US.UTF-8"; - LC_MONETARY = "uk_UA.UTF-8"; - LC_MESSAGES = "uk_UA.UTF-8"; - LC_PAPER = "uk_UA.UTF-8"; - LC_NAME = "uk_UA.UTF-8"; - LC_ADDRESS = "uk_UA.UTF-8"; - LC_TELEPHONE = "uk_UA.UTF-8"; - LC_MEASUREMENT = "uk_UA.UTF-8"; - LC_IDENTIFICATION = "uk_UA.UTF-8"; - }; - }; - }; -} diff --git a/hosts/sarien/system/misc/main.nix b/hosts/sarien/system/misc/main.nix deleted file mode 100644 index 4c4bc47..0000000 --- a/hosts/sarien/system/misc/main.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./opentabletdriver.nix - ./qmk-vial.nix - ./locale.nix - ]; -} diff --git a/hosts/sarien/system/misc/mullvad-vpn.nix b/hosts/sarien/system/misc/mullvad-vpn.nix deleted file mode 100644 index 31d3c05..0000000 --- a/hosts/sarien/system/misc/mullvad-vpn.nix +++ /dev/null @@ -1,6 +0,0 @@ -{pkgs, ...}: { - services.mullvad-vpn = { - enable = true; - package = pkgs.mullvad-vpn; - }; -} diff --git a/hosts/sarien/system/misc/opentabletdriver.nix b/hosts/sarien/system/misc/opentabletdriver.nix deleted file mode 100644 index 8951ff9..0000000 --- a/hosts/sarien/system/misc/opentabletdriver.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - config, - lib, - ... -}: { - options = { - opentabletdriver.enable = - lib.mkEnableOption "enables opentabletdriver"; - }; - config = lib.mkIf config.opentabletdriver.enable { - hardware.opentabletdriver = { - enable = true; - daemon.enable = true; - blacklistedKernelModules = [ - "hid-uclogic" - "wacom" - ]; - }; - }; -} diff --git a/hosts/sarien/system/misc/qmk-vial.nix b/hosts/sarien/system/misc/qmk-vial.nix deleted file mode 100644 index 0fd5732..0000000 --- a/hosts/sarien/system/misc/qmk-vial.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: { - options = { - qmk-vial.enable = - lib.mkEnableOption "adds a udev rule for vial keyboards"; - }; - config = lib.mkIf config.qmk-vial.enable { - services.udev.extraRules = '' - #vial rule - KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" - ''; - }; -} diff --git a/hosts/sarien/system/security/basic.nix b/hosts/sarien/system/security/basic.nix deleted file mode 100644 index bcb4cdc..0000000 --- a/hosts/sarien/system/security/basic.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.security.basic; -in { - options = { - security.basic.enable = - lib.mkEnableOption "enable basic security"; - }; - config = lib.mkIf cfg.enable { - security = { - sudo.enable = false; - # doas.enable = true; - sudo-rs = { - enable = true; - execWheelOnly = true; - }; - polkit.enable = true; - polkit.extraConfig = '' - polkit.addRule(function(action, subject) { - if ( - subject.isInGroup("users") - && ( - action.id == "org.freedesktop.login1.reboot" || - action.id == "org.freedesktop.login1.reboot-multiple-sessions" || - action.id == "org.freedesktop.login1.power-off" || - action.id == "org.freedesktop.login1.power-off-multiple-sessions" - ) - ) - { - return polkit.Result.YES; - } - }); - ''; - apparmor.enable = lib.mkDefault true; - }; - - environment.systemPackages = with pkgs; [ - (mkIf (config.security.doas.enable == true) doas-sudo-shim) # if doas install doas sudo shim - ]; - - services.dbus = { - apparmor = "enabled"; - implementation = "broker"; - }; - services.ntpd-rs = { - enable = true; - #settings = { - # server = { - # require-nts = true; - # }; - #}; - }; - - boot.blacklistedKernelModules = [ - # Obscure network protocols - "ax25" - "netrom" - "rose" - # Old or rare or insufficiently audited filesystems - "adfs" - "affs" - "bfs" - "befs" - "cramfs" - "efs" - "erofs" - "exofs" - "freevxfs" - "f2fs" - "hfs" - "hpfs" - "jfs" - "minix" - "nilfs2" - "ntfs" - "omfs" - "qnx4" - "qnx6" - "sysv" - "ufs" - ]; - - nix.settings.allowed-users = lib.mkDefault ["@users"]; - }; -} diff --git a/hosts/sarien/system/security/dnscrypt-proxy.nix b/hosts/sarien/system/security/dnscrypt-proxy.nix deleted file mode 100644 index 4dd9aa9..0000000 --- a/hosts/sarien/system/security/dnscrypt-proxy.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -with lib; { - options = { - security.dnscrypt-proxy.enable = - mkEnableOption "enable dnscrypt-proxy"; - }; - config = mkIf config.security.dnscrypt-proxy.enable { - networking = { - nameservers = ["127.0.0.1" "::1"]; - # If using dhcpcd: - dhcpcd.extraConfig = "nohook resolv.conf"; - # If using NetworkManager: - networkmanager.dns = "none"; - }; - - # Make sure you don't have services.resolved.enable on. - services.dnscrypt-proxy2 = { - enable = true; - settings = { - ipv6_servers = false; - require_dnssec = true; - - sources.public-resolvers = { - urls = [ - "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md" - "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" - ]; - cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; - minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; - }; - - # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md - server_names = [ - #"quad9-dnscrypt-ip4-filter-pri" - "cloudflare" - ]; - }; - }; - - systemd.services.dnscrypt-proxy2.serviceConfig = { - StateDirectory = "dnscrypt-proxy"; - }; - }; -} diff --git a/hosts/sarien/system/security/extensive.nix b/hosts/sarien/system/security/extensive.nix deleted file mode 100644 index bc14ba3..0000000 --- a/hosts/sarien/system/security/extensive.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -with lib; let - cfg = config.security.extensive; -in { - options = { - security.extensive.enable = - mkEnableOption "enable extensive security"; - }; - config = mkIf cfg.enable { - security.basic.enable = true; - - environment.memoryAllocator.provider = mkDefault "scudo"; - environment.variables.SCUDO_OPTIONS = mkDefault "ZeroContents=1"; - - security = { - lockKernelModules = mkDefault false; - protectKernelImage = mkDefault true; - # allowSimultaneousMultithreading = mkDefault false; - forcePageTableIsolation = mkDefault true; - unprivilegedUsernsClone = mkDefault config.virtualisation.containers.enable; - virtualisation.flushL1DataCache = mkDefault "always"; - apparmor.enable = mkDefault true; - apparmor.killUnconfinedConfinables = mkDefault true; - }; - - boot.kernel.sysctl = { - # Hide kptrs even for processes with CAP_SYSLOG - "kernel.kptr_restrict" = mkOverride 500 2; - # Disable bpf() JIT (to eliminate spray attacks) - "net.core.bpf_jit_enable" = mkDefault false; - # Disable ftrace debugging - "kernel.ftrace_enabled" = mkDefault false; - }; - - boot.kernel.sysctl = { - # Enable strict reverse path filtering (that is, do not attempt to route - # packets that "obviously" do not belong to the iface's network; dropped - # packets are logged as martians). - "net.ipv4.conf.all.log_martians" = mkDefault true; - "net.ipv4.conf.all.rp_filter" = mkDefault "1"; - "net.ipv4.conf.default.log_martians" = mkDefault true; - "net.ipv4.conf.default.rp_filter" = mkDefault "1"; - - # Ignore broadcast ICMP (mitigate SMURF) - "net.ipv4.icmp_echo_ignore_broadcasts" = mkDefault true; - - # Ignore incoming ICMP redirects (note: default is needed to ensure that the - # setting is applied to interfaces added after the sysctls are set) - "net.ipv4.conf.all.accept_redirects" = mkDefault false; - "net.ipv4.conf.all.secure_redirects" = mkDefault false; - "net.ipv4.conf.default.accept_redirects" = mkDefault false; - "net.ipv4.conf.default.secure_redirects" = mkDefault false; - "net.ipv6.conf.all.accept_redirects" = mkDefault false; - "net.ipv6.conf.default.accept_redirects" = mkDefault false; - - # Ignore outgoing ICMP redirects (this is ipv4 only) - "net.ipv4.conf.all.send_redirects" = mkDefault false; - "net.ipv4.conf.default.send_redirects" = mkDefault false; - }; - }; -} diff --git a/hosts/sarien/system/security/main.nix b/hosts/sarien/system/security/main.nix deleted file mode 100644 index aee351c..0000000 --- a/hosts/sarien/system/security/main.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./basic.nix - ./extensive.nix - ./dnscrypt-proxy.nix - ]; -} diff --git a/hosts/sarien/system/virtual/docker.nix b/hosts/sarien/system/virtual/docker.nix deleted file mode 100644 index f35dce2..0000000 --- a/hosts/sarien/system/virtual/docker.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - # pkgs, - config, - lib, - ... -}: -with lib; let - cfg = config.virtual.docker; -in { - options = { - virtual.docker.enable = - mkEnableOption "enable docker"; - }; - config = mkIf cfg.enable { - virtualisation.docker = { - enable = true; - rootless = { - enable = true; - setSocketVariable = true; - }; - storageDriver = "btrfs"; - autoPrune.enable = true; - #defaultNetwork.settings = { - # dns_enabled = true; - #}; - }; - virtualisation.oci-containers.backend = "docker"; - }; -} diff --git a/hosts/sarien/system/virtual/libvirt.nix b/hosts/sarien/system/virtual/libvirt.nix deleted file mode 100644 index 2270b99..0000000 --- a/hosts/sarien/system/virtual/libvirt.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -with lib; let - cfg = config.virtual.libvirt; -in { - options = { - virtual.libvirt.enable = - mkEnableOption "enables virtualisation"; - }; - config = mkIf cfg.enable { - virtualisation.libvirtd = { - enable = true; - qemu = { - package = pkgs.qemu_kvm; - runAsRoot = false; - swtpm.enable = true; - vhostUserPackages = [pkgs.virtiofsd]; - ovmf = { - enable = true; - packages = [ - (pkgs.OVMF.override { - secureBoot = true; - tpmSupport = true; - }) - .fd - ]; - }; - }; - }; - }; -} diff --git a/hosts/sarien/system/virtual/main.nix b/hosts/sarien/system/virtual/main.nix deleted file mode 100644 index f2229d6..0000000 --- a/hosts/sarien/system/virtual/main.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./libvirt.nix - ./podman.nix - ./docker.nix - ]; -} diff --git a/hosts/sarien/system/virtual/podman.nix b/hosts/sarien/system/virtual/podman.nix deleted file mode 100644 index de5edac..0000000 --- a/hosts/sarien/system/virtual/podman.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -with lib; let - cfg = config.virtual.podman; -in { - options = { - virtual.podman.enable = - mkEnableOption "enables podman"; - }; - config = mkIf cfg.enable { - virtualisation = { - containers.enable = true; - podman = { - enable = true; - dockerCompat = true; - defaultNetwork.settings.dns_enabled = true; - }; - }; - environment.systemPackages = with pkgs; [ - podman-tui - podman-compose - ]; - }; -} diff --git a/hosts/sarien/system/wireless/bluetooth.nix b/hosts/sarien/system/wireless/bluetooth.nix deleted file mode 100644 index 354884a..0000000 --- a/hosts/sarien/system/wireless/bluetooth.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - # pkgs, - lib, - config, - ... -}: -with lib; let - cfg = config.wireless.bluetooth; -in { - options = { - wireless.bluetooth = { - enable = mkEnableOption "enable bluetooth"; - enableBlueman = mkEnableOption "enable bluetooth manager"; - }; - }; - config = mkIf cfg.enable { - hardware.bluetooth.enable = true; - hardware.bluetooth.powerOnBoot = true; - services.blueman.enable = cfg.enableBlueman; - }; -} diff --git a/hosts/sarien/system/wireless/main.nix b/hosts/sarien/system/wireless/main.nix deleted file mode 100644 index 412300c..0000000 --- a/hosts/sarien/system/wireless/main.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./bluetooth.nix - ./wifi.nix - ]; -} diff --git a/hosts/sarien/system/wireless/wifi.nix b/hosts/sarien/system/wireless/wifi.nix deleted file mode 100644 index 7f7e6b5..0000000 --- a/hosts/sarien/system/wireless/wifi.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - lib, - config, - ... -}: -with lib; let - cfg = config.wireless.wifi; -in { - options = { - wireless.wifi.enable = - mkEnableOption "enables wifi with iwd and MAC address randomisation"; - }; - config = mkIf cfg.enable { - networking = { - networkmanager.wifi.backend = "iwd"; - wireless.iwd = { - enable = true; - settings = { - General = { - AddressRandomization = "network"; - }; - Settings = { - AlwaysRandomizeAddress = true; - }; - }; - }; - }; - }; -} diff --git a/modules/home/programs/flatpak.nix b/hosts/sarien/users/user/flatpak.nix similarity index 100% rename from modules/home/programs/flatpak.nix rename to hosts/sarien/users/user/flatpak.nix diff --git a/hosts/sarien/users/user/home-configuration.nix b/hosts/sarien/users/user/home-configuration.nix index 4f26ae2..1d14bcd 100644 --- a/hosts/sarien/users/user/home-configuration.nix +++ b/hosts/sarien/users/user/home-configuration.nix @@ -6,6 +6,7 @@ self.homeModules.desktop self.homeModules.programs ./programs.nix + ./flatpak.nix ]; home = { stateVersion = "25.05"; diff --git a/modules/home/programs/console.nix b/modules/home/programs/console.nix deleted file mode 100644 index dc72295..0000000 --- a/modules/home/programs/console.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - # config, - pkgs, - ... -}: { - home.packages = with pkgs; [ - git - ripgrep - trashy - fd - dust - procs - eza - tree - speedtest-rs - zip - unzip - execline - fastfetch - alejandra - uutils-coreutils-noprefix - ]; -} diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index ef6db4a..6e1ec8e 100644 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -1,7 +1,5 @@ { imports = [ - ./console.nix - ./flatpak.nix ./console/yazi.nix ./editor/main.nix ./shell/main.nix diff --git a/modules/home/programs/editor/helix.nix b/modules/home/programs/editor/helix.nix index 6fa013e..73de023 100644 --- a/modules/home/programs/editor/helix.nix +++ b/modules/home/programs/editor/helix.nix @@ -95,8 +95,8 @@ in { } { name = "markdown"; - auto-format = true; - formatter.command = "${pkgs.comrak}/bin/comrak"; + # auto-format = true; + # formatter.command = "${pkgs.comrak}/bin/comrak"; language-servers = ["markdown-oxide"]; } { diff --git a/hosts/dunamis/system/main.nix b/modules/nixos/system/default.nix similarity index 87% rename from hosts/dunamis/system/main.nix rename to modules/nixos/system/default.nix index aa8213d..efb761a 100644 --- a/hosts/dunamis/system/main.nix +++ b/modules/nixos/system/default.nix @@ -4,6 +4,5 @@ ./security/main.nix ./virtual/main.nix ./wireless/main.nix - ./stylix.nix ]; } diff --git a/hosts/dunamis/system/misc/locale.nix b/modules/nixos/system/misc/locale.nix similarity index 100% rename from hosts/dunamis/system/misc/locale.nix rename to modules/nixos/system/misc/locale.nix diff --git a/hosts/dunamis/system/misc/main.nix b/modules/nixos/system/misc/main.nix similarity index 100% rename from hosts/dunamis/system/misc/main.nix rename to modules/nixos/system/misc/main.nix diff --git a/hosts/dunamis/system/misc/mullvad-vpn.nix b/modules/nixos/system/misc/mullvad-vpn.nix similarity index 100% rename from hosts/dunamis/system/misc/mullvad-vpn.nix rename to modules/nixos/system/misc/mullvad-vpn.nix diff --git a/hosts/dunamis/system/misc/opentabletdriver.nix b/modules/nixos/system/misc/opentabletdriver.nix similarity index 100% rename from hosts/dunamis/system/misc/opentabletdriver.nix rename to modules/nixos/system/misc/opentabletdriver.nix diff --git a/hosts/dunamis/system/misc/qmk-vial.nix b/modules/nixos/system/misc/qmk-vial.nix similarity index 100% rename from hosts/dunamis/system/misc/qmk-vial.nix rename to modules/nixos/system/misc/qmk-vial.nix diff --git a/hosts/dunamis/system/security/basic.nix b/modules/nixos/system/security/basic.nix similarity index 100% rename from hosts/dunamis/system/security/basic.nix rename to modules/nixos/system/security/basic.nix diff --git a/hosts/dunamis/system/security/dnscrypt-proxy.nix b/modules/nixos/system/security/dnscrypt-proxy.nix similarity index 100% rename from hosts/dunamis/system/security/dnscrypt-proxy.nix rename to modules/nixos/system/security/dnscrypt-proxy.nix diff --git a/hosts/dunamis/system/security/extensive.nix b/modules/nixos/system/security/extensive.nix similarity index 100% rename from hosts/dunamis/system/security/extensive.nix rename to modules/nixos/system/security/extensive.nix diff --git a/hosts/dunamis/system/security/main.nix b/modules/nixos/system/security/main.nix similarity index 100% rename from hosts/dunamis/system/security/main.nix rename to modules/nixos/system/security/main.nix diff --git a/hosts/dunamis/system/virtual/docker.nix b/modules/nixos/system/virtual/docker.nix similarity index 100% rename from hosts/dunamis/system/virtual/docker.nix rename to modules/nixos/system/virtual/docker.nix diff --git a/hosts/dunamis/system/virtual/libvirt.nix b/modules/nixos/system/virtual/libvirt.nix similarity index 100% rename from hosts/dunamis/system/virtual/libvirt.nix rename to modules/nixos/system/virtual/libvirt.nix diff --git a/hosts/dunamis/system/virtual/main.nix b/modules/nixos/system/virtual/main.nix similarity index 100% rename from hosts/dunamis/system/virtual/main.nix rename to modules/nixos/system/virtual/main.nix diff --git a/hosts/dunamis/system/virtual/podman.nix b/modules/nixos/system/virtual/podman.nix similarity index 100% rename from hosts/dunamis/system/virtual/podman.nix rename to modules/nixos/system/virtual/podman.nix diff --git a/hosts/dunamis/system/wireless/bluetooth.nix b/modules/nixos/system/wireless/bluetooth.nix similarity index 100% rename from hosts/dunamis/system/wireless/bluetooth.nix rename to modules/nixos/system/wireless/bluetooth.nix diff --git a/hosts/dunamis/system/wireless/main.nix b/modules/nixos/system/wireless/main.nix similarity index 100% rename from hosts/dunamis/system/wireless/main.nix rename to modules/nixos/system/wireless/main.nix diff --git a/hosts/dunamis/system/wireless/wifi.nix b/modules/nixos/system/wireless/wifi.nix similarity index 100% rename from hosts/dunamis/system/wireless/wifi.nix rename to modules/nixos/system/wireless/wifi.nix