initial commit

This commit is contained in:
DashieTM 2024-04-15 18:52:30 +02:00
parent 6671b54dd2
commit e50591b2ec
162 changed files with 922 additions and 6328 deletions

13
nix/base/big_g.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, ... }: {
services = {
# needed for GNOME services outside of GNOME Desktop
dbus.packages = with pkgs; [
gcr
gnome.gnome-settings-daemon
];
gnome.gnome-keyring.enable = true;
gvfs.enable = true;
};
}

12
nix/base/default.nix Normal file
View file

@ -0,0 +1,12 @@
{ lib
, pkgs
, ...
}: {
imports = [
./login_manager.nix
./big_g.nix
./env.nix
./xkb_layout.nix
../hardware/streamdeck.nix
];
}

14
nix/base/env.nix Normal file
View file

@ -0,0 +1,14 @@
{ lib
, pkgs
, ...
}: {
environment.variables = {
GSETTINGS_SCHEMA_DIR = "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}";
NEOVIDE_MAXIMIZED = "0";
GPG_TTY = "$(tty)";
EDITOR = "neovide --no-fork";
SUDO_EDITOR = "neovide --no-fork";
SCRIPTS = "$HOME/.config/scripts";
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

View file

@ -0,0 +1,24 @@
{pkgs,
config,
lib,
...
}: {
# greetd display manager
services.greetd = let
session = {
command = "${pkgs.hyprland}/bin/Hyprland --config /home/dashie/.config/hypr/hyprgreet.conf";
user = "dashie";
};
in {
enable = true;
settings = {
terminal.vt = 1;
default_session = session;
initial_session = session;
};
};
programs.regreet.enable = true;
# unlock GPG keyring on login
security.pam.services.greetd.enableGnomeKeyring = true;
}

27
nix/base/xkb_layout.nix Normal file
View file

@ -0,0 +1,27 @@
{ pkgs
, ...
}:
let
customKeyboardLayout = pkgs.writeText "us_int" ''
xkb_symbols "us_int"
{
include "us(basic)"
key <AC11> {[ apostrophe, dead_diaeresis, apostrophe, quotedouble ] };
key <TLDE> {[ grave, asciitilde ] };
};
'';
compiledLayout = pkgs.runCommand "keyboard-layout" { } ''
${pkgs.xorg.xkbcomp}/bin/xkbcomp ${customKeyboardLayout} $out
'';
in
{
environment.systemPackages = [ pkgs.xorg.xkbcomp ];
services.xserver.xkb.extraLayouts.us_int = {
description = "US layout with 'umlaut'";
languages = [ "eng" ];
#symbolsFile = ${customKeyboardLayout};
symbolsFile = /home/dashie/.config/symbols/us_int;
};
#services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xkbcomp}/bin/xkbcomp ${compiledLayout} $DISPLAY";
}

46
nix/base_packages.nix Normal file
View file

@ -0,0 +1,46 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
openssl
dbus
glib
gtk4
gtk3
gtk-layer-shell
gtk4-layer-shell
direnv
dconf
gsettings-desktop-schemas
gnome.nixos-gsettings-overrides
gnome.adwaita-icon-theme
bibata-cursors
xorg.xkbutils
];
fonts.packages = with pkgs; [
cantarell-fonts
];
environment.variables = {
NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (config.systemd.packages ++ config.environment.systemPackages);
PKG_CONFIG_PATH = pkgs.lib.makeLibraryPath (config.systemd.packages ++ config.environment.systemPackages);
};
nix.settings.experimental-features = "nix-command flakes";
programs.fish.enable = true;
programs.fish.promptInit = ''
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
'';
programs.dconf.enable = true;
services.printing.enable = true;
services.dbus.enable = true;
services.dbus.packages = with pkgs; [
gnome2.GConf
];
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
}

View file

