add core configuration
This commit is contained in:
parent
ad124505da
commit
c556ce55b6
94 changed files with 2816 additions and 959 deletions
47
modules/common/common.nix
Normal file
47
modules/common/common.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.lily.common;
|
||||
in {
|
||||
options.lily.common.enable = lib.mkEnableOption "activate common";
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
neovim
|
||||
toybox
|
||||
util-linux
|
||||
tmux
|
||||
ghostty
|
||||
|
||||
# encryption and filesystem
|
||||
cryptsetup
|
||||
age
|
||||
|
||||
# network tools
|
||||
wget
|
||||
curl
|
||||
# FS-tools
|
||||
unzip
|
||||
gnutar
|
||||
xz
|
||||
bzip2
|
||||
p7zip
|
||||
|
||||
netcat-gnu
|
||||
dnsutils
|
||||
fd
|
||||
file
|
||||
tree
|
||||
];
|
||||
environment.shells = with pkgs; [zsh];
|
||||
};
|
||||
}
|
17
modules/common/default.nix
Normal file
17
modules/common/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{lib, ...}: let
|
||||
# recursively construct attr-set of a directory
|
||||
getDir = dir:
|
||||
lib.mapAttrs (file: type:
|
||||
if type == "directory"
|
||||
then getDir "${dir}/${file}"
|
||||
else type) (
|
||||
builtins.readDir dir
|
||||
);
|
||||
files = dir: lib.collect lib.isString (lib.mapAttrsRecursive (path: type: lib.concatStringsSep "/" path) (getDir dir));
|
||||
validFiles = dir:
|
||||
map (file: ./. + "/${file}") (
|
||||
lib.filter (file: lib.hasSuffix ".nix" file && file != "default.nix") (files dir)
|
||||
);
|
||||
in {
|
||||
imports = validFiles ./.;
|
||||
}
|
82
modules/common/desktop.nix
Normal file
82
modules/common/desktop.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
flake-self,
|
||||
...
|
||||
}: let
|
||||
cfg = config.lily.desktop;
|
||||
in {
|
||||
options.lily.desktop = {
|
||||
enable = lib.mkEnableOption "activate desktop";
|
||||
plasma.enable = lib.mkEnableOption "activate plasma desktop environment";
|
||||
hyprland.enable = lib.mkEnableOption "activate hyprland desktop";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
lily = {
|
||||
plasma.enable = cfg.plasma.enable;
|
||||
hyprland.enable = cfg.hyprland.enable;
|
||||
};
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
vulkan-tools
|
||||
jq
|
||||
libqalculate
|
||||
envsubst
|
||||
glib
|
||||
headsetcontrol
|
||||
];
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
jetbrains-mono
|
||||
noto-fonts-color-emoji
|
||||
garamond-libre
|
||||
helvetica-neue-lt-std
|
||||
# nerd-fonts.jetbrains-mono
|
||||
];
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
monospace = ["JetBrainsMono Bold"];
|
||||
serif = ["Garamond Libre"];
|
||||
sansSerif = ["Helvetica Neue LT Std"];
|
||||
emoji = ["Noto Color Emoji"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
audio.enable = true;
|
||||
wireplumber.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# services.printing.enable = true;
|
||||
# services.flatpak.enable = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
services.udev.packages = [pkgs.headsetcontrol];
|
||||
# environment.sessionVariables = {
|
||||
# MOZ_DISABLE_RDD_SANDBOX = "1";
|
||||
# };
|
||||
};
|
||||
}
|
18
modules/common/locale.nix
Normal file
18
modules/common/locale.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{...}: {
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
time.timeZone = "America/Detroit";
|
||||
}
|
49
modules/common/nixcommon.nix
Normal file
49
modules/common/nixcommon.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||
package = pkgs.nixVersions.stable;
|
||||
optimise.automatic = true;
|
||||
gc = {
|
||||
persistent = true;
|
||||
automatic = true;
|
||||
};
|
||||
extraOptions = ''
|
||||
# If set to true, Nix will fall back to building from source if a binary substitute fails.
|
||||
fallback = true
|
||||
# the timeout (in seconds) for establishing connections in the binary cache substituter.
|
||||
connect-timeout = 10
|
||||
# these log lines are only shown on a failed build
|
||||
log-lines = 25
|
||||
'';
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
|
||||
trusted-users = ["root" "@wheel"];
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
};
|
||||
# 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 = "24.11";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue