Compare commits

..

No commits in common. "d218f5a13c8d38b5b763fa6f66eee64ccaefec1f" and "cd55cda8a46560661ed33e04461479ceb81f2c73" have entirely different histories.

39 changed files with 807 additions and 436 deletions

4
.gitignore vendored
View file

@ -1,2 +1,2 @@
### Jetbrains # Jetbrains configuration directory
/.idea /.idea

View file

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4"> <module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$" />
<excludeFolder url="file://$MODULE_DIR$/.idea/codeStyles" />
</content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>

View file

@ -1,6 +1,6 @@
# nix-config # nix-config
Jo's absolutely insane NixOS configuration - as of july 2024 Jo's absolutely insane NixOS configuration - not in the good way
## Deployment ## Deployment

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"catppuccin": { "catppuccin": {
"locked": { "locked": {
"lastModified": 1720472194, "lastModified": 1719915848,
"narHash": "sha256-CYscFEts6tyvosc1T29nxhzIYJAj/1CCEkV3ZMzSN/c=", "narHash": "sha256-zq+CMkdT8A9z74HonwspXp8HsX4OvP4uaVdD98AO6as=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nix", "repo": "nix",
"rev": "d75d5803852fb0833767dc969a4581ac13204e22", "rev": "9345073d27d91ab66c1b6ab65df322906992aa59",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -15,66 +15,13 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"hardware": { "hardware": {
"locked": { "locked": {
"lastModified": 1721413321, "lastModified": 1719895800,
"narHash": "sha256-0GdiQScDceUrVGbxYpV819LHesK3szHOhJ09e6sgES4=", "narHash": "sha256-xNbjISJTFailxass4LmdWeV4jNhAlmJPwj46a/GxE6M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "ab165a8a6cd12781d76fe9cbccb9e975d0fb634f", "rev": "6e253f12b1009053eff5344be5e835f604bb64cd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -91,15 +38,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721534365, "lastModified": 1719827439,
"narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=", "narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "635563f245309ef5320f80c7ebcb89b2398d2949", "rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "master",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -122,11 +70,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1721562059, "lastModified": 1719848872,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=", "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe", "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -136,6 +84,29 @@
"type": "github" "type": "github"
} }
}, },
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1719875930,
"narHash": "sha256-jQmdWLxRP6BzOxRF8hQEhDD7UKw7UrnYbmaAPOSaXWY=",
"owner": "pjones",
"repo": "plasma-manager",
"rev": "7e062fcd669e261fb06cf54fe0ef2e46c3db8e83",
"type": "github"
},
"original": {
"owner": "pjones",
"repo": "plasma-manager",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
@ -143,44 +114,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"snowfall-lib": "snowfall-lib" "plasma-manager": "plasma-manager"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1719005984,
"narHash": "sha256-mpFl3Jv4fKnn+5znYXG6SsBjfXHJdRG5FEqNSPx0GLA=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "c6238c83de101729c5de3a29586ba166a9a65622",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
} }
} }
}, },

110
flake.nix
View file

@ -2,60 +2,94 @@
description = "Jo's NixOS configuration"; description = "Jo's NixOS configuration";
inputs = { inputs = {
# Nixpkgs instance. # Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Snowfall lib imposes an opinionated file-structure, which makes things a little easier sometimes. # Home manager
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home manager for managing the /home directory.
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Hardware specific tweaks and performance optimizations. # Plasma manager
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
hardware.url = "github:NixOS/nixos-hardware/master"; hardware.url = "github:NixOS/nixos-hardware/master";
# Catppuccin theme nix configuration.
catppuccin.url = "github:catppuccin/nix"; catppuccin.url = "github:catppuccin/nix";
# Declarative management of Flatpak packages.
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1"; nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
}; };
outputs = inputs: outputs = { self, nixpkgs, home-manager, plasma-manager, hardware, catppuccin, nix-flatpak, ... } @inputs:
inputs.snowfall-lib.mkFlake { let
inherit inputs; # Providing flake inputs to Snowfall Lib. inherit (self) outputs;
src = ./.; # "src" must point to the root of the flake.
snowfall = { # Supported systems for this flake
# "root" can be used, to tell Snowfall Lib where to look for Nix files. systems = [
# root = ./nix; "x86_64-linux"
];
# Namespace for this flake's packages, library and overlays. # Function that generates an attribute by calling a function you pass to it
namespace = "puzzlevision"; # It takes each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
# My custom packagess
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
meta = { # External resources (wallpapers, icons, dotfiles)
name = "jos-nixos-configuration"; # Used in certain places, like documentations. No spaces. resources = import ./resources;
title = "Jo's NixOS configuration"; # Basically just for decorational purposes.
}; # My reusable modules for nixos
nixosModules = import ./modules/nixos;
# My reusable modules for home-manager
homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
puzzlevision = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
home-manager.nixosModules.home-manager
./hosts/puzzlevision/configuration.nix
];
}; };
channels-config = {
allowUnfree = true; # Allow unfree packages.
};
# Apply some home-manager modules globally.
homes.modules = with inputs; [
nix-flatpak.homeManagerModules.nix-flatpak
];
homes.users."jo@puzzlevision".modules = with inputs; [
catppuccin.homeManagerModules.catppuccin
];
}; };
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"jo@puzzlevision" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./users/jo/home.nix
nix-flatpak.homeManagerModules.nix-flatpak
catppuccin.homeManagerModules.catppuccin
];
};
"work@puzzlevision" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./users/work/home.nix
];
};
"gaming@puzzlevision" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./users/gaming/home.nix
];
};
};
};
} }

