This commit is contained in:
DACHXY 2024-12-12 10:57:27 +08:00
parent 3728ac496d
commit 53395d3971
81 changed files with 723 additions and 1543 deletions

View file

@ -1,12 +1,8 @@
{ config, lib, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./modules
];
imports = [ ./hardware-configuration.nix ./modules ];
system.stateVersion = "23.11";
system.stateVersion = "24.11";
}

View file

@ -1,35 +1,8 @@
{ config, pkgs, lib, ... }:
{
# Switched to lanzaboote Secure Boot
# boot = {
# kernelParams = ["nohibernate" "ipv6.disable=1"];
# tmp.cleanOnBoot = true;
# supportedFilesystems = ["ntfs"];
# loader = {
# grub = {
# device = "nodev";
# efiSupport = true;
# enable = true;
# useOSProber = true;
# timeoutStyle = "menu";
# efiInstallAsRemovable = true;
# extraConfig = ''
# insmod tpm
# '';
# };
# timeout = 300;
# };
# };
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
environment.systemPackages = with pkgs; [
sbctl
];
boot.loader.systemd-boot.enable = true;
boot.swraid.enable = true;
boot.swraid.mdadmConf =
"\n MAILADDR smitty\n ARRAY /dev/md126 metadata=1.2 name=stuff:0\n UUID=3b0b7c51:2681:407e:a22a:e965a8aeece7\n ";
}

View file

@ -1,25 +1,25 @@
{ ... }:
{ ... }:
{
imports = [
./boot.nix
./fonts.nix
./gaming.nix
./hardware.nix
./hyprland.nix
./internationalisation.nix
./misc.nix
./networking.nix
./nixsettings.nix
./packages.nix
./polkit.nix
./programs.nix
./security.nix
./services.nix
./sound.nix
./time.nix
./theme.nix
./users.nix
./virtualisation.nix
];
imports = [
./boot.nix
./fonts.nix
./gaming.nix
./hardware.nix
./hyprland.nix
./internationalisation.nix
./misc.nix
./networking.nix
./nixsettings.nix
./packages.nix
./polkit.nix
./programs.nix
./security.nix
./services.nix
./sound.nix
./time.nix
./theme.nix
./users.nix
# ./virtualisation.nix
];
}

View file

@ -2,7 +2,7 @@
{
fonts.packages = with pkgs; [
font-awesome
font-awesome
jetbrains-mono
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })

View file

@ -3,11 +3,9 @@
{
nix = {
settings = {
warn-dirty = false;
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
substituters = ["https://nix-gaming.cachix.org"];
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
};
warn-dirty = false;
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
};
}

View file

@ -1,13 +1,9 @@
{ config, pkgs, ... }:
{ config, pkgs, ... }:
{
hardware = {
hardware = {
bluetooth.enable = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
};
graphics.enable = true;
nvidia.modesetting.enable = true;
};
}

View file

@ -1,22 +1,21 @@
{ config, pkgs, ... }:
{
programs.hyprland = {
enable = true;
};
programs.hyprland = { enable = true; };
environment.systemPackages = with pkgs; [
hyprpaper
kitty
libnotify
mako
qt5.qtwayland
qt6.qtwayland
swayidle
swaylock-effects
wlogout
wl-clipboard
wofi
waybar
];
environment.systemPackages = with pkgs; [
hyprshade
hyprpaper
kitty
libnotify
mako
qt5.qtwayland
qt6.qtwayland
swayidle
swaylock-effects
wlogout
wl-clipboard
wofi
waybar
];
}

View file

@ -15,9 +15,5 @@
LC_TIME = "en_US.UTF-8";
};
i18n.supportedLocales = [
"en_US.UTF-8/UTF-8"
"ru_RU.UTF-8/UTF-8"
"ka_GE.UTF-8/UTF-8"
];
i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ];
}

View file

@ -2,7 +2,7 @@
{
console = {
font = "Lat2-Terminus16";
useXkbConfig = true;
font = "Lat2-Terminus16";
useXkbConfig = true;
};
}

View file

@ -2,9 +2,9 @@
{
networking = {
hostName = "nixos-personal";
networkmanager.enable = true;
enableIPv6 = false;
firewall.enable = false;
hostName = "dn-nix";
networkmanager.enable = true;
enableIPv6 = false;
firewall.enable = false;
};
}

View file

