beautiful 😍

This commit is contained in:
Adithya 2024-06-22 19:56:27 +05:30
parent d41ef54a98
commit db635147fd
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
10 changed files with 92 additions and 81 deletions

View file

@ -1,12 +1,12 @@
{ config, pkgs, ... }: {
{ config, pkgs, username, ... }: {
users.mutableUsers = false;
users.users = {
root = {
hashedPasswordFile = config.sops.secrets."passwd/root".path;
};
adtya = {
${username} = {
uid = 1000;
hashedPasswordFile = config.sops.secrets."passwd/adtya".path;
hashedPasswordFile = config.sops.secrets."passwd/${username}".path;
description = "Adithya Nair";
isNormalUser = true;
extraGroups = [ "docker" "libvirtd" "networkmanager" "wheel" ];

View file

@ -1,9 +1,9 @@
pkgs: {
dracula-gtk = pkgs.callPackage ./dracula-gtk { };
misc-scripts = pkgs.callPackage ./scripts/misc { };
getpaper = pkgs.callPackage ./scripts/getpaper { };
youtube = pkgs.callPackage ./scripts/youtube { };
rofi-bluetooth = pkgs.callPackage ./rofi-bluetooth { };
smc-manjari = pkgs.callPackage ./smc-manjari { };
smc-nupuram = pkgs.callPackage ./smc-nupuram { };
final: prev: {
dracula-gtk = prev.callPackage ./dracula-gtk { };
misc-scripts = prev.callPackage ./scripts/misc { };
getpaper = prev.callPackage ./scripts/getpaper { };
youtube = prev.callPackage ./scripts/youtube { };
rofi-bluetooth = prev.callPackage ./rofi-bluetooth { };
smc-manjari = prev.callPackage ./smc-manjari { };
smc-nupuram = prev.callPackage ./smc-nupuram { };
}

View file

@ -1,5 +1,5 @@
{
description = "NixOS Configuration";
description = "NixOS Configuration for Skipper";
nixConfig = {
extra-substituters = [
@ -44,51 +44,45 @@
,
} @ inputs:
let
lib = nixpkgs.lib;
packages = system: import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
overlays = [ varnam-nix.overlays.default ];
overlays = [ varnam-nix.overlays.default (import ./extra-packages) ];
};
extra-packages = system: import ./extra-packages (packages system);
in
{
nixosConfigurations = {
Skipper = nixpkgs.lib.nixosSystem rec {
Skipper =
let
hostname = "Skipper";
system = "x86_64-linux";
username = "adtya";
in
nixpkgs.lib.nixosSystem {
inherit system;
pkgs = packages system;
specialArgs = inputs // { extra-packages = (extra-packages system); };
specialArgs = { inherit inputs username; };
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
networking.hostName = lib.mkDefault hostname;
nixpkgs.hostPlatform = lib.mkDefault system;
}
lix-module.nixosModules.default
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote
sops-nix.nixosModules.sops
lanzaboote.nixosModules.lanzaboote
impermanence.nixosModules.impermanence
home-manager.nixosModules.home-manager
./common
./hosts/skipper
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = inputs // { extra-packages = (extra-packages system); };
users.adtya = _: {
imports = [
impermanence.nixosModules.home-manager.impermanence
./home
];
};
};
}
];
};
};
}
// flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
@ -105,7 +99,7 @@
age
];
};
packages.getpaper = (import ./extra-packages pkgs).getpaper;
packages.getpaper = pkgs.callPackage ./extra-packages/scripts/getpaper;
}
);
}

View file