View file

@ -1,70 +0,0 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# Instance of `pkgs` with overlays and custom packages applied.
pkgs,
# All flake inputs.
inputs,
# Additional metadata, provided by Snowfall Lib.
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
home, # The home architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
# All other arguments come from the home home.
config,
...
}: {
imports = [
./apps/gnome.nix
];
# Flatpak configuration.
services.flatpak = {
enable = true;
update.auto.enable = true;
uninstallUnmanaged = true;
packages = [
"com.jeffser.Alpaca"
];
};
# Declare user packages.
home.packages = with pkgs; [
### General
qflipper
wineWowPackages.waylandFull
vesktop
lunar-client
steam
g4music
### Development
avra
avrdude
jetbrains.phpstorm
git
nodejs_22
bun
kitty
forge-sparks
devenv
### Work
teams-for-linux
enpass
### Notes & Organisation
obsidian
### Backups & Synchronization
celeste
];
home.stateVersion = "24.05";
}

View file

@ -1,32 +1,25 @@
{ {
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# Instance of `pkgs` with overlays and custom packages applied.
pkgs,
# All flake inputs.
inputs, inputs,
lib,
# Additional metadata, provided by Snowfall Lib.
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
system, # The system architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format, # A normalized name for the system target (eg. `iso`).
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems, # An attribute map of your defined hosts.
# All other arguments come from the system system.
config, config,
pkgs,
outputs,
... ...
}: { }: {
# You can import other NixOS modules here
imports = [ imports = [
./hardware-configuration.nix
inputs.hardware.nixosModules.common-pc-laptop inputs.hardware.nixosModules.common-pc-laptop
inputs.hardware.nixosModules.common-cpu-intel inputs.hardware.nixosModules.common-cpu-intel
inputs.hardware.nixosModules.common-pc-laptop-ssd inputs.hardware.nixosModules.common-pc-laptop-ssd
outputs.nixosModules.desktop.gnome
./hardware-configuration.nix
]; ];
nixpkgs = { nixpkgs = {
config = {
allowUnfree = true;
};
overlays = [ overlays = [
(final: prev: { (final: prev: {
linuxPackages_latest = prev.linuxPackages_latest.extend (lpfinal: lpprev: { linuxPackages_latest = prev.linuxPackages_latest.extend (lpfinal: lpprev: {
@ -44,17 +37,24 @@
}; };
nix = { nix = {
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
builders-use-substitutes = true; builders-use-substitutes = true;
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" "repl-flake" ];
keep-derivations = true; keep-derivations = true;
keep-outputs = true; keep-outputs = true;
max-jobs = "auto"; max-jobs = "auto";
warn-dirty = false; warn-dirty = false;
}; };
# Garbage collection configuration.
gc = { gc = {
automatic = true; automatic = true;
dates = "daily"; dates = "daily";
@ -65,45 +65,44 @@
# Set hostname # Set hostname
networking.hostName = "puzzlevision"; networking.hostName = "puzzlevision";
# Enable networking through networkmanager (required for most desktop environments). # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
# Install the latest kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
boot = { # Network card driver
# Always run the latest kernel. boot.extraModulePackages = [
kernelPackages = pkgs.linuxPackages_latest; pkgs.linuxPackages_latest.rtl8821ce
];
# Configure additional kernel modules. boot.blacklistedKernelModules = [
extraModulePackages = [ "rtw88_8821ce"
pkgs.linuxPackages_latest.rtl8821ce # Use custom network-card driver. ];
];
blacklistedKernelModules = [ # Bootloader.
"rtw88_8821ce" # Block the default network-card driver. boot.loader.grub = {
]; enable = true;
devices = [ "nodev" ];
efiInstallAsRemovable = true;
efiSupport = true;
# Grub configuration. extraEntries = ''
loader.grub = { menuentry "Reboot" {
enable = true; reboot
devices = [ "nodev" ]; }
efiInstallAsRemovable = true; menuentry "Poweroff" {
efiSupport = true; halt
}
extraEntries = '' '';
menuentry "Reboot" {
reboot
}
menuentry "Poweroff" {
halt
}
'';
};
}; };
# Set timezone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
# Internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8"; LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8"; LC_IDENTIFICATION = "de_DE.UTF-8";
@ -116,16 +115,17 @@
LC_TIME = "de_DE.UTF-8"; LC_TIME = "de_DE.UTF-8";
}; };
# Set console keymap. # Configure console keymap
console.keyMap = "de"; console.keyMap = "de";
# Enable the power-profiles-daemon service for improved battery management. # Enable the power-profiles-daemon service for improved battery health
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
# Enable printing. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
# Sound configuration based on pipewire. # Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
@ -135,7 +135,7 @@
pulse.enable = true; pulse.enable = true;
}; };
# Bluetooth configuration. # Enable bluetooth on boot
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
powerOnBoot = true; powerOnBoot = true;
@ -143,6 +143,7 @@
settings = { settings = {
General = { General = {
Disable = "Handsfree";
ControllerMode = "dual"; ControllerMode = "dual";
FastConnectable = "true"; FastConnectable = "true";
Experimental = "true"; Experimental = "true";
@ -151,40 +152,73 @@
}; };
}; };
# Enable flatpak support. services.blueman.enable = true;
# Enable flatpak
services.flatpak.enable = true; services.flatpak.enable = true;
# Enable iio-sensor for automatic screen rotation and similar features. programs.steam = {
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
# Enable automatic screen rotation and similar features
hardware.sensor.iio.enable = true; hardware.sensor.iio.enable = true;
# Configure system-wide default shell. # Enable docker
virtualisation.docker.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "de";
xkb.variant = "";
};
# Configure fish as the default shell
environment.shells = with pkgs; [ fish ]; environment.shells = with pkgs; [ fish ];
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
programs.fish.enable = true; programs.fish.enable = true;
# Configure users. # Define user accounts
snowfallorg.users.jo.admin = true; users.users = {
jo = {
isNormalUser = true;
description = "Jo";
initialPassword = "jo";
extraGroups = [ "networkmanager" "wheel" "docker" "tty" "dialout" ];
};
# Configure home-manager work = {
home-manager = { isNormalUser = true;
backupFileExtension = "homeManagerBackup"; description = "Work account";
initialPassword = "work";
extraGroups = [ "networkmanager" "wheel" "docker" ];
};
gaming = {
isNormalUser = true;
description = "Gaming account";
initialPassword = "gaming";
extraGroups = [ "networkmanager" "wheel" ];
};
}; };
# Provide users with some sane default packages.
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
### General
nano nano
firefox firefox
vlc vlc
libreoffice
spotify spotify
### Bluetooth # Bluetooth
bluez bluez
bluez-tools
### Fonts # Fonts
noto-fonts noto-fonts
noto-fonts-color-emoji noto-fonts-color-emoji
]; ];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }

View file

@ -8,7 +8,7 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" "usbhid" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -27,6 +27,12 @@
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
fileSystems."/var/lib/docker/btrfs" =
{ device = "/@/var/lib/docker/btrfs";
fsType = "none";
options = [ "bind" ];
};
swapDevices = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -34,17 +40,8 @@
# still possible to use this option, but it's recommended to use it in conjunction # 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`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.br-01571e4eda2f.useDHCP = lib.mkDefault true;
# networking.interfaces.br-20785fae249b.useDHCP = lib.mkDefault true;
# networking.interfaces.br-64a49a5722c1.useDHCP = lib.mkDefault true;
# networking.interfaces.br-71e5fc5962fc.useDHCP = lib.mkDefault true;
# networking.interfaces.br-7df9905783da.useDHCP = lib.mkDefault true;
# networking.interfaces.br-9b746f4e7e2f.useDHCP = lib.mkDefault true; # networking.interfaces.br-9b746f4e7e2f.useDHCP = lib.mkDefault true;
# networking.interfaces.br-e2f470a56dfe.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s13f0u4u4.useDHCP = lib.mkDefault true;
# networking.interfaces.veth4e96b46.useDHCP = lib.mkDefault true;
# networking.interfaces.veth96a5ccd.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true; # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -0,0 +1,16 @@
{
themes = {
gruvbox = {
plasma = import ./themes/gruvbox/plasma.nix;
};
catppuccin = {
gnome = import ./themes/catppuccin/gnome.nix;
global = import ./themes/catppuccin/global.nix;
};
};
development = {
ssh = import ./development/ssh.nix;
};
}

View file

@ -1,18 +1,8 @@
{ {
lib,
pkgs, pkgs,
inputs,
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
system, # The home architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
config, config,
... ...
}: let }: let
sshDir = "${config.home.homeDirectory}/.ssh"; sshDir = "${config.home.homeDirectory}/.ssh";
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -32,17 +22,19 @@ in {
user = "git"; user = "git";
}; };
"gitlab.com" = { "gitlab.com" = {
identityFile = "${sshDir}/id_ed25519"; identityFile = "${sshDir}/id_ed25519";
identitiesOnly = true; identitiesOnly = true;
user = "git"; user = "git";
}; };
"bitbucket.org" = { "bitbucket.org" = {
identityFile = "${sshDir}/id_ed25519"; identityFile = "${sshDir}/id_ed25519";
identitiesOnly = true; identitiesOnly = true;
user = "git"; user = "git";
}; };
}; };
}; };
} }

