Compare commits
1 commit
e5de3ca526
...
3dbad42be0
Author | SHA1 | Date | |
---|---|---|---|
3dbad42be0 |
9 changed files with 125 additions and 2474 deletions
|
@ -1,13 +0,0 @@
|
|||
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
2246
flake.lock
2246
flake.lock
File diff suppressed because it is too large
Load diff
86
flake.nix
86
flake.nix
|
@ -11,87 +11,63 @@
|
|||
# The most widely used is `github:owner/name/reference`,
|
||||
# which represents the GitHub repository URL + branch/commit-id/tag.
|
||||
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
# Home Manager
|
||||
home-manager-stable = {
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
};
|
||||
|
||||
home-manager-unstable = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# nix-fast-build
|
||||
nix-fast-build = {
|
||||
url = "github:Mic92/nix-fast-build";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# sops-nix
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# deploy-rs
|
||||
deploy-rs = {
|
||||
url = "github:serokell/deploy-rs";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# atuin
|
||||
atuin = {
|
||||
url = "github:atuinsh/atuin";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
};
|
||||
|
||||
# hyprland official
|
||||
hyprland-git = {
|
||||
url = "github:hyprwm/hyprland/v0.36.0";
|
||||
};
|
||||
|
||||
# hyprland plugin for an i3 / sway like manual tiling layout
|
||||
hy3 = {
|
||||
url = "github:outfoxxed/hy3/hl0.36.0";
|
||||
};
|
||||
|
||||
# hyprland-xdg-portal
|
||||
hyprland-xdph-git = {
|
||||
url = "github:hyprwm/xdg-desktop-portal-hyprland";
|
||||
};
|
||||
|
||||
# hyprland-protocols
|
||||
hyprland-protocols-git.url = "github:hyprwm/xdg-desktop-portal-hyprland";
|
||||
|
||||
# hyprland-community nix
|
||||
hyprland-nix = {
|
||||
url = "github:hyprland-community/hyprland-nix";
|
||||
inputs = {
|
||||
hyprland-xdph.follows = "hyprland-xdph-git";
|
||||
hyprland-protocols.follows = "hyprland-protocols-git";
|
||||
};
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
# The `@` syntax here is used to alias the attribute set of the
|
||||
# inputs's parameter, making it convenient to use inside the function.
|
||||
outputs = { self, nixpkgs-stable, nixpkgs-unstable, home-manager-stable, home-manager-unstable, hy3, ... }@inputs:
|
||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
forAllSystems = nixpkgs-stable.lib.genAttrs [
|
||||
# "aarch64-linux"
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
in
|
||||
{
|
||||
hosts = import ./hosts.nix;
|
||||
pkgs = forAllSystems (localSystem: import nixpkgs {
|
||||
inherit localSystem;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowAliases = true;
|
||||
};
|
||||
});
|
||||
|
||||
packages = forAllSystems (import ./packages inputs);
|
||||
|
||||
nixosConfigurations = {
|
||||
"durincore" = nixpkgs-unstable.lib.nixosSystem {
|
||||
"durincore" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
# Import the configuration.nix here, so that the
|
||||
# old configuration file can still take effect.
|
||||
|
@ -99,22 +75,21 @@
|
|||
./nixos/durincore/configuration.nix
|
||||
./nixos/common.nix
|
||||
# { nixpkgs.overlays = [ (self: super: { atuin = atuin.packages.${self.pkgs.system}.atuin; }) ]; }
|
||||
home-manager-unstable.nixosModules.home-manager
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jahanson = import ./home-manager/durincore.nix;
|
||||
home-manager.extraSpecialArgs = {inherit inputs outputs;};
|
||||
}
|
||||
];
|
||||
};
|
||||
"este" = nixpkgs-stable.lib.nixosSystem {
|
||||
"este" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
./nixos/este/configuration.nix
|
||||
./nixos/common.nix
|
||||
home-manager-stable.nixosModules.home-manager
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
@ -122,13 +97,13 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
"gandalf" = nixpkgs-stable.lib.nixosSystem {
|
||||
"gandalf" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
./nixos/gandalf/configuration.nix
|
||||
./nixos/common.nix
|
||||
home-manager-stable.nixosModules.home-manager
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
@ -137,5 +112,6 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,144 +1,16 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.hyprland-git.homeManagerModules.default ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
plugins = [ inputs.hy3.packages.${pkgs.system}.hy3 ];
|
||||
settings = {
|
||||
"monitor" = "eDP-1,1920x1080@60,0x0,1";
|
||||
"$mainMod" = "SUPER";
|
||||
"$terminal" = "alacritty";
|
||||
"$fileManager" = "thunar";
|
||||
"$menu" = "wofi --show drun";
|
||||
bind =
|
||||
[
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
"$mainMod, Q, exec, $terminal"
|
||||
"$mainMod, C, killactive,"
|
||||
"$mainMod, M, exit,"
|
||||
"$mainMod, E, exec, $fileManager"
|
||||
"$mainMod, V, togglefloating,"
|
||||
"$mainMod, R, exec, $menu"
|
||||
"$mainMod, P, pseudo, # dwindle"
|
||||
"$mainMod, J, togglesplit, # dwindle"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
"$mainMod, S, togglespecialworkspace, magic"
|
||||
"$mainMod SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
];
|
||||
general = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
|
||||
vibrancy = "0.1696";
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation =
|
||||
[
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # you probably want this
|
||||
};
|
||||
|
||||
master = {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_is_master = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
touchpad = {
|
||||
natural_scroll = "true";
|
||||
};
|
||||
};
|
||||
windowrulev2 = "suppressevent maximize, class:.*"; # You'll probably like this.
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# please change the username & home direcotry to your own
|
||||
# TODO please change the username & home direcotry to your own
|
||||
home.username = "jahanson";
|
||||
home.homeDirectory = "/home/jahanson";
|
||||
|
||||
# set cursor size and dpi for 4k monitor
|
||||
xresources.properties = {
|
||||
"Xcursor.size" = 16;
|
||||
"Xft.dpi" = 172;
|
||||
};
|
||||
|
||||
# basic configuration of git, please change to your own
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
@ -193,11 +65,6 @@
|
|||
ranger
|
||||
yazi
|
||||
|
||||
# gui file managers
|
||||
xfce.thunar
|
||||
|
||||
# Run Menu
|
||||
wofi
|
||||
|
||||
# archives
|
||||
zip
|
||||
|
@ -328,6 +195,7 @@
|
|||
env.TERM = "xterm-256color";
|
||||
font = {
|
||||
size = 12;
|
||||
draw_bold_text_with_bright_colors = true;
|
||||
};
|
||||
scrolling.multiplier = 5;
|
||||
selection.save_to_clipboard = true;
|
||||
|
@ -346,7 +214,7 @@
|
|||
# You can update home Manager without changing this value. See
|
||||
# the home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "24.05";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
# Let home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
|
21
hosts.nix
Normal file
21
hosts.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
durincore = {
|
||||
type = "nixos";
|
||||
hostPlatform = "x86_64-linux";
|
||||
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBsUe5YF5z8vGcEYtQX7AAiw2rJygGf2l7xxr8nZZa7w";
|
||||
};
|
||||
gandalf = {
|
||||
type = "nixos";
|
||||
address = "gandalf.jahanson.tech";
|
||||
hostPlatform = "x86_64-linux";
|
||||
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBsUe5YF5z8vGcEYtQX7AAiw2rJygGf2l7xxr8nZZa7w";
|
||||
remoteBuild = true;
|
||||
};
|
||||
este = {
|
||||
type = "nixos";
|
||||
address = "este.jahanson.tech";
|
||||
hostPlatform = "x86_64-linux";
|
||||
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBsUe5YF5z8vGcEYtQX7AAiw2rJygGf2l7xxr8nZZa7w";
|
||||
remoteBuild = true;
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running 'nixos-help').
|
||||
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
@ -16,32 +16,23 @@
|
|||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland-git.packages.${pkgs.system}.hyprland;
|
||||
# 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;
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.jahanson.enableGnomeKeyring = true;
|
||||
programs.seahorse.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# # 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;
|
||||
|
||||
# services.gnome.gnome-keyring.enable = true;
|
||||
# security.pam.services.jahanson.enableGnomeKeyring = true;
|
||||
# programs.seahorse.enable = true;
|
||||
|
||||
# # Configure keymap in X11
|
||||
# services.xserver = {
|
||||
# layout = "us";
|
||||
# xkbVariant = "";
|
||||
# };
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
|
@ -62,6 +53,9 @@
|
|||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
programs.gnupg.agent = {
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
|
||||
};
|
||||
|
||||
# Xen-orchestra
|
||||
# TODO: Add xen-orchestra
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers ={
|
||||
|
|
26
packages/default.nix
Normal file
26
packages/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
self,
|
||||
nix-fast-build,
|
||||
...
|
||||
}:
|
||||
hostPlatform:
|
||||
|
||||
let
|
||||
inherit (self.pkgs."x86_64-linux") callPackage lib linkFarm;
|
||||
|
||||
hostDrvs = lib.mapAttrs (_: nixos: nixos.config.system.build.toplevel) self.nixosConfigurations;
|
||||
|
||||
compatHosts = lib.filterAttrs (_: host: host.hostPlatform == hostPlatform) self.hosts;
|
||||
compatHostDrvs = lib.mapAttrs
|
||||
(name: _: hostDrvs.${name})
|
||||
compatHosts;
|
||||
|
||||
compatHostsFarm = linkFarm "hosts-x86_64-linux" (lib.mapAttrsToList (name: path: { inherit name path; }) compatHostDrvs);
|
||||
in
|
||||
compatHostDrvs
|
||||
// (lib.optionalAttrs (compatHosts != { }) {
|
||||
default = compatHostsFarm;
|
||||
}) // {
|
||||
inherit (nix-fast-build.packages."x86_64-linux") nix-fast-build;
|
||||
inherit (self.pkgs."x86_64-linux") cachix nix-eval-jobs;
|
||||
}
|
Reference in a new issue