boreal: initial setup
This commit is contained in:
parent
fe5df275d6
commit
d8e794f865
13
base/gui-programs.nix
Normal file
13
base/gui-programs.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
flameshot
|
||||||
|
alacritty
|
||||||
|
slack
|
||||||
|
discord
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
programs.nm-applet.enable = true;
|
||||||
|
}
|
|
@ -1,5 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixUnstable;
|
package = pkgs.nixUnstable;
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# shell usage
|
# shell usage
|
||||||
bat
|
bat
|
||||||
|
fd
|
||||||
ripgrep
|
ripgrep
|
||||||
wget
|
wget
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ in
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"media"
|
"media"
|
||||||
|
"networkmanager"
|
||||||
"wheel" # Enable ‘sudo’ for the user.
|
"wheel" # Enable ‘sudo’ for the user.
|
||||||
];
|
];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
|
|
26
boreal.nix
Normal file
26
boreal.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Default configuration
|
||||||
|
./base
|
||||||
|
./base/gui-programs.nix
|
||||||
|
|
||||||
|
# Service definitions
|
||||||
|
./services
|
||||||
|
|
||||||
|
# Configuration secrets
|
||||||
|
./secrets
|
||||||
|
|
||||||
|
# Host-specific config
|
||||||
|
./hosts/boreal
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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 = "20.09"; # Did you read the comment?
|
||||||
|
}
|
|
@ -30,5 +30,12 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
nixosConfigurations.boreal = nixpkgs-unstable.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules =
|
||||||
|
[
|
||||||
|
./boreal.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
60
hosts/boreal/default.nix
Normal file
60
hosts/boreal/default.nix
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
# 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, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
secrets = config.my.secrets;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
services.btrfs = {
|
||||||
|
autoScrub = {
|
||||||
|
enable = true;
|
||||||
|
fileSystems = [ "/" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = "boreal"; # Define your hostname.
|
||||||
|
networking.domain = "alarsyo.net";
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Paris";
|
||||||
|
|
||||||
|
# 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.interfaces.enp7s0.useDHCP = true;
|
||||||
|
networking.interfaces.wlp3s0.useDHCP = true;
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
my.services = {
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
openssh = {
|
||||||
|
enable = true;
|
||||||
|
permitRootLogin = "no";
|
||||||
|
passwordAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
videoDrivers = [ "nouveau" ];
|
||||||
|
windowManager.i3.enable = true;
|
||||||
|
layout = "fr";
|
||||||
|
xkbVariant = "us";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = true;
|
||||||
|
}
|
29
hosts/boreal/hardware-configuration.nix
Normal file
29
hosts/boreal/hardware-configuration.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/1a942915-c1ae-4058-b99d-09d12d40dbd3";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=nixos" "compress=zstd" "noatime" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/17C7-368D";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in a new issue