@ -6,21 +6,23 @@
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
[
# Include the results of the hardware scan.
#./hardware-configuration.nix
./base_packages.nix
./direnv.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelParams = [
"amdgpu.ppfeaturemask=0xffffffff"
];
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# WARNING: Simply change this for each config
networking.hostName = "spaceship";
# Enable networking
networking.networkmanager.enable = true;
@ -35,14 +37,10 @@
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
@ -59,13 +57,32 @@
pulse.enable = true;
};
environment.variables = rec {
XDG_CACHE_HOME = "$HOME/.cache";
DIRENV_LOG_FORMAT = "";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.dashie = {
isNormalUser = true;
description = "dashie";
extraGroups = [ "networkmanager" "wheel" "gamemode"];
extraGroups = [ "networkmanager" "wheel" "gamemode" ];
packages = with pkgs; [
home-manager
home-manager
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
];
};
nix.settings = {
builders-use-substitutes = true;
# substituters to use
substituters = [
"https://anyrun.cachix.org"
];
trusted-public-keys = [
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
];
};

13
nix/direnv.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, ... }: {
#set to default values
programs.direnv = {
package = pkgs.direnv;
silent = false;
loadInNixShell = true;
direnvrcExtra = "";
nix-direnv = {
enable = true;
package = pkgs.nix-direnv;
};
};
}

211
nix/flake.lock generated
View file

