1st commit
This commit is contained in:
commit
74d15b4c6a
25 changed files with 1328 additions and 0 deletions
177
configuration/configuration.nix
Executable file
177
configuration/configuration.nix
Executable file
|
|
@ -0,0 +1,177 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./disk.nix
|
||||
./sddm.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Nvidia set-up
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
||||
};
|
||||
|
||||
# Enable the X11
|
||||
services.xserver.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
configPackages = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_6_6;
|
||||
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
useOSProber = true;
|
||||
milk-theme.enable = true;
|
||||
gfxmodeBios = "1680x1050";
|
||||
gfxpayloadBios = "keep";
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "benag";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Prague";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "cs_CZ.UTF-8";
|
||||
LC_IDENTIFICATION = "cs_CZ.UTF-8";
|
||||
LC_MEASUREMENT = "cs_CZ.UTF-8";
|
||||
LC_MONETARY = "cs_CZ.UTF-8";
|
||||
LC_NAME = "cs_CZ.UTF-8";
|
||||
LC_NUMERIC = "cs_CZ.UTF-8";
|
||||
LC_PAPER = "cs_CZ.UTF-8";
|
||||
LC_TELEPHONE = "cs_CZ.UTF-8";
|
||||
LC_TIME = "cs_CZ.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
printing.enable = true;
|
||||
printing.browsing = true;
|
||||
printing.defaultShared = true;
|
||||
printing.drivers = [pkgs.hplip pkgs.gutenprint];
|
||||
pulseaudio.enable = false;
|
||||
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
xserver = {
|
||||
windowManager.bspwm.enable = true;
|
||||
|
||||
xkb = {
|
||||
layout = "cz";
|
||||
variant = "";
|
||||
options = "caps:escape";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
console.keyMap = "cz-lat2";
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users.users.benag = {
|
||||
isNormalUser = true;
|
||||
description = "Ben Ag";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
programs.steam.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bspwm
|
||||
feh
|
||||
mumble
|
||||
sxhkd
|
||||
polybar
|
||||
kitty
|
||||
home-manager
|
||||
git
|
||||
go
|
||||
kdePackages.dolphin
|
||||
openfortivpn
|
||||
man-pages
|
||||
man-pages-posix
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
|
||||
# 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;
|
||||
# };
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
system.activationScripts.cleanBackups = ''
|
||||
echo "Removing.backup_nix files..."
|
||||
find /home/benag -type f -name "*.backup_nix" -delete
|
||||
'';
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
12
configuration/disk.nix
Normal file
12
configuration/disk.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
fileSystems."/mnt/removable" = {
|
||||
device = "/dev/disk/by-uuid/1a899f03-4c6a-460a-9635-c4b208b29fba";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nofail"
|
||||
"users"
|
||||
"rw"
|
||||
"exec"
|
||||
];
|
||||
};
|
||||
}
|
||||
35
configuration/hardware-configuration.nix
Normal file
35
configuration/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# 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 = [ "ata_generic" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/484ccde0-f6a7-4217-a9ad-98d975cddbc9";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/3f695248-688d-4d1b-90ff-352252af7bce"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s26u1u1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
48
configuration/sddm.nix
Normal file
48
configuration/sddm.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
{pkgs, ...}: let
|
||||
image = ../assets/wallpaper/bocchi-lockscreen.png;
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "sddm";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "rototrash";
|
||||
repo = "tokyo-night-sddm";
|
||||
rev = "320c8e74ade1e94f640708eee0b9a75a395697c6";
|
||||
sha256 = "sha256-JRVVzyefqR2L3UrEK2iWyhUKfPMUNUnfRZmwdz05wL0=";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R ./* $out/
|
||||
cd $out/
|
||||
[ -f Backgrounds/win11.png ] && rm Backgrounds/win11.png
|
||||
cp -r ${image} $out/Backgrounds/win11.png
|
||||
'';
|
||||
}
|
||||
*/
|
||||
{pkgs, ...}: let
|
||||
sddm-astronaut = pkgs.sddm-astronaut.override {
|
||||
embeddedTheme = "pixel_sakura_static";
|
||||
};
|
||||
in {
|
||||
services.displayManager = {
|
||||
sddm = {
|
||||
package = pkgs.kdePackages.sddm;
|
||||
extraPackages = with pkgs.kdePackages; [
|
||||
# sddm-astronaut
|
||||
qtsvg
|
||||
qtmultimedia
|
||||
qtvirtualkeyboard
|
||||
];
|
||||
enable = true;
|
||||
wayland.enable = false;
|
||||
autoNumlock = true;
|
||||
enableHidpi = false;
|
||||
theme = "sddm-astronaut-theme";
|
||||
};
|
||||
};
|
||||
environment.systemPackages = [sddm-astronaut];
|
||||
# Prevent getting stuck at shutdown
|
||||
systemd.settings.Manager = {
|
||||
DefaultTimeoutStopSec = "10s";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue