mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-05-18 18:36:05 -07:00
refactor kestrel
This commit is contained in:
parent
aa0790da22
commit
7aff57181a
@ -40,11 +40,6 @@
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
hardware.pulseaudio.support32Bit = true;
|
||||
|
||||
# Add fonts
|
||||
fonts.fonts = with pkgs; [
|
||||
nerdfonts
|
||||
@ -54,62 +49,18 @@
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
|
||||
# Enable zsh
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# Define user account.
|
||||
users.users.${user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "docker" "libvirtd" ]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
shell = pkgs.bash;
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
git
|
||||
killall
|
||||
pciutils
|
||||
syncthing
|
||||
pinentry-curses
|
||||
trash-cli
|
||||
unzip
|
||||
nnn
|
||||
advcpmv
|
||||
];
|
||||
|
||||
# Enable user services
|
||||
services = {
|
||||
gvfs.enable = true; # USB automount
|
||||
blueman.enable = true;
|
||||
printing.enable = true;
|
||||
printing.drivers = [ pkgs.hplip ];
|
||||
avahi.enable = true;
|
||||
avahi.nssmdns = true;
|
||||
syncthing = {
|
||||
enable = true;
|
||||
user = "${user}";
|
||||
dataDir = "/home/${user}/sync";
|
||||
configDir = "/home/${user}/.config/syncthing";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "curses";
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# Enable modules
|
||||
imports = [ ../../modules ];
|
||||
modules = {
|
||||
services = {
|
||||
samba-client.enable = true;
|
||||
virt-manager.enable = true;
|
||||
desktop = {
|
||||
sway.enable = true;
|
||||
};
|
||||
devel = {
|
||||
tooling.enable = true;
|
||||
@ -119,10 +70,17 @@
|
||||
gaming = {
|
||||
steam.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
sway.enable = true;
|
||||
services = {
|
||||
samba-client.enable = true;
|
||||
virt-manager.enable = true;
|
||||
syncthing.enable = true;
|
||||
peripherals.enable = true;
|
||||
};
|
||||
system = {
|
||||
terminal.enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
# Did you read the comment?
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ ./desktop ./gaming ./devel ./services ];
|
||||
imports = [ ./desktop ./gaming ./devel ./services ./system ];
|
||||
}
|
||||
|
@ -7,20 +7,15 @@ let
|
||||
in {
|
||||
options.modules.devel.tooling.enable = lib.mkEnableOption "tooling";
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Install packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
ripgrep
|
||||
tmux
|
||||
tmuxp
|
||||
lazygit
|
||||
git-annex
|
||||
cmake
|
||||
gcc
|
||||
coreutils
|
||||
gnumake
|
||||
# TODO: Move somewhere else
|
||||
pandoc
|
||||
gollum
|
||||
cmake
|
||||
coreutils
|
||||
gcc
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ ./samba-server.nix ./samba-client.nix ./jellyfin.nix ./virt-manager.nix ];
|
||||
imports = [ ./syncthing.nix ./samba-server.nix ./samba-client.nix ./jellyfin.nix ./virt-manager.nix ./peripherals.nix ];
|
||||
}
|
||||
|
21
provision/nixos/modules/services/peripherals.nix
Normal file
21
provision/nixos/modules/services/peripherals.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.services.peripherals;
|
||||
in {
|
||||
options.modules.services.peripherals.enable = lib.mkEnableOption "peripherals";
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
hardware.pulseaudio.support32Bit = true;
|
||||
|
||||
services = {
|
||||
gvfs.enable = true;
|
||||
blueman.enable = true;
|
||||
printing.enable = true;
|
||||
printing.drivers = [ pkgs.hplip ];
|
||||
avahi.enable = true;
|
||||
avahi.nssmdns = true;
|
||||
};
|
||||
};
|
||||
}
|
15
provision/nixos/modules/services/syncthing.nix
Normal file
15
provision/nixos/modules/services/syncthing.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.services.syncthing;
|
||||
in {
|
||||
options.modules.services.syncthing.enable = lib.mkEnableOption "syncthing";
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Install packages
|
||||
environment.systemPackages = with pkgs; [ syncthing ];
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "${user}";
|
||||
configDir = "/home/${user}/.config/syncthing";
|
||||
};
|
||||
};
|
||||
}
|
4
provision/nixos/modules/system/default.nix
Normal file
4
provision/nixos/modules/system/default.nix
Normal file
@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ ./terminal.nix ./ssh.nix ];
|
||||
}
|
16
provision/nixos/modules/system/ssh.nix
Normal file
16
provision/nixos/modules/system/ssh.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ config, lib, pkgs, user, ... }:
|
||||
|
||||
let cfg = config.modules.system.ssh;
|
||||
in {
|
||||
options.modules.system.ssh.enable = lib.mkEnableOption "ssh";
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "curses";
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
26
provision/nixos/modules/system/terminal.nix
Normal file
26
provision/nixos/modules/system/terminal.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, user, ... }:
|
||||
|
||||
let cfg = config.modules.system.terminal;
|
||||
in {
|
||||
options.modules.system.terminal.enable = lib.mkEnableOption "terminal";
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Install packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
bash
|
||||
bash-completion
|
||||
neovim
|
||||
ripgrep
|
||||
tmux
|
||||
tmuxp
|
||||
git
|
||||
git-annex
|
||||
killall
|
||||
pciutils
|
||||
pinentry-curses
|
||||
trash-cli
|
||||
unzip
|
||||
nnn
|
||||
advcpmv
|
||||
];
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user