@ -1,22 +1,70 @@
{
"nodes": {
"flatpaks": {
"Hyprspace": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
"hyprland": [
"hyprland"
],
"hyprlandPlugins": "hyprlandPlugins",
"nixpkgs": [
"Hyprspace",
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1707326266,
"narHash": "sha256-vRVih6iltuyLdj305Pj236BfhzFaOkAbHg3r5VsFdxs=",
"owner": "GermanBread",
"repo": "declarative-flatpak",
"rev": "efe7897ddcfbca085fba0690b3094e7f8e8911dd",
"lastModified": 1713113295,
"narHash": "sha256-3oivuUgU2B3zQIuop1lc+VXBOhqCnZMl81pFYdZu1oc=",
"owner": "KZDKM",
"repo": "Hyprspace",
"rev": "046533d6fb0244874273254d4008cbdc48621829",
"type": "github"
},
"original": {
"owner": "GermanBread",
"ref": "stable",
"repo": "declarative-flatpak",
"owner": "KZDKM",
"repo": "Hyprspace",
"type": "github"
}
},
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1712136515,
"narHash": "sha256-LpjQJYC24S5P5XhJsZX6HqsQT1pohcFzM6N42I6qo/U=",
"owner": "Kirottu",
"repo": "anyrun",
"rev": "be6728884d543665e7bd137bbef62dc1d04a210b",
"type": "github"
},
"original": {
"owner": "Kirottu",
"repo": "anyrun",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"anyrun",
"nixpkgs"
]
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
@ -27,16 +75,15 @@
]
},
"locked": {
"lastModified": 1709578214,
"narHash": "sha256-jSCHB1+9eA0S2h7G8Aju8XARK0vbDuOR7uFFvCEsKhk=",
"lastModified": 1713077896,
"narHash": "sha256-Noot8H0EZEAFRQWyGxh9ryvhK96xpIqKbh78X447JWs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "219f4bef6d22bc67cddefbba69aadb748d79c49d",
"rev": "630a0992b3627c64e34f179fab68e3d48c6991c0",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
@ -75,22 +122,25 @@
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"nixpkgs": "nixpkgs_2",
"systems": "systems_2",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1713050186,
"narHash": "sha256-AKdzVa0Zz5PQ1ptQgD0jj8J+UZUW9OeKGZ0mNVnkyI4=",
"lastModified": 1713126795,
"narHash": "sha256-IX9N+WMMcdBsxjQFLHjBCwXByMt+0S8sL18dQ2QTzvI=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "0634aaeac6cca12e4f72174c431c2db9da9c0072",
"rev": "67f47fbdccd639502a76ccb3552a23df37f19ef8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "67f47fbdccd639502a76ccb3552a23df37f19ef8",
"type": "github"
}
},
@ -119,6 +169,33 @@
"type": "github"
}
},
"hyprlandPlugins": {
"inputs": {
"hyprland": [
"Hyprspace",
"hyprland"
],
"systems": [
"Hyprspace",
"hyprlandPlugins",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1712836056,
"narHash": "sha256-qf6yev9OlJuQv557ApLQ/5V8pQj0YOO9tyh5j3It1mY=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "e9457e08ca3ff16dc5a815be62baf9e18b539197",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-plugins",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"nixpkgs": [
@ -144,39 +221,22 @@
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1711997375,
"narHash": "sha256-KvU4gOtuFMS9Il67glRGtdNfguAINT9pCaXtvCL8uI8=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "45bf66f7068db79b552da864c0e87452be624d6c",
"type": "github"
},
"original": {
"owner": "gmodena",
"repo": "nix-flatpak",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1706098335,
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1712439257,
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1713088362,
"narHash": "sha256-ttDSOqkEBinjA1dlMWkBjaXzTqjiAPt5lNkoONbz25Y=",
@ -193,28 +253,15 @@
},
"root": {
"inputs": {
"flatpaks": "flatpaks",
"Hyprspace": "Hyprspace",
"anyrun": "anyrun",
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_3"
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@ -229,38 +276,20 @@
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"lastModified": 1712935342,
"narHash": "sha256-zzIbTFNFd/as42jyGx23fil2uBDYYv+8GA5JmRq5y9c=",
"lastModified": 1713124002,
"narHash": "sha256-vPeZCY+sdiGsz4fl3AVVujfyZyQBz6+vZdkUE4hQ+HI=",
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "62eeffbe233d199f520a5755c344e85f8eab7940",
"rev": "611a4f24cd2384378f6e500253983107c6656c64",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "62eeffbe233d199f520a5755c344e85f8eab7940",
"rev": "611a4f24cd2384378f6e500253983107c6656c64",
"type": "github"
}
},

View file

@ -3,16 +3,26 @@
inputs =
{
flatpaks.url = "github:GermanBread/declarative-flatpak/stable";
nix-flatpak.url = "github:gmodena/nix-flatpak";
nixpkgs.url = "github:nixos/nixpkgs";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland/67f47fbdccd639502a76ccb3552a23df37f19ef8";
inputs.nixpkgs.follows = "nixpkgs";
};
Hyprspace = {
url = "github:KZDKM/Hyprspace";
inputs.hyprland.follows = "hyprland";
};
anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, flatpaks, hyprland }:
outputs = inputs @ { self, nixpkgs, home-manager, nix-flatpak, hyprland, anyrun, ... }:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
@ -30,26 +40,41 @@
inherit pkgs;
modules = [ ./hardware/overheating.nix ];
};
homeConfigurations."dashie" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
flatpaks.homeManagerModules.default
hyprland.homeManagerModules.default
./programs/hyprland/config.nix
];
};
nixosConfigurations."nixos" = nixpkgs.lib.nixosSystem {
nixosConfigurations."spaceship" = nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [
./configuration.nix
flatpaks.nixosModules.default
hyprland.nixosModules.default
home-manager.nixosModules.home-manager {
home-manager.users.dashie = import ./programs/default.nix {inherit pkgs; };
home-manager.useGlobalPkgs = true;
}
./programs/flatpak.nix
# TODO put this into not gaming
./hardware/spaceship.nix
./configuration.nix
./programs/gaming/default.nix
./base/default.nix
hyprland.nixosModules.default
home-manager.nixosModules.home-manager
{
xdg.portal.config.common.default = "*";
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
home-manager.useGlobalPkgs = true;
home-manager.users.dashie.imports = [
{
_module = { args = { inherit self inputs; }; };
}
./programs/default.nix
hyprland.homeManagerModules.default
anyrun.homeManagerModules.default
./programs/hyprland/default.nix #{inherit Hyprspace; }
nix-flatpak.homeManagerModules.nix-flatpak
./programs/flatpak.nix
];
home-manager.users.dashie.home.stateVersion = "24.05";
}
];
};
};

