Merge pull request 'Add global config' (#1) from add-global-config into main
Reviewed-on: greyweather/nixos#1
This commit is contained in:
11 files changed
+250
-117
No files matched your search
@@ -36,7 +36,7 @@
|
||||
|
||||
outputs = {self,nixpkgs,home-manager,plasma-manager,...}@inputs: {
|
||||
nixosConfigurations = builtins.listToAttrs (map (name: {
|
||||
name = name;
|
||||
inherit name;
|
||||
value = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
./hosts/${name}
|
||||
@@ -47,14 +47,17 @@
|
||||
users.grey = ./hosts/${name}/home.nix;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
hostname = name;
|
||||
stateVersion = "26.05";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit name;
|
||||
hostname = name;
|
||||
system = "x86-64-linux";
|
||||
stateVersion = "26.05";
|
||||
};
|
||||
};
|
||||
}) ["takamaki" "kitagawa" "nixos-vm"]);
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,105 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
firefox-addons = with pkgs; inputs.firefox-addons.packages.${system};
|
||||
in {
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
setAsDefaultBrowser = true;
|
||||
nativeMessagingHosts = [
|
||||
pkgs.firefoxpwa
|
||||
];
|
||||
policies = {
|
||||
AutofillAddressEnabled = false;
|
||||
AutofillCreditCardEnabled = false;
|
||||
DisableAppUpdate = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
NoDefaultBookmarks = true;
|
||||
OfferToSaveLogins = false;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
Preferences = {
|
||||
"browser.startup.homepage" = {
|
||||
Value = "about:blank";
|
||||
Status = "locked";
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles.default = {
|
||||
settings = {
|
||||
"zen.urlbar.behavior" = "float";
|
||||
"zen.welcome-screen.seen" = true;
|
||||
};
|
||||
extensions.packages = with firefox-addons; [
|
||||
adnauseam
|
||||
bitwarden
|
||||
indie-wiki-buddy
|
||||
pwas-for-firefox
|
||||
];
|
||||
search = {
|
||||
force = true;
|
||||
default = "ddg";
|
||||
engines = {
|
||||
nixpkgs = {
|
||||
name = "nixpkgs packages";
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages?query={searchTerms}";
|
||||
}
|
||||
];
|
||||
icon = "https://wiki.nixos.org/favicon.ico";
|
||||
definedAliases = ["@np"];
|
||||
};
|
||||
nixos-options = {
|
||||
name = "NixOS options";
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/options?query={searchTerms}";
|
||||
}
|
||||
];
|
||||
icon = "https://wiki.nixos.org/favicon.ico";
|
||||
definedAliases = ["@no"];
|
||||
};
|
||||
nixos-wiki = {
|
||||
name = "NixOS Wiki";
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
icon = "https://wiki.nixos.org/favicon.ico";
|
||||
definedAliases = ["@nw"];
|
||||
};
|
||||
};
|
||||
};
|
||||
keyboardShortcuts = [
|
||||
{
|
||||
id = "key_close";
|
||||
key = "q";
|
||||
modifiers = {
|
||||
control = false;
|
||||
alt = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
id = "key_newNavigatorTab";
|
||||
keycode = "VK_RETURN";
|
||||
modifiers = {
|
||||
control = false;
|
||||
alt = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
keyboardShortcutsVersion = 19;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
specialArgs,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = specialArgs.hostname; # Define your hostname.
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
# Select internationalisation properties.
|
||||
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";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "gb";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "uk";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users."grey" = {
|
||||
isNormalUser = true;
|
||||
description = "grey";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
pkgs.pipewire
|
||||
pkgs.git
|
||||
pkgs.fzf
|
||||
pkgs.jq
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = specialArgs.stateVersion; # Did you read the comment?
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
specialArgs,
|
||||
...
|
||||
}: {
|
||||
home.stateVersion = specialArgs.stateVersion;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
settings = {
|
||||
user.name = "Grey Jones";
|
||||
user.email = "grey@greyweather.dev";
|
||||
};
|
||||
|
||||
signing = {
|
||||
format = "openpgp";
|
||||
key = "CC7388DF8E1890729921BCFF7C67C51C2FF524D9";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
settings = {
|
||||
"git.greyweather.dev" = {
|
||||
HostName = "git.greyweather.dev";
|
||||
Port = "222";
|
||||
User = "git";
|
||||
IdentityFile = "~/.ssh/id_gitea";
|
||||
};
|
||||
"github.com" = {
|
||||
HostName = "github.com";
|
||||
Port = 22;
|
||||
User = "git";
|
||||
IdentityFile = "~/.ssh/id_github";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.shell.enableBashIntegration = true;
|
||||
}
|
||||
@@ -6,83 +6,26 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let name = "nixos-vm"; in {
|
||||
}: let
|
||||
modules-dir = ../../modules;
|
||||
in {
|
||||
imports = [
|
||||
../../global-default.nix
|
||||
./hardware-configuration.nix
|
||||
../../flakes/nh.nix
|
||||
../../flakes/plasma-desktop.nix
|
||||
../../flakes/home-manager.nix
|
||||
"${modules-dir}/nh.nix"
|
||||
"${modules-dir}/plasma-desktop.nix"
|
||||
"${modules-dir}/home-manager.nix"
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = name; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
# Select internationalisation properties.
|
||||
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";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "gb";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "uk";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users."grey" = {
|
||||
isNormalUser = true;
|
||||
description = "grey";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
virtualisation.virtualbox.guest.enable = true;
|
||||
virtualisation.virtualbox.guest.dragAndDrop = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
pkgs.pipewire
|
||||
pkgs.git
|
||||
pkgs.fzf
|
||||
pkgs.jq
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
users.users."grey".shell = pkgs.zsh;
|
||||
@@ -104,12 +47,4 @@
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "26.05"; # Did you read the comment?
|
||||
}
|
||||
+8
-43
@@ -4,18 +4,16 @@
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
global-configs-dir = ../../global-configs;
|
||||
in {
|
||||
imports = [
|
||||
./configs/plasma.nix
|
||||
./configs/fastfetch.nix
|
||||
./configs/zen-browser.nix
|
||||
../../global-home.nix
|
||||
"${global-configs-dir}/plasma.nix"
|
||||
"${global-configs-dir}/fastfetch.nix"
|
||||
"${global-configs-dir}/zen-browser.nix"
|
||||
];
|
||||
|
||||
home.username = "grey";
|
||||
home.homeDirectory = "/home/grey";
|
||||
|
||||
home.stateVersion = "26.05";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pkgs.steam
|
||||
pkgs.equibop
|
||||
@@ -35,40 +33,6 @@
|
||||
pkgs.lact
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
settings = {
|
||||
user.name = "Grey Jones";
|
||||
user.email = "grey@greyweather.dev";
|
||||
};
|
||||
|
||||
signing = {
|
||||
format = "openpgp";
|
||||
key = "CC7388DF8E1890729921BCFF7C67C51C2FF524D9";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
settings = {
|
||||
"git.greyweather.dev" = {
|
||||
HostName = "git.greyweather.dev";
|
||||
Port = "222";
|
||||
User = "git";
|
||||
IdentityFile = "~/.ssh/id_gitea";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.shell.enableZshIntegration = true;
|
||||
|
||||
programs.zsh = {
|
||||
@@ -100,6 +64,7 @@
|
||||
confirm_os_window_close = -1;
|
||||
};
|
||||
|
||||
shellIntegration.enableBashIntegration = true;
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
themeFile = "Arthur";
|
||||
};
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user