View file

@ -0,0 +1,17 @@
{
inputs,
pkgs,
outputs,
lib,
...
}: {
catppuccin = {
enable = true;
accent = "blue";
flavor = "frappe";
pointerCursor.enable = true;
pointerCursor.accent = "blue";
pointerCursor.flavor = "frappe";
};
}

View file

@ -0,0 +1,46 @@
{
inputs,
pkgs,
outputs,
lib,
...
}: {
gtk = with pkgs; {
enable = true;
font = {
name = "Cantarell";
size = 12;
package = cantarell-fonts;
};
catppuccin = {
icon.enable = true;
icon.accent = "blue";
icon.flavor = "frappe";
};
theme = {
name = "Colloid-Dark-Catppuccin";
package = colloid-gtk-theme.override {
themeVariants = ["default"];
colorVariants = ["dark"];
sizeVariants = ["standard"];
tweaks = ["catppuccin"];
};
};
};
dconf.settings = {
# ---------------------- Theming
"org/gnome/desktop/background" = {
picture-uri = "${outputs.resources.wallpapers}/animals_at_campfire.jpg";
picture-uri-dark = "${outputs.resources.wallpapers}/animals_at_campfire.jpg";
};
"org/gnome/shell/extensions/user-theme" = {
name = "Colloid-Dark-Catppuccin";
};
# ---------------------- Theming END
};
}

View file

@ -0,0 +1,18 @@
{
inputs,
pkgs,
outputs,
lib,
...
}: {
home.packages = with pkgs; [
tela-icon-theme
outputs.packages.x86_64-linux.themes.kde-gruvbox-colors
];
programs.plasma.workspace = {
iconTheme = "Tela-green-dark";
colorScheme = "GruvboxColors";
wallpaper = "${outputs.resources.wallpapers}/gruvbox/green_pokemon_guy.png";
};
}

View file

@ -1,17 +0,0 @@
{
lib,
pkgs,
inputs,
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
system,
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
config,
...
}: {
home.file.".config/fish/themes/Catppuccin\ Frappe.theme".source = lib.snowfall.fs.get-file "resources/apps/fish/Catppuccin\ Frappe.theme";
}

View file

@ -1,25 +0,0 @@
{
lib,
pkgs,
inputs,
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
system,
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
config,
...
}: {
catppuccin = {
enable = true;
accent = "blue";
flavor = "frappe";
pointerCursor.enable = true;
pointerCursor.accent = "blue";
pointerCursor.flavor = "frappe";
};
}

View file

@ -1,59 +0,0 @@
{
lib,
pkgs,
inputs,
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
system,
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
config,
...
}: {
gtk = {
enable = true;
font = {
name = "Cantarell";
size = 12;
package = pkgs.cantarell-fonts;
};
catppuccin = {
icon = {
enable = true;
accent = "blue";
flavor = "frappe";
};
};
theme = {
name = "Colloid-Dark-Catppuccin";
package = pkgs.colloid-gtk-theme.override {
themeVariants = ["default"];
colorVariants = ["dark"];
sizeVariants = ["standard"];
tweaks = ["catppuccin"];
};
};
};
dconf.settings = {
"org/gnome/desktop/background" = {
picture-uri = lib.snowfall.fs.get-file "resources/wallpapers/pond_sidewalk_dusk.jpg";
picture-uri-dark = lib.snowfall.fs.get-file "resources/wallpapers/pond_sidewalk_dusk.jpg";
};
"org/gnome/shell/extensions/user-theme" = {
name = "Colloid-Dark-Catppuccin";
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
cursor-theme = "catppuccin-frappe-blue-cursors";
};
};
}