View file

@ -1,49 +0,0 @@
building the system configuration...
trace: warning: The option `services.xserver.xkbVariant' defined in `/nix/store/53sb5ixrwba793scv24rb8zl15z22jq1-source/configuration.nix' has been renamed to `services.xserver.xkb.variant'.
trace: warning: The option `services.xserver.layout' defined in `/nix/store/53sb5ixrwba793scv24rb8zl15z22jq1-source/configuration.nix' has been renamed to `services.xserver.xkb.layout'.
these 9 derivations will be built:
/nix/store/np0n7b6f05mzgln8isi0vjz3qv29wf1k-home-manager-path.drv
/nix/store/8c5l2gjr9jbilklrzvvjxa0m6y057lw0-hm_fontconfigconf.d10hmfonts.conf.drv
/nix/store/mnf21n8sfzxvqykzyriiabsq5kmv6glm-home-manager-files.drv
/nix/store/x0wjqz7aay3vaqzsqkxy45mpwbhmrdsn-activation-script.drv
/nix/store/dx1bjiby48rbq7qg1dwz6a6wdbxpsxvc-home-manager-generation.drv
/nix/store/bqjbbqzqgcy6ygz3qlh1y868j2h99xj8-unit-home-manager-dashie.service.drv
/nix/store/dm875ly78yc9lbwbw0061bpwz5ani7mc-system-units.drv
/nix/store/2s8xk8yl7l316x2k8qrlf3pwj2wy3h9c-etc.drv
/nix/store/jngp4gggy2qhwvhclcmlqylbnfv5c2ik-nixos-system-nixos-24.05.20240414.f32598c.drv
building '/nix/store/np0n7b6f05mzgln8isi0vjz3qv29wf1k-home-manager-path.drv'...
building '/nix/store/x0wjqz7aay3vaqzsqkxy45mpwbhmrdsn-activation-script.drv'...
building '/nix/store/8c5l2gjr9jbilklrzvvjxa0m6y057lw0-hm_fontconfigconf.d10hmfonts.conf.drv'...
building '/nix/store/mnf21n8sfzxvqykzyriiabsq5kmv6glm-home-manager-files.drv'...
building '/nix/store/dx1bjiby48rbq7qg1dwz6a6wdbxpsxvc-home-manager-generation.drv'...
building '/nix/store/bqjbbqzqgcy6ygz3qlh1y868j2h99xj8-unit-home-manager-dashie.service.drv'...
building '/nix/store/dm875ly78yc9lbwbw0061bpwz5ani7mc-system-units.drv'...
building '/nix/store/2s8xk8yl7l316x2k8qrlf3pwj2wy3h9c-etc.drv'...
building '/nix/store/jngp4gggy2qhwvhclcmlqylbnfv5c2ik-nixos-system-nixos-24.05.20240414.f32598c.drv'...
updating GRUB 2 menu...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
lsblk: /dev/mapper/no*[0-9]: not a block device
lsblk: /dev/mapper/raid*[0-9]: not a block device
lsblk: /dev/mapper/disks*[0-9]: not a block device
installing the GRUB 2 boot loader on /dev/sda...
Installing for i386-pc platform.
Installation finished. No error reported.
stopping swap device: /dev/disk/by-uuid/2cb00912-21ef-46e4-9a8c-14819a1335ae
stopping the following units: audit.service, boot.mount, dhcpcd.service, kmod-static-nodes.service, logrotate-checkconf.service, mount-pstore.service, network-interfaces.target, network-local-commands.service, network-setup.service, nscd.service, resolvconf.service, systemd-modules-load.service, systemd-oomd.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-vconsole-setup.service, virtualbox.service
NOT restarting the following changed units: -.mount, getty@tty1.service, systemd-fsck@dev-disk-by\x2duuid-719F\x2d1D58.service, systemd-journal-flush.service, systemd-logind.service, systemd-random-seed.service, systemd-remount-fs.service, systemd-update-utmp.service, systemd-user-sessions.service, user-runtime-dir@1000.service, user@1000.service
activating the configuration...
removing group systemd-journal-gateway
removing group dhcpcd
removing user systemd-journal-gateway
removing user dhcpcd
setting up /etc...
removing obsolete symlink /etc/dhcpcd.exit-hook...
removing obsolete symlink /etc/pulse/client.conf...
restarting systemd...
reloading user units for dashie...
restarting sysinit-reactivation.target
reloading the following units: dbus.service, firewall.service, reload-systemd-vconsole-setup.service
restarting the following units: systemd-journald.service
starting the following units: audit.service, kmod-static-nodes.service, logrotate-checkconf.service, mount-pstore.service, network-local-commands.service, network-setup.service, nscd.service, resolvconf.service, systemd-modules-load.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-vconsole-setup.service, virtualbox.service
the following new units were started: NetworkManager-dispatcher.service, NetworkManager-wait-online.service, NetworkManager.service, alsa-store.service, avahi-daemon.service, avahi-daemon.socket, cups-browsed.service, cups.service, cups.socket, dbus-broker.service, home-manager-dashie.service, manage-system-flatpaks.service, nix-daemon.service, sysinit-reactivation.target, systemd-hostnamed.service, systemd-tmpfiles-resetup.service

