From fe0b45d2f76e0d2a28494bc5ff97323264e4b7be Mon Sep 17 00:00:00 2001 From: Jakub Trzeciak Date: Tue, 19 Sep 2023 19:39:57 +0200 Subject: Flake support --- .gitignore | 1 - README.md | 19 +++ autologin.nix | 19 --- configuration.nix | 345 --------------------------------------- flake.lock | 117 +++++++++++++ flake.nix | 58 +++++++ home-manager/home.nix | 6 +- makefile | 2 + nixos/autologin.nix | 19 +++ nixos/configuration.nix | 310 +++++++++++++++++++++++++++++++++++ nixos/hardware-configuration.nix | 41 +++++ 11 files changed, 569 insertions(+), 368 deletions(-) delete mode 100644 .gitignore delete mode 100644 autologin.nix delete mode 100644 configuration.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 makefile create mode 100644 nixos/autologin.nix create mode 100644 nixos/configuration.nix create mode 100644 nixos/hardware-configuration.nix diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 577b0a0..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -hardware-configuration.nix diff --git a/README.md b/README.md index 8d3e25f..1ebbb12 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ # Jptrzy's nixos config +**This configuration is impure,** so don't expect it will work for you out of the box, without any modifications. +For sure you need disk partitioned like bellow and write disk ids into **hardware-configuration.nix** file. +``` +disk +|- boot +|- encrypted + |- swap + |- root +``` + +## Why flake.nix for nixos configuration +Read more on [this blog post](https://www.tweag.io/blog/2020-07-31-nixos-flakes). + +If you want to start your own configuration check out [this repo](https://github.com/Misterio77/nix-starter-configs). + ## Installation [Full Guide](https://qfpl.io/posts/installing-nixos) + +## TODO +Use more independent config by implementing [nixos-hardware module](https://github.com/NixOS/nixos-hardware) and +using a separate file for partition config. diff --git a/autologin.nix b/autologin.nix deleted file mode 100644 index 42a3316..0000000 --- a/autologin.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, pkgs, getty, ... }: - -let - script = pkgs.writeText "login-program.sh" '' - if [[ "$(tty)" == '/dev/tty1' ]]; then - ${pkgs.shadow}/bin/login -f jp3; - else - ${pkgs.shadow}/bin/login; - fi - ''; -in - -{ - services.getty = { - loginProgram = "${pkgs.bash}/bin/sh"; - loginOptions = toString script; - extraArgs = [ "--skip-login" ]; - }; -} diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index 9c83935..0000000 --- a/configuration.nix +++ /dev/null @@ -1,345 +0,0 @@ -# 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, ... }: - -let - user = "jp3"; - - home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz"; - - dmenu-src = builtins.fetchTarball "https://git.jptrzy.xyz/dmenu/snapshot/master.tar.gz"; - #dwm-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwm/snapshot/master.tar.gz"; - dwmblocks-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwmblocks/snapshot/master.tar.gz"; - neo-comic-mono-font = builtins.fetchTarball "https://git.jptrzy.xyz/neo-comic-mono-font/snapshot/master.tar.gz"; - sent-src = builtins.fetchTarball "https://git.jptrzy.xyz/sent/snapshot/master.tar.gz"; - slock-src = builtins.fetchTarball "https://git.jptrzy.xyz/slock/snapshot/master.tar.gz"; - - dwm-src = /home/${user}/.local/src/dwm; -in { - -# NixOS Specific - # Copy the NixOS configuration - /run/current-system/configuration.nix - system.copySystemConfiguration = true; - # Check out https://nixos.org/nixos/options.html). - system.stateVersion = "23.05"; # Did you read the comment? - - nixpkgs.config.allowUnfree = true; - - nix.extraOptions = '' - experimental-features = nix-command flakes - ''; - nix.gc.automatic = true; - - imports = [ - (import "${home-manager}/nixos") - - # Include the results of the hardware scan. - ./hardware-configuration.nix - - # Autologin on tty1 - ./autologin.nix - ]; - - nixpkgs.config.packageOverrides = pkgs: { - nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { - inherit pkgs; - }; - - vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; - angband = pkgs.angband.override { - enableSdl2 = true; - }; - }; - - home-manager.users."${user}" = import ./home-manager/home.nix { - inherit user config pkgs; - inherit (pkgs) lib; - }; - security.pam.services."${user}".enableGnomeKeyring = true; - security.wrappers = { - slock = { - owner = "root"; group = "root"; - setuid = true; - source = "${pkgs.slock}/bin/slock"; - }; - }; - -# BootLoader - - boot = { - initrd.luks.devices = { # Decrypt LUKS Partition before accessing LVM(s) partitions - root = { - device = "/dev/sda2"; - preLVM = true; - }; - }; - - loader = { # Use the systemd-boot EFI boot loader. - systemd-boot = { - enable = true; - configurationLimit = 3; - }; - - efi.canTouchEfiVariables = true; - }; - }; - -# System - - # Set your time zone. - time.timeZone = "Europe/Warsaw"; - - users.groups."${user}" = {}; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users."${user}" = { - createHome = true; - isNormalUser = true; - extraGroups = [ "${user}" "wheel" "video" "audio" "disk" "networkmanager" ]; # Enable ‘sudo’ for the user. - group = "users"; - home = "/home/${user}"; - uid = 1000; - }; - - # Network - networking = { - hostName = "jp3-x270"; # Define your hostname. - networkmanager.enable = true; # Easiest to use and most distros use this by default. - }; - - # Enable sound. - sound.enable = true; - - hardware = { - bluetooth = { - enable = true; - settings = { - General = { - Enable = "Source,Sink,Media,Socket"; - }; - }; - }; - - pulseaudio = { - enable = true; - package = pkgs.pulseaudioFull; - extraConfig = " - load-module module-switch-on-connect - "; - }; - - opengl = { - enable = 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 - libGL - ]; - setLdLibraryPath = true; - }; - }; - - services = { - logind.extraConfig = '' - HandleLidSwitch=suspend - ''; - - xserver = { # Enable the X11 windowing system. - enable = true; - - layout = "pl"; - xkbOptions = "caps:escape"; - - displayManager.sx.enable = true; - windowManager.dwm.enable = true; - - libinput = { - enable = true; - touchpad = { - naturalScrolling = true; - clickMethod = "none"; - tapping = false; - }; - }; - }; - - printing = { - enable = true; - - drivers = [ - pkgs.hplip - pkgs.hplipWithPlugin - ]; - }; - - avahi = { - enable = true; - nssmdns = true; - openFirewall = true; - }; - - auto-cpufreq.enable = true; # Helps battery life - - flatpak.enable = true; - - gvfs.enable = true; # Gvfs - Trash and MTP (Smartphones) - - dbus.enable = true; - }; - -# Lock on lid close - #systemd.user.services.systemd-lock-handler = { - # enable = true; - #}; - - #systemd.services.xautolock-lid-close = { - # enable = true; - # description = "Enable xautolock on lid close"; - - # before = [ "sleep.target" ]; - # wantedBy = [ "sleep.target" ]; - - # serviceConfig = { - # Type = "forking"; - # User = "root"; - # Environment = "DISPLAY=:1"; - # ExecStartPre = "${pkgs.xorg.xhost}/bin/xhost si:localuser:root"; - # ExecStart = "${pkgs.xautolock}/bin/xautolock --locknow"; - # }; - #}; - -# Services - - # PinEntry for GnuPG - programs.gnupg.agent = { - enable = true; - pinentryFlavor = "gnome3"; - enableSSHSupport = true; - }; - - # Portals - xdg.portal.enable = true; - xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - -# Programs - # Enable Sceen Brightness - programs.light.enable = true; - - programs.system-config-printer.enable = true; - - # Fonts - fonts.fonts = with pkgs; [ - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - - font-awesome - - # Custom - (import "${neo-comic-mono-font}") - ]; - - # Gaming - programs.steam = { - enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server - }; - - # Suckless Overlays - nixpkgs.overlays = [ - (final: prev: { - dmenu = prev.dmenu.overrideAttrs (old: { src = dmenu-src; }); - dwm = prev.dwm.overrideAttrs (old: { src = dwm-src; }); - dwmblocks = prev.dwmblocks.overrideAttrs (old: { src = dwmblocks-src; }); - sent = prev.dwm.overrideAttrs (old: { src = sent-src; }); - slock = prev.slock.overrideAttrs (old: { - src = slock-src; - buildInputs = with pkgs; [ - xorg.libXinerama - xorg.libXft - imlib2 - ] ++ old.buildInputs; - }); - }) - ]; - -# List packages installed in system profile. To search, run: - environment.binsh = "${pkgs.dash}/bin/dash"; - - # $ nix search wget - environment.systemPackages = with pkgs; [ - #(import /home/.../.local/src/slock/default.nix { - # inherit fetchurl lib stdenv writeText; - # inherit libxcrypt; - # inherit (xorg) xorgproto libX11 libXext libXrandr; - #}) - neovim - git - wget - htop - gnumake - gcc - gnupg - pass - killall - shellcheck - - # Window Manager - cmus - dconf - dmenu dwm dwmblocks slock - xclip - nsxiv - zathura - - pinentry-gnome gcr pinentry-gtk2 - - # Heavy - lazygit - alacritty - firefox - gnome.nautilus - pika-backup - pavucontrol - logseq - heroic - lxappearance - fontpreview - ffmpeg - mpv - thunderbird - signal-desktop - w3m - texlive.combined.scheme-full - yt-dlp - curl - ueberzug - libnotify - abaddon # Discord - inkscape gimp krita - cups - arandr - monero-gui - sent - xautolock - fragments # Torrent client - - # Gnome Apps without Gnome - gnome.adwaita-icon-theme libsecret gnome.seahorse - - # Lanuguages - nil nix-index - - # Games - angband - nethack - openttd - dolphin-emu - ]; -} - diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..98e73b5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,117 @@ +{ + "nodes": { + "base16-schemes": { + "flake": false, + "locked": { + "lastModified": 1680729003, + "narHash": "sha256-M9LHTL24/W4oqgbYRkz0B2qpNrkefTs98pfj3MxIXnU=", + "owner": "tinted-theming", + "repo": "base16-schemes", + "rev": "dc048afa066287a719ddbab62b3e19e4b5110cf0", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-schemes", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1695108154, + "narHash": "sha256-gSg7UTVtls2yO9lKtP0yb66XBHT1Fx5qZSZbGMpSn2c=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "07682fff75d41f18327a871088d20af2710d4744", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-23.05", + "repo": "home-manager", + "type": "github" + } + }, + "nix-colors": { + "inputs": { + "base16-schemes": "base16-schemes", + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1682108218, + "narHash": "sha256-tMr7BbxualFQlN+XopS8rMMgf2XR9ZfRuwIZtjsWmfI=", + "owner": "misterio77", + "repo": "nix-colors", + "rev": "b92df8f5eb1fa20d8e09810c03c9dc0d94ef2820", + "type": "github" + }, + "original": { + "owner": "misterio77", + "repo": "nix-colors", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1694937365, + "narHash": "sha256-iHZSGrb9gVpZRR4B2ishUN/1LRKWtSHZNO37C8z1SmA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5d017a8822e0907fb96f7700a319f9fe2434de02", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1680397293, + "narHash": "sha256-wBpJ73+tJ8fZSWb4tzNbAVahC4HSo2QG3nICDy4ExBQ=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "b18d328214ca3c627d3cc3f51fd9d1397fdbcd7a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1694959747, + "narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "970a59bd19eff3752ce552935687100c46e820a5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nix-colors": "nix-colors", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..344a8a1 --- /dev/null +++ b/flake.nix @@ -0,0 +1,58 @@ +{ + description = "Jptrzy's nixos config"; + + inputs = { + # Nixpkgs + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + # Home manager + home-manager.url = "github:nix-community/home-manager/release-23.05"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + # Nix Colors + nix-colors.url = "github:misterio77/nix-colors"; + }; + + outputs = { + self, + nixpkgs, + home-manager, + ... + } @ inputs: let + inherit (self) outputs; + + username = "jp3"; + hostname = "x270"; + + system = "x86_64-linux"; + + pkgs = import nixpkgs { + inherit system; + }; + lib = nixpkgs.lib; + in { + #overlays = import ./overlays {inherit inputs;}; + + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#your-hostname' + nixosConfigurations = { + ${hostname} = nixpkgs.lib.nixosSystem { + specialArgs = { inherit username hostname system inputs outputs; }; + modules = [ + ./nixos/configuration.nix + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.${username} = { + imports = [ ./home-manager/home.nix ]; + }; + home-manager.extraSpecialArgs = { inherit username; }; + } + ]; + }; + }; + + }; +} diff --git a/home-manager/home.nix b/home-manager/home.nix index 3141fdc..b46d8ba 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -1,4 +1,4 @@ -{ user, config, pkgs, lib, ... }: +{ username, pkgs, lib, ... }: let nvim-spell-pl-utf8-dict = builtins.fetchurl { @@ -6,8 +6,8 @@ let sha256 = "1sg7hnjkvhilvh0sidjw5ciih0vdia9vas8vfrd9vxnk9ij51khl"; }; in { - home.username = "${user}"; - home.homeDirectory = "/home/${user}"; + home.username = "${username}"; + home.homeDirectory = "/home/${username}"; home.stateVersion = "22.05"; # Please read the comment before changing. diff --git a/makefile b/makefile new file mode 100644 index 0000000..62d98a4 --- /dev/null +++ b/makefile @@ -0,0 +1,2 @@ +sync: + sudo nixos-rebuild switch --flake .#x270 --show-trace --impure diff --git a/nixos/autologin.nix b/nixos/autologin.nix new file mode 100644 index 0000000..42a3316 --- /dev/null +++ b/nixos/autologin.nix @@ -0,0 +1,19 @@ +{ config, pkgs, getty, ... }: + +let + script = pkgs.writeText "login-program.sh" '' + if [[ "$(tty)" == '/dev/tty1' ]]; then + ${pkgs.shadow}/bin/login -f jp3; + else + ${pkgs.shadow}/bin/login; + fi + ''; +in + +{ + services.getty = { + loginProgram = "${pkgs.bash}/bin/sh"; + loginOptions = toString script; + extraArgs = [ "--skip-login" ]; + }; +} diff --git a/nixos/configuration.nix b/nixos/configuration.nix new file mode 100644 index 0000000..3d1dfb6 --- /dev/null +++ b/nixos/configuration.nix @@ -0,0 +1,310 @@ +# 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`). + +{ hostname, username, config, pkgs, ... }: + +let + dmenu-src = builtins.fetchTarball "https://git.jptrzy.xyz/dmenu/snapshot/master.tar.gz"; + #dwm-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwm/snapshot/master.tar.gz"; + dwmblocks-src = builtins.fetchTarball "https://git.jptrzy.xyz/dwmblocks/snapshot/master.tar.gz"; + neo-comic-mono-font = builtins.fetchTarball "https://git.jptrzy.xyz/neo-comic-mono-font/snapshot/master.tar.gz"; + sent-src = builtins.fetchTarball "https://git.jptrzy.xyz/sent/snapshot/master.tar.gz"; + slock-src = builtins.fetchTarball "https://git.jptrzy.xyz/slock/snapshot/master.tar.gz"; + + dwm-src = /home/${username}/.local/src/dwm; +in { + system.stateVersion = "23.05"; # Did you read the comment? + + nixpkgs.config.allowUnfree = true; + + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + nix.gc.automatic = true; + + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + + # Autologin on tty1 + ./autologin.nix + ]; + + nixpkgs.config.packageOverrides = pkgs: { + nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { + inherit pkgs; + }; + + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + angband = pkgs.angband.override { + enableSdl2 = true; + }; + }; + + security.pam.services."${username}".enableGnomeKeyring = true; + security.wrappers = { + slock = { + owner = "root"; group = "root"; + setuid = true; + source = "${pkgs.slock}/bin/slock"; + }; + }; + +# BootLoader + + boot = { + # Decrypt LUKS Partition before accessing LVM(s) partitions + initrd.luks.devices = { + root = { + device = "/dev/sda2"; + preLVM = true; + }; + }; + + # Use the systemd-boot EFI boot loader. + loader = { + systemd-boot = { + enable = true; + configurationLimit = 3; + }; + + efi.canTouchEfiVariables = true; + }; + }; + +# System + + # Set your time zone. + time.timeZone = "Europe/Warsaw"; + + users.groups."${username}" = {}; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users."${username}" = { + createHome = true; + isNormalUser = true; + extraGroups = [ "${username}" "wheel" "video" "audio" "disk" "networkmanager" ]; # Enable ‘sudo’ for the user. + group = "users"; + home = "/home/${username}"; + uid = 1000; + }; + + # Network + networking = { + hostName = "${hostname}"; # Define your hostname. + networkmanager.enable = true; # Easiest to use and most distros use this by default. + }; + + # Enable sound. + sound.enable = true; + + hardware = { + bluetooth = { + enable = true; + settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + }; + }; + }; + + pulseaudio = { + enable = true; + package = pkgs.pulseaudioFull; + extraConfig = " + load-module module-switch-on-connect + "; + }; + + opengl = { + enable = 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 + libGL + ]; + setLdLibraryPath = true; + }; + }; + + services = { + logind.extraConfig = '' + HandleLidSwitch=suspend + ''; + + xserver = { # Enable the X11 windowing system. + enable = true; + + layout = "pl"; + xkbOptions = "caps:escape"; + + displayManager.sx.enable = true; + windowManager.dwm.enable = true; + + libinput = { + enable = true; + touchpad = { + naturalScrolling = true; + clickMethod = "none"; + tapping = false; + }; + }; + }; + + #printing = { + # enable = true; + # drivers = [ + # pkgs.hplip + # pkgs.hplipWithPlugin + # ]; + #}; + + avahi = { + enable = true; + nssmdns = true; + openFirewall = true; + }; + + auto-cpufreq.enable = true; # Helps battery life + + flatpak.enable = true; + + gvfs.enable = true; # Gvfs - Trash and MTP (Smartphones) + + dbus.enable = true; + }; + +# Services + + # PinEntry for GnuPG + programs.gnupg.agent = { + enable = true; + pinentryFlavor = "gnome3"; + enableSSHSupport = true; + }; + + # Portals + xdg.portal.enable = true; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + +# Programs + # Enable Sceen Brightness + programs.light.enable = true; + + programs.system-config-printer.enable = true; + + # Fonts + fonts.fonts = with pkgs; [ + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + + font-awesome + + # Custom + (import "${neo-comic-mono-font}") + ]; + + # Gaming + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + }; + + # Suckless Overlays + nixpkgs.overlays = [ + (final: prev: { + dmenu = prev.dmenu.overrideAttrs (old: { src = dmenu-src; }); + dwm = prev.dwm.overrideAttrs (old: { src = dwm-src; }); + dwmblocks = prev.dwmblocks.overrideAttrs (old: { src = dwmblocks-src; }); + sent = prev.dwm.overrideAttrs (old: { src = sent-src; }); + slock = prev.slock.overrideAttrs (old: { + src = slock-src; + buildInputs = with pkgs; [ + xorg.libXinerama + xorg.libXft + imlib2 + ] ++ old.buildInputs; + }); + }) + ]; + +# List packages installed in system profile. To search, run: + environment.binsh = "${pkgs.dash}/bin/dash"; + + # $ nix search wget + environment.systemPackages = with pkgs; [ + #(import /home/.../.local/src/slock/default.nix { + # inherit fetchurl lib stdenv writeText; + # inherit libxcrypt; + # inherit (xorg) xorgproto libX11 libXext libXrandr; + #}) + neovim + git + wget + htop + gnumake + gcc + gnupg + pass + killall + shellcheck + + # Window Manager + cmus + dconf + dmenu dwm dwmblocks slock + xclip + nsxiv + zathura + + pinentry-gnome gcr pinentry-gtk2 + + # Heavy + lazygit + alacritty + firefox + gnome.nautilus + pika-backup + pavucontrol + logseq + heroic + lxappearance + fontpreview + ffmpeg + mpv + thunderbird + signal-desktop + w3m + texlive.combined.scheme-full + yt-dlp + curl + ueberzug + libnotify + abaddon # Discord + inkscape gimp krita + cups + arandr + monero-gui + sent + xautolock + fragments # Torrent client + + # Gnome Apps without Gnome + gnome.adwaita-icon-theme libsecret gnome.seahorse + + # Lanuguages + nil nix-index + + # Games + #angband + #nethack + #openttd + dolphin-emu + ]; +} + diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix new file mode 100644 index 0000000..ef908ea --- /dev/null +++ b/nixos/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/ff088d99-9fdc-4013-8082-008148360c14"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/091D-7160"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/1135c8e4-787d-4643-ac13-64c454d7a6cd"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} -- cgit v1.2.3