Base of Nix Configuration
This commit is contained in:
Executable
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
shell = import ./services/shell.nix;
|
||||
gnome = import ./services/gnome.nix;
|
||||
zed = import ./submodules/zed.nix;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
shell = import ../submodules/gnome-shell.nix;
|
||||
apps = import ../submodules/gnome-apps.nix;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
zsh = import ../submodules/zsh.nix;
|
||||
nh = import ../submodules/nh.nix;
|
||||
git = import ../submodules/git.nix;
|
||||
docker = import ../submodules/docker.nix;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.within.shell.docker;
|
||||
in
|
||||
{
|
||||
options.within.shell.docker = {
|
||||
enable = mkEnableOption "System docker service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.within.shell.git;
|
||||
in
|
||||
{
|
||||
options.within.shell.git = {
|
||||
enable = mkEnableOption "System git service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
init.defaultBranch = "main";
|
||||
user = {
|
||||
name = "Laurent Gueret";
|
||||
email = "gueretlob@icloud.com";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.enableAskPassword = false;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.within.gnome.apps;
|
||||
in
|
||||
{
|
||||
options.within.gnome.apps = {
|
||||
enable = mkEnableOption "System gnome apps service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment = {
|
||||
systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
# Gnome media apps
|
||||
papers
|
||||
celluloid
|
||||
]
|
||||
++ [
|
||||
# Gnome files explorer
|
||||
nautilus
|
||||
];
|
||||
};
|
||||
|
||||
services.gvfs.enable = true; # SMB, FTP, ... access
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.within.gnome.shell;
|
||||
in
|
||||
{
|
||||
options.within.gnome.shell = {
|
||||
enable = mkEnableOption "System gnome shell service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.gnome.games.enable = false;
|
||||
services.gnome.core-apps.enable = false;
|
||||
services.gnome.core-developer-tools.enable = false;
|
||||
|
||||
environment = {
|
||||
|
||||
gnome.excludePackages = with pkgs; [
|
||||
gnome-tour
|
||||
gnome-user-docs
|
||||
];
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
|
||||
# Gnome terminal
|
||||
ghostty
|
||||
|
||||
# Gnome icons
|
||||
papirus-icon-theme
|
||||
|
||||
# Gnome Extensions
|
||||
gnomeExtensions.vitals
|
||||
gnomeExtensions.paperwm
|
||||
gnomeExtensions.app-hider
|
||||
gnomeExtensions.dash-to-panel
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.within.shell.nh;
|
||||
in
|
||||
{
|
||||
options.within.shell.nh = {
|
||||
enable = mkEnableOption "System nh service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 2d --keep 3";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.within.shell.zsh;
|
||||
in
|
||||
{
|
||||
options.within.shell.zsh = {
|
||||
enable = mkEnableOption "System zsh service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user