mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
clean up host settings
and start removing if statements
This commit is contained in:
parent
3c51dd0db6
commit
d013f980a7
@ -7,7 +7,6 @@ with inputs;
|
||||
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { };
|
||||
modules = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/common
|
||||
@ -18,24 +17,26 @@ nixpkgs.lib.nixosSystem {
|
||||
{
|
||||
physical = true;
|
||||
networking.hostName = "tempest";
|
||||
nixpkgs.overlays = [ nur.overlay ] ++ overlays;
|
||||
# Set registry to flake packages, used for nix X commands
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||
gui.enable = true;
|
||||
nixpkgs.overlays = [ nur.overlay ] ++ overlays;
|
||||
passwordHash = nixpkgs.lib.fileContents ../../password.sha512;
|
||||
|
||||
# Must be prepared ahead
|
||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||
|
||||
# Theming
|
||||
theme = {
|
||||
colors = (import ../../colorscheme/gruvbox).dark;
|
||||
dark = true;
|
||||
};
|
||||
wallpaper = "${wallpapers}/gruvbox/road.jpg";
|
||||
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||
passwordHash = nixpkgs.lib.fileContents ../../password.sha512;
|
||||
wsl.enable = false;
|
||||
publicKey = null;
|
||||
|
||||
# Programs and services
|
||||
charm.enable = true;
|
||||
neovim.enable = true;
|
||||
media.enable = true;
|
||||
dotfiles.enable = true;
|
||||
firefox.enable = true;
|
||||
kitty.enable = true;
|
||||
_1password.enable = true;
|
||||
@ -46,11 +47,9 @@ nixpkgs.lib.nixosSystem {
|
||||
mail.aerc.enable = true;
|
||||
mail.himalaya.enable = true;
|
||||
keybase.enable = true;
|
||||
# mullvad.enable = true;
|
||||
mullvad.enable = false;
|
||||
nixlang.enable = true;
|
||||
dotfiles.enable = true;
|
||||
yt-dlp.enable = true;
|
||||
|
||||
gaming = {
|
||||
enable = true;
|
||||
steam.enable = true;
|
||||
|
@ -32,7 +32,7 @@
|
||||
frequency = "*:0/5";
|
||||
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
||||
};
|
||||
services.imapnotify.enable = pkgs.stdenv.isLinux && config.physical;
|
||||
services.imapnotify.enable = pkgs.stdenv.isLinux;
|
||||
programs.notmuch.enable = true;
|
||||
accounts.email = {
|
||||
maildirBasePath = "${config.homePath}/mail";
|
||||
|
@ -67,6 +67,12 @@
|
||||
# Set channel to flake packages, used for nix-shell commands
|
||||
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
||||
|
||||
# Set registry to this flake's packages, used for nix X commands
|
||||
registry.nixpkgs.to = {
|
||||
type = "path";
|
||||
path = pkgs.path;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
boot.loader = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
||||
boot.loader = lib.mkIf config.physical {
|
||||
grub = {
|
||||
enable = true;
|
||||
|
||||
@ -40,8 +40,7 @@
|
||||
};
|
||||
|
||||
# Allow reading from Windows drives
|
||||
boot.supportedFilesystems =
|
||||
lib.mkIf (config.physical && pkgs.stdenv.isLinux) [ "ntfs" ];
|
||||
boot.supportedFilesystems = lib.mkIf config.physical [ "ntfs" ];
|
||||
|
||||
# Use latest released Linux kernel by default
|
||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
config =
|
||||
lib.mkIf (config.gui.enable && config.physical && pkgs.stdenv.isLinux) {
|
||||
config = lib.mkIf config.gui.enable {
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
config =
|
||||
lib.mkIf (config.gui.enable && config.physical && pkgs.stdenv.isLinux) {
|
||||
config = lib.mkIf config.gui.enable {
|
||||
|
||||
# Mouse customization
|
||||
services.ratbagd.enable = true;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{ config, lib, ... }: {
|
||||
|
||||
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
||||
config = lib.mkIf config.physical {
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{ config, lib, ... }: {
|
||||
|
||||
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
||||
config = lib.mkIf config.physical {
|
||||
|
||||
# Prevent wake from keyboard
|
||||
powerManagement.powerDownCommands = ''
|
||||
|
@ -1,9 +1,10 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options = {
|
||||
publicKey = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Public SSH key authorized for this system.";
|
||||
default = null;
|
||||
};
|
||||
permitRootLogin = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
@ -12,8 +13,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf
|
||||
(pkgs.stdenv.isLinux && !config.wsl.enable && config.publicKey != null) {
|
||||
config = lib.mkIf (!config.wsl.enable && config.publicKey != null) {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 22 ];
|
||||
|
Loading…
Reference in New Issue
Block a user