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: {
|
outputs = {self,nixpkgs,home-manager,plasma-manager,...}@inputs: {
|
||||||
nixosConfigurations = builtins.listToAttrs (map (name: {
|
nixosConfigurations = builtins.listToAttrs (map (name: {
|
||||||
name = name;
|
inherit name;
|
||||||
value = nixpkgs.lib.nixosSystem {
|
value = nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/${name}
|
./hosts/${name}
|
||||||
@@ -47,14 +47,17 @@
|
|||||||
users.grey = ./hosts/${name}/home.nix;
|
users.grey = ./hosts/${name}/home.nix;
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
hostname = name;
|
||||||
|
stateVersion = "26.05";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit name;
|
hostname = name;
|
||||||
system = "x86-64-linux";
|
system = "x86-64-linux";
|
||||||
|
stateVersion = "26.05";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}) ["takamaki" "kitagawa" "nixos-vm"]);
|
}) ["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,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let name = "nixos-vm"; in {
|
}: let
|
||||||
|
modules-dir = ../../modules;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
../../global-default.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../flakes/nh.nix
|
"${modules-dir}/nh.nix"
|
||||||
../../flakes/plasma-desktop.nix
|
"${modules-dir}/plasma-desktop.nix"
|
||||||
../../flakes/home-manager.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.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# 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.enable = true;
|
||||||
virtualisation.virtualbox.guest.dragAndDrop = 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;
|
programs.zsh.enable = true;
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
users.users."grey".shell = pkgs.zsh;
|
users.users."grey".shell = pkgs.zsh;
|
||||||
@@ -104,12 +47,4 @@
|
|||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# 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,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
global-configs-dir = ../../global-configs;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./configs/plasma.nix
|
../../global-home.nix
|
||||||
./configs/fastfetch.nix
|
"${global-configs-dir}/plasma.nix"
|
||||||
./configs/zen-browser.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; [
|
home.packages = with pkgs; [
|
||||||
pkgs.steam
|
pkgs.steam
|
||||||
pkgs.equibop
|
pkgs.equibop
|
||||||
@@ -35,40 +33,6 @@
|
|||||||
pkgs.lact
|
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;
|
home.shell.enableZshIntegration = true;
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
@@ -100,6 +64,7 @@
|
|||||||
confirm_os_window_close = -1;
|
confirm_os_window_close = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
shellIntegration.enableBashIntegration = true;
|
||||||
shellIntegration.enableZshIntegration = true;
|
shellIntegration.enableZshIntegration = true;
|
||||||
themeFile = "Arthur";
|
themeFile = "Arthur";
|
||||||
};
|
};
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user