mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-02-14 19:30:19 +01:00
nixos cfg
This commit is contained in:
parent
9719d91e47
commit
65749a4d89
4 changed files with 179 additions and 0 deletions
66
nixos/configuration.nix
Normal file
66
nixos/configuration.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./pkg.nix
|
||||
./home.nix
|
||||
./localcfg.nix
|
||||
];
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
networking.useDHCP = false;
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "dvorak-programmer";
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
localtime.enable = true;
|
||||
fwupd.enable = true;
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
};
|
||||
|
||||
fonts.enableDefaultFonts = true;
|
||||
fonts.fonts = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "Hack" ]; })
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
nix.autoOptimiseStore = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 7d"; # Ajuste comme tu veux, tu peux utiliser +5 pour garder les 5 dernières, etc.
|
||||
};
|
||||
|
||||
# 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 = "21.05"; # Did you read the comment?
|
||||
}
|
||||
9
nixos/home.nix
Normal file
9
nixos/home.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{...}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
<home-manager/nixos>
|
||||
];
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.traxys = (import /etc/nixos/traxys/home.nix);
|
||||
}
|
||||
60
nixos/localcfg.nix
Normal file
60
nixos/localcfg.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
initrd = {
|
||||
luks.devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-uuid/de0242ac-788a-44fc-a1ef-8d7bfaa448c6";
|
||||
preLVM = true;
|
||||
#keyFile = "/etc/secrets/initrd/keyfile";
|
||||
fallbackToPassword = true;
|
||||
};
|
||||
home = {
|
||||
device = "/dev/disk/by-uuid/b028c674-64c5-40e0-88c4-481d78854049";
|
||||
preLVM = true;
|
||||
#keyFile = "/etc/secrets/initrd/keyfile";
|
||||
fallbackToPassword = true;
|
||||
};
|
||||
};
|
||||
secrets = {
|
||||
"/etc/secrets/initrd/keyfile" = "/etc/secrets/initrd/keyfile";
|
||||
};
|
||||
#kernelParams = [ "iomem=relaxed" ];
|
||||
};
|
||||
loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "nodev";
|
||||
enableCryptodisk = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "ZeNixLaptop";
|
||||
interfaces = {
|
||||
eno0.useDHCP = true;
|
||||
wlp1s0.useDHCP = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.traxys = {
|
||||
uid = 1000;
|
||||
isNormalUser = true;
|
||||
home = "/home/traxys";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
44
nixos/pkg.nix
Normal file
44
nixos/pkg.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
gtkUsePortal = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
package = pkgs.nixFlakes;
|
||||
allowUnfree = true;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(import (builtins.fetchTarball {
|
||||
url = https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz;
|
||||
}))
|
||||
];
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
neovim-nightly
|
||||
git
|
||||
gnumake
|
||||
ripgrep
|
||||
flashrom
|
||||
gcc
|
||||
libappindicator
|
||||
file
|
||||
jq
|
||||
];
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue