Move folder
This commit is contained in:
15
system/configuration.nix
Normal file
15
system/configuration.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./modules
|
||||
];
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
31
system/hardware-configuration.nix
Normal file
31
system/hardware-configuration.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
# 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" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/c425db8f-455a-4fec-8a24-72cd670640cb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/038B-4974";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
23
system/modules/boot.nix
Normal file
23
system/modules/boot.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
24
system/modules/default.nix
Normal file
24
system/modules/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./fonts.nix
|
||||
./gaming.nix
|
||||
./hardware.nix
|
||||
./hyprland.nix
|
||||
./internationalisation.nix
|
||||
./networking.nix
|
||||
./nixsettings.nix
|
||||
./packages.nix
|
||||
./polkit.nix
|
||||
./programs.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
./sound.nix
|
||||
./theme.nix
|
||||
./time.nix
|
||||
./users.nix
|
||||
./virtualisation.nix
|
||||
];
|
||||
}
|
||||
10
system/modules/fonts.nix
Normal file
10
system/modules/fonts.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
fonts.packages = with pkgs; [
|
||||
font-awesome
|
||||
jetbrains-mono
|
||||
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
];
|
||||
}
|
||||
13
system/modules/gaming.nix
Normal file
13
system/modules/gaming.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
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="];
|
||||
};
|
||||
};
|
||||
}
|
||||
12
system/modules/hardware.nix
Normal file
12
system/modules/hardware.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
22
system/modules/hyprland.nix
Normal file
22
system/modules/hyprland.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
hyprpaper
|
||||
kitty
|
||||
libnotify
|
||||
mako
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
swayidle
|
||||
swaylock-effects
|
||||
wlogout
|
||||
wl-clipboard
|
||||
wofi
|
||||
waybar
|
||||
];
|
||||
}
|
||||
23
system/modules/internationalisation.nix
Normal file
23
system/modules/internationalisation.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||
LC_MONETARY = "en_GB.UTF-8";
|
||||
LC_NAME = "en_GB.UTF-8";
|
||||
LC_NUMERIC = "en_GB.UTF-8";
|
||||
LC_PAPER = "en_GB.UTF-8";
|
||||
LC_TELEPHONE = "en_GB.UTF-8";
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
i18n.supportedLocales = [
|
||||
"en_GB.UTF-8/UTF-8"
|
||||
"en_US.UTF-8/UTF-8"
|
||||
"ro_RO.UTF-8/UTF-8"
|
||||
];
|
||||
}
|
||||
10
system/modules/networking.nix
Normal file
10
system/modules/networking.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = "stationette";
|
||||
networkmanager.enable = true;
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
}
|
||||
23
system/modules/nixsettings.nix
Normal file
23
system/modules/nixsettings.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
documentation.nixos.enable = false;
|
||||
|
||||
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="];
|
||||
};
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
}
|
||||
30
system/modules/packages.nix
Normal file
30
system/modules/packages.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
bat
|
||||
btop
|
||||
eza
|
||||
fzf
|
||||
git
|
||||
gnumake
|
||||
lm_sensors
|
||||
libsForQt5.qt5.qtquickcontrols2
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
libsForQt5.qt5.qtsvg
|
||||
neofetch
|
||||
neovim
|
||||
ripgrep
|
||||
tldr
|
||||
unzip
|
||||
openssl
|
||||
openssl.dev
|
||||
pkg-config
|
||||
wget
|
||||
xfce.thunar
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-wlr
|
||||
zip
|
||||
zoxide
|
||||
];
|
||||
}
|
||||
27
system/modules/polkit.nix
Normal file
27
system/modules/polkit.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ 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;
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
DefaulTimeoutStopSec=10s
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
polkit
|
||||
polkit_gnome
|
||||
];
|
||||
}
|
||||
57
system/modules/programs.nix
Normal file
57
system/modules/programs.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
xdgOpenUsePortal = false;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
enable = true;
|
||||
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
gnupg = {
|
||||
agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
escapeTime = 0;
|
||||
|
||||
# plugins = with pkgs; [
|
||||
# tmuxPlugins.vim-timux-navigator
|
||||
# tmuxPlugins.resurrect
|
||||
# tmuxPlugins.continuum
|
||||
# tmuxPlugins.catppuccin
|
||||
# ];
|
||||
|
||||
# zsh.enable = true;
|
||||
# mtr.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
system/modules/sddm-theme.nix
Normal file
15
system/modules/sddm-theme.nix
Normal file
@@ -0,0 +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/
|
||||
'';
|
||||
}
|
||||
7
system/modules/security.nix
Normal file
7
system/modules/security.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
security.polkit.enable = true;
|
||||
security.pam.services.swaylock = {};
|
||||
security.pam.services.swaylock.fprintAuth = false;
|
||||
}
|
||||
21
system/modules/services.nix
Normal file
21
system/modules/services.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
picom.enable = true;
|
||||
openssh.enable = true;
|
||||
spice-vdagentd.enable = true;
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "gb, us, ro";
|
||||
xkbOptions = "grp:alt_shift_toggle, caps:swapescape";
|
||||
|
||||
displayManager = {
|
||||
sddm.enable = true;
|
||||
sddm.theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
21
system/modules/sound.nix
Normal file
21
system/modules/sound.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
sound.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pamixer
|
||||
pavucontrol
|
||||
];
|
||||
}
|
||||
10
system/modules/theme.nix
Normal file
10
system/modules/theme.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome3.adwaita-icon-theme
|
||||
glib
|
||||
gsettings-desktop-schemas
|
||||
nwg-look
|
||||
];
|
||||
}
|
||||
5
system/modules/time.nix
Normal file
5
system/modules/time.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
time.timeZone = "Europe/London";
|
||||
}
|
||||
16
system/modules/users.nix
Normal file
16
system/modules/users.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.chris = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"docker"
|
||||
"qemu"
|
||||
"kvm"
|
||||
"libvirtd"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
}
|
||||
36
system/modules/virtualisation.nix
Normal file
36
system/modules/virtualisation.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation = {
|
||||
spiceUSBRedirection.enable = true;
|
||||
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
# ovmf.packages = [ pkgs.OVMFFULL.fd ];
|
||||
};
|
||||
};
|
||||
|
||||
podman = {
|
||||
enable = true;
|
||||
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-compose
|
||||
qemu
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
virt-manager
|
||||
virt-viewer
|
||||
win-spice
|
||||
win-virtio
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user