@ -6,18 +6,17 @@
nixpkgs.config.allowUnfree = true;
nix = {
settings = {
warn-dirty = false;
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
substituters = ["https://nix-gaming.cachix.org"];
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
};
settings = {
warn-dirty = false;
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
substituters =
[ "https://nix-gaming.cachix.org" "https://hyprland.cachix.org" ];
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
trusted-public-keys = [
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
};
}

View file

@ -1,4 +1,3 @@
{ config, pkgs, ... }:
{

View file

@ -1,27 +1,25 @@
{ pkgs, ... }:
{ pkgs, ... }:
{
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart =
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
extraConfig = ''
DefaultTimeoutStopSec=10s
DefaultTimeoutStopSec=10s
'';
};
environment.systemPackages = with pkgs; [
polkit
polkit_gnome
];
environment.systemPackages = with pkgs; [ polkit polkit_gnome ];
}

View file

@ -1,94 +1,88 @@
{ config, pkgs, ... }:
{ config, pkgs, ... }:
{
xdg.portal = {
xdg.portal = {
enable = true;
wlr.enable = false;
xdgOpenUsePortal = false;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
extraPortals =
[ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ];
};
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
programs = {
# steam = {
# enable = true;
# remotePlay.openFirewall = true;
# dedicatedServer.openFirewall = true;
# };
hyprland = {
enable = true;
xwayland = {
enable = true;
};
portalPackage = pkgs.xdg-desktop-portal-hyprland;
enable = true;
withUWSM = true;
xwayland = { enable = true; };
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
gnupg = {
agent = {
enable = true;
enableSSHSupport = true;
};
};
agent = {
enable = true;
enableSSHSupport = true;
};
};
tmux = {
enable = true;
escapeTime = 0;
plugins = with pkgs; [
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.resurrect
tmuxPlugins.continuum
tmuxPlugins.catppuccin
];
enable = true;
escapeTime = 0;
extraConfig = ''
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
plugins = with pkgs; [
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.resurrect
tmuxPlugins.continuum
tmuxPlugins.catppuccin
];
unbind %
bind | split-window -h
extraConfig = ''
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
set -g prefix C-b
bind-key C-b send-prefix
unbind '"'
bind - split-window -v
unbind %
bind | split-window -h
unbind r
bind r source-file ~/.tmux.conf
unbind '"'
bind - split-window -v
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
unbind r
bind r source-file ~/.tmux.conf
bind -r m resize-pane -Z
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
set -g mouse on
bind -r m resize-pane -Z
set-window-option -g mode-keys vi
set -g mouse on
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
set-window-option -g mode-keys vi
unbind -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
set -g @catppuccin-flavour 'macchiato'
'';
unbind -T copy-mode-vi MouseDragEnd1Pane
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
set -g @catppuccin-flavour 'macchiato'
'';
};
zsh.enable = true;
mtr.enable = true;
};
mtr.enable = true;
};
}

View file

@ -1,15 +1,15 @@
{ pkgs }:
pkgs.stdenv.mkDerivation {
name = "sddm-theme";
src = pkgs.fetchFromGitHub {
owner = "gpskwlkr";
repo = "sddm-astronaut-theme";
rev = "468a100460d5feaa701c2215c737b55789cba0fc";
sha256 = "1h20b7n6a4pbqnrj22y8v5gc01zxs58lck3bipmgkpyp52ip3vig";
};
installPhase = ''
mkdir -p $out
cp -R ./* $out/
'';
name = "sddm-theme";
src = pkgs.fetchFromGitHub {
owner = "gpskwlkr";
repo = "sddm-astronaut-theme";
rev = "468a100460d5feaa701c2215c737b55789cba0fc";
sha256 = "1h20b7n6a4pbqnrj22y8v5gc01zxs58lck3bipmgkpyp52ip3vig";
};
installPhase = ''
mkdir -p $out
cp -R ./* $out/
'';
}

View file

@ -1,7 +1,7 @@
{ pkgs, ... }:
{ pkgs, ... }:
{
security.polkit.enable = true;
security.pam.services.swaylock = {};
security.pam.services.swaylock = { };
security.pam.services.swaylock.fprintAuth = false;
}

View file

@ -2,20 +2,18 @@
{
services = {
dbus.enable = true;
picom.enable = true;
openssh.enable = true;
spice-vdagentd.enable = true;
dbus.enable = true;
picom.enable = true;
openssh.enable = true;
xserver = {
enable = true;
layout = "us, ru, ge";
xkbOptions = "grp:alt_shift_toggle, caps:swapescape";
xserver = {
enable = true;
layout = "us";
};
displayManager = {
sddm.enable = true;
sddm.theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
};
};
displayManager = {
sddm.enable = true;
sddm.theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
};
};
}

View file

@ -6,16 +6,13 @@
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
environment.systemPackages = with pkgs; [
pamixer
pavucontrol
];
environment.systemPackages = with pkgs; [ pamixer pavucontrol ];
}

View file

@ -2,8 +2,8 @@
{
environment.systemPackages = with pkgs; [
gnome3.adwaita-icon-theme # default gnome cursors
glib
adwaita-icon-theme # default gnome cursors
glib
gsettings-desktop-schemas
nwg-look

View file

@ -1,5 +1,5 @@
{ ... }:
{
time.timeZone = "Asia/Tbilisi";
time.timeZone = "Asia/Taipei";
}

View file

@ -1,15 +1,9 @@
{ config, pkgs, ... }:
{
users.users.gpskwlkr = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [
"wheel"
"qemu"
"kvm"
"libvirtd"
"networkmanager"
];
};
users.users.danny = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [ "wheel" "qemu" "kvm" "libvirtd" "networkmanager" ];
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }:
{
virtualisation = {
@ -31,6 +31,6 @@
virt-manager
virt-viewer
win-spice
win-virtio
win-virtio
];
}