Compare commits

..

1 commit

Author SHA1 Message Date
3dbad42be0 Lock file maintenance 2024-03-06 14:07:53 +00:00
9 changed files with 125 additions and 2474 deletions

View file

@ -1,13 +0,0 @@
{
nix = {
settings = {
substituters = [
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
};
}

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -11,87 +11,63 @@
# The most widely used is `github:owner/name/reference`, # The most widely used is `github:owner/name/reference`,
# which represents the GitHub repository URL + branch/commit-id/tag. # which represents the GitHub repository URL + branch/commit-id/tag.
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Home Manager # Home Manager
home-manager-stable = { home-manager = {
url = "github:nix-community/home-manager/release-23.11"; url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-unstable = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
# nix-fast-build # nix-fast-build
nix-fast-build = { nix-fast-build = {
url = "github:Mic92/nix-fast-build"; url = "github:Mic92/nix-fast-build";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# sops-nix # sops-nix
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# deploy-rs # deploy-rs
deploy-rs = { deploy-rs = {
url = "github:serokell/deploy-rs"; url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# atuin # atuin
atuin = { atuin = {
url = "github:atuinsh/atuin"; url = "github:atuinsh/atuin";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs";
};
# 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";
};
}; };
}; };
# The `@` syntax here is used to alias the attribute set of the # The `@` syntax here is used to alias the attribute set of the
# inputs's parameter, making it convenient to use inside the function. # 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 let
inherit (self) outputs; forAllSystems = nixpkgs.lib.genAttrs [
forAllSystems = nixpkgs-stable.lib.genAttrs [ "aarch64-linux"
# "aarch64-linux"
"x86_64-linux" "x86_64-linux"
]; ];
in in
{ {
hosts = import ./hosts.nix;
pkgs = forAllSystems (localSystem: import nixpkgs {
inherit localSystem;
config = {
allowUnfree = true;
allowAliases = true;
};
});
packages = forAllSystems (import ./packages inputs);
nixosConfigurations = { nixosConfigurations = {
"durincore" = nixpkgs-unstable.lib.nixosSystem { "durincore" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {inherit inputs outputs;}; specialArgs = inputs;
modules = [ modules = [
# Import the configuration.nix here, so that the # Import the configuration.nix here, so that the
# old configuration file can still take effect. # old configuration file can still take effect.
@ -99,22 +75,21 @@
./nixos/durincore/configuration.nix ./nixos/durincore/configuration.nix
./nixos/common.nix ./nixos/common.nix
# { nixpkgs.overlays = [ (self: super: { atuin = atuin.packages.${self.pkgs.system}.atuin; }) ]; } # { 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.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.jahanson = import ./home-manager/durincore.nix; 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"; system = "x86_64-linux";
specialArgs = {inherit inputs outputs;}; specialArgs = inputs;
modules = [ modules = [
./nixos/este/configuration.nix ./nixos/este/configuration.nix
./nixos/common.nix ./nixos/common.nix
home-manager-stable.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
@ -122,13 +97,13 @@
} }
]; ];
}; };
"gandalf" = nixpkgs-stable.lib.nixosSystem { "gandalf" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = {inherit inputs outputs;}; specialArgs = inputs;
modules = [ modules = [
./nixos/gandalf/configuration.nix ./nixos/gandalf/configuration.nix
./nixos/common.nix ./nixos/common.nix
home-manager-stable.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
@ -137,5 +112,6 @@
]; ];
}; };
}; };
}; };
} }

View file

@ -1,144 +1,16 @@
{ config, pkgs, inputs, ... }: { config, pkgs, ... }:
{ {
imports = [ inputs.hyprland-git.homeManagerModules.default ]; # TODO please change the username & home direcotry to your own
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
home.username = "jahanson"; home.username = "jahanson";
home.homeDirectory = "/home/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 # basic configuration of git, please change to your own
programs.git = { programs.git = {
enable = true; enable = true;
@ -193,11 +65,6 @@
ranger ranger
yazi yazi
# gui file managers
xfce.thunar
# Run Menu
wofi
# archives # archives
zip zip
@ -328,6 +195,7 @@
env.TERM = "xterm-256color"; env.TERM = "xterm-256color";
font = { font = {
size = 12; size = 12;
draw_bold_text_with_bright_colors = true;
}; };
scrolling.multiplier = 5; scrolling.multiplier = 5;
selection.save_to_clipboard = true; selection.save_to_clipboard = true;
@ -346,7 +214,7 @@
# You can update home Manager without changing this value. See # You can update home Manager without changing this value. See
# the home Manager release notes for a list of state version # the home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home.stateVersion = "24.05"; home.stateVersion = "23.11";
# Let home Manager install and manage itself. # Let home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;

21
hosts.nix Normal file
View 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;
};
}

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running 'nixos-help'). # and in the NixOS manual (accessible by running 'nixos-help').
{ config, pkgs, inputs, ... }: { config, pkgs, ... }:
{ {
imports = imports =
@ -16,32 +16,23 @@
networkmanager.enable = true; networkmanager.enable = true;
}; };
programs.hyprland = { # Enable the X11 windowing system.
enable = true; services.xserver.enable = true;
package = inputs.hyprland-git.packages.${pkgs.system}.hyprland;
# 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. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
@ -62,6 +53,9 @@
#media-session.enable = true; #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 # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
programs.gnupg.agent = { programs.gnupg.agent = {

View file

@ -101,7 +101,7 @@
}; };
# Xen-orchestra # TODO: Add xen-orchestra
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";
containers ={ containers ={

26
packages/default.nix Normal file
View 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;
}