View file

@ -4,27 +4,53 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ ];
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/299e37e5-6a68-4cbe-97ad-0c59e5ed0bf4";
{
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/home" =
{
device = "/dev/disk/by-label/HOME";
fsType = "btrfs";
};
fileSystems."/drive2" =
{
device = "/dev/disk/by-label/DRIVE2";
fsType = "ext4";
};
swapDevices = [ ];
swapDevices =
[{ device = "/dev/disk/by-label/SWAP"; }];
# 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.enp0s3.useDHCP = lib.mkDefault true;
# networking.interfaces.enp15s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp16s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
virtualisation.virtualbox.guest.enable = true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1 +1 @@
{ config, lib, pkgs, modulesPath, ... }: {}
{ config, lib, pkgs, modulesPath, ... }: { }

View file

@ -1 +1 @@
{ config, lib, pkgs, modulesPath, ... }: {}
{ config, lib, pkgs, modulesPath, ... }: { }

View file

@ -1 +1,69 @@
{ config, lib, pkgs, modulesPath, ... }: {}
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [
"noatime"
"nodiratime"
"discard"
];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ];
};
fileSystems."/home" =
{
device = "/dev/disk/by-label/HOME";
fsType = "btrfs";
options = [
"noatime"
"nodiratime"
"discard"
];
};
fileSystems."/drive2" =
{
device = "/dev/disk/by-label/DRIVE2";
fsType = "ext4";
options = [
"noatime"
"nodiratime"
"discard"
];
};
swapDevices =
[{ device = "/dev/disk/by-label/SWAP"; }];
# 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.enp15s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp16s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.fstrim.enable = lib.mkDefault true;
nix.settings.auto-optimise-store = true;
}

View file

@ -0,0 +1,6 @@
{ pkgs, ... }: {
programs.streamdeck-ui = {
enable = true;
autoStart = true; # optional
};
}

117
nix/kek.nix Normal file
View file