View file

@ -0,0 +1,7 @@
{
desktop = {
kde = import ./desktop/kde.nix;
gnome = import ./desktop/gnome.nix;
cosmic = import ./desktop/cosmic.nix;
};
}

View file

@ -0,0 +1,16 @@
{
inputs,
lib,
config,
pkgs,
...
}: {
# Enable the x11 windowing system
services.xserver.enable = true;
# Enable Cosmic DE
services.desktopManager.cosmic.enable = true;
# Enable Cosmic greeter
services.displayManager.cosmic-greeter.enable = true;
}

View file

@ -1,38 +1,31 @@
{ {
lib,
pkgs,
inputs, inputs,
lib,
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
system, # The system architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format, # A normalized name for the system target (eg. `iso`).
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems, # An attribute map of your defined hosts.
config, config,
pkgs,
... ...
}: { }: {
# Enable the X11 windowing system.
services.xserver.enable = true; services.xserver.enable = true;
# Enable GNOME and GDM. # Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;
environment.gnome.excludePackages = (with pkgs; [ environment.gnome.excludePackages = (with pkgs; [
gnome-tour gnome-tour
gedit gedit
cheese
geary
yelp # Help view
epiphany # Gnome web
]) ++ (with pkgs.gnome; [ ]) ++ (with pkgs.gnome; [
cheese
gnome-music gnome-music
epiphany # Gnome web
tali # Poker game tali # Poker game
iagno # Go game iagno # Go game
hitori # Sudoku game hitori # Sudoku game
yelp # Help view
gnome-contacts gnome-contacts
gnome-initial-setup gnome-initial-setup
geary
]); ]);
programs.dconf.enable = true; programs.dconf.enable = true;
@ -45,6 +38,6 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnome-tweaks gnome.gnome-tweaks
]; ];
} }

View file

@ -0,0 +1,24 @@
{
inputs,
lib,
config,
pkgs,
...
}: {
# Enable the x11 windowing system
services.xserver.enable = true;
# Enable the SDDM display manager.
services.displayManager.sddm.enable = true;
# Enable the KDE Plasma 6 desktop environment.
services.desktopManager.plasma6.enable = true;
# Enable KDE-Connect
programs.kdeconnect.enable = true;
# On-screen keyboard dependency
environment.systemPackages = with pkgs; [
maliit-keyboard
];
}

12
pkgs/default.nix Normal file
View file

@ -0,0 +1,12 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
pkgs: {
# example = pkgs.callPackage ./example { };
themes = {
kde-gruvbox-colors = pkgs.callPackage ./themes/kde-gruvbox-colors.nix { };
};
gnomeExtensions = {
rounded-window-corners = pkgs.callPackage ./gnomeExtensions/rounded-window-corners.nix { };
};
}

View file

