Cleanup and some modularization
This commit is contained in:
parent
b87d3ab26f
commit
ad3203eada
37 changed files with 274 additions and 601 deletions
77
flake.nix
77
flake.nix
|
@ -11,80 +11,7 @@
|
|||
|
||||
outputs = inputs @ { self, ... }: {
|
||||
diskoConfigurations = import ./disko.nix;
|
||||
homeConfigurations = import ./home.nix;
|
||||
|
||||
nixosConfigurations = {
|
||||
beefcake = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules =
|
||||
[
|
||||
./machines/beefcake.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.daniel = import ./daniel.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
musicbox = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules =
|
||||
[
|
||||
inputs.disko.nixosModules.disko
|
||||
self.diskoConfigurations.unencrypted
|
||||
{ _module.args.disks = [ "/dev/sda" ]; }
|
||||
./machines/musicbox.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.daniel = import ./daniel.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
thinker = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
inputs.disko.nixosModules.disko
|
||||
self.diskoConfigurations.standard
|
||||
{ _module.args.disks = [ "/dev/nvme0n1" ]; }
|
||||
./machines/thinker.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.daniel = import ./daniel.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
colmena = {
|
||||
meta = {
|
||||
nixpkgs = import inputs.nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
};
|
||||
defaults = {
|
||||
environment.etc."nixos/configuration.nix".text = ''
|
||||
throw "sorry, no nixos-rebuild, use colmena"
|
||||
'';
|
||||
};
|
||||
beefcake = {
|
||||
deployment = {
|
||||
targetHost = "beefcake";
|
||||
targetUser = "daniel";
|
||||
};
|
||||
};
|
||||
};
|
||||
homeConfigurations = import ./home.nix inputs;
|
||||
nixosConfigurations = import ./nixos.nix inputs;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [
|
||||
../profiles/desktop.nix
|
||||
../modules/systemd-boot-efi.nix
|
||||
../modules/amd.nix
|
||||
../modules/amd-gpu.nix
|
||||
../modules/docker.nix
|
||||
../modules/network-manager.nix
|
||||
../modules/bluetooth.nix
|
||||
../modules/pulseaudio.nix
|
||||
../modules/de/sway.nix
|
||||
../modules/users/daniel.nix
|
||||
../modules/users/valerie.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "wallwart.lyte.dev";
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [ ntfs3g ];
|
||||
};
|
||||
|
||||
fileSystems."/storage/ext".options = [ "defaults" "user" "nofail" ];
|
||||
fileSystems."/storage/butter".options = [ "defaults" "auto" "nofail" ];
|
||||
fileSystems."/storage/windows" = {
|
||||
device = "/dev/disk/by-uuid/AE624593624560E7";
|
||||
fsType = "ntfs";
|
||||
options = [ "defaults" "auto" "nofail" ];
|
||||
};
|
||||
fileSystems."/storage/shared" = {
|
||||
device = "/dev/disk/by-uuid/26F6144A6B518523";
|
||||
fsType = "ntfs";
|
||||
options = [ "defaults" "auto" "nofail" ];
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
hardware = {
|
||||
cpu.amd.updateMicrocode = true;
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.bash ];
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
hardware.bluetooth.enable = true;
|
||||
}
|
|
@ -1,10 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
|
||||
in {
|
||||
fonts.fonts = with pkgs; [
|
||||
# helvetica # needed by zoom
|
||||
];
|
||||
{ config, pkgs, ... }: {
|
||||
users.users.daniel = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "docker" ];
|
||||
|
@ -31,11 +25,14 @@ in {
|
|||
postgresql # database
|
||||
htop # almost as good as bottom (btm)
|
||||
unzip # needed by a handful of other utilities
|
||||
autoconf automake # autotools
|
||||
autoconf
|
||||
automake # autotools
|
||||
weechat # irc
|
||||
python39Full # python 3.9
|
||||
jq # awk for json
|
||||
xfce.thunar xfce.thunar-archive-plugin xfce.thunar-volman # gui file manager
|
||||
xfce.thunar
|
||||
xfce.thunar-archive-plugin
|
||||
xfce.thunar-volman # gui file manager
|
||||
mpd # music player daemon
|
||||
ncmpcpp # ncurses music player client
|
||||
vlc # video player
|
|
@ -1,27 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
|
||||
in {
|
||||
imports = [ ./graphics.nix ];
|
||||
programs = {
|
||||
};
|
||||
services = {
|
||||
pipewire.enable = true;
|
||||
xserver = {
|
||||
desktopManager.gnome3.enable = true;
|
||||
libinput = {
|
||||
enable = true;
|
||||
tapping = true;
|
||||
naturalScrolling = true;
|
||||
disableWhileTyping = false;
|
||||
};
|
||||
};
|
||||
gnome3 = {
|
||||
gnome-keyring.enable = true;
|
||||
sushi.enable = true;
|
||||
};
|
||||
};
|
||||
systemd.packages = with pkgs.gnome3; [ gnome-session gnome-shell];
|
||||
environment.systemPackages = with pkgs.gnome3; [ adwaita-icon-theme ];
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [ ../gdm.nix ];
|
||||
fonts.fonts = with pkgs; [ iosevka ];
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
glxinfo
|
||||
firefox-devedition-bin
|
||||
pavucontrol
|
||||
brightnessctl
|
||||
];
|
||||
};
|
||||
qt5 = {
|
||||
platformTheme = "gtk2";
|
||||
style = "gtk2";
|
||||
};
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
|
||||
in {
|
||||
imports = [ ./graphics.nix ];
|
||||
fonts.fonts = with pkgs; [
|
||||
noto-fonts-emoji font-awesome
|
||||
];
|
||||
programs = {
|
||||
sway = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
unstable.pipewire
|
||||
swaylock
|
||||
swayidle
|
||||
unstable.mako unstable.libnotify
|
||||
waybar
|
||||
wl-clipboard
|
||||
slurp
|
||||
grim
|
||||
unstable.font-awesome
|
||||
unstable.xwayland
|
||||
unstable.kanshi
|
||||
unstable.gammastep
|
||||
];
|
||||
# TODO: this should come from the user's homedir maybe through dotfiles
|
||||
# somehow? home-manager?
|
||||
extraSessionCommands = ''
|
||||
systemctl --user import-environment
|
||||
export TERMINAL=kitty
|
||||
export BROWSER=firefox-devedition
|
||||
export WLC_REPEAT_DELAY=200
|
||||
export WLC_REPEAT_RATE=60
|
||||
export CLUTTER_BACKEND=wayland
|
||||
# export SDL_VIDEODRIVER=wayland
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
'';
|
||||
};
|
||||
};
|
||||
services = {
|
||||
pipewire.enable = true;
|
||||
xserver = {
|
||||
libinput = {
|
||||
enable = true;
|
||||
tapping = true;
|
||||
naturalScrolling = true;
|
||||
disableWhileTyping = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
gtkUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
unstable.xdg-desktop-portal-wlr
|
||||
];
|
||||
};
|
||||
}
|
7
modules/desktop-usage.nix
Normal file
7
modules/desktop-usage.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./sway.nix
|
||||
./user-installed-applications.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableOnBoot = false;
|
||||
};
|
||||
environment.systemPackages = [ pkgs.docker-compose ];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
# services.xserver.displayManager.defaultSession
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,19 +1,25 @@
|
|||
{ config, pkgs, ... }: {
|
||||
services.xserver.videoDrivers = [ "intel" ];
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
};
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = true;
|
||||
opengl = {
|
||||
extraPackages = with pkgs; [
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
};
|
||||
{ lib, config, pkgs, ... }: {
|
||||
|
||||
nixpkgs.config = {
|
||||
packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
driSupport = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
# services.xserver.displayManager.defaultSession
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
greeter = {
|
||||
enable = true;
|
||||
};
|
||||
greeters.gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.arc-theme;
|
||||
name = "Arc-Dark";
|
||||
};
|
||||
clock-format = "%H:%M:%S";
|
||||
extraConfig = ''
|
||||
font-name=IosevkaLyteTerm Nerd Font Complete
|
||||
'';
|
||||
};
|
||||
# background = "";
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ lightdm lightdm_gtk_greeter ];
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
|
||||
aliases = { vim = "nvim"; vi = "nvim"; };
|
||||
in
|
||||
{
|
||||
environment = {
|
||||
systemPackages = [ unstable.neovim ];
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
PAGER = "nvim";
|
||||
VISUAL = "nvim";
|
||||
# we have to escape these doublequotes so that they work when NixOS
|
||||
# injects them into the shell
|
||||
MANPAGER = ''env MANWIDTH=\"\" nvim --cmd \"let g:prosession_on_startup=0\" +Man!'';
|
||||
MANWIDTH = "80";
|
||||
};
|
||||
shellAliases = aliases;
|
||||
};
|
||||
programs.bash.shellAliases = aliases;
|
||||
programs.fish.shellAliases = aliases;
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
networking.networkmanager.enable = true;
|
||||
environment.systemPackages = [ pkgs.networkmanager ];
|
||||
}
|
26
modules/pipewire.nix
Normal file
26
modules/pipewire.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ ... }: {
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
||||
wireplumber.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
pulseaudio = {
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
security = {
|
||||
# I forget why I need these...
|
||||
polkit.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
nixpkgs.config.pulseaudio = true;
|
||||
sound.enable = true;
|
||||
}
|
61
modules/sway.nix
Normal file
61
modules/sway.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
# this is unused because it's referenced by my sway config
|
||||
dbus-sway-environment = pkgs.writeTextFile {
|
||||
name = "dbus-sway-environment";
|
||||
destination = "/bin/dbus-sway-environment";
|
||||
executable = true;
|
||||
|
||||
text = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
};
|
||||
|
||||
# this is unused because it's referenced by my sway config
|
||||
configure-gtk = pkgs.writeTextFile {
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
executable = true;
|
||||
text =
|
||||
let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in
|
||||
''
|
||||
export XDG_DATA_DIRS="${datadir}:$XDG_DATA_DIRS
|
||||
gnome_schema = org.gnome.desktop.interface
|
||||
gsettings set $gnome_schema gtk-theme 'Catppuccin-Mocha'
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ./pipewire.nix ];
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
# services.xserver.libinput.enable = true;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.tmux ];
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
3
modules/user-installed-applications.nix
Normal file
3
modules/user-installed-applications.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
services.flatpak.enable = true;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
users.users.valerie = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
home = "/home/valerie";
|
||||
};
|
||||
}
|
38
nixos.nix
Normal file
38
nixos.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
inputs @ { self, ... }:
|
||||
let
|
||||
daniel = {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.daniel = import ./daniel.nix;
|
||||
};
|
||||
hms = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
daniel
|
||||
];
|
||||
disko = scheme: disks: [
|
||||
inputs.disko.nixosModules.disko
|
||||
scheme
|
||||
{ _module.args.disks = disks; }
|
||||
];
|
||||
nixosSystem = modules: inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ ./nixos/common.nix ] ++ modules;
|
||||
};
|
||||
in
|
||||
{
|
||||
beefcake = nixosSystem [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./machines/beefcake.nix
|
||||
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
|
||||
] ++ hms;
|
||||
|
||||
musicbox = nixosSystem (disko self.diskoConfigurations.unencrypted [ "/dev/sda" ]) ++ [
|
||||
./machines/musicbox.nix
|
||||
] ++ hms;
|
||||
|
||||
thinker = nixosSystem (disko self.diskoConfigurations.standard [ "/dev/nvme0n1" ]) ++ [
|
||||
./machines/thinker.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
] ++ hms;
|
||||
}
|
91
nixos/common.nix
Normal file
91
nixos/common.nix
Normal file
|
@ -0,0 +1,91 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
users.users = {
|
||||
daniel = {
|
||||
isNormalUser = true;
|
||||
home = "/home/daniel/.home";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
extraGroups = [ "wheel" "video" ];
|
||||
packages = [ ];
|
||||
};
|
||||
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys;
|
||||
};
|
||||
};
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
layout = "us";
|
||||
xkbOptions = "ctrl:nocaps";
|
||||
};
|
||||
|
||||
openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
permitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
earlySetup = true;
|
||||
|
||||
# colors = [
|
||||
# "111111"
|
||||
# "f92672"
|
||||
# "a6e22e"
|
||||
# "f4bf75"
|
||||
# "66d9ef"
|
||||
# "ae81ff"
|
||||
# "a1efe4"
|
||||
# "f8f8f2"
|
||||
# "75715e"
|
||||
# "f92672"
|
||||
# "a6e22e"
|
||||
# "f4bf75"
|
||||
# "66d9ef"
|
||||
# "ae81ff"
|
||||
# "a1efe4"
|
||||
# "f9f8f5"
|
||||
# ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
useDHCP = lib.mkDefault true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = lib.mkDefault [ "nix-command" "flakes" ];
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
};
|
||||
|
||||
programs =
|
||||
{
|
||||
fish = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
time = {
|
||||
timeZone = "America/Chicago";
|
||||
};
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.fish;
|
||||
};
|
||||
}
|
|
@ -117,7 +117,7 @@ in
|
|||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
extraGroups = [ "wheel" "video" ];
|
||||
extraGroups = [ "wheel" "video" "docker" ];
|
||||
packages = [ ];
|
||||
};
|
||||
|
|
@ -14,9 +14,7 @@ in
|
|||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usbhid" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
|
|
|
@ -2,51 +2,27 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||
|
||||
{ modulesPath, pkgs, config, lib, inputs, ... }:
|
||||
{ modulesPath, pkgs, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
# this is unused because it's referenced by my sway config
|
||||
dbus-sway-environment = pkgs.writeTextFile {
|
||||
name = "dbus-sway-environment";
|
||||
destination = "/bin/dbus-sway-environment";
|
||||
executable = true;
|
||||
|
||||
text = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
};
|
||||
|
||||
# this is unused because it's referenced by my sway config
|
||||
configure-gtk = pkgs.writeTextFile {
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
executable = true;
|
||||
text =
|
||||
let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in
|
||||
''
|
||||
export XDG_DATA_DIRS="${datadir}:$XDG_DATA_DIRS
|
||||
gnome_schema = org.gnome.desktop.interface
|
||||
gsettings set $gnome_schema gtk-theme 'Catppuccin-Mocha'
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../modules/intel.net
|
||||
../modules/desktop-usage.nix
|
||||
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
# hardware
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
services.pcscd.enable = true; # why do I need this? SD card slot?
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# wifi
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
||||
# TODO: hibernation? I've been using [deep] in /sys/power/mem_sleep alright
|
||||
# with this machine so it may not be necessary?
|
||||
|
@ -54,120 +30,12 @@ in
|
|||
|
||||
# TODO: fonts? right now, I'm just installing to ~/.local/share/fonts
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
driSupport = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
networking.hostName = "thinker";
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
networking.hostName = "thinker"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
security.polkit.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
programs.fish.enable = true;
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# pulse.support32Bit = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# services.xserver.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.layout = "us";
|
||||
services.xserver.xkbOptions = "ctrl:nocaps";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
# services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
# sound.enable = true;
|
||||
# hardware.pulseaudio.support32Bit = true;
|
||||
hardware.pulseaudio.support32Bit = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.daniel = {
|
||||
isNormalUser = true;
|
||||
home = "/home/daniel/.home";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
extraGroups = [ "wheel" "video" ];
|
||||
packages = [ ];
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
# I own a printer in the year of our Lord 2023
|
||||
services.printing.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
age
|
||||
|
@ -251,15 +119,6 @@ in
|
|||
zstd
|
||||
];
|
||||
|
||||
services.pcscd.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.thunar.enable = true;
|
||||
|
||||
services.tailscale = {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{ allowUnfree = true; }
|
|
@ -1,4 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "20.03";
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [
|
||||
../modules/fish.nix
|
||||
../modules/bash.nix
|
||||
../modules/tmux.nix
|
||||
../modules/neovim.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
less
|
||||
wget curl
|
||||
rsync
|
||||
w3m
|
||||
git
|
||||
pciutils usbutils binutils
|
||||
ripgrep sd fd
|
||||
unzip
|
||||
killall
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryFlavor = "curses";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
permitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
console = {
|
||||
earlySetup = true;
|
||||
colors = [
|
||||
"111111"
|
||||
"f92672"
|
||||
"a6e22e"
|
||||
"f4bf75"
|
||||
"66d9ef"
|
||||
"ae81ff"
|
||||
"a1efe4"
|
||||
"f8f8f2"
|
||||
"75715e"
|
||||
"f92672"
|
||||
"a6e22e"
|
||||
"f4bf75"
|
||||
"66d9ef"
|
||||
"ae81ff"
|
||||
"a1efe4"
|
||||
"f9f8f5"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [ ./base.nix ];
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [ ./base.nix ];
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
exec dbus-sway-environment
|
||||
exec configure-gtk
|
Loading…
Reference in a new issue