hosts: rearrange modules a bit
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
		@@ -3,15 +3,17 @@ let
 | 
			
		||||
  inherit (inputs) nixpkgs;
 | 
			
		||||
 | 
			
		||||
  commonModules = [
 | 
			
		||||
    ./modules/nvim
 | 
			
		||||
    ./nvim
 | 
			
		||||
    globalArgs
 | 
			
		||||
  ];
 | 
			
		||||
  personalModules = [
 | 
			
		||||
    ./modules/xorg.nix
 | 
			
		||||
    ./modules/wayland.nix
 | 
			
		||||
    ./modules/nix.nix
 | 
			
		||||
  desktopModules = [
 | 
			
		||||
    ./xorg.nix
 | 
			
		||||
    ./wayland.nix
 | 
			
		||||
    ./nix.nix
 | 
			
		||||
    ./desktop-pkgs.nix
 | 
			
		||||
    ./sound.nix
 | 
			
		||||
  ];
 | 
			
		||||
  serverModules = [ ./modules/minimal.nix ];
 | 
			
		||||
  serverModules = [ ./minimal.nix ];
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  flake.nixosConfigurations = {
 | 
			
		||||
@@ -20,9 +22,8 @@ in
 | 
			
		||||
      system = "x86_64-linux";
 | 
			
		||||
      modules = [
 | 
			
		||||
        ./satori
 | 
			
		||||
        { nixpkgs.pkgs = self.legacyPackages.${system}; }
 | 
			
		||||
      ]
 | 
			
		||||
      ++ personalModules
 | 
			
		||||
      ++ desktopModules
 | 
			
		||||
      ++ commonModules;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@@ -31,7 +32,6 @@ in
 | 
			
		||||
      system = "aarch64-linux";
 | 
			
		||||
      modules = [
 | 
			
		||||
        ./marisa
 | 
			
		||||
        { nixpkgs.pkgs = self.legacyPackages.${system}; }
 | 
			
		||||
      ]
 | 
			
		||||
      ++ commonModules
 | 
			
		||||
      ++ serverModules;
 | 
			
		||||
@@ -42,9 +42,8 @@ in
 | 
			
		||||
      system = "x86_64-linux";
 | 
			
		||||
      modules = [
 | 
			
		||||
        ./remilia
 | 
			
		||||
        ./modules/x86builder.nix
 | 
			
		||||
        ./x86builder.nix
 | 
			
		||||
        inputs.mailserver.nixosModules.mailserver
 | 
			
		||||
        { nixpkgs.pkgs = self.legacyPackages.${system}; }
 | 
			
		||||
      ]
 | 
			
		||||
      ++ commonModules
 | 
			
		||||
      ++ serverModules;
 | 
			
		||||
@@ -55,8 +54,7 @@ in
 | 
			
		||||
      system = "x86_64-linux";
 | 
			
		||||
      modules = [
 | 
			
		||||
        ./hina
 | 
			
		||||
        ./modules/x86builder.nix
 | 
			
		||||
        { nixpkgs.pkgs = self.legacyPackages.${system}; }
 | 
			
		||||
        ./x86builder.nix
 | 
			
		||||
      ]
 | 
			
		||||
      ++ commonModules
 | 
			
		||||
      ++ serverModules;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,12 +14,26 @@
 | 
			
		||||
    ripgrep
 | 
			
		||||
    kbd
 | 
			
		||||
    gcc
 | 
			
		||||
    rnix-lsp
 | 
			
		||||
    vulkan-tools
 | 
			
		||||
    vulkan-headers
 | 
			
		||||
    jq
 | 
			
		||||
    dconf
 | 
			
		||||
    inputs.nbfc.packages.${pkgs.system}.nbfc
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  fonts.packages = with pkgs; [
 | 
			
		||||
    fira-code
 | 
			
		||||
    fira-mono
 | 
			
		||||
    monoid
 | 
			
		||||
    font-awesome
 | 
			
		||||
    material-icons
 | 
			
		||||
    material-design-icons
 | 
			
		||||
    lohit-fonts.devanagari
 | 
			
		||||
    lohit-fonts.gurmukhi
 | 
			
		||||
    office-code-pro
 | 
			
		||||
    eb-garamond
 | 
			
		||||
    noto-fonts-cjk
 | 
			
		||||
    takao
 | 
			
		||||
    liberation_ttf
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  programs = {
 | 
			
		||||
@@ -29,7 +43,6 @@
 | 
			
		||||
      agent = {
 | 
			
		||||
        enableSSHSupport = true;
 | 
			
		||||
        enable = true;
 | 
			
		||||
        pinentryFlavor = "curses";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
@@ -44,9 +57,7 @@
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    adb.enable = true;
 | 
			
		||||
    light.enable = true;
 | 
			
		||||
    gamemode.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
@@ -8,7 +8,7 @@ in
 | 
			
		||||
 | 
			
		||||
    openssh = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      permitRootLogin = "yes";
 | 
			
		||||
      settings.PermitRootLogin = "yes";
 | 
			
		||||
      ports = [ 22 ];
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,6 @@
 | 
			
		||||
    vim
 | 
			
		||||
    tmux
 | 
			
		||||
    wireguard-tools
 | 
			
		||||
    rnix-lsp
 | 
			
		||||
    nmap
 | 
			
		||||
    gcc
 | 
			
		||||
  ];
 | 
			
		||||
@@ -29,16 +28,14 @@
 | 
			
		||||
    gnupg = {
 | 
			
		||||
      agent = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        pinentryFlavor = "curses";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  nix = {
 | 
			
		||||
    package = pkgs.nixUnstable;
 | 
			
		||||
    extraOptions = ''
 | 
			
		||||
      experimental-features = nix-command flakes
 | 
			
		||||
    '';
 | 
			
		||||
    settings.trusted-users = [ "root" "spark" ];
 | 
			
		||||
    settings.trusted-users = [ "root" ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,14 @@
 | 
			
		||||
{ config, pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
  nixpkgs = {
 | 
			
		||||
    config = {
 | 
			
		||||
      allowUnfree = true;
 | 
			
		||||
      allowBroken = true;
 | 
			
		||||
      allowInsecure = true;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  nix = {
 | 
			
		||||
    package = pkgs.nixUnstable;
 | 
			
		||||
    extraOptions = ''
 | 
			
		||||
      experimental-features = nix-command flakes
 | 
			
		||||
    '';
 | 
			
		||||
@@ -11,6 +18,7 @@
 | 
			
		||||
      substituters = [
 | 
			
		||||
        "https://nix-gaming.cachix.org"
 | 
			
		||||
        "https://nix-community.cachix.org"
 | 
			
		||||
        #       "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
 | 
			
		||||
      ];
 | 
			
		||||
      trusted-public-keys = [
 | 
			
		||||
        "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
  };
 | 
			
		||||
  programs.neovim = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    package = pkgs.neovim-nightly;
 | 
			
		||||
    package = inputs.nvim-overlay.packages.${pkgs.system}.neovim;
 | 
			
		||||
    defaultEditor = false;
 | 
			
		||||
    configure = {
 | 
			
		||||
      customRC = ''
 | 
			
		||||
@@ -7,7 +7,7 @@ in
 | 
			
		||||
    cron.enable = true;
 | 
			
		||||
    openssh = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      permitRootLogin = "yes";
 | 
			
		||||
      settings.PermitRootLogin = "yes";
 | 
			
		||||
      ports = [ 22 22002 ];
 | 
			
		||||
    };
 | 
			
		||||
    nginx = {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,6 @@
 | 
			
		||||
    [
 | 
			
		||||
      ./hardware.nix
 | 
			
		||||
      ./stuff.nix
 | 
			
		||||
      ./pkgs.nix
 | 
			
		||||
      ./networking.nix
 | 
			
		||||
      ./boot.nix
 | 
			
		||||
      ./services.nix
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
{ lib, config, pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
  services = {
 | 
			
		||||
    tor.enable = true;
 | 
			
		||||
    openssh = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      settings.PermitRootLogin = "yes";
 | 
			
		||||
@@ -16,26 +15,9 @@
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
    logind.extraConfig = "RuntimeDirectorySize=30%";
 | 
			
		||||
    mysql.enable = true;
 | 
			
		||||
    mysql.package = pkgs.mariadb;
 | 
			
		||||
 | 
			
		||||
    /*    nomad = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      enableDocker = true;
 | 
			
		||||
      dropPrivileges = false;
 | 
			
		||||
      extraPackages = with pkgs; [ consul cni-plugins ];
 | 
			
		||||
      extraSettingsPaths = [ "/home/natto/hclconfigs/nomad/nomad.json" ];
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      consul = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      package = pkgs.consul;
 | 
			
		||||
      extraConfigFiles = [ "/home/natto/hclconfigs/consul/consul.json" ];
 | 
			
		||||
    };*/
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  systemd.services = {
 | 
			
		||||
    tor.wantedBy = lib.mkForce [ ];
 | 
			
		||||
    libvirtd.wantedBy = lib.mkForce [ ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
{ lib, config, agenix, pkgs, ... }:
 | 
			
		||||
{ lib, config, pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
  time.timeZone = "Asia/Kolkata";
 | 
			
		||||
 | 
			
		||||
@@ -22,21 +22,6 @@
 | 
			
		||||
  };
 | 
			
		||||
  console.useXkbConfig = true;
 | 
			
		||||
 | 
			
		||||
  fonts.packages = with pkgs; [
 | 
			
		||||
    fira-code
 | 
			
		||||
    fira-mono
 | 
			
		||||
    monoid
 | 
			
		||||
    font-awesome
 | 
			
		||||
    material-icons
 | 
			
		||||
    material-design-icons
 | 
			
		||||
    lohit-fonts.devanagari
 | 
			
		||||
    lohit-fonts.gurmukhi
 | 
			
		||||
    office-code-pro
 | 
			
		||||
    eb-garamond
 | 
			
		||||
    noto-fonts-cjk
 | 
			
		||||
    takao
 | 
			
		||||
    liberation_ttf
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  users.users.natto = {
 | 
			
		||||
    isNormalUser = true;
 | 
			
		||||
@@ -54,45 +39,4 @@
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  gtk.iconCache.enable = true;
 | 
			
		||||
 | 
			
		||||
  # sound stuff
 | 
			
		||||
  sound.enable = true;
 | 
			
		||||
  services.pipewire = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    alsa = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      support32Bit = true;
 | 
			
		||||
    };
 | 
			
		||||
    pulse.enable = true;
 | 
			
		||||
    socketActivation = true;
 | 
			
		||||
    wireplumber.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
  /*
 | 
			
		||||
    environment.etc =
 | 
			
		||||
    let
 | 
			
		||||
      json = pkgs.formats.json { };
 | 
			
		||||
    in
 | 
			
		||||
    {
 | 
			
		||||
      "pipewire/pipewire.conf.d/50-noise.conf".source = json.generate "50-noise.conf" {
 | 
			
		||||
        context.modules = [
 | 
			
		||||
          {
 | 
			
		||||
            name = "libpipewire-module-echo-cancel";
 | 
			
		||||
            args = {
 | 
			
		||||
              capture.props = {
 | 
			
		||||
                node.name = "Echo Cancellation Capture";
 | 
			
		||||
              };
 | 
			
		||||
              source.props = {
 | 
			
		||||
                node.name = "Echo Cancellation Source";
 | 
			
		||||
              };
 | 
			
		||||
              sink.props = {
 | 
			
		||||
                node.name = "Echo Cancellation Sink";
 | 
			
		||||
              };
 | 
			
		||||
              playback.props = {
 | 
			
		||||
                node.name = "Echo Cancellation Playback";
 | 
			
		||||
              };
 | 
			
		||||
            };
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
    };*/
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								hosts/sound.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								hosts/sound.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
{ lib, config, pkgs, ... }: {
 | 
			
		||||
  # sound stuff
 | 
			
		||||
  sound.enable = true;
 | 
			
		||||
  services.pipewire = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    alsa = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      support32Bit = true;
 | 
			
		||||
    };
 | 
			
		||||
    pulse.enable = true;
 | 
			
		||||
    socketActivation = true;
 | 
			
		||||
    wireplumber.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user