feat: update configuration with work nixos configuration
This commit is contained in:
135
hosts/work/configuration.nix
Normal file
135
hosts/work/configuration.nix
Normal file
@@ -0,0 +1,135 @@
|
||||
{
|
||||
inputs,
|
||||
modulesPath,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./disk-config.nix
|
||||
];
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
environment.sessionVariables = {
|
||||
FLAKE = "/etc/nixos";
|
||||
};
|
||||
environment.systemPackages = map lib.lowPrio [
|
||||
pkgs.curl
|
||||
pkgs.gitMinimal
|
||||
pkgs.slack
|
||||
pkgs.teams-for-linux
|
||||
pkgs.openvpn
|
||||
];
|
||||
networking = {
|
||||
hostName = "work-laptop";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
time.timeZone = "Europe/Paris";
|
||||
i18n.defaultLocale = "fr_FR.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "fr_FR.UTF-8";
|
||||
LC_IDENTIFICATION = "fr_FR.UTF-8";
|
||||
LC_MEASUREMENT = "fr_FR.UTF-8";
|
||||
LC_MONETARY = "fr_FR.UTF-8";
|
||||
LC_NAME = "fr_FR.UTF-8";
|
||||
LC_NUMERIC = "fr_FR.UTF-8";
|
||||
LC_PAPER = "fr_FR.UTF-8";
|
||||
LC_TELEPHONE = "fr_FR.UTF-8";
|
||||
LC_TIME = "fr_FR.UTF-8";
|
||||
};
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
# gc = {
|
||||
# automatic = true;
|
||||
# dates = "weekly";
|
||||
# option = "--delete-older-than 10d";
|
||||
# };
|
||||
};
|
||||
services = {
|
||||
xserver.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
cli-environment.enable = true;
|
||||
# desktop-apps.enable = true;
|
||||
dev-environment.enable = true;
|
||||
fonts.enable = true;
|
||||
window-manager.enable = true;
|
||||
};
|
||||
users.users = {
|
||||
xmorel = {
|
||||
shell = pkgs.fish;
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||
initialPassword = "toto";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBd3US4tUcbWZQgcVOtZIcbHF5mHwzJzygrQuE/pGde6"
|
||||
];
|
||||
};
|
||||
root = {
|
||||
initialPassword = "toto";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBd3US4tUcbWZQgcVOtZIcbHF5mHwzJzygrQuE/pGde6"
|
||||
];
|
||||
};
|
||||
};
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
users = {
|
||||
"xmorel" = import ./home.nix;
|
||||
};
|
||||
};
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = ../../wall.jpg;
|
||||
polarity = "dark";
|
||||
opacity.terminal = 0.9;
|
||||
cursor.package = pkgs.bibata-cursors;
|
||||
cursor.name = "Bibata-Modern-Ice";
|
||||
cursor.size = 24;
|
||||
fonts = {
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = "JetBrainsMono Nerd Font Mono";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.montserrat;
|
||||
name = "Montserrat";
|
||||
};
|
||||
serif = {
|
||||
package = pkgs.montserrat;
|
||||
name = "Montserrat";
|
||||
};
|
||||
sizes = {
|
||||
applications = 12;
|
||||
terminal = 12;
|
||||
desktop = 11;
|
||||
popups = 12;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
56
hosts/work/disk-config.nix
Normal file
56
hosts/work/disk-config.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ lib, ...}:
|
||||
{
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
device = lib.mkDefault "/dev/nvme0n1";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["umask=0077"];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
hosts/work/hardware-configuration.nix
Normal file
26
hosts/work/hardware-configuration.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp5s0f3u1u3c2.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -12,15 +12,75 @@
|
||||
../../modules/home-manager/kitty.nix
|
||||
];
|
||||
|
||||
# myHome.dotfiles.enable = true;
|
||||
myHome.dotfiles.enable = true;
|
||||
myHome.helix.enable = true;
|
||||
# myHome.waybar.enable = true;
|
||||
myHome.waybar.enable = true;
|
||||
myHome.kitty.enable = true;
|
||||
myHome.shell.enable = true;
|
||||
|
||||
# TODO Move somewhere...
|
||||
# programs.spotify-player.enable = true;
|
||||
gtk = {
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
style.name = "adwaita-dark";
|
||||
platformTheme.name = "gtk3";
|
||||
};
|
||||
services = {
|
||||
hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
firefox.enable = true;
|
||||
gh.enable = true;
|
||||
btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim_keys = true;
|
||||
};
|
||||
};
|
||||
home-manager.enable = true;
|
||||
hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
grace = 10;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "23.11";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user