[Init]
This commit is contained in:
		
							
								
								
									
										27
									
								
								hosts/_/cfg.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										27
									
								
								hosts/_/cfg.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
{
 | 
			
		||||
    lib,
 | 
			
		||||
    config, 
 | 
			
		||||
    ... 
 | 
			
		||||
}:   
 | 
			
		||||
with lib;               
 | 
			
		||||
let
 | 
			
		||||
  cfg = config.hostcfg;
 | 
			
		||||
in {
 | 
			
		||||
  options.hostcfg = {
 | 
			
		||||
    hostname = mkOption {
 | 
			
		||||
      type = types.str;
 | 
			
		||||
    };
 | 
			
		||||
    wlp_if = mkOption {
 | 
			
		||||
        type = types.str;
 | 
			
		||||
    };
 | 
			
		||||
    wg_ip4 = mkOption {
 | 
			
		||||
        type = types.str;
 | 
			
		||||
    };
 | 
			
		||||
    wg_ip6 = mkOption {
 | 
			
		||||
        type = types.str;
 | 
			
		||||
    };
 | 
			
		||||
    wg_pk = mkOption {
 | 
			
		||||
        type = types.str;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										88
									
								
								hosts/_/home.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										88
									
								
								hosts/_/home.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,88 @@
 | 
			
		||||
{
 | 
			
		||||
  config, 
 | 
			
		||||
  pkgs, 
 | 
			
		||||
  ...
 | 
			
		||||
}:{
 | 
			
		||||
 | 
			
		||||
imports = [
 | 
			
		||||
  ../../colors
 | 
			
		||||
  ../../home/cli
 | 
			
		||||
  ../../home/gui
 | 
			
		||||
  ../../home/wayland/hyprland
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
  systemd.user.startServices = "sd-switch";
 | 
			
		||||
  programs.home-manager.enable = true;
 | 
			
		||||
  services.nextcloud-client.enable = true;
 | 
			
		||||
 | 
			
		||||
  xdg.userDirs.enable = true;
 | 
			
		||||
  xdg.userDirs.desktop = "${config.home.homeDirectory}/desktop";
 | 
			
		||||
  xdg.userDirs.documents = "${config.home.homeDirectory}/desktop";
 | 
			
		||||
  xdg.userDirs.download = "${config.home.homeDirectory}/downloads";
 | 
			
		||||
  xdg.userDirs.extraConfig = {
 | 
			
		||||
    XDG_MISC_DIR = "${config.home.homeDirectory}/misc";
 | 
			
		||||
  };
 | 
			
		||||
  xdg.userDirs.music = "${config.home.homeDirectory}/media/music";
 | 
			
		||||
  xdg.userDirs.pictures = "${config.home.homeDirectory}/media/photo";
 | 
			
		||||
  xdg.userDirs.publicShare = "${config.home.homeDirectory}/media/photo";
 | 
			
		||||
  xdg.userDirs.templates = "${config.home.homeDirectory}/media/template";
 | 
			
		||||
  xdg.userDirs.videos = "${config.home.homeDirectory}/media/video";
 | 
			
		||||
  xdg.userDirs.createDirectories = true;
 | 
			
		||||
 | 
			
		||||
  home = {
 | 
			
		||||
    username = "sora";
 | 
			
		||||
    homeDirectory = "/home/sora";
 | 
			
		||||
    packages = with pkgs; [
 | 
			
		||||
 | 
			
		||||
      #lang
 | 
			
		||||
      go
 | 
			
		||||
      cargo
 | 
			
		||||
      nodejs
 | 
			
		||||
      yarn
 | 
			
		||||
      python3Full
 | 
			
		||||
      pipenv
 | 
			
		||||
      tk
 | 
			
		||||
 | 
			
		||||
      #ui
 | 
			
		||||
      firefox
 | 
			
		||||
      vscodium
 | 
			
		||||
      xfce.thunar
 | 
			
		||||
      xfce.thunar-volman
 | 
			
		||||
      xfce.thunar-archive-plugin
 | 
			
		||||
      # xplorer
 | 
			
		||||
      discord
 | 
			
		||||
      telegram-desktop
 | 
			
		||||
      obs-studio
 | 
			
		||||
      pavucontrol
 | 
			
		||||
      unzip
 | 
			
		||||
      appimage-run
 | 
			
		||||
      yt-dlp
 | 
			
		||||
      keepassxc
 | 
			
		||||
      nextcloud-client
 | 
			
		||||
      jellyfin-mpv-shim
 | 
			
		||||
 | 
			
		||||
      #software
 | 
			
		||||
      krita
 | 
			
		||||
      gimp
 | 
			
		||||
      gramps
 | 
			
		||||
      custom.simc
 | 
			
		||||
 | 
			
		||||
      #games
 | 
			
		||||
      wineWowPackages.wayland
 | 
			
		||||
      gamemode
 | 
			
		||||
      gamescope
 | 
			
		||||
      mangohud
 | 
			
		||||
      prismlauncher
 | 
			
		||||
      openttd-jgrpp
 | 
			
		||||
      bottles
 | 
			
		||||
 | 
			
		||||
      #sexyterm
 | 
			
		||||
      cbonsai
 | 
			
		||||
      pipes-rs
 | 
			
		||||
      cmatrix
 | 
			
		||||
      cava
 | 
			
		||||
    ];
 | 
			
		||||
    
 | 
			
		||||
    stateVersion = "23.05";
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										157
									
								
								hosts/_/host.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										157
									
								
								hosts/_/host.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,157 @@
 | 
			
		||||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}: {
 | 
			
		||||
  imports =
 | 
			
		||||
    [ 
 | 
			
		||||
    ../../home/wayland
 | 
			
		||||
  #  ../../home/xorg
 | 
			
		||||
    ../../modules
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  time.timeZone = "Europe/Zurich";
 | 
			
		||||
 | 
			
		||||
  i18n.defaultLocale = "en_GB.UTF-8";
 | 
			
		||||
 | 
			
		||||
  i18n.extraLocaleSettings = {
 | 
			
		||||
    LC_ADDRESS = "en_GB.UTF-8";
 | 
			
		||||
    LC_IDENTIFICATION = "en_GB.UTF-8";
 | 
			
		||||
    LC_MEASUREMENT = "en_GB.UTF-8";
 | 
			
		||||
    LC_MONETARY = "en_GB.UTF-8";
 | 
			
		||||
    LC_NAME = "en_GB.UTF-8";
 | 
			
		||||
    LC_NUMERIC = "en_GB.UTF-8";
 | 
			
		||||
    LC_PAPER = "en_GB.UTF-8";
 | 
			
		||||
    LC_TELEPHONE = "en_GB.UTF-8";
 | 
			
		||||
    LC_TIME = "en_GB.UTF-8";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  services = {
 | 
			
		||||
    fstrim = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
    };
 | 
			
		||||
    xserver = {
 | 
			
		||||
     enable = true;
 | 
			
		||||
     videoDrivers = [ "amd" ];
 | 
			
		||||
     layout = "us";
 | 
			
		||||
     xkbVariant = "intl";
 | 
			
		||||
     excludePackages = [ pkgs.xterm ];
 | 
			
		||||
     exportConfiguration = true;
 | 
			
		||||
    #  libinput.touchpad.tapping = false;
 | 
			
		||||
     desktopManager.xterm.enable = false;
 | 
			
		||||
    };
 | 
			
		||||
    gvfs = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
    };
 | 
			
		||||
 };
 | 
			
		||||
 | 
			
		||||
  programs.gnupg.agent = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    enableSSHSupport = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # services.pcscd.enable = true;
 | 
			
		||||
 | 
			
		||||
  sound.enable = true;
 | 
			
		||||
  hardware.pulseaudio.enable = false;
 | 
			
		||||
  security.rtkit.enable = true;
 | 
			
		||||
  services.pipewire = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    alsa.enable = true;
 | 
			
		||||
    alsa.support32Bit = true;
 | 
			
		||||
    pulse.enable = true;
 | 
			
		||||
    wireplumber.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  hardware.bluetooth.enable = true;
 | 
			
		||||
  hardware.brillo.enable = true;
 | 
			
		||||
  services.blueman.enable = true;
 | 
			
		||||
 | 
			
		||||
  programs.steam.enable = true;
 | 
			
		||||
  programs.zsh.enable = true;
 | 
			
		||||
  programs.adb.enable = true;
 | 
			
		||||
 | 
			
		||||
  programs.ssh = {
 | 
			
		||||
    extraConfig = ''
 | 
			
		||||
      IdentityFile ${config.sops.secrets."${config.hostcfg.hostname}_ssh_priv".path}
 | 
			
		||||
    '';
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  security.polkit.enable = true;
 | 
			
		||||
  security.pam.services.swaylock = {
 | 
			
		||||
    text = ''
 | 
			
		||||
      auth include login
 | 
			
		||||
      '';
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
  hardware = {
 | 
			
		||||
    opengl = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      extraPackages = with pkgs; [];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  users = {
 | 
			
		||||
    defaultUserShell = pkgs.zsh;
 | 
			
		||||
    users.sora = {
 | 
			
		||||
      isNormalUser = true;
 | 
			
		||||
      description = "sora";
 | 
			
		||||
      extraGroups = [ "networkmanager" "wheel" "vboxsf" "adbusers" "lp" "audio" "video"];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  environment.systemPackages = with pkgs; [
 | 
			
		||||
    wget
 | 
			
		||||
    dconf
 | 
			
		||||
    gvfs
 | 
			
		||||
    sops
 | 
			
		||||
 | 
			
		||||
    polkit_gnome
 | 
			
		||||
    nfs-utils
 | 
			
		||||
    bluez
 | 
			
		||||
    bluez-tools
 | 
			
		||||
    easyeffects
 | 
			
		||||
    
 | 
			
		||||
    jre8
 | 
			
		||||
    jdk8
 | 
			
		||||
    jdk
 | 
			
		||||
 ];
 | 
			
		||||
 | 
			
		||||
  nix = {
 | 
			
		||||
    package = pkgs.nixFlakes;
 | 
			
		||||
    extraOptions = ''
 | 
			
		||||
      experimental-features = nix-command flakes
 | 
			
		||||
      warn-dirty = false
 | 
			
		||||
      ''; 
 | 
			
		||||
    gc = {
 | 
			
		||||
      automatic = true;
 | 
			
		||||
      dates = "weekly";
 | 
			
		||||
      options = "--delete-older-than 7d";
 | 
			
		||||
    };
 | 
			
		||||
    settings = {
 | 
			
		||||
      auto-optimise-store = true;
 | 
			
		||||
      builders-use-substitutes = true;
 | 
			
		||||
      substituters = [
 | 
			
		||||
        "https://hyprland.cachix.org"
 | 
			
		||||
        "https://cache.nixos.org"
 | 
			
		||||
      ];
 | 
			
		||||
      trusted-public-keys = [
 | 
			
		||||
        "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
 | 
			
		||||
        "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
      
 | 
			
		||||
  nixpkgs.config = {
 | 
			
		||||
    permittedInsecurePackages = [];
 | 
			
		||||
    allowUnfree = true;
 | 
			
		||||
    packageOverrides = pkgs: {
 | 
			
		||||
      custom = import ../../pkgs { inherit pkgs; };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  nixpkgs.overlays = import ../../pkgs/overlay.nix { inherit pkgs; };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
system.stateVersion = "unstable";
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										112
									
								
								hosts/asgard/default.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										112
									
								
								hosts/asgard/default.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,112 @@
 | 
			
		||||
 | 
			
		||||
{ config, pkgs, ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  imports = [];
 | 
			
		||||
 | 
			
		||||
  users.users.sora = {
 | 
			
		||||
    home = "/Users/sora";
 | 
			
		||||
    shell = pkgs.zsh;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  networking = {
 | 
			
		||||
    computerName = "asgard";
 | 
			
		||||
    hostName = "asgard";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  fonts = { 
 | 
			
		||||
    fontDir.enable = true;
 | 
			
		||||
    fonts = with pkgs; [
 | 
			
		||||
      ibm-plex
 | 
			
		||||
      openmoji-color
 | 
			
		||||
      material-design-icons
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  environment = {
 | 
			
		||||
    shells = with pkgs; [ zsh ];
 | 
			
		||||
    variables = {
 | 
			
		||||
      EDITOR = "nvim";
 | 
			
		||||
      VISUAL = "vscodium";
 | 
			
		||||
    };
 | 
			
		||||
    systemPackages = with pkgs; [
 | 
			
		||||
      git
 | 
			
		||||
      ranger
 | 
			
		||||
 | 
			
		||||
      fd
 | 
			
		||||
      ripgrep
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  programs = {
 | 
			
		||||
    zsh.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  services = {
 | 
			
		||||
    nix-daemon.enable = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  homebrew = { 
 | 
			
		||||
    enable = true;
 | 
			
		||||
    onActivation = {
 | 
			
		||||
      autoUpdate = false;
 | 
			
		||||
      upgrade = false;
 | 
			
		||||
      cleanup = "zap";
 | 
			
		||||
    };
 | 
			
		||||
    brews = [
 | 
			
		||||
      "wireguard-tools"
 | 
			
		||||
    ];
 | 
			
		||||
    casks = [
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    nix = {
 | 
			
		||||
        package = pkgs.nix;
 | 
			
		||||
        extraOptions = ''
 | 
			
		||||
            experimental-features = nix-command flakes
 | 
			
		||||
            warn-dirty = false
 | 
			
		||||
            ''; 
 | 
			
		||||
        gc = {
 | 
			
		||||
            automatic = true;
 | 
			
		||||
            dates = "weekly";
 | 
			
		||||
            options = "--delete-older-than 7d";
 | 
			
		||||
        };
 | 
			
		||||
        settings = {
 | 
			
		||||
            auto-optimise-store = true;
 | 
			
		||||
            builders-use-substitutes = true;
 | 
			
		||||
            substituters = [
 | 
			
		||||
                "https://cache.nixos.org"
 | 
			
		||||
            ];
 | 
			
		||||
            trusted-public-keys = [
 | 
			
		||||
                "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
 | 
			
		||||
            ];
 | 
			
		||||
        };
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    system = {
 | 
			
		||||
        defaults = {
 | 
			
		||||
            NSGlobalDomain = {
 | 
			
		||||
                KeyRepeat = 1;
 | 
			
		||||
                NSAutomaticCapitalizationEnabled = false;
 | 
			
		||||
                NSAutomaticSpellingCorrectionEnabled = false;
 | 
			
		||||
            };
 | 
			
		||||
            dock = { 
 | 
			
		||||
                autohide = true;
 | 
			
		||||
                orientation = "bottom";
 | 
			
		||||
                showhidden = true;
 | 
			
		||||
                tilesize = 40;
 | 
			
		||||
            };
 | 
			
		||||
            finder = { 
 | 
			
		||||
                QuitMenuItem = false; 
 | 
			
		||||
            };  
 | 
			
		||||
            trackpad = { 
 | 
			
		||||
                Clicking = true;
 | 
			
		||||
                TrackpadRightClick = true;
 | 
			
		||||
            };
 | 
			
		||||
        };
 | 
			
		||||
        activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh''; 
 | 
			
		||||
        stateVersion = 4;
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										14
									
								
								hosts/asgard/home.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								hosts/asgard/home.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
{ pkgs, ... }:
 | 
			
		||||
{
 | 
			
		||||
    home = { 
 | 
			
		||||
        packages = with pkgs; [];
 | 
			
		||||
        stateVersion = "22.05";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    programs = {
 | 
			
		||||
        zsh = {
 | 
			
		||||
            enable = true;
 | 
			
		||||
            # FIND SETTINGS FROM /home/cli/zsh
 | 
			
		||||
        };
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										32
									
								
								hosts/iriy/default.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										32
									
								
								hosts/iriy/default.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
{ 
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}: {
 | 
			
		||||
  imports =
 | 
			
		||||
    [ 
 | 
			
		||||
    ../_/cfg.nix
 | 
			
		||||
    ./hardware-configuration.nix
 | 
			
		||||
    ../_/host.nix
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  boot.loader = {
 | 
			
		||||
    systemd-boot = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      configurationLimit = 8;
 | 
			
		||||
    };
 | 
			
		||||
    efi = {
 | 
			
		||||
      canTouchEfiVariables = true;
 | 
			
		||||
      efiSysMountPoint = "/boot/efi";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  hostcfg = {
 | 
			
		||||
    hostname = "iriy";
 | 
			
		||||
    wlp_if = "wlp9s0";
 | 
			
		||||
    wg_ip4 = "10.10.1.7/24";
 | 
			
		||||
    wg_ip6 = "fd10:10:10::7/128";
 | 
			
		||||
    wg_pk = config.sops.secrets.iriy_wg_priv.path;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										37
									
								
								hosts/iriy/hardware-configuration.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										37
									
								
								hosts/iriy/hardware-configuration.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
# Do not modify this file!  It was generated by ‘nixos-generate-config’
 | 
			
		||||
# and may be overwritten by future invocations.  Please make changes
 | 
			
		||||
# to /etc/nixos/configuration.nix instead.
 | 
			
		||||
{ config, lib, pkgs, modulesPath, ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  imports = [
 | 
			
		||||
    (modulesPath + "/installer/scan/not-detected.nix")
 | 
			
		||||
   ];
 | 
			
		||||
 | 
			
		||||
  boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
 | 
			
		||||
  boot.initrd.kernelModules = [ ];
 | 
			
		||||
  boot.kernelModules = [ "v4l2loopback" "kvm-amd" ];
 | 
			
		||||
  boot.kernelPackages = pkgs.linuxPackages_latest;
 | 
			
		||||
  boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
 | 
			
		||||
  
 | 
			
		||||
  virtualisation.libvirtd.enable = true;
 | 
			
		||||
 | 
			
		||||
  fileSystems."/" =
 | 
			
		||||
    { device = "/dev/disk/by-uuid/f612abce-6f3f-439a-8585-6a050e18b7fc";
 | 
			
		||||
      fsType = "ext4";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  fileSystems."/boot/efi" =
 | 
			
		||||
    { device = "/dev/disk/by-uuid/349E-5086";
 | 
			
		||||
      fsType = "vfat";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  swapDevices =
 | 
			
		||||
    [ { 
 | 
			
		||||
      device = "/dev/disk/by-uuid/42394c4d-2c81-4917-82ff-75a548715a7d";
 | 
			
		||||
    }];
 | 
			
		||||
 | 
			
		||||
  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
 | 
			
		||||
  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
 | 
			
		||||
  hardware.opengl.driSupport32Bit = true;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										9
									
								
								hosts/iriy/home.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								hosts/iriy/home.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
{config, pkgs, ...}:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
imports = [
 | 
			
		||||
  ../_/home.nix
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										33
									
								
								hosts/valinor/default.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								hosts/valinor/default.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
{ 
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}: {
 | 
			
		||||
  imports =
 | 
			
		||||
    [ 
 | 
			
		||||
    ../_/cfg.nix
 | 
			
		||||
    ./hardware-configuration.nix
 | 
			
		||||
    ../_/host.nix
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  boot.loader = {
 | 
			
		||||
    systemd-boot = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      configurationLimit = 8;
 | 
			
		||||
    };
 | 
			
		||||
    efi = {
 | 
			
		||||
      canTouchEfiVariables = true;
 | 
			
		||||
      efiSysMountPoint = "/boot/efi";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  hostcfg = {
 | 
			
		||||
    hostname = "valinor";
 | 
			
		||||
    wlp_if = "wlp3s0";
 | 
			
		||||
    wg_ip4 = "10.10.1.5/24";
 | 
			
		||||
    wg_ip6 = "fd10:10:10::5/128";
 | 
			
		||||
    wg_pk = config.sops.secrets.valinor_wg_priv.path;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										45
									
								
								hosts/valinor/hardware-configuration.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										45
									
								
								hosts/valinor/hardware-configuration.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
# Do not modify this file!  It was generated by ‘nixos-generate-config’
 | 
			
		||||
# and may be overwritten by future invocations.  Please make changes
 | 
			
		||||
# to /etc/nixos/configuration.nix instead.
 | 
			
		||||
{ config, lib, pkgs, modulesPath, ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  imports = [
 | 
			
		||||
    (modulesPath + "/installer/scan/not-detected.nix")
 | 
			
		||||
   ];
 | 
			
		||||
 | 
			
		||||
  boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
 | 
			
		||||
  boot.initrd.kernelModules = [ ];
 | 
			
		||||
  boot.kernelModules = [ "v4l2loopback" "kvm-amd" ];
 | 
			
		||||
  boot.kernelPackages = pkgs.linuxPackages_latest;
 | 
			
		||||
  boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
 | 
			
		||||
  
 | 
			
		||||
  virtualisation.libvirtd.enable = true;
 | 
			
		||||
 | 
			
		||||
  fileSystems."/" =
 | 
			
		||||
    { device = "/dev/disk/by-uuid/e9713f83-ee3a-4fb1-806f-594c3bab7006";
 | 
			
		||||
      fsType = "ext4";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  fileSystems."/boot/efi" =
 | 
			
		||||
    { device = "/dev/disk/by-uuid/F344-72E2";
 | 
			
		||||
      fsType = "vfat";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
  swapDevices =
 | 
			
		||||
    [ { device = "/dev/disk/by-uuid/8bbeae2f-9431-4849-9b42-9f2655da596e"; }
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
 | 
			
		||||
  # (the default) this is the recommended approach. When using systemd-networkd it's
 | 
			
		||||
  # still possible to use this option, but it's recommended to use it in conjunction
 | 
			
		||||
  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
 | 
			
		||||
  networking.useDHCP = lib.mkDefault true;
 | 
			
		||||
  # networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
 | 
			
		||||
  # networking.interfaces.enp6s0f3u1u3i5.useDHCP = lib.mkDefault true;
 | 
			
		||||
  # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
 | 
			
		||||
 | 
			
		||||
  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
 | 
			
		||||
  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
 | 
			
		||||
  hardware.opengl.driSupport32Bit = true;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										41
									
								
								hosts/valinor/home.nix
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										41
									
								
								hosts/valinor/home.nix
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
{config, pkgs, ...}:
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  imports = [
 | 
			
		||||
    ../_/home.nix
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  services.kanshi = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    systemdTarget = "graphical-session.target";
 | 
			
		||||
    profiles = {
 | 
			
		||||
      default = {
 | 
			
		||||
        outputs = [
 | 
			
		||||
          {
 | 
			
		||||
            criteria = "eDP-1";
 | 
			
		||||
            mode = "1920x1080@60.020";
 | 
			
		||||
            position = "0,0";
 | 
			
		||||
            status = "enable";
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
      d0 = {
 | 
			
		||||
        outputs = [
 | 
			
		||||
          {
 | 
			
		||||
            criteria = "CEX CX133 0x00000001";
 | 
			
		||||
            mode = "2560x1600@59.972";
 | 
			
		||||
            position = "0,0";
 | 
			
		||||
            status = "enable";
 | 
			
		||||
          }
 | 
			
		||||
          {
 | 
			
		||||
            criteria = "eDP-1";
 | 
			
		||||
            mode = "1920x1080@60.020";
 | 
			
		||||
            position = "2560,0";
 | 
			
		||||
            status = "enable";
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user