@ -0,0 +1,117 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# networking.hostName = "nixos"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.dashie = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
git
neovim
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
# ];
# 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;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -1,40 +1,36 @@
{ inputs
, lib
, pkgs
{ lib
, fetchCrate
, rustPlatform
, ...
}: {
imports = [
./config.nix
./anyrun.nix
./ironbar.nix
];
home.packages = with pkgs; [
(rustPackage {
name = "oxinoti";
home.packages = [
rustPlatform.buildRustPackage
rec {
pname = "oxinoti";
version = "0.1.1";
src = fetchCrate {
inherit name version;
sha256 = lib.fakesha256;
inherit pname version;
hash = lib.fakehash;
};
})
(rustPackage {
name = "oxidash";
version = "0.1.0";
src = fetchCrate {
inherit name version;
sha256 = lib.fakesha256;
};
})
(rustPackage {
name = "oxishut";
version = "0.1.0";
src = fetchCrate {
inherit name version;
sha256 = lib.fakesha256;
};
})
}
#rustPlatform.buildRustPackage
#{
# pname = "oxidash";
# version = "0.1.0";
# #src = fetchCrate {
# # inherit name version;
# # sha256 = lib.fakesha256;
# #};
#}
#rustPlatform.buildRustPackage
#{
# pname = "oxishut";
# version = "0.1.0";
# #src = fetchCrate {
# # inherit name version;
# # sha256 = lib.fakesha256;
# #};
#}
];
}

View file

@ -1,5 +1,4 @@
{ lib
, pkgs
{ pkgs
, ...
}:
{
@ -12,9 +11,18 @@
go
nodejs_20
deno
# rustpython
python3
neovim
typst
neovide
tree-sitter
dotnet-runtime_8
unzip
pkg-config
lua-language-server
nil
nixpkgs-fmt
crate2nix
sqlite
];
}

View file

@ -1,6 +1,4 @@
{ lib
, pkgs
, fonts
{ pkgs
, ...
}:
{
@ -12,6 +10,7 @@
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
vesktop
kitty
firefox
fish
@ -22,7 +21,40 @@
lsd
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
flatpak
gnome.gnome-software
networkmanager
zoxide
pkgs.greetd.greetd
pkgs.greetd.regreet
fastfetch
pkgs.gnome.gnome-keyring
dbus
killall
adw-gtk3
gradience
qt5ct
qt6ct
libadwaita
yazi
gnutar
fishPlugins.tide
nix-index
libnotify
zenith
];
home.sessionPath = [
"$HOME/.cargo/bin"
];
home.sessionVariables = {
GOROOT = "$HOME/.go";
};
home.keyboard = null;
programs.nix-index =
{
enable = true;
enableFishIntegration = true;
};
}

View file

@ -1,15 +1,17 @@
{pkgs, ... }:
{ pkgs, ... }:
{
imports = [
./hyprland/default.nix
./common.nix
./kitty.nix
./coding.nix
./xdg.nix
./media.nix
./utils.nix
#./gtk.nix
#./cargo.nix
];
home.username = "dashie";
home.homeDirectory = "/home/dashie";
home.stateVersion = "23.05";
}
home.username = "dashie";
home.homeDirectory = "/home/dashie";
home.stateVersion = "24.05";
}

View file

@ -1,17 +1,17 @@
{...}: {
services.flatpak.remotes = {
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
};
services.flatpak.packages = [
"flathub:app/com.github.tchx84.Flatseal//stable"
"flathub:app/dev.vencord.Vesktop//stable"
"flathub:app/com.rustdesk.RustDesk//stable"
"flathub:app/io.github.Foldex.AdwSteamGtk//stable"
"flathub:app/io.github.Foldex.AdwSteamGtk//stable"
"flathub:app/org.gnome.dspy//stable"
"flathub:app/org.onlyoffice.desktopeditors//stable"
"flathub:app/org.gtk.Gtk3theme.adw-gtk3//stable"
"flathub:app/com.brave.Browser//stable"
{ lib, pkgs, ... }: {
services.flatpak.remotes = lib.mkOptionDefault [{
name = "flathub-stable";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}];
services.flatpak.uninstallUnmanaged = true;
services.flatpak.packages = [
"com.github.tchx84.Flatseal"
"io.github.Foldex.AdwSteamGtk"
"org.gnome.dspy"
"org.onlyoffice.desktopeditors"
"org.gtk.Gtk3theme.adw-gtk3"
"com.brave.Browser"
];
}

View file

@ -0,0 +1,36 @@
{ lib
, pkgs
, ...
}: {
imports = [
# ./anyrun.nix
# ./config.nix
];
environment.systemPackages = with pkgs; [
gamemode
steam
lutris
wine
];
programs.steam.enable = true;
programs.gamemode.enable = true;
programs.gamemode = {
enableRenice = true;
settings = {
general = {
governor = "performance";
};
gpu = {
apply_gpu_optimisations = "accept-responsibility";
gpu_device = 0;
amd_performance_level = "high";
};
custom = {
start = "notify-send -a 'Gamemode' 'Optimizations activated'";
end = "notify-send -a 'Gamemode' 'Optimizations deactivated'";
};
};
};
}

23
nix/programs/gtk.nix Normal file
View file

@ -0,0 +1,23 @@
{ pkgs, ... }:
{
gtk = {
enable = true;
iconTheme = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
};
theme = {
name = "adw-gtk3";
package = pkgs.adw-gtk3;
};
cursorTheme = {
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
};
};
home.sessionVariables.GTK_THEME = "adw-gtk3";
}

View file

@ -1,3 +1,3 @@
{ pkgs, ... }: {
programs.home-manager.enable = true;
}
}

View file

@ -1,20 +1,17 @@
{ pkgs
, osConfig
, ...
}: {
{ inputs, pkgs, ... }: {
programs.anyrun = {
enable = true;
config = {
#plugins = with inputs.anyrun.packages.${pkgs.system}; [
# applications
# rink
# shell
# websearch
# inputs.anyrun-nixos-options.packages.${pkgs.system}.default
#];
position = "center";
plugins = [
inputs.anyrun.packages.${pkgs.system}.applications
inputs.anyrun.packages.${pkgs.system}.rink
inputs.anyrun.packages.${pkgs.system}.translate
inputs.anyrun.packages.${pkgs.system}.websearch
];
#position = "center";
hideIcons = false;
width = { fraction = 0.3; };
y = { fraction = 0.5; };
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;

View file

@ -1,21 +1,7 @@
{ config
, pkgs
{ pkgs
, inputs
, ...
}:
let
# scripts = "${config.home.homeDirectory}/.config/scripts";
inputs = {
hyprland ={
# Update for releavant commit, this is just bleeding edge as of 2024/04/11
url = github:hyprwm/Hyprland/ac0f3411c18497a39498b756b711e092512de9e0;
inputs.nixpkgs.follows = "nixpkgs";
};
Hyprspace = {
url = github:KZDKM/Hyprspace;
inputs.hyprland.follows = "hyprland";
};
};
in
{
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
@ -24,7 +10,7 @@ in
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
];
bind = [
# screenshots
@ -38,11 +24,11 @@ in
"$mod SUPER,T,exec,kitty -1"
"$mod SUPER,E,exec,nautilus -w"
"$mod SUPER,N,exec,neovide"
"$mod SUPER,M,exec,oxidash"
"$mod SUPER,M,exec,$HOME/.cargo/bin/oxidash"
"$mod SUPER,R,exec,anyrun"
"$mod SUPER,G,exec,oxicalc"
"$mod SUPER,D,exec,oxishut"
"$mod SUPER,A,exec,oxipaste"
"$mod SUPER,G,exec,$HOME/.cargo/bin/oxicalc"
"$mod SUPER,D,exec,$HOME/.cargo/bin/oxishut"
"$mod SUPER,A,exec,$HOME/.cargo/bin/oxipaste"
"$mod SUPERSHIFT,L,exec, playerctl -a pause & swaylock -c 000000 & systemctl suspend"
# media keys
@ -131,31 +117,38 @@ in
];
general = {
gaps_out = "3,5,5,5";
border_size = 3;
col.active_border = "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
col.inactive_border = "0x66333333";
allow_tearing = true;
gaps_out = "3,5,5,5";
border_size = 3;
"col.active_border" = "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
"col.inactive_border" = "0x66333333";
allow_tearing = true;
};
decoration = {
rounding = 4;
rounding = 4;
};
animations = {
bezier = "penguin,0.05,0.9,0.1,1.0";
animation = [
"windowsMove,1,4,default"
"windows,1,7,default,popin 70%"
"windowsOut,1,7,default,popin 70%"
"border,1,10,default"
"fade,1,7,default"
"workspaces,1,6,default"
"layers,1,3,default,popin"
];
animations = {
bezier = "penguin,0.05,0.9,0.1,1.0";
animation = [
"windowsMove,1,4,default"
"windows,1,7,default,popin 70%"
"windowsOut,1,7,default,popin 70%"
"border,1,10,default"
"fade,1,7,default"
"workspaces,1,6,default"
"layers,1,3,default,popin"
];
};
dwindle = {
preserve_split = true;
pseudotile = 0;
permanent_direction_override = false;
};
input = {
kb_layout = "us_int";
repeat_delay = 200;
force_no_accel = true;
touchpad = {
@ -166,12 +159,14 @@ in
};
misc = {
vrr = 1;
animate_manual_resizes = 1;
enable_swallow = true;
disable_splash_rendering = true;
disable_hyprland_logo = true;
swallow_regex = "^(.*)(kitty)(.*)$";
vrr = 1;
animate_manual_resizes = 1;
enable_swallow = true;
disable_splash_rendering = true;
disable_hyprland_logo = true;
swallow_regex = "^(.*)(kitty)(.*)$";
# conversion seems to be borked right now, i want a smooth bibata :(
enable_hyprcursor = false;
};
env = [
@ -185,16 +180,14 @@ in
"XCURSOR_THEME,Bibata-Modern-Classic"
"XCURSOR_SIZE,24"
"QT_QPA_PLATFORM,wayland"
"QT_QPA_PLATFORMTHEME = \"qt5ct\""
"QT_WAYLAND_FORCE_DPI,96"
"QT_AUTO_SCREEN_SCALE_FACTOR,0"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"QT_SCALE_FACTOR,1"
"PKG_CONFIG_PATH,/usr/local/lib/pkgconfig"
"LD_LIBRARY_PATH,/usr/local/lib"
"EDITOR,\"neovide --novsync --nofork\""
"WLR_DRM_NO_ATOMIC,1"
"GTK_USE_PORTAL, 1"
"PATH,/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:~/.local/bin:~/.cargo/bin:$PATH"
];
monitor = [
@ -228,7 +221,7 @@ in
];
layerrule = [
layerrule = [
# layer rules
# mainly to disable animations within slurp and grim
"noanim, selection"
@ -261,19 +254,18 @@ in
exec-once = [
# environment
"systemctl --user import-environment"
"systemctl --user import-environment"
"dbus-update-activation-environment --systemd --all"
"hyprctl setcursor Bibata-Modern-Classic 24"
"hyprctl setcursor Bibata-Modern-Classic 24"
# other programs
"hyprpaper"
"ironbar"
"firefox"
"streamdeck -n"
"oxipaste_daemon"
"/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
"nextcloud --background"
"oxinoti"
"hyprpaper"
"ironbar"
"firefox"
#"oxipaste_daemon"
#"/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
"nextcloud --background"
"$HOME/.cargo/bin/oxinoti"
];
plugin = {

View file

@ -1,14 +1,13 @@
{
lib
{ lib
, pkgs
, ...
}: {
imports = [
#./anyrun.nix
imports = [
./anyrun.nix
./config.nix
];
home.packages = with pkgs; [
hyprland
xorg.xprop
grim
slurp
@ -20,6 +19,9 @@
copyq
gnome.nautilus
gnome.sushi
wl-clipboard
kooha
hyprcursor
hyprpaper
];
}

View file

@ -58,6 +58,5 @@
shell = "fish";
};
theme = "Catppuccin-Mocha";
};
}

View file

@ -15,6 +15,9 @@
mpv
# pdf
zathura
evince
libreoffice-fresh
pdftk
# spotify
ncspot
# video editing