added a common module for nixos configurations and set up BICEP
This commit is contained in:
parent
e2637dcb5c
commit
4b58cbe687
11
flake.nix
11
flake.nix
|
@ -56,14 +56,12 @@
|
||||||
# desktop
|
# desktop
|
||||||
nixosConfigurations."BICEP" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."BICEP" = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/BICEP/configuration.nix
|
./hosts/BICEP/configuration.nix
|
||||||
home-manager.nixosModules.home-manager
|
./modules/nixos-common.nix
|
||||||
{
|
{nixpkgs.overlays = overlays;}
|
||||||
home-manager.useGlobalPkgs = true;
|
] ++ home-manager-config ./users/tacocat/home.nix;
|
||||||
home-manager.users."tacocat" = ./users/tacocat/home.nix;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# laptop
|
# laptop
|
||||||
|
@ -73,6 +71,7 @@
|
||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
./hosts/JWST/configuration.nix
|
./hosts/JWST/configuration.nix
|
||||||
|
./modules/nixos-common.nix
|
||||||
nixos-hardware.nixosModules.dell-xps-15-9520
|
nixos-hardware.nixosModules.dell-xps-15-9520
|
||||||
{nixpkgs.overlays = overlays;}
|
{nixpkgs.overlays = overlays;}
|
||||||
]
|
]
|
||||||
|
|
14
hosts/BICEP/configuration.nix
Normal file
14
hosts/BICEP/configuration.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# ------------ System ------------
|
||||||
|
|
||||||
|
time.timeZone = "America/New_York";
|
||||||
|
|
||||||
|
networking.hostName = "BICEP";
|
||||||
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
# config,
|
# config,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
@ -11,63 +10,16 @@
|
||||||
|
|
||||||
# ------------ System ------------
|
# ------------ System ------------
|
||||||
|
|
||||||
users.users.tacocat = {
|
boot.loader.grub.extraEntries = ''
|
||||||
isNormalUser = true;
|
menuentry "Void" {
|
||||||
extraGroups = ["wheel" "networkmanager" "audio" "video" "bluetooth" "kvm"];
|
search --set=void --fs-uuid 987518fa-8ea0-49a6-b1e5-1fed4e4ae50f
|
||||||
home = "/home/tacocat";
|
configfile "($void)/boot/grub/grub.cfg"
|
||||||
description = "Aria Nolan";
|
}
|
||||||
};
|
'';
|
||||||
|
|
||||||
boot.loader = {
|
|
||||||
efi.canTouchEfiVariables = false;
|
|
||||||
grub = {
|
|
||||||
efiSupport = true;
|
|
||||||
configurationLimit = 10;
|
|
||||||
device = "nodev";
|
|
||||||
extraEntries = ''
|
|
||||||
menuentry "Void" {
|
|
||||||
search --set=void --fs-uuid 987518fa-8ea0-49a6-b1e5-1fed4e4ae50f
|
|
||||||
configfile "($void)/boot/grub/grub.cfg"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
console = {
|
|
||||||
font = "Lat2-Terminus16";
|
|
||||||
keyMap = "us";
|
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
time.timeZone = "America/New_York";
|
||||||
|
|
||||||
networking.hostName = "JWST";
|
networking.hostName = "JWST";
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.resolvconf.extraConfig = ''
|
|
||||||
name_servers="1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001"
|
|
||||||
name_server_blacklist="129.21.3.17 129.21.4.18 2620:8d:8000:0:aba:ca:daba:ec"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Sound
|
|
||||||
sound.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Services/Hardware
|
|
||||||
hardware.opentabletdriver.enable = true;
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
services.blueman.enable = true;
|
|
||||||
services.printing.enable = true;
|
|
||||||
services.geoclue2.enable = true;
|
|
||||||
services.mullvad-vpn.enable = true;
|
|
||||||
services.mullvad-vpn.enableExcludeWrapper = false;
|
|
||||||
services.fwupd.enable = true;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.resolved.enable = true;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
@ -77,98 +29,12 @@
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
|
|
||||||
# ------------ Nix ------------
|
|
||||||
|
|
||||||
nix.settings = {
|
|
||||||
experimental-features = ["nix-command" "flakes"];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
trusted-users = ["root" "tacocat"];
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 1w";
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
||||||
builtins.elem (lib.getName pkg) [
|
|
||||||
"steam"
|
|
||||||
"steam-original"
|
|
||||||
"steam-run"
|
|
||||||
"nvidia-x11"
|
|
||||||
"nvidia-settings"
|
|
||||||
"discord"
|
|
||||||
"spotify"
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.nix-index.enable = true;
|
|
||||||
programs.command-not-found.enable = false;
|
|
||||||
|
|
||||||
# ------------ Software ------------
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
screen
|
|
||||||
pyocd
|
|
||||||
vim
|
|
||||||
exfat
|
|
||||||
encfs
|
|
||||||
ntfs3g
|
|
||||||
];
|
|
||||||
# remove nano
|
|
||||||
defaultPackages = with pkgs; [
|
|
||||||
perl
|
|
||||||
rsync
|
|
||||||
strace
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.sway = {
|
|
||||||
enable = true;
|
|
||||||
wrapperFeatures.gtk = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
swaylock
|
|
||||||
swayidle
|
|
||||||
brightnessctl
|
|
||||||
wl-mirror
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.waybar.enable = true;
|
|
||||||
programs.steam.enable = true;
|
|
||||||
programs.steam.remotePlay.openFirewall = true;
|
|
||||||
# programs.steam.gamescopeSession = {
|
|
||||||
# enable = true;
|
|
||||||
# args = [
|
|
||||||
# "-f"
|
|
||||||
# "--expose-wayland"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
# programs.gamescope.enable = true;
|
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
wlr.enable = true;
|
|
||||||
extraPortals = with pkgs; [
|
|
||||||
xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk.iconCache.enable = true;
|
|
||||||
|
|
||||||
# ------------ Graphics ------------
|
# ------------ Graphics ------------
|
||||||
|
|
||||||
hardware.opengl = {
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
enable = true;
|
intel-compute-runtime
|
||||||
driSupport = true;
|
vaapiVdpau
|
||||||
driSupport32Bit = true;
|
];
|
||||||
extraPackages = with pkgs; [
|
|
||||||
intel-compute-runtime
|
|
||||||
vaapiVdpau
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|
148
modules/nixos-common.nix
Normal file
148
modules/nixos-common.nix
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
|
||||||
|
# ------------ System ------------
|
||||||
|
|
||||||
|
users.users.tacocat = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = ["wheel" "networkmanager" "audio" "video" "bluetooth" "kvm"];
|
||||||
|
home = "/home/tacocat";
|
||||||
|
description = "Aria Nolan";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader = {
|
||||||
|
efi.canTouchEfiVariables = false;
|
||||||
|
grub = {
|
||||||
|
efiSupport = true;
|
||||||
|
configurationLimit = 10;
|
||||||
|
device = "nodev";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "us";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.resolvconf.extraConfig = ''
|
||||||
|
name_servers="1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001"
|
||||||
|
name_server_blacklist="129.21.3.17 129.21.4.18 2620:8d:8000:0:aba:ca:daba:ec"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Sound
|
||||||
|
sound.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Services/Hardware
|
||||||
|
hardware.opentabletdriver.enable = true;
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
services.printing.enable = true;
|
||||||
|
services.geoclue2.enable = true;
|
||||||
|
services.mullvad-vpn.enable = true;
|
||||||
|
services.mullvad-vpn.enableExcludeWrapper = false;
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.resolved.enable = true;
|
||||||
|
|
||||||
|
# ------------ Nix ------------
|
||||||
|
|
||||||
|
nix.settings = {
|
||||||
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
trusted-users = ["root" "tacocat"];
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 1w";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||||
|
builtins.elem (lib.getName pkg) [
|
||||||
|
"steam"
|
||||||
|
"steam-original"
|
||||||
|
"steam-run"
|
||||||
|
"nvidia-x11"
|
||||||
|
"nvidia-settings"
|
||||||
|
"discord"
|
||||||
|
"spotify"
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.nix-index.enable = true;
|
||||||
|
programs.command-not-found.enable = false;
|
||||||
|
|
||||||
|
# ------------ Software ------------
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
screen
|
||||||
|
pyocd
|
||||||
|
vim
|
||||||
|
exfat
|
||||||
|
encfs
|
||||||
|
ntfs3g
|
||||||
|
];
|
||||||
|
# remove nano
|
||||||
|
defaultPackages = with pkgs; [
|
||||||
|
perl
|
||||||
|
rsync
|
||||||
|
strace
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
swaylock
|
||||||
|
swayidle
|
||||||
|
brightnessctl
|
||||||
|
wl-mirror
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.waybar.enable = true;
|
||||||
|
programs.steam.enable = true;
|
||||||
|
programs.steam.remotePlay.openFirewall = true;
|
||||||
|
# programs.steam.gamescopeSession = {
|
||||||
|
# enable = true;
|
||||||
|
# args = [
|
||||||
|
# "-f"
|
||||||
|
# "--expose-wayland"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
programs.gamemode.enable = true;
|
||||||
|
# programs.gamescope.enable = true;
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk.iconCache.enable = true;
|
||||||
|
|
||||||
|
# ------------ Graphics ------------
|
||||||
|
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue