treewide: format files
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
#Catpuccin Mocha
 | 
					#Catpuccin Mocha
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  colors = rec{
 | 
					  colors = rec {
 | 
				
			||||||
    rosewater = "#F5E0DC";
 | 
					    rosewater = "#F5E0DC";
 | 
				
			||||||
    flamingo = "#F2CDCD";
 | 
					    flamingo = "#F2CDCD";
 | 
				
			||||||
    pink = "#F5C2E7";
 | 
					    pink = "#F5C2E7";
 | 
				
			||||||
@@ -37,5 +37,9 @@ in
 | 
				
			|||||||
rec {
 | 
					rec {
 | 
				
			||||||
  default = with builtins; mapAttrs (_: color: substring 1 6 color) colors; # hex without hash
 | 
					  default = with builtins; mapAttrs (_: color: substring 1 6 color) colors; # hex without hash
 | 
				
			||||||
  hex = colors; # hex with hash
 | 
					  hex = colors; # hex with hash
 | 
				
			||||||
  argb = { a ? "ff" }: builtins.mapAttrs (_:color: a + color) default; # ARGB
 | 
					  argb =
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      a ? "ff",
 | 
				
			||||||
 | 
					    }:
 | 
				
			||||||
 | 
					    builtins.mapAttrs (_: color: a + color) default; # ARGB
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										51
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								flake.nix
									
									
									
									
									
								
							@@ -2,36 +2,36 @@
 | 
				
			|||||||
  description = "dotfiles";
 | 
					  description = "dotfiles";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  inputs = {
 | 
					  inputs = {
 | 
				
			||||||
    nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
 | 
					    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    stable.url = github:nixos/nixpkgs/release-24.05;
 | 
					    stable.url = "github:nixos/nixpkgs/release-24.05";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    flake-parts.url = github:hercules-ci/flake-parts;
 | 
					    flake-parts.url = "github:hercules-ci/flake-parts";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    home-manager = {
 | 
					    home-manager = {
 | 
				
			||||||
      url = github:nix-community/home-manager;
 | 
					      url = "github:nix-community/home-manager";
 | 
				
			||||||
      inputs.nixpkgs.follows = "nixpkgs";
 | 
					      inputs.nixpkgs.follows = "nixpkgs";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    mailserver = {
 | 
					    mailserver = {
 | 
				
			||||||
      url = gitlab:simple-nixos-mailserver/nixos-mailserver;
 | 
					      url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
 | 
				
			||||||
      inputs.nixpkgs.follows = "nixpkgs";
 | 
					      inputs.nixpkgs.follows = "nixpkgs";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    filehost = {
 | 
					    filehost = {
 | 
				
			||||||
      url = github:natto1784/simpler-filehost;
 | 
					      url = "github:natto1784/simpler-filehost";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nix-gaming.url = github:fufexan/nix-gaming;
 | 
					    nix-gaming.url = "github:fufexan/nix-gaming";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nbfc = {
 | 
					    nbfc = {
 | 
				
			||||||
      url = github:nbfc-linux/nbfc-linux;
 | 
					      url = "github:nbfc-linux/nbfc-linux";
 | 
				
			||||||
      inputs.nixpkgs.follows = "nixpkgs";
 | 
					      inputs.nixpkgs.follows = "nixpkgs";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    emacs-overlay.url = github:nix-community/emacs-overlay;
 | 
					    emacs-overlay.url = "github:nix-community/emacs-overlay";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nvim-overlay.url = github:nix-community/neovim-nightly-overlay;
 | 
					    nvim-overlay.url = "github:nix-community/neovim-nightly-overlay";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    hyprland = {
 | 
					    hyprland = {
 | 
				
			||||||
      type = "git";
 | 
					      type = "git";
 | 
				
			||||||
@@ -40,17 +40,21 @@
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    hyprland-contrib = {
 | 
					    hyprland-contrib = {
 | 
				
			||||||
      url = github:hyprwm/contrib;
 | 
					      url = "github:hyprwm/contrib";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    agenix.url = github:ryantm/agenix;
 | 
					    agenix.url = "github:ryantm/agenix";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ags.url = github:Aylur/ags/v1;
 | 
					    ags.url = "github:Aylur/ags/v1";
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  outputs = inputs@{ self, ... }:
 | 
					  outputs =
 | 
				
			||||||
 | 
					    inputs@{ self, ... }:
 | 
				
			||||||
    inputs.flake-parts.lib.mkFlake { inherit inputs; } {
 | 
					    inputs.flake-parts.lib.mkFlake { inherit inputs; } {
 | 
				
			||||||
      systems = [ "x86_64-linux" "aarch64-linux" ];
 | 
					      systems = [
 | 
				
			||||||
 | 
					        "x86_64-linux"
 | 
				
			||||||
 | 
					        "aarch64-linux"
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      imports = [
 | 
					      imports = [
 | 
				
			||||||
        ./hosts
 | 
					        ./hosts
 | 
				
			||||||
@@ -59,15 +63,18 @@
 | 
				
			|||||||
        ./conf
 | 
					        ./conf
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      perSystem = { system, pkgs, ... }:
 | 
					      perSystem =
 | 
				
			||||||
 | 
					        { system, pkgs, ... }:
 | 
				
			||||||
        rec {
 | 
					        rec {
 | 
				
			||||||
          formatter = pkgs.nixfmt-rfc-style;
 | 
					          formatter = pkgs.nixfmt-rfc-style;
 | 
				
			||||||
          devShells.default = with pkgs; mkShell {
 | 
					          devShells.default =
 | 
				
			||||||
            packages = [
 | 
					            with pkgs;
 | 
				
			||||||
              nixd
 | 
					            mkShell {
 | 
				
			||||||
              formatter
 | 
					              packages = [
 | 
				
			||||||
            ];
 | 
					                nixd
 | 
				
			||||||
          };
 | 
					                formatter
 | 
				
			||||||
 | 
					              ];
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
          _module.args.pkgs = import inputs.nixpkgs {
 | 
					          _module.args.pkgs = import inputs.nixpkgs {
 | 
				
			||||||
            inherit system;
 | 
					            inherit system;
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, inputs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  inputs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  home = {
 | 
					  home = {
 | 
				
			||||||
    homeDirectory = "/home/amneesh";
 | 
					    homeDirectory = "/home/amneesh";
 | 
				
			||||||
@@ -14,7 +19,7 @@
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
     ./programs/emacs
 | 
					    ./programs/emacs
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  xdg.mime.enable = true;
 | 
					  xdg.mime.enable = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,10 +24,11 @@ in
 | 
				
			|||||||
      alwaysEnsure = true;
 | 
					      alwaysEnsure = true;
 | 
				
			||||||
      alwaysTangle = true;
 | 
					      alwaysTangle = true;
 | 
				
			||||||
      defaultInitFile = true;
 | 
					      defaultInitFile = true;
 | 
				
			||||||
      extraEmacsPackages = epkgs: with epkgs; [
 | 
					      extraEmacsPackages =
 | 
				
			||||||
        use-package
 | 
					        epkgs: with epkgs; [
 | 
				
			||||||
        (tree-sitter-langs.withPlugins (_: tree-sitter-langs.plugins))
 | 
					          use-package
 | 
				
			||||||
      ];
 | 
					          (tree-sitter-langs.withPlugins (_: tree-sitter-langs.plugins))
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  services.emacs = {
 | 
					  services.emacs = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ self, inputs, globalArgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  self,
 | 
				
			||||||
 | 
					  inputs,
 | 
				
			||||||
 | 
					  globalArgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  common = [
 | 
					  common = [
 | 
				
			||||||
    { programs.home-manager.enable = true; }
 | 
					    { programs.home-manager.enable = true; }
 | 
				
			||||||
@@ -6,15 +11,17 @@ let
 | 
				
			|||||||
    ./common/direnv
 | 
					    ./common/direnv
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  mkPkgs = system: import inputs.nixpkgs {
 | 
					  mkPkgs =
 | 
				
			||||||
    inherit system;
 | 
					    system:
 | 
				
			||||||
    config = {
 | 
					    import inputs.nixpkgs {
 | 
				
			||||||
      allowUnfree = true;
 | 
					      inherit system;
 | 
				
			||||||
      allowBroken = true;
 | 
					      config = {
 | 
				
			||||||
      allowInsecure = true;
 | 
					        allowUnfree = true;
 | 
				
			||||||
 | 
					        allowBroken = true;
 | 
				
			||||||
 | 
					        allowInsecure = true;
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					      overlays = [ self.overlays.default ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    overlays = [ self.overlays.default ];
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  extraSpecialArgs = globalArgs;
 | 
					  extraSpecialArgs = globalArgs;
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
@@ -50,49 +57,57 @@ in
 | 
				
			|||||||
    // {
 | 
					    // {
 | 
				
			||||||
      spark = inputs.home-manager.lib.homeManagerConfiguration {
 | 
					      spark = inputs.home-manager.lib.homeManagerConfiguration {
 | 
				
			||||||
        inherit extraSpecialArgs;
 | 
					        inherit extraSpecialArgs;
 | 
				
			||||||
        modules = [{
 | 
					        modules = [
 | 
				
			||||||
          home = {
 | 
					          {
 | 
				
			||||||
            homeDirectory = "/home/spark";
 | 
					            home = {
 | 
				
			||||||
            username = "spark";
 | 
					              homeDirectory = "/home/spark";
 | 
				
			||||||
            stateVersion = "23.05";
 | 
					              username = "spark";
 | 
				
			||||||
          };
 | 
					              stateVersion = "23.05";
 | 
				
			||||||
        }] ++ common;
 | 
					            };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ] ++ common;
 | 
				
			||||||
        pkgs = mkPkgs "aarch64-linux";
 | 
					        pkgs = mkPkgs "aarch64-linux";
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      bat = inputs.home-manager.lib.homeManagerConfiguration {
 | 
					      bat = inputs.home-manager.lib.homeManagerConfiguration {
 | 
				
			||||||
        inherit extraSpecialArgs;
 | 
					        inherit extraSpecialArgs;
 | 
				
			||||||
        modules = [{
 | 
					        modules = [
 | 
				
			||||||
          home = {
 | 
					          {
 | 
				
			||||||
            homeDirectory = "/home/bat";
 | 
					            home = {
 | 
				
			||||||
            username = "bat";
 | 
					              homeDirectory = "/home/bat";
 | 
				
			||||||
            stateVersion = "23.05";
 | 
					              username = "bat";
 | 
				
			||||||
          };
 | 
					              stateVersion = "23.05";
 | 
				
			||||||
        }] ++ common;
 | 
					            };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ] ++ common;
 | 
				
			||||||
        pkgs = mkPkgs "x86_64-linux";
 | 
					        pkgs = mkPkgs "x86_64-linux";
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      spin = inputs.home-manager.lib.homeManagerConfiguration {
 | 
					      spin = inputs.home-manager.lib.homeManagerConfiguration {
 | 
				
			||||||
        inherit extraSpecialArgs;
 | 
					        inherit extraSpecialArgs;
 | 
				
			||||||
        modules = [{
 | 
					        modules = [
 | 
				
			||||||
          home = {
 | 
					          {
 | 
				
			||||||
            homeDirectory = "/home/spin";
 | 
					            home = {
 | 
				
			||||||
            username = "spin";
 | 
					              homeDirectory = "/home/spin";
 | 
				
			||||||
            stateVersion = "23.05";
 | 
					              username = "spin";
 | 
				
			||||||
          };
 | 
					              stateVersion = "23.05";
 | 
				
			||||||
        }] ++ common;
 | 
					            };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ] ++ common;
 | 
				
			||||||
        pkgs = mkPkgs "x86_64-linux";
 | 
					        pkgs = mkPkgs "x86_64-linux";
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      kero = inputs.home-manager.lib.homeManagerConfiguration {
 | 
					      kero = inputs.home-manager.lib.homeManagerConfiguration {
 | 
				
			||||||
        inherit extraSpecialArgs;
 | 
					        inherit extraSpecialArgs;
 | 
				
			||||||
        modules = [{
 | 
					        modules = [
 | 
				
			||||||
          home = {
 | 
					          {
 | 
				
			||||||
            homeDirectory = "/home/kero";
 | 
					            home = {
 | 
				
			||||||
            username = "kero";
 | 
					              homeDirectory = "/home/kero";
 | 
				
			||||||
            stateVersion = "24.05";
 | 
					              username = "kero";
 | 
				
			||||||
          };
 | 
					              stateVersion = "24.05";
 | 
				
			||||||
        }] ++ common;
 | 
					            };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ] ++ common;
 | 
				
			||||||
        pkgs = mkPkgs "aarch64-linux";
 | 
					        pkgs = mkPkgs "aarch64-linux";
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,26 +1,35 @@
 | 
				
			|||||||
{ pkgs, lib, config, inputs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  inputs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  cfg = config.programs.ags;
 | 
					  cfg = config.programs.ags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  deps = with pkgs; [
 | 
					  deps =
 | 
				
			||||||
    sass
 | 
					    with pkgs;
 | 
				
			||||||
    gawk
 | 
					    [
 | 
				
			||||||
    bash
 | 
					      sass
 | 
				
			||||||
    procps
 | 
					      gawk
 | 
				
			||||||
    coreutils
 | 
					      bash
 | 
				
			||||||
    imagemagick
 | 
					      procps
 | 
				
			||||||
    systemd
 | 
					      coreutils
 | 
				
			||||||
    config.wayland.windowManager.hyprland.package
 | 
					      imagemagick
 | 
				
			||||||
  ] ++ lib.optional config.isLaptop brightnessctl;
 | 
					      systemd
 | 
				
			||||||
 | 
					      config.wayland.windowManager.hyprland.package
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					    ++ lib.optional config.isLaptop brightnessctl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  configDir = lib.cleanSourceWith {
 | 
					  configDir = lib.cleanSourceWith {
 | 
				
			||||||
    src = ./.;
 | 
					    src = ./.;
 | 
				
			||||||
    filter = name: _:
 | 
					    filter =
 | 
				
			||||||
 | 
					      name: _:
 | 
				
			||||||
      let
 | 
					      let
 | 
				
			||||||
        baseName = baseNameOf (toString name);
 | 
					        baseName = baseNameOf (toString name);
 | 
				
			||||||
      in
 | 
					      in
 | 
				
			||||||
        !(lib.hasSuffix ".nix" baseName);
 | 
					      !(lib.hasSuffix ".nix" baseName);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -28,7 +37,10 @@ in
 | 
				
			|||||||
    inputs.ags.homeManagerModules.default
 | 
					    inputs.ags.homeManagerModules.default
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  programs.ags.enable = true;
 | 
					  programs.ags = {
 | 
				
			||||||
 | 
					    enable = true;
 | 
				
			||||||
 | 
					    #   package = pkgs.ags_1;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  xdg.configFile."ags" = {
 | 
					  xdg.configFile."ags" = {
 | 
				
			||||||
    source = configDir;
 | 
					    source = configDir;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,10 +21,10 @@
 | 
				
			|||||||
    ./zsh.nix
 | 
					    ./zsh.nix
 | 
				
			||||||
    ./games.nix
 | 
					    ./games.nix
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* when xserver */
 | 
					    # when xserver
 | 
				
			||||||
    # ./xsession.nix
 | 
					    # ./xsession.nix
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* when wayland */
 | 
					    # when wayland
 | 
				
			||||||
    ./wayland.nix
 | 
					    ./wayland.nix
 | 
				
			||||||
    ./hyprland.nix
 | 
					    ./hyprland.nix
 | 
				
			||||||
    ./foot.nix
 | 
					    ./foot.nix
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,9 @@
 | 
				
			|||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
    dunst = {
 | 
					    dunst = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      iconTheme = with config.gtk.iconTheme; { inherit name package; };
 | 
					      iconTheme = with config.gtk.iconTheme; {
 | 
				
			||||||
 | 
					        inherit name package;
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
      settings = with conf.colors.hex; {
 | 
					      settings = with conf.colors.hex; {
 | 
				
			||||||
        global = {
 | 
					        global = {
 | 
				
			||||||
          mouse_left_click = "close_current";
 | 
					          mouse_left_click = "close_current";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, lib, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  key = "53EC089EF230E47A83BA8F8195949BD4B853F559";
 | 
					  key = "53EC089EF230E47A83BA8F8195949BD4B853F559";
 | 
				
			||||||
  host = "mail.weirdnatto.in";
 | 
					  host = "mail.weirdnatto.in";
 | 
				
			||||||
@@ -51,18 +56,17 @@ in
 | 
				
			|||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      package = pkgs.neomutt;
 | 
					      package = pkgs.neomutt;
 | 
				
			||||||
      sort = "reverse-date";
 | 
					      sort = "reverse-date";
 | 
				
			||||||
      extraConfig =
 | 
					      extraConfig = lib.concatMapStringsSep "\n" builtins.readFile [
 | 
				
			||||||
        lib.concatMapStringsSep
 | 
					        ./config/neomutt/neomuttrc
 | 
				
			||||||
          "\n"
 | 
					        ./config/neomutt/theme
 | 
				
			||||||
          builtins.readFile
 | 
					      ];
 | 
				
			||||||
          [
 | 
					 | 
				
			||||||
            ./config/neomutt/neomuttrc
 | 
					 | 
				
			||||||
            ./config/neomutt/theme
 | 
					 | 
				
			||||||
          ];
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  home = {
 | 
					  home = {
 | 
				
			||||||
    packages = with pkgs; [ mailcap w3m ];
 | 
					    packages = with pkgs; [
 | 
				
			||||||
 | 
					      mailcap
 | 
				
			||||||
 | 
					      w3m
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    file = {
 | 
					    file = {
 | 
				
			||||||
      mailcap = {
 | 
					      mailcap = {
 | 
				
			||||||
        source = ./config/mailcap;
 | 
					        source = ./config/mailcap;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +1,21 @@
 | 
				
			|||||||
{ config, pkgs, lib, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  programs.eww = {
 | 
					  programs.eww = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    package = pkgs.eww;
 | 
					    package = pkgs.eww;
 | 
				
			||||||
    configDir = lib.cleanSourceWith {
 | 
					    configDir = lib.cleanSourceWith {
 | 
				
			||||||
      src = ./.;
 | 
					      src = ./.;
 | 
				
			||||||
      filter = name: _:
 | 
					      filter =
 | 
				
			||||||
 | 
					        name: _:
 | 
				
			||||||
        let
 | 
					        let
 | 
				
			||||||
          baseName = baseNameOf (toString name);
 | 
					          baseName = baseNameOf (toString name);
 | 
				
			||||||
        in
 | 
					        in
 | 
				
			||||||
          !(lib.hasSuffix ".nix" baseName);
 | 
					        !(lib.hasSuffix ".nix" baseName);
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -20,24 +26,24 @@
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
    Service =
 | 
					    Service =
 | 
				
			||||||
      let
 | 
					      let
 | 
				
			||||||
        deps = [
 | 
					        deps =
 | 
				
			||||||
          config.programs.eww.package
 | 
					          [
 | 
				
			||||||
        ] ++ lib.optional
 | 
					            config.programs.eww.package
 | 
				
			||||||
          config.wayland.windowManager.hyprland.enable
 | 
					          ]
 | 
				
			||||||
          config.wayland.windowManager.hyprland.package
 | 
					          ++ lib.optional config.wayland.windowManager.hyprland.enable config.wayland.windowManager.hyprland.package
 | 
				
			||||||
        ++ (with pkgs; [
 | 
					          ++ (with pkgs; [
 | 
				
			||||||
          coreutils
 | 
					            coreutils
 | 
				
			||||||
          bash
 | 
					            bash
 | 
				
			||||||
          jq
 | 
					            jq
 | 
				
			||||||
          less
 | 
					            less
 | 
				
			||||||
          gawk
 | 
					            gawk
 | 
				
			||||||
          socat
 | 
					            socat
 | 
				
			||||||
          playerctl
 | 
					            playerctl
 | 
				
			||||||
          networkmanager
 | 
					            networkmanager
 | 
				
			||||||
          iwgtk
 | 
					            iwgtk
 | 
				
			||||||
          wireplumber
 | 
					            wireplumber
 | 
				
			||||||
        ])
 | 
					          ])
 | 
				
			||||||
        ++ lib.optional config.laptop pkgs.light;
 | 
					          ++ lib.optional config.laptop pkgs.light;
 | 
				
			||||||
      in
 | 
					      in
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        Type = "simple";
 | 
					        Type = "simple";
 | 
				
			||||||
@@ -48,4 +54,3 @@
 | 
				
			|||||||
    Install.WantedBy = [ "graphical-session.target" ];
 | 
					    Install.WantedBy = [ "graphical-session.target" ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,4 +11,3 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  programs.mangohud.enable = true;
 | 
					  programs.mangohud.enable = true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,11 @@
 | 
				
			|||||||
{ pkgs, inputs, config, conf, ... }: {
 | 
					{
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  inputs,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
  wayland = {
 | 
					  wayland = {
 | 
				
			||||||
    windowManager = {
 | 
					    windowManager = {
 | 
				
			||||||
      hyprland = {
 | 
					      hyprland = {
 | 
				
			||||||
@@ -8,16 +15,17 @@
 | 
				
			|||||||
        xwayland = {
 | 
					        xwayland = {
 | 
				
			||||||
          enable = true;
 | 
					          enable = true;
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        extraConfig = (builtins.readFile ./config/hypr/hyprland.conf)
 | 
					        extraConfig =
 | 
				
			||||||
 | 
					          (builtins.readFile ./config/hypr/hyprland.conf)
 | 
				
			||||||
          + (with config.home.pointerCursor; ''
 | 
					          + (with config.home.pointerCursor; ''
 | 
				
			||||||
          exec-once=hyprctl setcursor ${name} ${toString size}
 | 
					            exec-once=hyprctl setcursor ${name} ${toString size}
 | 
				
			||||||
        '')
 | 
					          '')
 | 
				
			||||||
          + (with conf.colors.argb { a = "ee"; };''
 | 
					          + (with conf.colors.argb { a = "ee"; }; ''
 | 
				
			||||||
          general {
 | 
					            general {
 | 
				
			||||||
            col.active_border = 0x${mauve} 0x${flamingo} 135deg
 | 
					              col.active_border = 0x${mauve} 0x${flamingo} 135deg
 | 
				
			||||||
            col.inactive_border = 0x${surface0}
 | 
					              col.inactive_border = 0x${surface0}
 | 
				
			||||||
          }
 | 
					            }
 | 
				
			||||||
        '');
 | 
					          '');
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,7 +84,6 @@ in
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
  age.secrets.mpdasrc = {
 | 
					  age.secrets.mpdasrc = {
 | 
				
			||||||
    file = ./secrets/mpdasrc.age;
 | 
					    file = ./secrets/mpdasrc.age;
 | 
				
			||||||
    path = "${home}/.config/mpdasrc";
 | 
					    path = "${home}/.config/mpdasrc";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,4 +16,3 @@
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,46 +1,54 @@
 | 
				
			|||||||
{ flake, pkgs, config, ... }:
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  home.packages = with pkgs; [
 | 
					  flake,
 | 
				
			||||||
    # A/V, codec and media stuff
 | 
					  pkgs,
 | 
				
			||||||
    ffmpeg-full
 | 
					  config,
 | 
				
			||||||
    wireplumber
 | 
					  ...
 | 
				
			||||||
    pulseaudio
 | 
					}:
 | 
				
			||||||
    pavucontrol
 | 
					{
 | 
				
			||||||
    imagemagick
 | 
					  home.packages =
 | 
				
			||||||
 | 
					    with pkgs;
 | 
				
			||||||
 | 
					    [
 | 
				
			||||||
 | 
					      # A/V, codec and media stuff
 | 
				
			||||||
 | 
					      ffmpeg-full
 | 
				
			||||||
 | 
					      wireplumber
 | 
				
			||||||
 | 
					      pulseaudio
 | 
				
			||||||
 | 
					      pavucontrol
 | 
				
			||||||
 | 
					      imagemagick
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Utils
 | 
					      # Utils
 | 
				
			||||||
    neofetch
 | 
					      neofetch
 | 
				
			||||||
    rage
 | 
					      rage
 | 
				
			||||||
    curl
 | 
					      curl
 | 
				
			||||||
    yt-dlp
 | 
					      yt-dlp
 | 
				
			||||||
    p7zip
 | 
					      p7zip
 | 
				
			||||||
    unrar
 | 
					      unrar
 | 
				
			||||||
    vim
 | 
					      vim
 | 
				
			||||||
    (flake.packages.${system}.customscripts)
 | 
					      (flake.packages.${system}.customscripts)
 | 
				
			||||||
    cachix
 | 
					      cachix
 | 
				
			||||||
    steam-run
 | 
					      steam-run
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # GUI
 | 
					      # GUI
 | 
				
			||||||
    vesktop
 | 
					      vesktop
 | 
				
			||||||
    (xfce.thunar.override {
 | 
					      (xfce.thunar.override {
 | 
				
			||||||
      thunarPlugins = with xfce; [
 | 
					        thunarPlugins = with xfce; [
 | 
				
			||||||
        thunar-media-tags-plugin
 | 
					          thunar-media-tags-plugin
 | 
				
			||||||
        thunar-volman
 | 
					          thunar-volman
 | 
				
			||||||
        thunar-archive-plugin
 | 
					          thunar-archive-plugin
 | 
				
			||||||
      ];
 | 
					        ];
 | 
				
			||||||
    })
 | 
					      })
 | 
				
			||||||
    xfce.xfconf
 | 
					      xfce.xfconf
 | 
				
			||||||
    xfce.tumbler
 | 
					      xfce.tumbler
 | 
				
			||||||
    qbittorrent
 | 
					      qbittorrent
 | 
				
			||||||
    hexchat
 | 
					      hexchat
 | 
				
			||||||
    dunst
 | 
					      dunst
 | 
				
			||||||
    zenity
 | 
					      zenity
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Misc
 | 
					      # Misc
 | 
				
			||||||
    mailcap
 | 
					      mailcap
 | 
				
			||||||
    libsForQt5.qtstyleplugins
 | 
					      libsForQt5.qtstyleplugins
 | 
				
			||||||
  ] ++ lib.optionals config.isLaptop [
 | 
					    ]
 | 
				
			||||||
    powertop
 | 
					    ++ lib.optionals config.isLaptop [
 | 
				
			||||||
    undervolt
 | 
					      powertop
 | 
				
			||||||
  ];
 | 
					      undervolt
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,10 @@
 | 
				
			|||||||
{ config, lib, pkgs, ... }: {
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
  xdg = {
 | 
					  xdg = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    userDirs.enable = true;
 | 
					    userDirs.enable = true;
 | 
				
			||||||
@@ -29,7 +35,10 @@
 | 
				
			|||||||
    inputMethod = {
 | 
					    inputMethod = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      type = "fcitx5";
 | 
					      type = "fcitx5";
 | 
				
			||||||
      fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-mozc ];
 | 
					      fcitx5.addons = with pkgs; [
 | 
				
			||||||
 | 
					        fcitx5-m17n
 | 
				
			||||||
 | 
					        fcitx5-mozc
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ pkgs, config, flake, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  flake,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  xsession = {
 | 
					  xsession = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,21 +26,23 @@ in
 | 
				
			|||||||
    # Desktop
 | 
					    # Desktop
 | 
				
			||||||
    okina = nixpkgs.lib.nixosSystem {
 | 
					    okina = nixpkgs.lib.nixosSystem {
 | 
				
			||||||
      system = "x86_64-linux";
 | 
					      system = "x86_64-linux";
 | 
				
			||||||
      modules = [
 | 
					      modules =
 | 
				
			||||||
        ./okina
 | 
					        [
 | 
				
			||||||
      ]
 | 
					          ./okina
 | 
				
			||||||
      ++ desktopModules
 | 
					        ]
 | 
				
			||||||
      ++ commonModules;
 | 
					        ++ desktopModules
 | 
				
			||||||
 | 
					        ++ commonModules;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #Home laptop
 | 
					    #Home laptop
 | 
				
			||||||
    satori = nixpkgs.lib.nixosSystem {
 | 
					    satori = nixpkgs.lib.nixosSystem {
 | 
				
			||||||
      system = "x86_64-linux";
 | 
					      system = "x86_64-linux";
 | 
				
			||||||
      modules = [
 | 
					      modules =
 | 
				
			||||||
        ./satori
 | 
					        [
 | 
				
			||||||
      ]
 | 
					          ./satori
 | 
				
			||||||
      ++ desktopModules
 | 
					        ]
 | 
				
			||||||
      ++ commonModules;
 | 
					        ++ desktopModules
 | 
				
			||||||
 | 
					        ++ commonModules;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #Home server (RPi4)
 | 
					    #Home server (RPi4)
 | 
				
			||||||
@@ -48,8 +50,7 @@ in
 | 
				
			|||||||
      system = "aarch64-linux";
 | 
					      system = "aarch64-linux";
 | 
				
			||||||
      modules = [
 | 
					      modules = [
 | 
				
			||||||
        ./marisa
 | 
					        ./marisa
 | 
				
			||||||
      ]
 | 
					      ] ++ commonModules;
 | 
				
			||||||
      ++ commonModules;
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #Oracle Cloud VM
 | 
					    #Oracle Cloud VM
 | 
				
			||||||
@@ -59,8 +60,7 @@ in
 | 
				
			|||||||
        ./remilia
 | 
					        ./remilia
 | 
				
			||||||
        ./x86builder.nix
 | 
					        ./x86builder.nix
 | 
				
			||||||
        inputs.mailserver.nixosModules.mailserver
 | 
					        inputs.mailserver.nixosModules.mailserver
 | 
				
			||||||
      ]
 | 
					      ] ++ commonModules;
 | 
				
			||||||
      ++ commonModules;
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #Oracle Cloud VM
 | 
					    #Oracle Cloud VM
 | 
				
			||||||
@@ -69,8 +69,7 @@ in
 | 
				
			|||||||
      modules = [
 | 
					      modules = [
 | 
				
			||||||
        ./hina
 | 
					        ./hina
 | 
				
			||||||
        ./x86builder.nix
 | 
					        ./x86builder.nix
 | 
				
			||||||
      ]
 | 
					      ] ++ commonModules;
 | 
				
			||||||
      ++ commonModules;
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #Oracle Cloud VM
 | 
					    #Oracle Cloud VM
 | 
				
			||||||
@@ -78,8 +77,7 @@ in
 | 
				
			|||||||
      system = "aarch64-linux";
 | 
					      system = "aarch64-linux";
 | 
				
			||||||
      modules = [
 | 
					      modules = [
 | 
				
			||||||
        ./suwako
 | 
					        ./suwako
 | 
				
			||||||
      ]
 | 
					      ] ++ commonModules;
 | 
				
			||||||
      ++ commonModules;
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,9 +3,19 @@
 | 
				
			|||||||
  boot = {
 | 
					  boot = {
 | 
				
			||||||
    kernel.sysctl."net.ipv4.ip_forward" = 1;
 | 
					    kernel.sysctl."net.ipv4.ip_forward" = 1;
 | 
				
			||||||
    initrd.kernelModules = [ "bochs" ];
 | 
					    initrd.kernelModules = [ "bochs" ];
 | 
				
			||||||
    initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ];
 | 
					    initrd.availableKernelModules = [
 | 
				
			||||||
 | 
					      "ata_piix"
 | 
				
			||||||
 | 
					      "uhci_hcd"
 | 
				
			||||||
 | 
					      "virtio_pci"
 | 
				
			||||||
 | 
					      "virtio_scsi"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    kernelModules = [ "kvm-amd" ];
 | 
					    kernelModules = [ "kvm-amd" ];
 | 
				
			||||||
    kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ];
 | 
					    kernelParams = [
 | 
				
			||||||
 | 
					      "console=ttyS0"
 | 
				
			||||||
 | 
					      "console=tty1"
 | 
				
			||||||
 | 
					      "nvme.shutdown_timeout=10"
 | 
				
			||||||
 | 
					      "libiscsi.debug_libiscsi_eh=1"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    loader = {
 | 
					    loader = {
 | 
				
			||||||
      systemd-boot.enable = true;
 | 
					      systemd-boot.enable = true;
 | 
				
			||||||
      efi.canTouchEfiVariables = true;
 | 
					      efi.canTouchEfiVariables = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ./networking.nix
 | 
					    ./networking.nix
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,20 @@
 | 
				
			|||||||
{ config, lib, pkgs, modulesPath, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  modulesPath,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports = [
 | 
				
			||||||
    [
 | 
					    (modulesPath + "/profiles/qemu-guest.nix")
 | 
				
			||||||
      (modulesPath + "/profiles/qemu-guest.nix")
 | 
					  ];
 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/" =
 | 
					  fileSystems."/" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
 | 
					    fsType = "ext4";
 | 
				
			||||||
      fsType = "ext4";
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  swapDevices = [
 | 
					  swapDevices = [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,25 @@
 | 
				
			|||||||
{ lib, config, conf, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
    useDHCP = false;
 | 
					    useDHCP = false;
 | 
				
			||||||
    hostName = "hina";
 | 
					    hostName = "hina";
 | 
				
			||||||
    firewall =
 | 
					    firewall = {
 | 
				
			||||||
      {
 | 
					      interfaces = {
 | 
				
			||||||
        interfaces = {
 | 
					        ens3 = {
 | 
				
			||||||
          ens3 = {
 | 
					          allowedTCPPorts = [
 | 
				
			||||||
            allowedTCPPorts = [ 9898 80 443 ];
 | 
					            9898
 | 
				
			||||||
          };
 | 
					            80
 | 
				
			||||||
 | 
					            443
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
    interfaces = {
 | 
					    interfaces = {
 | 
				
			||||||
      ens3 = {
 | 
					      ens3 = {
 | 
				
			||||||
        useDHCP = true;
 | 
					        useDHCP = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,10 @@
 | 
				
			|||||||
{ config, pkgs, lib, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  domain = conf.network.addresses.domain.natto;
 | 
					  domain = conf.network.addresses.domain.natto;
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
@@ -32,4 +38,3 @@ in
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,19 +2,33 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  boot = {
 | 
					  boot = {
 | 
				
			||||||
    consoleLogLevel = 7;
 | 
					    consoleLogLevel = 7;
 | 
				
			||||||
    kernelParams = [ "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0" ];
 | 
					    kernelParams = [
 | 
				
			||||||
 | 
					      "console=ttyS0,115200n8"
 | 
				
			||||||
 | 
					      "console=ttyAMA0,115200n8"
 | 
				
			||||||
 | 
					      "console=tty0"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    kernelPackages = pkgs.linuxPackages_5_10;
 | 
					    kernelPackages = pkgs.linuxPackages_5_10;
 | 
				
			||||||
    initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "usbhid" "uas" "pcie-brcmstb" "vc4" ];
 | 
					    initrd.availableKernelModules = [
 | 
				
			||||||
 | 
					      "xhci_pci"
 | 
				
			||||||
 | 
					      "usb_storage"
 | 
				
			||||||
 | 
					      "usbhid"
 | 
				
			||||||
 | 
					      "uas"
 | 
				
			||||||
 | 
					      "pcie-brcmstb"
 | 
				
			||||||
 | 
					      "vc4"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    loader = {
 | 
					    loader = {
 | 
				
			||||||
      grub.enable = false;
 | 
					      grub.enable = false;
 | 
				
			||||||
      generic-extlinux-compatible.enable = true;
 | 
					      generic-extlinux-compatible.enable = true;
 | 
				
			||||||
      /* raspberryPi= {
 | 
					      /*
 | 
				
			||||||
 | 
					        raspberryPi= {
 | 
				
			||||||
        version = 4;
 | 
					        version = 4;
 | 
				
			||||||
        firmwareConfig = "dtparam=sd_poll_once=on";
 | 
					        firmwareConfig = "dtparam=sd_poll_once=on";
 | 
				
			||||||
        enable = true;
 | 
					        enable = true;
 | 
				
			||||||
        }; */
 | 
					        };
 | 
				
			||||||
 | 
					      */
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    /* kernelPatches = [
 | 
					    /*
 | 
				
			||||||
 | 
					      kernelPatches = [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
      name = "change-pgtable";
 | 
					      name = "change-pgtable";
 | 
				
			||||||
      patch = null;
 | 
					      patch = null;
 | 
				
			||||||
@@ -22,6 +36,7 @@
 | 
				
			|||||||
      CONFIG_PGTABLE_LEVELS 4
 | 
					      CONFIG_PGTABLE_LEVELS 4
 | 
				
			||||||
      '';
 | 
					      '';
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      ];*/
 | 
					      ];
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ./networking.nix
 | 
					    ./networking.nix
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,21 +1,24 @@
 | 
				
			|||||||
# Do not modify this file!  It was generated by ‘nixos-generate-config’
 | 
					# Do not modify this file!  It was generated by ‘nixos-generate-config’
 | 
				
			||||||
# and may be overwritten by future invocations.  Please make changes
 | 
					# and may be overwritten by future invocations.  Please make changes
 | 
				
			||||||
# to /etc/nixos/configuration.nix instead.
 | 
					# to /etc/nixos/configuration.nix instead.
 | 
				
			||||||
{ config, lib, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  fileSystems."/" =
 | 
					  fileSystems."/" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-label/NIXOS_SD";
 | 
				
			||||||
      device = "/dev/disk/by-label/NIXOS_SD";
 | 
					    fsType = "ext4";
 | 
				
			||||||
      fsType = "ext4";
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/nix/store" =
 | 
					  fileSystems."/nix/store" = {
 | 
				
			||||||
    {
 | 
					    device = "/nix/store";
 | 
				
			||||||
      device = "/nix/store";
 | 
					    fsType = "none";
 | 
				
			||||||
      fsType = "none";
 | 
					    options = [ "bind" ];
 | 
				
			||||||
      options = [ "bind" ];
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  swapDevices = [
 | 
					  swapDevices = [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
    hostName = "marisa";
 | 
					    hostName = "marisa";
 | 
				
			||||||
@@ -7,10 +12,10 @@
 | 
				
			|||||||
        22 # ssh
 | 
					        22 # ssh
 | 
				
			||||||
        80 # http
 | 
					        80 # http
 | 
				
			||||||
        #  5454
 | 
					        #  5454
 | 
				
			||||||
        5001 #gitea
 | 
					        5001 # gitea
 | 
				
			||||||
        4646 #nomad
 | 
					        4646 # nomad
 | 
				
			||||||
        #  8500 #vault nomad consul
 | 
					        #  8500 #vault nomad consul
 | 
				
			||||||
        8000 #simpler-filehost
 | 
					        8000 # simpler-filehost
 | 
				
			||||||
        #  6666 #concourse
 | 
					        #  6666 #concourse
 | 
				
			||||||
        #  202 #gitea-ssh
 | 
					        #  202 #gitea-ssh
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
@@ -25,16 +30,20 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    interfaces = {
 | 
					    interfaces = {
 | 
				
			||||||
      eth0 = {
 | 
					      eth0 = {
 | 
				
			||||||
        ipv4.addresses = [{
 | 
					        ipv4.addresses = [
 | 
				
			||||||
          prefixLength = 24;
 | 
					          {
 | 
				
			||||||
          address = "192.168.1.159";
 | 
					            prefixLength = 24;
 | 
				
			||||||
        }];
 | 
					            address = "192.168.1.159";
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      wlan0 = {
 | 
					      wlan0 = {
 | 
				
			||||||
        ipv4.addresses = [{
 | 
					        ipv4.addresses = [
 | 
				
			||||||
          prefixLength = 24;
 | 
					          {
 | 
				
			||||||
          address = "192.168.1.159";
 | 
					            prefixLength = 24;
 | 
				
			||||||
        }];
 | 
					            address = "192.168.1.159";
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
 | 
					    wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
 | 
				
			||||||
@@ -52,6 +61,9 @@
 | 
				
			|||||||
      ];
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    defaultGateway = "192.168.1.1";
 | 
					    defaultGateway = "192.168.1.1";
 | 
				
			||||||
    nameservers = [ "1.1.1.1" "8.8.8.8" ];
 | 
					    nameservers = [
 | 
				
			||||||
 | 
					      "1.1.1.1"
 | 
				
			||||||
 | 
					      "8.8.8.8"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,19 +17,20 @@
 | 
				
			|||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
    openssh = {
 | 
					    openssh = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      ports = [ 22 22001 ];
 | 
					      ports = [
 | 
				
			||||||
 | 
					        22
 | 
				
			||||||
 | 
					        22001
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    postgresql = {
 | 
					    postgresql = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      authentication = ''
 | 
					      authentication = ''
 | 
				
			||||||
        local gitea all ident map=gitea-map
 | 
					        local gitea all ident map=gitea-map
 | 
				
			||||||
      '';
 | 
					      '';
 | 
				
			||||||
      identMap =
 | 
					      identMap = ''
 | 
				
			||||||
        ''
 | 
					        gitea-map gitea gitea
 | 
				
			||||||
          gitea-map gitea gitea
 | 
					      '';
 | 
				
			||||||
        '';
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,10 @@
 | 
				
			|||||||
{ config, pkgs, inputs, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  inputs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  systemd.services.filehost = {
 | 
					  systemd.services.filehost = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
    gitea = rec {
 | 
					    gitea = rec {
 | 
				
			||||||
@@ -38,4 +43,3 @@
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,10 @@
 | 
				
			|||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      enableDocker = true;
 | 
					      enableDocker = true;
 | 
				
			||||||
      dropPrivileges = false;
 | 
					      dropPrivileges = false;
 | 
				
			||||||
      extraPackages = with pkgs; [ consul cni-plugins ];
 | 
					      extraPackages = with pkgs; [
 | 
				
			||||||
 | 
					        consul
 | 
				
			||||||
 | 
					        cni-plugins
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
      extraSettingsPaths = [ "/run/nomad/nomad.json" ];
 | 
					      extraSettingsPaths = [ "/run/nomad/nomad.json" ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    vault = {
 | 
					    vault = {
 | 
				
			||||||
@@ -27,4 +30,3 @@
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,20 +1,38 @@
 | 
				
			|||||||
{ lib, config, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  boot = {
 | 
					  boot = {
 | 
				
			||||||
    kernelPackages = pkgs.linuxPackages;
 | 
					    kernelPackages = pkgs.linuxPackages;
 | 
				
			||||||
    initrd = {
 | 
					    initrd = {
 | 
				
			||||||
      availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
 | 
					      availableKernelModules = [
 | 
				
			||||||
 | 
					        "xhci_pci"
 | 
				
			||||||
 | 
					        "ahci"
 | 
				
			||||||
 | 
					        "nvme"
 | 
				
			||||||
 | 
					        "usbhid"
 | 
				
			||||||
 | 
					        "usb_storage"
 | 
				
			||||||
 | 
					        "sd_mod"
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
      kernelModules = [ ];
 | 
					      kernelModules = [ ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    kernelParams = [ "i915.force_probe=56a1" ];
 | 
					    kernelParams = [ "i915.force_probe=56a1" ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #   kernelModules = [ "kvm-intel" "i2c-dev" "ddcci_backlight" ];
 | 
					    #   kernelModules = [ "kvm-intel" "i2c-dev" "ddcci_backlight" ];
 | 
				
			||||||
    kernelModules = [ "kvm-intel" "i2c-dev" ];
 | 
					    kernelModules = [
 | 
				
			||||||
 | 
					      "kvm-intel"
 | 
				
			||||||
 | 
					      "i2c-dev"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    #   extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ddcci-driver ];
 | 
					    #   extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ddcci-driver ];
 | 
				
			||||||
    extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ];
 | 
					    extraModulePackages = with config.boot.kernelPackages; [
 | 
				
			||||||
 | 
					      v4l2loopback
 | 
				
			||||||
 | 
					      r8125
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    blacklistedKernelModules = [ "r8169" ];
 | 
					    blacklistedKernelModules = [ "r8169" ];
 | 
				
			||||||
    extraModprobeConfig = '' options snd-intel-dspcfg dsp_driver=1 '';
 | 
					    extraModprobeConfig = ''options snd-intel-dspcfg dsp_driver=1 '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    resumeDevice = "/dev/disk/by-uuid/3770e3bd-a200-4e36-b3a5-4963d13865f9";
 | 
					    resumeDevice = "/dev/disk/by-uuid/3770e3bd-a200-4e36-b3a5-4963d13865f9";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,11 @@
 | 
				
			|||||||
{ lib, config, ... }:
 | 
					{ lib, config, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports = [
 | 
				
			||||||
    [
 | 
					    ./hardware.nix
 | 
				
			||||||
      ./hardware.nix
 | 
					    ./stuff.nix
 | 
				
			||||||
      ./stuff.nix
 | 
					    ./networking.nix
 | 
				
			||||||
      ./networking.nix
 | 
					    ./boot.nix
 | 
				
			||||||
      ./boot.nix
 | 
					    ./services.nix
 | 
				
			||||||
      ./services.nix
 | 
					  ];
 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
  system.stateVersion = "23.05";
 | 
					  system.stateVersion = "23.05";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,42 +1,45 @@
 | 
				
			|||||||
{ config, lib, modulesPath, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  modulesPath,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports = [
 | 
				
			||||||
    [
 | 
					    (modulesPath + "/installer/scan/not-detected.nix")
 | 
				
			||||||
      (modulesPath + "/installer/scan/not-detected.nix")
 | 
					  ];
 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/" =
 | 
					  fileSystems."/" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/5679b901-3a70-4422-81f5-af91f287500b";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/5679b901-3a70-4422-81f5-af91f287500b";
 | 
					    fsType = "btrfs";
 | 
				
			||||||
      fsType = "btrfs";
 | 
					    options = [ "compress-force=zstd:3" ];
 | 
				
			||||||
      options = [ "compress-force=zstd:3" ];
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/boot/efi" =
 | 
					  fileSystems."/boot/efi" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/A2E5-006F";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/A2E5-006F";
 | 
					    fsType = "vfat";
 | 
				
			||||||
      fsType = "vfat";
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/media/omghi" =
 | 
					  fileSystems."/media/omghi" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/0e862bdb-168a-42cc-8a28-0ae9e9a0753c";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/0e862bdb-168a-42cc-8a28-0ae9e9a0753c";
 | 
					    fsType = "ext4";
 | 
				
			||||||
      fsType = "ext4";
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/media/real" =
 | 
					  fileSystems."/media/real" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
 | 
					    fsType = "btrfs";
 | 
				
			||||||
      fsType = "btrfs";
 | 
					    options = [ "compress-force=zstd:3" ];
 | 
				
			||||||
      options = [ "compress-force=zstd:3" ];
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* fileSystems."/media/ntfs" =
 | 
					  /*
 | 
				
			||||||
 | 
					    fileSystems."/media/ntfs" =
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      device = "/dev/disk/by-uuid/54034ca6-d3cd-11ee-9e0c-f020ff87c985";
 | 
					      device = "/dev/disk/by-uuid/54034ca6-d3cd-11ee-9e0c-f020ff87c985";
 | 
				
			||||||
      fsType = "ntfs";
 | 
					      fsType = "ntfs";
 | 
				
			||||||
    };*/
 | 
					    };
 | 
				
			||||||
 | 
					  */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  zramSwap = {
 | 
					  zramSwap = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,10 @@
 | 
				
			|||||||
{ config, pkgs, conf, lib, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
@@ -10,35 +16,54 @@
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    firewall = {
 | 
					    firewall = {
 | 
				
			||||||
      allowedTCPPorts = [ 22 18172 6600 8001 7590 25565 9092 8096 ];
 | 
					      allowedTCPPorts = [
 | 
				
			||||||
      allowedUDPPorts = [ 22 17840 18172 ];
 | 
					        22
 | 
				
			||||||
 | 
					        18172
 | 
				
			||||||
 | 
					        6600
 | 
				
			||||||
 | 
					        8001
 | 
				
			||||||
 | 
					        7590
 | 
				
			||||||
 | 
					        25565
 | 
				
			||||||
 | 
					        9092
 | 
				
			||||||
 | 
					        8096
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
 | 
					      allowedUDPPorts = [
 | 
				
			||||||
 | 
					        22
 | 
				
			||||||
 | 
					        17840
 | 
				
			||||||
 | 
					        18172
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
      trustedInterfaces = [ "docker0" ];
 | 
					      trustedInterfaces = [ "docker0" ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    interfaces = {
 | 
					    interfaces = {
 | 
				
			||||||
      enp7s0 = {
 | 
					      /*
 | 
				
			||||||
        ipv4.addresses = [{
 | 
					        enp7s0 = {
 | 
				
			||||||
          prefixLength = 24;
 | 
					          ipv4.addresses = [{
 | 
				
			||||||
          address = "192.168.1.106";
 | 
					            prefixLength = 24;
 | 
				
			||||||
        }];
 | 
					            address = "192.168.1.106";
 | 
				
			||||||
      };
 | 
					          }];
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					      */
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
 | 
					    wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
 | 
				
			||||||
      ips = [ okina ];
 | 
					      ips = [ okina ];
 | 
				
			||||||
      listenPort = 17840;
 | 
					      listenPort = 17840;
 | 
				
			||||||
      privateKeyFile = "/var/secrets/wg.key";
 | 
					      privateKeyFile = "/var/secrets/wg.key";
 | 
				
			||||||
      peers = [{
 | 
					      peers = [
 | 
				
			||||||
        #Oracle VM1
 | 
					        {
 | 
				
			||||||
        publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
					          #Oracle VM1
 | 
				
			||||||
        allowedIPs = [ remilia ];
 | 
					          publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
				
			||||||
        endpoint = "${conf.network.addresses.domain.natto}:17840";
 | 
					          allowedIPs = [ remilia ];
 | 
				
			||||||
        persistentKeepalive = 25;
 | 
					          endpoint = "${conf.network.addresses.domain.natto}:17840";
 | 
				
			||||||
      }];
 | 
					          persistentKeepalive = 25;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    defaultGateway = "192.168.1.1";
 | 
					    defaultGateway = "192.168.1.1";
 | 
				
			||||||
    nameservers = [ "1.1.1.1" "8.8.8.8" ];
 | 
					    nameservers = [
 | 
				
			||||||
 | 
					      "1.1.1.1"
 | 
				
			||||||
 | 
					      "8.8.8.8"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ lib, config, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
    openssh = {
 | 
					    openssh = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ lib, config, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  time.timeZone = "Asia/Kolkata";
 | 
					  time.timeZone = "Asia/Kolkata";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -9,13 +14,23 @@
 | 
				
			|||||||
    polkit.enable = true;
 | 
					    polkit.enable = true;
 | 
				
			||||||
    sudo.enable = true;
 | 
					    sudo.enable = true;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  console.useXkbConfig = true;
 | 
					  console.useXkbConfig = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  users.users.natto = {
 | 
					  users.users.natto = {
 | 
				
			||||||
    isNormalUser = true;
 | 
					    isNormalUser = true;
 | 
				
			||||||
    shell = pkgs.zsh;
 | 
					    shell = pkgs.zsh;
 | 
				
			||||||
    home = "/home/natto";
 | 
					    home = "/home/natto";
 | 
				
			||||||
    extraGroups = [ "wheel" "adbusers" "video" "libvirtd" "docker" "networkmanager" "dialout" "pipewire" ];
 | 
					    extraGroups = [
 | 
				
			||||||
 | 
					      "wheel"
 | 
				
			||||||
 | 
					      "adbusers"
 | 
				
			||||||
 | 
					      "video"
 | 
				
			||||||
 | 
					      "libvirtd"
 | 
				
			||||||
 | 
					      "docker"
 | 
				
			||||||
 | 
					      "networkmanager"
 | 
				
			||||||
 | 
					      "dialout"
 | 
				
			||||||
 | 
					      "pipewire"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtualisation = {
 | 
					  virtualisation = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,10 @@
 | 
				
			|||||||
    '';
 | 
					    '';
 | 
				
			||||||
    settings = {
 | 
					    settings = {
 | 
				
			||||||
      auto-optimise-store = true;
 | 
					      auto-optimise-store = true;
 | 
				
			||||||
      trusted-users = [ "root" "@wheel" ];
 | 
					      trusted-users = [
 | 
				
			||||||
 | 
					        "root"
 | 
				
			||||||
 | 
					        "@wheel"
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
      substituters = [
 | 
					      substituters = [
 | 
				
			||||||
        "https://nix-community.cachix.org"
 | 
					        "https://nix-community.cachix.org"
 | 
				
			||||||
        "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
 | 
					        "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,9 +3,19 @@
 | 
				
			|||||||
  boot = {
 | 
					  boot = {
 | 
				
			||||||
    kernel.sysctl."net.ipv4.ip_forward" = 1;
 | 
					    kernel.sysctl."net.ipv4.ip_forward" = 1;
 | 
				
			||||||
    initrd.kernelModules = [ "bochs" ];
 | 
					    initrd.kernelModules = [ "bochs" ];
 | 
				
			||||||
    initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ];
 | 
					    initrd.availableKernelModules = [
 | 
				
			||||||
 | 
					      "ata_piix"
 | 
				
			||||||
 | 
					      "uhci_hcd"
 | 
				
			||||||
 | 
					      "virtio_pci"
 | 
				
			||||||
 | 
					      "virtio_scsi"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    kernelModules = [ "kvm-amd" ];
 | 
					    kernelModules = [ "kvm-amd" ];
 | 
				
			||||||
    kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ];
 | 
					    kernelParams = [
 | 
				
			||||||
 | 
					      "console=ttyS0"
 | 
				
			||||||
 | 
					      "console=tty1"
 | 
				
			||||||
 | 
					      "nvme.shutdown_timeout=10"
 | 
				
			||||||
 | 
					      "libiscsi.debug_libiscsi_eh=1"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    loader = {
 | 
					    loader = {
 | 
				
			||||||
      systemd-boot.enable = true;
 | 
					      systemd-boot.enable = true;
 | 
				
			||||||
      efi.canTouchEfiVariables = true;
 | 
					      efi.canTouchEfiVariables = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ./networking.nix
 | 
					    ./networking.nix
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,20 @@
 | 
				
			|||||||
{ config, lib, pkgs, modulesPath, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  modulesPath,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports = [
 | 
				
			||||||
    [
 | 
					    (modulesPath + "/profiles/qemu-guest.nix")
 | 
				
			||||||
      (modulesPath + "/profiles/qemu-guest.nix")
 | 
					  ];
 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/" =
 | 
					  fileSystems."/" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
 | 
					    fsType = "ext4";
 | 
				
			||||||
      fsType = "ext4";
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  swapDevices = [
 | 
					  swapDevices = [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,15 @@
 | 
				
			|||||||
{ config, pkgs, conf, network, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  network,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  mailserver =
 | 
					  mailserver =
 | 
				
			||||||
    let domain = conf.network.addresses.domain.natto; in
 | 
					    let
 | 
				
			||||||
 | 
					      domain = conf.network.addresses.domain.natto;
 | 
				
			||||||
 | 
					    in
 | 
				
			||||||
    rec {
 | 
					    rec {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      fqdn = "mail.${domain}";
 | 
					      fqdn = "mail.${domain}";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,27 +1,43 @@
 | 
				
			|||||||
{ lib, config, conf, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
    useDHCP = false;
 | 
					    useDHCP = false;
 | 
				
			||||||
    hostName = "remilia";
 | 
					    hostName = "remilia";
 | 
				
			||||||
    firewall =
 | 
					    firewall = {
 | 
				
			||||||
      {
 | 
					      interfaces = {
 | 
				
			||||||
        interfaces = {
 | 
					        ens3 = {
 | 
				
			||||||
          ens3 = {
 | 
					          allowedTCPPorts = [
 | 
				
			||||||
            allowedTCPPorts = [ 80 81 443 444 993 465 143 25 22 22001 22002 4444 ]
 | 
					            80
 | 
				
			||||||
              ++ (map (x: x.sourcePort) config.networking.nat.forwardPorts);
 | 
					            81
 | 
				
			||||||
            allowedUDPPorts = [ 17840 ];
 | 
					            443
 | 
				
			||||||
          };
 | 
					            444
 | 
				
			||||||
 | 
					            993
 | 
				
			||||||
 | 
					            465
 | 
				
			||||||
 | 
					            143
 | 
				
			||||||
 | 
					            25
 | 
				
			||||||
 | 
					            22
 | 
				
			||||||
 | 
					            22001
 | 
				
			||||||
 | 
					            22002
 | 
				
			||||||
 | 
					            4444
 | 
				
			||||||
 | 
					          ] ++ (map (x: x.sourcePort) config.networking.nat.forwardPorts);
 | 
				
			||||||
 | 
					          allowedUDPPorts = [ 17840 ];
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        extraCommands = lib.concatMapStringsSep "\n"
 | 
					 | 
				
			||||||
          (x:
 | 
					 | 
				
			||||||
            let
 | 
					 | 
				
			||||||
              t = lib.splitString ":" x.destination;
 | 
					 | 
				
			||||||
            in
 | 
					 | 
				
			||||||
            with lib;
 | 
					 | 
				
			||||||
            "iptables -t nat -A POSTROUTING -d ${head t} -p tcp -m tcp --dport ${last t} -j MASQUERADE"
 | 
					 | 
				
			||||||
          )
 | 
					 | 
				
			||||||
          config.networking.nat.forwardPorts;
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					      extraCommands = lib.concatMapStringsSep "\n" (
 | 
				
			||||||
 | 
					        x:
 | 
				
			||||||
 | 
					        let
 | 
				
			||||||
 | 
					          t = lib.splitString ":" x.destination;
 | 
				
			||||||
 | 
					        in
 | 
				
			||||||
 | 
					        with lib;
 | 
				
			||||||
 | 
					        "iptables -t nat -A POSTROUTING -d ${head t} -p tcp -m tcp --dport ${last t} -j MASQUERADE"
 | 
				
			||||||
 | 
					      ) config.networking.nat.forwardPorts;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
    interfaces = {
 | 
					    interfaces = {
 | 
				
			||||||
      ens3 = {
 | 
					      ens3 = {
 | 
				
			||||||
        useDHCP = true;
 | 
					        useDHCP = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,10 @@
 | 
				
			|||||||
{ config, pkgs, lib, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  domain = conf.network.addresses.domain.natto;
 | 
					  domain = conf.network.addresses.domain.natto;
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
@@ -8,7 +14,10 @@ in
 | 
				
			|||||||
    openssh = {
 | 
					    openssh = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      settings.PermitRootLogin = "yes";
 | 
					      settings.PermitRootLogin = "yes";
 | 
				
			||||||
      ports = [ 22 22002 ];
 | 
					      ports = [
 | 
				
			||||||
 | 
					        22
 | 
				
			||||||
 | 
					        22002
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    nginx = {
 | 
					    nginx = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
@@ -24,20 +33,29 @@ in
 | 
				
			|||||||
      '';
 | 
					      '';
 | 
				
			||||||
      virtualHosts =
 | 
					      virtualHosts =
 | 
				
			||||||
        let
 | 
					        let
 | 
				
			||||||
          genericHttpRProxy = { addr, ssl ? true, conf ? "" }: {
 | 
					          genericHttpRProxy =
 | 
				
			||||||
            enableACME = ssl;
 | 
					            {
 | 
				
			||||||
            # addSSL = ssl;
 | 
					              addr,
 | 
				
			||||||
            forceSSL = ssl;
 | 
					              ssl ? true,
 | 
				
			||||||
            locations."/" = {
 | 
					              conf ? "",
 | 
				
			||||||
              proxyPass = toString addr;
 | 
					            }:
 | 
				
			||||||
              extraConfig = ''
 | 
					            {
 | 
				
			||||||
                expires $expires;
 | 
					              enableACME = ssl;
 | 
				
			||||||
                proxy_set_header Host $host;
 | 
					              # addSSL = ssl;
 | 
				
			||||||
              '' + conf;
 | 
					              forceSSL = ssl;
 | 
				
			||||||
 | 
					              locations."/" = {
 | 
				
			||||||
 | 
					                proxyPass = toString addr;
 | 
				
			||||||
 | 
					                extraConfig =
 | 
				
			||||||
 | 
					                  ''
 | 
				
			||||||
 | 
					                    expires $expires;
 | 
				
			||||||
 | 
					                    proxy_set_header Host $host;
 | 
				
			||||||
 | 
					                  ''
 | 
				
			||||||
 | 
					                  + conf;
 | 
				
			||||||
 | 
					              };
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        in
 | 
					        in
 | 
				
			||||||
        with conf.network.addresses.wireguard.ips; {
 | 
					        with conf.network.addresses.wireguard.ips;
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          "${domain}" = {
 | 
					          "${domain}" = {
 | 
				
			||||||
            addSSL = true;
 | 
					            addSSL = true;
 | 
				
			||||||
            enableACME = true;
 | 
					            enableACME = true;
 | 
				
			||||||
@@ -51,7 +69,8 @@ in
 | 
				
			|||||||
          # "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
 | 
					          # "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
 | 
				
			||||||
          "f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8000"; };
 | 
					          "f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8000"; };
 | 
				
			||||||
          "radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
 | 
					          "radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
 | 
				
			||||||
          /* "radio.${domain}" = {
 | 
					          /*
 | 
				
			||||||
 | 
					            "radio.${domain}" = {
 | 
				
			||||||
            addSSL = true;
 | 
					            addSSL = true;
 | 
				
			||||||
            enableACME = true;
 | 
					            enableACME = true;
 | 
				
			||||||
            locations."/" = {
 | 
					            locations."/" = {
 | 
				
			||||||
@@ -62,13 +81,15 @@ in
 | 
				
			|||||||
            '';
 | 
					            '';
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            locations."= /".return = "301 /radio";
 | 
					            locations."= /".return = "301 /radio";
 | 
				
			||||||
            };*/
 | 
					            };
 | 
				
			||||||
 | 
					          */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          "git.${domain}" = genericHttpRProxy {
 | 
					          "git.${domain}" = genericHttpRProxy {
 | 
				
			||||||
            addr = "http://${marisa}:5001";
 | 
					            addr = "http://${marisa}:5001";
 | 
				
			||||||
            conf = "client_max_body_size 64M;";
 | 
					            conf = "client_max_body_size 64M;";
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
          /*"nomad.${domain}" = genericHttpRProxy {
 | 
					          /*
 | 
				
			||||||
 | 
					            "nomad.${domain}" = genericHttpRProxy {
 | 
				
			||||||
            addr = "http://${marisa}:4646";
 | 
					            addr = "http://${marisa}:4646";
 | 
				
			||||||
            conf = ''
 | 
					            conf = ''
 | 
				
			||||||
            proxy_buffering off;
 | 
					            proxy_buffering off;
 | 
				
			||||||
@@ -80,4 +101,3 @@ in
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,22 +1,49 @@
 | 
				
			|||||||
{ lib, config, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  boot = {
 | 
					  boot = {
 | 
				
			||||||
    kernelPackages = pkgs.linuxPackages_latest;
 | 
					    kernelPackages = pkgs.linuxPackages_latest;
 | 
				
			||||||
    initrd = {
 | 
					    initrd = {
 | 
				
			||||||
      availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "vfio-pci" ];
 | 
					      availableKernelModules = [
 | 
				
			||||||
      /*     preDeviceCommands = ''
 | 
					        "xhci_pci"
 | 
				
			||||||
 | 
					        "ahci"
 | 
				
			||||||
 | 
					        "nvme"
 | 
				
			||||||
 | 
					        "usb_storage"
 | 
				
			||||||
 | 
					        "sd_mod"
 | 
				
			||||||
 | 
					        "vfio-pci"
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
 | 
					      /*
 | 
				
			||||||
 | 
					        preDeviceCommands = ''
 | 
				
			||||||
        DEVS="0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3"
 | 
					        DEVS="0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3"
 | 
				
			||||||
        for DEV in $DEVS; do
 | 
					        for DEV in $DEVS; do
 | 
				
			||||||
        echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
 | 
					        echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
 | 
				
			||||||
        done
 | 
					        done
 | 
				
			||||||
        modprobe -i vfio-pci
 | 
					        modprobe -i vfio-pci
 | 
				
			||||||
        '';*/
 | 
					        '';
 | 
				
			||||||
 | 
					      */
 | 
				
			||||||
      kernelModules = [ ];
 | 
					      kernelModules = [ ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    kernelParams = [ "intel_pstate=active" "intel_iommu=on" "nvidia_drm.modeset=1" "clearcpuid=512" ];
 | 
					    kernelParams = [
 | 
				
			||||||
    kernelModules = [ "kvm-intel" "snd-seq" "snd-rawmidi" "joydev" ];
 | 
					      "intel_pstate=active"
 | 
				
			||||||
    extraModulePackages = with config.boot.kernelPackages; [ nvidia_x11 v4l2loopback ];
 | 
					      "intel_iommu=on"
 | 
				
			||||||
 | 
					      "nvidia_drm.modeset=1"
 | 
				
			||||||
 | 
					      "clearcpuid=512"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					    kernelModules = [
 | 
				
			||||||
 | 
					      "kvm-intel"
 | 
				
			||||||
 | 
					      "snd-seq"
 | 
				
			||||||
 | 
					      "snd-rawmidi"
 | 
				
			||||||
 | 
					      "joydev"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					    extraModulePackages = with config.boot.kernelPackages; [
 | 
				
			||||||
 | 
					      nvidia_x11
 | 
				
			||||||
 | 
					      v4l2loopback
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    loader = {
 | 
					    loader = {
 | 
				
			||||||
      efi = {
 | 
					      efi = {
 | 
				
			||||||
        canTouchEfiVariables = true;
 | 
					        canTouchEfiVariables = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,13 +1,12 @@
 | 
				
			|||||||
{ lib, config, ... }:
 | 
					{ lib, config, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports = [
 | 
				
			||||||
    [
 | 
					    ./hardware.nix
 | 
				
			||||||
      ./hardware.nix
 | 
					    ./stuff.nix
 | 
				
			||||||
      ./stuff.nix
 | 
					    ./networking.nix
 | 
				
			||||||
      ./networking.nix
 | 
					    ./boot.nix
 | 
				
			||||||
      ./boot.nix
 | 
					    ./services.nix
 | 
				
			||||||
      ./services.nix
 | 
					    ./graphics.nix
 | 
				
			||||||
      ./graphics.nix
 | 
					  ];
 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
  system.stateVersion = "23.05";
 | 
					  system.stateVersion = "23.05";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, lib, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  nvidia-offload = pkgs.writeShellScriptBin "nvi" ''
 | 
					  nvidia-offload = pkgs.writeShellScriptBin "nvi" ''
 | 
				
			||||||
    export __NV_PRIME_RENDER_OFFLOAD=1
 | 
					    export __NV_PRIME_RENDER_OFFLOAD=1
 | 
				
			||||||
@@ -23,11 +28,15 @@ in
 | 
				
			|||||||
      package = config.boot.kernelPackages.nvidia_x11;
 | 
					      package = config.boot.kernelPackages.nvidia_x11;
 | 
				
			||||||
      prime = {
 | 
					      prime = {
 | 
				
			||||||
        #      sync.enable = true;
 | 
					        #      sync.enable = true;
 | 
				
			||||||
        offload = { enable = true; };
 | 
					        offload = {
 | 
				
			||||||
 | 
					          enable = true;
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
        intelBusId = "PCI:0:2:0";
 | 
					        intelBusId = "PCI:0:2:0";
 | 
				
			||||||
        nvidiaBusId = "PCI:1:0:0";
 | 
					        nvidiaBusId = "PCI:1:0:0";
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      modesetting = { enable = true; };
 | 
					      modesetting = {
 | 
				
			||||||
 | 
					        enable = true;
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
      powerManagement = {
 | 
					      powerManagement = {
 | 
				
			||||||
        enable = true;
 | 
					        enable = true;
 | 
				
			||||||
        finegrained = true;
 | 
					        finegrained = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,29 +1,30 @@
 | 
				
			|||||||
{ config, lib, modulesPath, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  modulesPath,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports = [
 | 
				
			||||||
    [
 | 
					    (modulesPath + "/installer/scan/not-detected.nix")
 | 
				
			||||||
      (modulesPath + "/installer/scan/not-detected.nix")
 | 
					  ];
 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/" =
 | 
					  fileSystems."/" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/59af143c-1a87-4654-9b31-7594ac8ba530";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/59af143c-1a87-4654-9b31-7594ac8ba530";
 | 
					    fsType = "ext4";
 | 
				
			||||||
      fsType = "ext4";
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/media/real" =
 | 
					  fileSystems."/media/real" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
 | 
					    fsType = "btrfs";
 | 
				
			||||||
      fsType = "btrfs";
 | 
					    options = [ "compress-force=zstd:3" ];
 | 
				
			||||||
      options = [ "compress-force=zstd:3" ];
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/boot/efi" =
 | 
					  fileSystems."/boot/efi" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/2424-5639";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/2424-5639";
 | 
					    fsType = "vfat";
 | 
				
			||||||
      fsType = "vfat";
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  zramSwap = {
 | 
					  zramSwap = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
@@ -33,7 +34,10 @@
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  swapDevices = [
 | 
					  swapDevices = [
 | 
				
			||||||
    { device = "/var/swap"; size = 4096; }
 | 
					    {
 | 
				
			||||||
 | 
					      device = "/var/swap";
 | 
				
			||||||
 | 
					      size = 4096;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  powerManagement = {
 | 
					  powerManagement = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
@@ -10,8 +15,20 @@
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    firewall = {
 | 
					    firewall = {
 | 
				
			||||||
      allowedTCPPorts = [ 22 18172 6600 8001 7590 25565 9092 ];
 | 
					      allowedTCPPorts = [
 | 
				
			||||||
      allowedUDPPorts = [ 22 17840 18172 ];
 | 
					        22
 | 
				
			||||||
 | 
					        18172
 | 
				
			||||||
 | 
					        6600
 | 
				
			||||||
 | 
					        8001
 | 
				
			||||||
 | 
					        7590
 | 
				
			||||||
 | 
					        25565
 | 
				
			||||||
 | 
					        9092
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
 | 
					      allowedUDPPorts = [
 | 
				
			||||||
 | 
					        22
 | 
				
			||||||
 | 
					        17840
 | 
				
			||||||
 | 
					        18172
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
      trustedInterfaces = [ "docker0" ];
 | 
					      trustedInterfaces = [ "docker0" ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -19,16 +36,21 @@
 | 
				
			|||||||
      ips = [ satori ];
 | 
					      ips = [ satori ];
 | 
				
			||||||
      listenPort = 17840;
 | 
					      listenPort = 17840;
 | 
				
			||||||
      privateKeyFile = "/var/secrets/wg.key";
 | 
					      privateKeyFile = "/var/secrets/wg.key";
 | 
				
			||||||
      peers = [{
 | 
					      peers = [
 | 
				
			||||||
        #Oracle VM1
 | 
					        {
 | 
				
			||||||
        publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
					          #Oracle VM1
 | 
				
			||||||
        allowedIPs = [ remilia ];
 | 
					          publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
				
			||||||
        endpoint = "${conf.network.addresses.domain.natto}:17840";
 | 
					          allowedIPs = [ remilia ];
 | 
				
			||||||
        persistentKeepalive = 25;
 | 
					          endpoint = "${conf.network.addresses.domain.natto}:17840";
 | 
				
			||||||
      }];
 | 
					          persistentKeepalive = 25;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    defaultGateway = "192.168.1.1";
 | 
					    defaultGateway = "192.168.1.1";
 | 
				
			||||||
    nameservers = [ "1.1.1.1" "8.8.8.8" ];
 | 
					    nameservers = [
 | 
				
			||||||
 | 
					      "1.1.1.1"
 | 
				
			||||||
 | 
					      "8.8.8.8"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ lib, config, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
    openssh = {
 | 
					    openssh = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ lib, config, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  time.timeZone = "Asia/Kolkata";
 | 
					  time.timeZone = "Asia/Kolkata";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -11,12 +16,19 @@
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
  console.useXkbConfig = true;
 | 
					  console.useXkbConfig = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
  users.users.natto = {
 | 
					  users.users.natto = {
 | 
				
			||||||
    isNormalUser = true;
 | 
					    isNormalUser = true;
 | 
				
			||||||
    shell = pkgs.zsh;
 | 
					    shell = pkgs.zsh;
 | 
				
			||||||
    home = "/home/natto";
 | 
					    home = "/home/natto";
 | 
				
			||||||
    extraGroups = [ "wheel" "adbusers" "video" "libvirtd" "docker" "networkmanager" "dialout" ];
 | 
					    extraGroups = [
 | 
				
			||||||
 | 
					      "wheel"
 | 
				
			||||||
 | 
					      "adbusers"
 | 
				
			||||||
 | 
					      "video"
 | 
				
			||||||
 | 
					      "libvirtd"
 | 
				
			||||||
 | 
					      "docker"
 | 
				
			||||||
 | 
					      "networkmanager"
 | 
				
			||||||
 | 
					      "dialout"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtualisation = {
 | 
					  virtualisation = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,9 +3,19 @@
 | 
				
			|||||||
  boot = {
 | 
					  boot = {
 | 
				
			||||||
    kernel.sysctl."net.ipv4.ip_forward" = 1;
 | 
					    kernel.sysctl."net.ipv4.ip_forward" = 1;
 | 
				
			||||||
    initrd.kernelModules = [ "bochs" ];
 | 
					    initrd.kernelModules = [ "bochs" ];
 | 
				
			||||||
    initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ];
 | 
					    initrd.availableKernelModules = [
 | 
				
			||||||
 | 
					      "ata_piix"
 | 
				
			||||||
 | 
					      "uhci_hcd"
 | 
				
			||||||
 | 
					      "virtio_pci"
 | 
				
			||||||
 | 
					      "virtio_scsi"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    kernelModules = [ "kvm-amd" ];
 | 
					    kernelModules = [ "kvm-amd" ];
 | 
				
			||||||
    kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ];
 | 
					    kernelParams = [
 | 
				
			||||||
 | 
					      "console=ttyS0"
 | 
				
			||||||
 | 
					      "console=tty1"
 | 
				
			||||||
 | 
					      "nvme.shutdown_timeout=10"
 | 
				
			||||||
 | 
					      "libiscsi.debug_libiscsi_eh=1"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    loader = {
 | 
					    loader = {
 | 
				
			||||||
      systemd-boot.enable = true;
 | 
					      systemd-boot.enable = true;
 | 
				
			||||||
      efi.canTouchEfiVariables = true;
 | 
					      efi.canTouchEfiVariables = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,9 @@
 | 
				
			|||||||
{ config, pkgs, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ./networking.nix
 | 
					    ./networking.nix
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,20 @@
 | 
				
			|||||||
{ config, lib, pkgs, modulesPath, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  modulesPath,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports = [
 | 
				
			||||||
    [
 | 
					    (modulesPath + "/profiles/qemu-guest.nix")
 | 
				
			||||||
      (modulesPath + "/profiles/qemu-guest.nix")
 | 
					  ];
 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/" =
 | 
					  fileSystems."/" = {
 | 
				
			||||||
    {
 | 
					    device = "/dev/disk/by-uuid/e87c20b9-f451-45bf-b863-385ac9c290cf ";
 | 
				
			||||||
      device = "/dev/disk/by-uuid/e87c20b9-f451-45bf-b863-385ac9c290cf ";
 | 
					    fsType = "ext4";
 | 
				
			||||||
      fsType = "ext4";
 | 
					  };
 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  swapDevices = [
 | 
					  swapDevices = [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,25 @@
 | 
				
			|||||||
{ lib, config, conf, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
    useDHCP = false;
 | 
					    useDHCP = false;
 | 
				
			||||||
    hostName = "suwako";
 | 
					    hostName = "suwako";
 | 
				
			||||||
    firewall =
 | 
					    firewall = {
 | 
				
			||||||
      {
 | 
					      interfaces = {
 | 
				
			||||||
        interfaces = {
 | 
					        enp0s6 = {
 | 
				
			||||||
          enp0s6 = {
 | 
					          allowedTCPPorts = [
 | 
				
			||||||
            allowedTCPPorts = [ 22 443 80 ];
 | 
					            22
 | 
				
			||||||
          };
 | 
					            443
 | 
				
			||||||
 | 
					            80
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
    interfaces = {
 | 
					    interfaces = {
 | 
				
			||||||
      enp0s6 = {
 | 
					      enp0s6 = {
 | 
				
			||||||
        useDHCP = true;
 | 
					        useDHCP = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,10 @@
 | 
				
			|||||||
{ config, pkgs, lib, conf, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  conf,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  domain = conf.network.addresses.domain.natto;
 | 
					  domain = conf.network.addresses.domain.natto;
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
@@ -13,4 +19,3 @@ in
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,10 @@
 | 
				
			|||||||
#Taken from https://github.com/MagicRB/dotfiles/blob/master/nix/nixos-modules/vault-agent.nix
 | 
					#Taken from https://github.com/MagicRB/dotfiles/blob/master/nix/nixos-modules/vault-agent.nix
 | 
				
			||||||
{ config, lib, pkgs, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  config,
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
with lib;
 | 
					with lib;
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  cfg = config.services.vault-agent;
 | 
					  cfg = config.services.vault-agent;
 | 
				
			||||||
@@ -59,48 +64,49 @@ in
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  config = mkIf cfg.enable
 | 
					  config = mkIf cfg.enable ({
 | 
				
			||||||
    ({
 | 
					    users = {
 | 
				
			||||||
      users = {
 | 
					      users = {
 | 
				
			||||||
        users = {
 | 
					        "${cfg.userName}" = {
 | 
				
			||||||
          "${cfg.userName}" = {
 | 
					          group = cfg.groupName;
 | 
				
			||||||
            group = cfg.groupName;
 | 
					          uid = cfg.uid;
 | 
				
			||||||
            uid = cfg.uid;
 | 
					          isSystemUser = true;
 | 
				
			||||||
            isSystemUser = true;
 | 
					          description = "Vault-Agent User";
 | 
				
			||||||
            description = "Vault-Agent User";
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
        groups = {
 | 
					 | 
				
			||||||
          "${cfg.groupName}" = {
 | 
					 | 
				
			||||||
            gid = cfg.gid;
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      systemd.tmpfiles.rules = mkIf (cfg.secretsDir != null) [
 | 
					      groups = {
 | 
				
			||||||
        "d ${cfg.secretsDir} 6755 vault-agent ${cfg.groupName} 0"
 | 
					        "${cfg.groupName}" = {
 | 
				
			||||||
      ];
 | 
					          gid = cfg.gid;
 | 
				
			||||||
      systemd.services.vault-agent = {
 | 
					        };
 | 
				
			||||||
        description = "Vault Agent";
 | 
					      };
 | 
				
			||||||
        wantedBy = [ "multi-user.target" ];
 | 
					    };
 | 
				
			||||||
        wants = [ "network-online.target" ];
 | 
					    systemd.tmpfiles.rules = mkIf (cfg.secretsDir != null) [
 | 
				
			||||||
        after = [ "network-online.target" ];
 | 
					      "d ${cfg.secretsDir} 6755 vault-agent ${cfg.groupName} 0"
 | 
				
			||||||
        path = (with pkgs; [
 | 
					    ];
 | 
				
			||||||
 | 
					    systemd.services.vault-agent = {
 | 
				
			||||||
 | 
					      description = "Vault Agent";
 | 
				
			||||||
 | 
					      wantedBy = [ "multi-user.target" ];
 | 
				
			||||||
 | 
					      wants = [ "network-online.target" ];
 | 
				
			||||||
 | 
					      after = [ "network-online.target" ];
 | 
				
			||||||
 | 
					      path = (
 | 
				
			||||||
 | 
					        with pkgs;
 | 
				
			||||||
 | 
					        [
 | 
				
			||||||
          glibc
 | 
					          glibc
 | 
				
			||||||
        ]);
 | 
					        ]
 | 
				
			||||||
        serviceConfig = {
 | 
					      );
 | 
				
			||||||
          User = cfg.userName;
 | 
					      serviceConfig = {
 | 
				
			||||||
          Group = cfg.groupName;
 | 
					        User = cfg.userName;
 | 
				
			||||||
          ExecReload = "${pkgs.busybox}/bin/kill -HUP $MAINPID";
 | 
					        Group = cfg.groupName;
 | 
				
			||||||
          ExecStart = "${cfg.package}/bin/vault agent -config=${json.generate "vault.json" cfg.settings}";
 | 
					        ExecReload = "${pkgs.busybox}/bin/kill -HUP $MAINPID";
 | 
				
			||||||
          KillMode = "process";
 | 
					        ExecStart = "${cfg.package}/bin/vault agent -config=${json.generate "vault.json" cfg.settings}";
 | 
				
			||||||
          KillSignal = "SIGINT";
 | 
					        KillMode = "process";
 | 
				
			||||||
          Restart = "on-failure";
 | 
					        KillSignal = "SIGINT";
 | 
				
			||||||
          TimeoutStopSec = "30s";
 | 
					        Restart = "on-failure";
 | 
				
			||||||
          RestartSec = 2;
 | 
					        TimeoutStopSec = "30s";
 | 
				
			||||||
          ConfigurationDirectory = "vault-agent";
 | 
					        RestartSec = 2;
 | 
				
			||||||
          ConfigurationDirectoryMode = "0600";
 | 
					        ConfigurationDirectory = "vault-agent";
 | 
				
			||||||
        };
 | 
					        ConfigurationDirectoryMode = "0600";
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    });
 | 
					    };
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,13 +4,23 @@
 | 
				
			|||||||
    extraOptions = ''
 | 
					    extraOptions = ''
 | 
				
			||||||
      builders-use-substitutes = true
 | 
					      builders-use-substitutes = true
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
    buildMachines = [{
 | 
					    buildMachines = [
 | 
				
			||||||
      hostName = "okina";
 | 
					      {
 | 
				
			||||||
      systems = [ "x86_64-linux" "aarch64-linux" ];
 | 
					        hostName = "okina";
 | 
				
			||||||
      maxJobs = 4;
 | 
					        systems = [
 | 
				
			||||||
      speedFactor = 2;
 | 
					          "x86_64-linux"
 | 
				
			||||||
      supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
 | 
					          "aarch64-linux"
 | 
				
			||||||
    }];
 | 
					        ];
 | 
				
			||||||
 | 
					        maxJobs = 4;
 | 
				
			||||||
 | 
					        speedFactor = 2;
 | 
				
			||||||
 | 
					        supportedFeatures = [
 | 
				
			||||||
 | 
					          "nixos-test"
 | 
				
			||||||
 | 
					          "benchmark"
 | 
				
			||||||
 | 
					          "big-parallel"
 | 
				
			||||||
 | 
					          "kvm"
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
    distributedBuilds = true;
 | 
					    distributedBuilds = true;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,8 @@
 | 
				
			|||||||
{ lib, stdenvNoCC, fetchFromGitHub }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  stdenvNoCC,
 | 
				
			||||||
 | 
					  fetchFromGitHub,
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
stdenvNoCC.mkDerivation {
 | 
					stdenvNoCC.mkDerivation {
 | 
				
			||||||
  name = "customscripts";
 | 
					  name = "customscripts";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
{ self, ... }: {
 | 
					{ self, ... }:
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
  flake = {
 | 
					  flake = {
 | 
				
			||||||
    overlays = rec {
 | 
					    overlays = rec {
 | 
				
			||||||
      packages = import ./packages.nix;
 | 
					      packages = import ./packages.nix;
 | 
				
			||||||
@@ -6,7 +7,9 @@
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  perSystem = { pkgs, ... }: {
 | 
					  perSystem =
 | 
				
			||||||
    packages = self.overlays.default null pkgs;
 | 
					    { pkgs, ... }:
 | 
				
			||||||
  };
 | 
					    {
 | 
				
			||||||
 | 
					      packages = self.overlays.default null pkgs;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,11 @@
 | 
				
			|||||||
{ wrapNeovimUnstable, neovimUtils, neovim-unwrapped, nvimPackage ? neovim-unwrapped, vimPlugins, ... }:
 | 
					{
 | 
				
			||||||
 | 
					  wrapNeovimUnstable,
 | 
				
			||||||
 | 
					  neovimUtils,
 | 
				
			||||||
 | 
					  neovim-unwrapped,
 | 
				
			||||||
 | 
					  nvimPackage ? neovim-unwrapped,
 | 
				
			||||||
 | 
					  vimPlugins,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  nvimConfig = neovimUtils.makeNeovimConfig {
 | 
					  nvimConfig = neovimUtils.makeNeovimConfig {
 | 
				
			||||||
    plugins = with vimPlugins; [
 | 
					    plugins = with vimPlugins; [
 | 
				
			||||||
@@ -24,8 +31,11 @@ let
 | 
				
			|||||||
    ];
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
wrapNeovimUnstable nvimPackage (nvimConfig // {
 | 
					wrapNeovimUnstable nvimPackage (
 | 
				
			||||||
  luaRcContent = ''
 | 
					  nvimConfig
 | 
				
			||||||
    ${builtins.readFile ./init.lua}
 | 
					  // {
 | 
				
			||||||
  '';
 | 
					    luaRcContent = ''
 | 
				
			||||||
})
 | 
					      ${builtins.readFile ./init.lua}
 | 
				
			||||||
 | 
					    '';
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,11 @@
 | 
				
			|||||||
{ lib, stdenvNoCC, fetchFromGitLab, python3, librsvg, xcursorgen }:
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  stdenvNoCC,
 | 
				
			||||||
 | 
					  fetchFromGitLab,
 | 
				
			||||||
 | 
					  python3,
 | 
				
			||||||
 | 
					  librsvg,
 | 
				
			||||||
 | 
					  xcursorgen,
 | 
				
			||||||
 | 
					}:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
stdenvNoCC.mkDerivation rec {
 | 
					stdenvNoCC.mkDerivation rec {
 | 
				
			||||||
  pname = "simp1e-cursors";
 | 
					  pname = "simp1e-cursors";
 | 
				
			||||||
@@ -36,4 +43,3 @@ stdenvNoCC.mkDerivation rec {
 | 
				
			|||||||
    maintainers = with maintainers; [ natto1784 ];
 | 
					    maintainers = with maintainers; [ natto1784 ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user