@ -0,0 +1,26 @@
{ stdenv, fetchFromGitHub, pkgs }:
stdenv.mkDerivation rec {
pname = "rounded-window-corners";
version = "1.0.0";
src = fetchFromGitHub {
owner = "flexagoon";
repo = pname;
rev = "61c326e3d6cba36fe3d07cf1c15e6c74d3f9abb1";
sha256 = "sha256-jS6G9wSKSXAxNhCmuew6pTcYa1gTZqbfrcAZ0ky4vkc=";
};
buildInputs = with pkgs; [ nodejs_22 gettext just ];
installPhase = ''
runHook preInstall
just install
mkdir -p $out/share/gnome-shell/extensions
cp ~/.local/share/gnome-shell/extensions/rounded-window-corners@fxgn $out/share/gnome-shell/extensions/rounded-window-corners@fxgn
runHook postInstall
'';
}

View file

@ -0,0 +1,22 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "kde-gruvbox-colors";
version = "1.0.0";
src = fetchFromGitHub {
owner = "jokiller230";
repo = pname;
rev = "438a23c571e22c1bf416c229afac78ad64e81f17";
sha256 = "sha256-5iRfWqqtv+ImDN96PuWaS3nuK8AHjfa4DGc8vCkLi4U=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -R color-schemes konsole $out/share
runHook postInstall
'';
}

4
resources/default.nix Normal file
View file

@ -0,0 +1,4 @@
{
wallpapers = ./wallpapers;
app-files = ./programm-files;
}

View file

