refactoring some stuff

This commit is contained in:
Jo 2023-10-25 12:12:59 +02:00
parent 687254741c
commit 5b7d0b0a49
6 changed files with 160 additions and 49 deletions

View file

@ -7,32 +7,32 @@
]
},
"locked": {
"lastModified": 1685599623,
"narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=",
"lastModified": 1698128422,
"narHash": "sha256-Qf39ATHrj6wfeC+K6uwD/FnI7RKrdEiN3uWaciUi0rM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd",
"rev": "6045b68ee725167ed0487f0fb88123202ba61923",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1686431482,
"narHash": "sha256-oPVQ/0YP7yC2ztNsxvWLrV+f0NQ2QAwxbrZ+bgGydEM=",
"lastModified": 1697723726,
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d3bb401dcfc5a46ce51cdfb5762e70cc75d082d2",
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -3,10 +3,13 @@
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Gnome testing branch (getting new major versions earlier)
# gnomeNixpkgs.url = "github:NixOS/nixpkgs/gnome";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# TODO: Add any other flake you might need
@ -32,19 +35,23 @@
nixos = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
# > Our main nixos configuration file <
modules = [./nixos/configuration.nix];
modules = [
./nixos/configuration.nix
./nixos/modules/desktop/kde.nix
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
# FIXME replace with your username@hostname
"jo@nixos" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
# > Our main home-manager configuration file <
modules = [./home-manager/home.nix];
modules = [
./home-manager/home.nix
];
};
};
};

View file

@ -1,5 +1,3 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
lib,
@ -11,9 +9,6 @@
imports = [
# If you want to use home-manager modules from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModule
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
];
nixpkgs = {
@ -38,12 +33,89 @@
};
};
# TODO: Set your username
home = {
username = "jo";
homeDirectory = "/home/jo";
};
home.packages = with pkgs.gnomeExtensions; [
user-themes
dash-to-dock
appindicator
blur-my-shell
rounded-window-corners
];
dconf.settings = with lib.hm.gvariant; {
"org/gnome/shell" = {
disable-user-extensions = false;
# enabled-extensions = map (extension: extension.extensionUuid) home.packages;
disabled-extensions = [ ];
};
"org/gnome/shell/extensions/user-theme" = {
name = config.gtk.theme.name;
};
# "org/gnome/shell/extensions/dash-to-dock" = {
# "appicon-margin" = 0;
# "appicon-padding" = 6;
# "tray-padding" = 4;
# "click-action" = "TOGGLE-SHOWPREVIEW";
# "dot-position" = "TOP";
# "dot-style-focused" = "METRO";
# "dot-style-unfocused" = "DASHES";
# "group-apps" = true;
# "isolate-workspaces" = true;
# "middle-click-action" = "MINIMIZE";
# "shift-click-action" = "LAUNCH";
# "scroll-icon-action" = "NOTHING";
# "scroll-panel-action" = "NOTHING";
# "stockgs-panelbtn-click-only" = true;
# };
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
clock-show-weekday = true;
clock-show-date = true;
clock-show-seconds = false;
enable-hot-corners = false;
};
"org/gnome/desktop/input-sources" = {
sources = [ (mkTuple [ "xkb" "de" ]) ];
};
"org/gnome/shell" = {
favorite-apps = [
"firefox.desktop"
"org.gnome.Nautilus.desktop"
];
};
};
gtk = {
enable = true;
theme = {
name = "Adw-gtk3";
package = pkgs.adw-gtk3;
};
cursorTheme = {
name = "Catppuccin-Macchiato-Dark-Cursors";
package = pkgs.catppuccin-cursors.macchiatoRed;
size = 32;
};
};
# home.file.".config/gtk-4.0/gtk.css".source = "${orchis}/share/themes/Orchis-Green-Dark-Compact/gtk-4.0/gtk.css";
# home.file.".config/gtk-4.0/gtk-dark.css".source = "${orchis}/share/themes/Orchis-Green-Dark-Compact/gtk-4.0/gtk-dark.css";
# home.file.".config/gtk-4.0/assets" = {
# recursive = true;
# source = "${orchis}/share/themes/Orchis-Green-Dark-Compact/gtk-4.0/assets";
# };
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
# home.packages = with pkgs; [ steam ];

View file

@ -11,9 +11,6 @@
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
];
@ -40,10 +37,24 @@
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
substituters = [
"https://cache.nixos.org?priority=10"
"https://nix-community.cachix.org"
];
auto-optimise-store = true;
builders-use-substitutes = true;
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
keep-derivations = true;
keep-outputs = true;
max-jobs = "auto";
warn-dirty = false;
};
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 3d";
};
};
@ -51,12 +62,7 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
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";
networking.hostName = "nixos";
# Enable networking
networking.networkmanager.enable = true;
@ -79,19 +85,6 @@
LC_TIME = "de_DE.UTF-8";
};
# 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 = "de";
xkbVariant = "";
};
# Configure console keymap
console.keyMap = "de";
@ -120,6 +113,8 @@
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
discord
# ciscoPacketTracer8
wireshark
];
};
@ -140,16 +135,13 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# GNOME packages (extensions, themes, etc...)
gnome.gnome-tweaks
adw-gtk3
# Other packages
nano
git
vscodium
firefox
thunderbird
gnome.gnome-tweaks
];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion

View file

@ -0,0 +1,20 @@
{
inputs,
lib,
config,
pkgs,
...
}: {
# 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 = "de";
xkbVariant = "";
};
}

View file

@ -0,0 +1,20 @@
{
inputs,
lib,
config,
pkgs,
...
}: {
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "de";
xkbVariant = "";
};
}