@ -1,24 +1,25 @@
_: {
imports = [ ./programs ./services ./wm ./gtk.nix ./persistence.nix ./qt.nix ./secrets.nix ];
{ inputs, username, ... }: {
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs username; };
users.${username} = _: {
imports = [
inputs.impermanence.nixosModules.home-manager.impermanence
{
imports = [
./programs
./services
./wm
./gtk.nix
./persistence.nix
./qt.nix
./secrets.nix
./xdg.nix
];
home.stateVersion = "23.11";
xdg = {
enable = true;
mime.enable = true;
mimeApps = {
enable = true;
defaultApplications = {
"x-scheme-handler/tg" = [ "org.telegram.desktop.desktop" ];
"x-scheme-handler/magnet" = [ "io.github.TransmissionRemoteGtk.desktop" ];
};
};
userDirs.enable = true;
desktopEntries."nixos-manual" = {
name = "NixOS Manual";
exec = "nixos-help";
noDisplay = true;
}
];
};
};
}

View file

@ -1,11 +1,10 @@
{ pkgs
, extra-packages
, ...
}:
let
gtkTheme = {
name = "Dracula";
package = extra-packages.dracula-gtk;
package = pkgs.dracula-gtk;
};
iconTheme = {

View file

@ -1,4 +1,4 @@
{ osConfig, ... }: {
{ osConfig, username, ... }: {
programs.git = {
enable = true;
delta = {
@ -9,7 +9,7 @@
};
};
userEmail = "adtya@adtya.xyz";
userName = osConfig.users.users.adtya.description;
userName = osConfig.users.users.${username}.description;
signing = {
key = "51E4F5AB1B82BE45B4229CC243A5E25AA5A27849";
signByDefault = true;

View file

@ -1,4 +1,4 @@
{ pkgs, neovim-nightly, ... }: {
{ pkgs, inputs, ... }: {
xdg = {
desktopEntries = {
"nvim".name = "Neovim wrapper";
@ -8,7 +8,7 @@
};
programs.neovim = {
enable = true;
package = neovim-nightly.packages.${pkgs.system}.default;
package = inputs.neovim-nightly.packages.${pkgs.system}.default;
withNodeJs = true;
withPython3 = true;
withRuby = true;

View file

@ -1,6 +1,5 @@
{ config
, pkgs
, extra-packages
, ...
}:
let
@ -18,7 +17,7 @@ let
wpaperctl = "${config.programs.wpaperd.package}/bin/wpaperctl";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
yazi = "${pkgs.yazi}/bin/yazi";
youtube = "${extra-packages.youtube}/bin/youtube";
youtube = "${pkgs.youtube}/bin/youtube";
pictures = "${config.xdg.userDirs.pictures}";
in
@ -173,10 +172,10 @@ in
"SUPER,i, exec, ${firefox}"
"SUPER_SHIFT,i, exec, ${librewolf}"
"SUPER_SHIFT,escape, exec, ${extra-packages.misc-scripts}/bin/power-menu"
"SUPER,f11, exec, ${extra-packages.misc-scripts}/bin/tmux-sessions"
"SUPER_SHIFT,escape, exec, ${pkgs.misc-scripts}/bin/power-menu"
"SUPER,f11, exec, ${pkgs.misc-scripts}/bin/tmux-sessions"
"SUPER_SHIFT,y, exec, ${youtube}"
"SUPER_SHIFT,b, exec, ${extra-packages.rofi-bluetooth}/bin/rofi-bluetooth"
"SUPER_SHIFT,b, exec, ${pkgs.rofi-bluetooth}/bin/rofi-bluetooth"
"SUPER,escape, exec, ${loginctl} lock-session"
"SUPER_SHIFT,W, exec, ${wpaperctl} next"

20
home/xdg.nix Normal file
View file

@ -0,0 +1,20 @@
_: {
xdg = {
enable = true;
mime.enable = true;
mimeApps = {
enable = true;
defaultApplications = {
"x-scheme-handler/tg" = [ "org.telegram.desktop.desktop" ];
"x-scheme-handler/magnet" = [ "io.github.TransmissionRemoteGtk.desktop" ];
};
};
userDirs.enable = true;
desktopEntries."nixos-manual" = {
name = "NixOS Manual";
exec = "nixos-help";
noDisplay = true;
};
};
}

View file

@ -16,8 +16,6 @@
];
};
hostName = "Skipper";
nameservers = [
"2620:fe::fe#dns.quad9.net"
"9.9.9.9#dns.quad9.net"