@ -0,0 +1,35 @@
{
"name": "Catppuccin-Macchiato",
"comment": "Soothing pastel theme for the high-spirited!",
"background-color": "#24273A",
"foreground-color": "#CAD3F5",
"badge-color": "#5B6078",
"bold-color": "#5B6078",
"cursor-background-color": "#F4DBD6",
"cursor-foreground-color": "#24273A",
"highlight-background-color": "#F4DBD6",
"highlight-foreground-color": "#24273A",
"palette": [
"#494D64",
"#ED8796",
"#A6DA95",
"#EED49F",
"#8AADF4",
"#F5BDE6",
"#8BD5CA",
"#B8C0E0",
"#5B6078",
"#ED8796",
"#A6DA95",
"#EED49F",
"#8AADF4",
"#F5BDE6",
"#8BD5CA",
"#A5ADCB"
],
"use-badge-color": false,
"use-bold-color": false,
"use-cursor-color": true,
"use-highlight-color": true,
"use-theme-colors": false
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -0,0 +1,27 @@
{
inputs,
lib,
config,
pkgs,
outputs,
...
}: {
imports = [
inputs.plasma-manager.homeManagerModules.plasma-manager
outputs.homeManagerModules.themes.gruvbox.plasma
];
home.packages = with pkgs; [
kdePackages.sierra-breeze-enhanced
kde-rounded-corners
];
# Plasma configuration
programs.plasma = {
enable = true;
workspace = {
clickItemTo = "select";
};
};
}

43
users/gaming/home.nix Normal file
View file

@ -0,0 +1,43 @@
{
inputs,
lib,
config,
pkgs,
outputs,
...
}: {
imports = [
./desktop/plasma.nix
];
nixpkgs = {
config = {
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
# Username and home directory
home = {
username = "gaming";
homeDirectory = "/home/gaming";
};
# General packages
home.packages = with pkgs; [
lutris
vesktop
steam
lunar-client
];
# Enable home-manager
programs.home-manager.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
home.stateVersion = "23.05";
}

View file

@ -0,0 +1,9 @@
{
inputs,
pkgs,
outputs,
lib,
...
}: {
home.file.".local/share/blackbox/schemes/Catppuccin-Macchiato.json".source = "${outputs.resources.app-files}/blackbox/Catppuccin-Macchiato.json";
}

9
users/jo/apps/fish.nix Normal file
View file

@ -0,0 +1,9 @@
{
inputs,
pkgs,
outputs,
lib,
...
}: {
home.file.".config/fish/themes/Catppuccin\ Frappe.theme".source = "${outputs.resources.app-files}/fish/Catppuccin\ Frappe.theme";
}

View file

@ -0,0 +1,11 @@
{
inputs,
pkgs,
outputs,
lib,
...
}: {
home.file.".librewolf/librewolf.overrides.cfg".text = ''
defaultPref("identity.fxaccounts.enabled", true);
'';
}

View file

@ -1,18 +1,14 @@
{ {
lib,
pkgs,
inputs, inputs,
pkgs,
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". outputs,
home, # The home architecture for this host (eg. `x86_64-linux`). lib,
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
config,
... ...
}: { }: {
imports = [
outputs.homeManagerModules.themes.catppuccin.gnome
];
home.packages = with pkgs.gnomeExtensions; [ home.packages = with pkgs.gnomeExtensions; [
dash-to-dock dash-to-dock
user-themes user-themes
@ -24,6 +20,11 @@
# Use `dconf watch /` to track stateful changes you are doing, then set them here. # Use `dconf watch /` to track stateful changes you are doing, then set them here.
dconf.settings = { dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
cursor-theme = "catppuccin-frappe-blue-cursors";
};
"org/gnome/shell" = { "org/gnome/shell" = {
favorite-apps = [ favorite-apps = [
"org.gnome.Nautilus.desktop" "org.gnome.Nautilus.desktop"
@ -65,4 +66,4 @@
window-buttons-theme = "catppuccin"; window-buttons-theme = "catppuccin";
}; };
}; };
} }

27
users/jo/desktop/kde.nix Normal file
View file

@ -0,0 +1,27 @@
{
inputs,
lib,
config,
pkgs,
outputs,
...
}: {
imports = [
inputs.plasma-manager.homeManagerModules.plasma-manager
outputs.homeManagerModules.themes.gruvbox.plasma
];
home.packages = with pkgs; [
kdePackages.sierra-breeze-enhanced
kde-rounded-corners
];
# Plasma configuration
programs.plasma = {
enable = true;
workspace = {
clickItemTo = "select";
};
};
}

124
users/jo/home.nix Normal file
View file

@ -0,0 +1,124 @@
{
inputs,
lib,
config,
pkgs,
outputs,
...
}: {
imports = [
./desktop/gnome.nix
./apps/fish.nix
./apps/blackbox.nix
./apps/librewolf.nix
outputs.homeManagerModules.themes.catppuccin.global
outputs.homeManagerModules.development.ssh
];
nixpkgs = {
config = {
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
# Username and home directory
home = {
username = "jo";
homeDirectory = "/home/jo";
};
# Flatpak packages
services.flatpak = {
enable = true;
update.auto.enable = true;
uninstallUnmanaged = true;
packages = [
"com.jeffser.Alpaca"
"dev.aunetx.deezer"
];
};
# General packages
home.packages = with pkgs; [
qflipper
wineWowPackages.waylandFull
vesktop
lunar-client
steam
g4music
librewolf
# For development
avra
avrdude
jetbrains.phpstorm
git
nodejs_22
bun
termius
blackbox-terminal
forge-sparks
devenv
# Work stuff for when I'm not actually working
teams-for-linux
enpass
# Notes and Organisation
obsidian
# File synchronization
celeste
];
# Enable home-manager
programs.home-manager.enable = true;
# Enable and configure git
programs.git = {
enable = true;
userEmail = "jo@thevoid.cafe";
userName = "Jo";
extraConfig = {
user = {
signingkey = "$HOME/.ssh/id_ed25519";
};
init = {
defaultBranch = "main";
};
color = {
ui = true;
};
};
};
programs.gh = {
enable = true;
gitCredentialHelper = {
enable = true;
hosts = [
"https://github.com"
"https://gist.github.com"
"https://git.thevoid.cafe"
"https://gitlab.org"
"https://git.semiko.dev"
"https://bitbucket.org"
];
};
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
home.stateVersion = "23.05";
}

View file

@ -0,0 +1,27 @@
{
inputs,
lib,
config,
pkgs,
outputs,
...
}: {
imports = [
inputs.plasma-manager.homeManagerModules.plasma-manager
outputs.homeManagerModules.themes.gruvbox.plasma
];
home.packages = with pkgs; [
kdePackages.sierra-breeze-enhanced
kde-rounded-corners
];
# Plasma configuration
programs.plasma = {
enable = true;
workspace = {
clickItemTo = "select";
};
};
}

39
users/work/home.nix Normal file
View file

@ -0,0 +1,39 @@
{
pkgs,
lib,
outputs,
inputs,
config,
...
}: {
imports = [
./desktop/plasma.nix
outputs.homeManagerModules.development.ssh
];
nixpkgs = {
config = {
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
home = {
username = "work";
homeDirectory = "/home/work";
};
home.packages = with pkgs; [
jetbrains.phpstorm
thunderbird
teams-for-linux
enpass
vscodium
];
systemd.user.startServices = "sd-switch";
home.stateVersion = "23.05";
}