build: use flakes for config
This commit is contained in:
parent
0fb2341372
commit
045287e682
21 changed files with 84 additions and 110 deletions
|
@ -3,12 +3,9 @@
|
|||
what is currently not working:
|
||||
|
||||
- plymouth theme has no login prompt
|
||||
- sddm theme flashes white
|
||||
- autosign in to keyring
|
||||
|
||||
what i want to do:
|
||||
|
||||
- learn flakes
|
||||
- add auto-rotate widget in ags control center
|
||||
- when multiple widgets open, clicking on a background one puts it forward
|
||||
|
||||
|
|
|
@ -4,11 +4,15 @@
|
|||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
initrd.systemd.enable = true;
|
||||
|
||||
initrd = {
|
||||
verbose = false;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 2;
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
|
@ -19,15 +23,12 @@
|
|||
# Because it still draws that image otherwise
|
||||
splashImage = null;
|
||||
};
|
||||
timeout = 2;
|
||||
};
|
||||
|
||||
extraModulePackages = with config.boot.kernelPackages; [
|
||||
v4l2loopback
|
||||
];
|
||||
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
|
@ -19,10 +19,12 @@
|
|||
fwupd.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
printing.drivers = with pkgs; [
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
hplip
|
||||
];
|
||||
};
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{config, pkgs, lib, ...}:
|
||||
{ pkgs, hyprland, ... }:
|
||||
|
||||
{
|
||||
systemd.user.services.protonmail-bridge = {
|
||||
|
@ -30,10 +30,10 @@
|
|||
};
|
||||
};
|
||||
sessionPackages = [
|
||||
(builtins.getFlake "github:hyprwm/Hyprland").packages.x86_64-linux.default
|
||||
hyprland.packages.x86_64-linux.default
|
||||
];
|
||||
defaultSession = "hyprland";
|
||||
autoLogin = { # logs out after a minute
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "matt";
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.fprintd.enable = true;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./overlays/list.nix
|
||||
./cfg/main.nix
|
||||
|
@ -29,7 +28,6 @@
|
|||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
GTK_THEME = "Dracula";
|
||||
|
@ -37,8 +35,6 @@
|
|||
QT_FONT_DPI = "125";
|
||||
};
|
||||
|
||||
system.autoUpgrade.channel = "https://nixos.org/channels/nixos-unstable";
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
|
@ -46,5 +42,4 @@
|
|||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
|
BIN
nixos/flake.lock
Normal file
BIN
nixos/flake.lock
Normal file
Binary file not shown.
BIN
nixos/flake.nix
Normal file
BIN
nixos/flake.nix
Normal file
Binary file not shown.
|
@ -1,27 +1,25 @@
|
|||
# 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, ... }:
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/6ae4d722-dacf-485a-8d29-b276f540dc91";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/6ae4d722-dacf-485a-8d29-b276f540dc91";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/ab82b477-2477-453f-b95f-28e5553ad10d";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/F6E1-006D";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/F6E1-006D";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.bash = { # TODO: deal with root dotfiles
|
||||
|
@ -29,8 +29,8 @@
|
|||
"cdspell"
|
||||
"dirspell"
|
||||
"dotglob"
|
||||
]
|
||||
;
|
||||
];
|
||||
|
||||
shellAliases = {
|
||||
sudo = "sudo ";
|
||||
frick = "sudo $(fc -ln -1)";
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
{ pkgs, config, ... }: let
|
||||
|
||||
{ pkgs, config, hyprland, hyprgrass, ags, ... }: let
|
||||
configDir = "/home/matt/.nix/config";
|
||||
|
||||
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
|
||||
|
||||
hyprland = (import flake-compat {
|
||||
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz";
|
||||
}).defaultNix;
|
||||
|
||||
ags = (builtins.getFlake "github:Aylur/ags");
|
||||
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
|
@ -25,15 +15,16 @@ in
|
|||
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
package = ags.packages.x86_64-linux.default;
|
||||
configDir = config.lib.file.mkOutOfStoreSymlink "${configDir}/ags";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = (builtins.getFlake "github:horriblename/hyprgrass").inputs.hyprland.packages.x86_64-linux.default;
|
||||
package = hyprland.packages.x86_64-linux.default;
|
||||
|
||||
plugins = [
|
||||
"${(builtins.getFlake "github:horriblename/hyprgrass").packages.x86_64-linux.default}/lib/libhyprgrass.so"
|
||||
"${hyprgrass.packages.x86_64-linux.default}/lib/libhyprgrass.so"
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
||||
in
|
||||
{ home-manager, ... }:
|
||||
|
||||
{
|
||||
## Global config to add home-manager module
|
||||
#############################################################################
|
||||
imports =
|
||||
[
|
||||
(import "${home-manager}/nixos")
|
||||
imports = [
|
||||
home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
# Define a user account. Don't forget to set a password with 'passwd'.
|
||||
|
|
|
@ -40,6 +40,12 @@
|
|||
(with plasma5Packages; [
|
||||
polkit-kde-agent
|
||||
qtstyleplugin-kvantum
|
||||
ark
|
||||
kcharselect
|
||||
kdenlive
|
||||
okular
|
||||
|
||||
# Dolphin & co
|
||||
dolphin
|
||||
dolphin-plugins
|
||||
kdegraphics-thumbnailers
|
||||
|
@ -47,11 +53,7 @@
|
|||
kio
|
||||
kio-admin # needs to be both here and in system pkgs
|
||||
kio-extras
|
||||
ark
|
||||
kcharselect
|
||||
kdenlive
|
||||
kmime
|
||||
okular
|
||||
|
||||
]) ++
|
||||
(with gnome; [
|
||||
|
@ -59,8 +61,8 @@
|
|||
seahorse
|
||||
adwaita-icon-theme
|
||||
|
||||
]) ++
|
||||
[
|
||||
]) ++ [
|
||||
|
||||
(writeShellScriptBin "Gparted" ''
|
||||
(
|
||||
sleep 1.5
|
||||
|
@ -79,9 +81,10 @@
|
|||
# School
|
||||
virt-manager
|
||||
gradle
|
||||
gradle-completion
|
||||
gradle-completion # not working
|
||||
jdk19_headless
|
||||
#camunda-modeler
|
||||
#
|
||||
|
||||
protonmail-bridge
|
||||
thunderbird
|
||||
input-emulator
|
||||
|
@ -102,7 +105,6 @@
|
|||
qt6.qtwayland
|
||||
bottles-unwrapped
|
||||
zscroll
|
||||
httrack
|
||||
lisgd
|
||||
zeal
|
||||
acpi
|
||||
|
@ -115,7 +117,6 @@
|
|||
xdg-utils
|
||||
pavucontrol # TODO: open on left click
|
||||
gimp-with-plugins
|
||||
jdk19_headless
|
||||
bluez-tools
|
||||
vlc
|
||||
discord
|
||||
|
@ -149,6 +150,5 @@
|
|||
squeekboard
|
||||
glib
|
||||
appimage-run
|
||||
gparted # doesn't open without sudo
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ neovim-nightly-overlay, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
|
@ -25,8 +25,6 @@
|
|||
coloryou = final.callPackage ./pkgs/coloryou/default.nix {};
|
||||
})
|
||||
|
||||
(import (builtins.fetchTarball {
|
||||
url = "https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz";
|
||||
}))
|
||||
neovim-nightly-overlay.overlay
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
{ stdenv
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
### test package
|
||||
{ lib
|
||||
, stdenv
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
{ stdenv
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
|
|
Loading…
Reference in a new issue