cleanup and updates

This commit is contained in:
2024-03-31 22:00:34 +01:00
parent 7bcc81f20d
commit 36317ca5e5
2 changed files with 153 additions and 203 deletions
+55 -90
View File
@@ -11,30 +11,27 @@
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
]; ];
# nixpkgs.config.permittedInsecurePackages = [
# "electron-19.1.9"
# ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.plymouth.enable = true; boot.plymouth.enable = true;
# networking.hostName = "nixos"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking = { networking = {
networkmanager.enable = true; # Easiest to use and most distros use this by default. networkmanager.enable = true; # Easiest to use and most distros use this by default.
hostName = "nixos-laptop"; hostName = "nixos-laptop";
firewall.enable = false;
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
}; };
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Dublin"; time.timeZone = "Europe/Dublin";
# 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. # Select internationalisation properties.
i18n= { i18n= {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
@@ -47,34 +44,22 @@
]; ];
}; };
}; };
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver = { services = {
xserver = {
enable = true; enable = true;
xkb = { xkb = {
layout = "us"; layout = "us";
variant = ""; variant = "";
}; };
# displayManager = { windowManager = {
# sddm.enable = true; i3.enable = true;
# sddm.theme = "${import ../../modules/themes/sddm-theme.nix { inherit pkgs; }}"; dwm.enable = true;
# sessionPackages = [ pkgs.hyprland ]; };
# };
windowManager.i3.enable = true;
libinput.enable = true; libinput.enable = true;
}; };
greetd = {
powerManagement = {
enable = true;
powertop.enable = true;
};
services.greetd = {
enable = true; enable = true;
restart = true; restart = true;
settings = { settings = {
@@ -83,30 +68,37 @@
}; };
}; };
}; };
blueman.enable = true;
printing.enable = true; # Enable CUPS to print documents.
gvfs.enable = true;
auto-cpufreq.enable = true;
thermald.enable = true;
};
powerManagement = {
enable = true;
powertop.enable = true;
};
environment.etc."greetd/environments".text = '' environment.etc."greetd/environments".text = ''
Hyprland Hyprland
none+i3 none+i3
''; '';
hardware.bluetooth.enable = true; hardware = {
services.blueman.enable = true; bluetooth.enable = true;
hardware.opengl = { opengl = {
enable = true; enable = true;
# extraPackages = with pkgs; [ };
# vaapiIntel pulseaudio.enable = true;
# vaapiVdpau
# libvdpau-va-gl # System76 Devices
# ]; system76.enableAll = true;
# driSupport32Bit = true;
}; };
services.printing.enable = true; # Enable CUPS to print documents.
security.pam.services.swaylock = {}; security.pam.services.swaylock = {};
# Enable sound. # Enable sound.
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = true;
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
noto-fonts noto-fonts
@@ -120,9 +112,12 @@
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; }) (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
]; ];
# This is my `configuration.nix`
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
(final: prev: {
dwm = prev.dwm.overrideAttrs (old: {src = /home/liamm/oss/dwm;});
})
];
# nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ # nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
# "steam" # "steam"
# "steam-original" # "steam-original"
@@ -147,13 +142,24 @@
extraGroups = [ "networkmanager" "wheel" "disk" "power" "video" "davfs2" "input" ]; # Enable sudo for the user. extraGroups = [ "networkmanager" "wheel" "disk" "power" "video" "davfs2" "input" ]; # Enable sudo for the user.
}; };
programs.dconf.enable = true; programs = {
programs.steam = { dconf.enable = true;
steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
}; };
programs.nix-ld.enable = true;
nix-ld.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
home-manager = { home-manager = {
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
users = { users = {
@@ -175,17 +181,6 @@
libdrm libdrm
]; ];
# System76 Devices
hardware.system76.enableAll = true;
services = {
gvfs.enable = true;
auto-cpufreq.enable = true;
thermald.enable = true;
};
# services.flatpak.enable = true;
zramSwap = { zramSwap = {
enable = true; enable = true;
algorithm = "zstd"; algorithm = "zstd";
@@ -196,47 +191,17 @@
portal = { portal = {
enable = true; enable = true;
wlr.enable = true; wlr.enable = true;
gtkUsePortal = true; # gtkUsePortal = true;
extraPortals = with pkgs;[ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; extraPortals = with pkgs;[ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
}; };
}; };
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
# enableSSHSupport = true;
};
# List services that you want to enable: # List services that you want to enable:
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;
# Open ports in the firewall. # This option defines the first version of NixOS you have installed on this particular machine
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly. # and migrated your data accordingly.
# #
+23 -38
View File
@@ -4,6 +4,10 @@
home.username = "liamm"; home.username = "liamm";
home.homeDirectory = "/home/liamm"; home.homeDirectory = "/home/liamm";
imports = [
../../modules/home-manager/dunst.nix
../../modules/home-manager/terminals/alacritty.nix
];
# You should not change this value, even if you update Home Manager. If you do # You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager # want to update the value, then make sure to first check the Home Manager
# release notes. # release notes.
@@ -109,10 +113,6 @@
xdg.enable = true; xdg.enable = true;
xdg.configFile = { xdg.configFile = {
"alacritty" = {
recursive = true;
source = ../../modules/old_configs/alacritty;
};
"contour" = { "contour" = {
recursive = true; recursive = true;
source = ../../modules/old_configs/contour; source = ../../modules/old_configs/contour;
@@ -167,7 +167,8 @@
# BEGIN PROGRAMS # BEGIN PROGRAMS
programs.bash = { programs = {
bash = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
enableVteIntegration = true; enableVteIntegration = true;
@@ -200,49 +201,43 @@
set-gitlab-var = "export GITLAB=$(sed -n 4p ~/documents/.git_keys)"; set-gitlab-var = "export GITLAB=$(sed -n 4p ~/documents/.git_keys)";
}; };
}; };
programs.emacs = { emacs = {
enable = true; enable = true;
extraPackages = epkgs: [ extraPackages = epkgs: [
# epkgs.nix-mode
# epkgs.magit
epkgs.pdf-tools epkgs.pdf-tools
epkgs.org-pdftools epkgs.org-pdftools
]; ];
}; };
programs.feh.enable = true; feh.enable = true;
programs.git = { git = {
enable = true; enable = true;
diff-so-fancy.enable = true; diff-so-fancy.enable = true;
userEmail = "maloneliam@proton.me"; userEmail = "maloneliam@proton.me";
userName = "Liam Malone"; userName = "Liam Malone";
}; };
programs.neovim = { neovim = {
enable = true; enable = true;
package = pkgs.neovim-unwrapped; package = pkgs.neovim-unwrapped;
vimAlias = true; vimAlias = true;
vimdiffAlias = true; vimdiffAlias = true;
}; };
programs.obs-studio = { obs-studio = {
enable = true; enable = true;
}; };
programs.swaylock.enable = true; swaylock.enable = true;
programs.waybar = { waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
systemd.target = "hyprland-session.target"; systemd.target = "hyprland-session.target";
}; };
programs.wofi.enable = true; wofi.enable = true;
};
# BEGIN SERVICES # BEGIN SERVICES
services = {
services.blueman-applet.enable = true; blueman-applet.enable = true;
services.dunst = { emacs = {
enable = true;
# waylandDisplay = true;
};
services.emacs = {
enable = true; enable = true;
client = { client = {
enable = true; enable = true;
@@ -253,23 +248,13 @@
}; };
startWithUserSession = true; startWithUserSession = true;
}; };
gnome-keyring.enable = true;
# services.flameshot = { gpg-agent = {
# enable = true;
# settings = {
# General = {
# disabledTrayIcon = true;
# showStartupLaunchMessage = false;
# };
# };
# };
services.gnome-keyring.enable = true;
services.gpg-agent = {
enable = true; enable = true;
defaultCacheTtl = 1800; defaultCacheTtl = 1800;
enableSshSupport = true; enableSshSupport = true;
}; };
services.nextcloud-client.enable = true; nextcloud-client.enable = true;
services.swayidle.enable = true; swayidle.enable = true;
};
} }