mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
21
hosts/server/configuration.nix
Normal file
21
hosts/server/configuration.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, ... }: {
|
||||
imports = [
|
||||
../../nixos/home-manager.nix
|
||||
../../nixos/nix.nix
|
||||
../../nixos/systemd-boot.nix
|
||||
../../nixos/users.nix
|
||||
../../nixos/utils.nix
|
||||
../../nixos/docker.nix
|
||||
|
||||
../../server-modules/ssh.nix
|
||||
|
||||
# You should let those lines as is
|
||||
./hardware-configuration.nix
|
||||
./variables.nix
|
||||
];
|
||||
|
||||
home-manager.users."${config.var.username}" = import ./home.nix;
|
||||
|
||||
# Don't touch this
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
45
hosts/server/home.nix
Normal file
45
hosts/server/home.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ pkgs, config, ... }: {
|
||||
|
||||
imports = [
|
||||
# Mostly user-specific configuration
|
||||
./variables.nix
|
||||
|
||||
# Programs
|
||||
../../home/programs/nvim
|
||||
../../home/programs/shell
|
||||
../../home/programs/fetch
|
||||
../../home/programs/git
|
||||
../../home/programs/lazygit
|
||||
|
||||
# Scripts
|
||||
../../home/scripts # All scripts
|
||||
];
|
||||
|
||||
home = {
|
||||
inherit (config.var) username;
|
||||
homeDirectory = "/home/" + config.var.username;
|
||||
|
||||
packages = with pkgs; [
|
||||
# Dev
|
||||
go
|
||||
nodejs
|
||||
python3
|
||||
jq
|
||||
just
|
||||
pnpm
|
||||
|
||||
# Utils
|
||||
zip
|
||||
unzip
|
||||
optipng
|
||||
pfetch
|
||||
btop
|
||||
fastfetch
|
||||
];
|
||||
|
||||
# Don't touch this
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
36
hosts/server/variables.nix
Normal file
36
hosts/server/variables.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ config, lib, ... }: {
|
||||
imports = [
|
||||
# Choose your theme here:
|
||||
../../themes/nixy.nix
|
||||
];
|
||||
|
||||
config.var = {
|
||||
hostname = "jack";
|
||||
username = "hadi";
|
||||
configDirectory = "/home/" + config.var.username
|
||||
+ "/.config/nixos"; # The path of the nixos configuration directory
|
||||
|
||||
keyboardLayout = "fr";
|
||||
|
||||
location = "Paris";
|
||||
timeZone = "Europe/Paris";
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocale = "fr_FR.UTF-8";
|
||||
|
||||
git = {
|
||||
username = "Hadi";
|
||||
email = "112569860+anotherhadi@users.noreply.github.com";
|
||||
};
|
||||
|
||||
autoUpgrade = false;
|
||||
autoGarbageCollector = true;
|
||||
};
|
||||
|
||||
# Let this here
|
||||
options = {
|
||||
var = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user