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.mutableUsers = false;
users.users = { users.users = {
root = { root = {
hashedPasswordFile = config.sops.secrets."passwd/root".path; hashedPasswordFile = config.sops.secrets."passwd/root".path;
}; };
adtya = { ${username} = {
uid = 1000; uid = 1000;
hashedPasswordFile = config.sops.secrets."passwd/adtya".path; hashedPasswordFile = config.sops.secrets."passwd/${username}".path;
description = "Adithya Nair"; description = "Adithya Nair";
isNormalUser = true; isNormalUser = true;
extraGroups = [ "docker" "libvirtd" "networkmanager" "wheel" ]; extraGroups = [ "docker" "libvirtd" "networkmanager" "wheel" ];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
{ config { config
, pkgs , pkgs
, extra-packages
, ... , ...
}: }:
let let
@ -18,7 +17,7 @@ let
wpaperctl = "${config.programs.wpaperd.package}/bin/wpaperctl"; wpaperctl = "${config.programs.wpaperd.package}/bin/wpaperctl";
wpctl = "${pkgs.wireplumber}/bin/wpctl"; wpctl = "${pkgs.wireplumber}/bin/wpctl";
yazi = "${pkgs.yazi}/bin/yazi"; yazi = "${pkgs.yazi}/bin/yazi";
youtube = "${extra-packages.youtube}/bin/youtube"; youtube = "${pkgs.youtube}/bin/youtube";
pictures = "${config.xdg.userDirs.pictures}"; pictures = "${config.xdg.userDirs.pictures}";
in in
@ -173,10 +172,10 @@ in
"SUPER,i, exec, ${firefox}" "SUPER,i, exec, ${firefox}"
"SUPER_SHIFT,i, exec, ${librewolf}" "SUPER_SHIFT,i, exec, ${librewolf}"
"SUPER_SHIFT,escape, exec, ${extra-packages.misc-scripts}/bin/power-menu" "SUPER_SHIFT,escape, exec, ${pkgs.misc-scripts}/bin/power-menu"
"SUPER,f11, exec, ${extra-packages.misc-scripts}/bin/tmux-sessions" "SUPER,f11, exec, ${pkgs.misc-scripts}/bin/tmux-sessions"
"SUPER_SHIFT,y, exec, ${youtube}" "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,escape, exec, ${loginctl} lock-session"
"SUPER_SHIFT,W, exec, ${wpaperctl} next" "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 = [ nameservers = [
"2620:fe::fe#dns.quad9.net" "2620:fe::fe#dns.quad9.net"
"9.9.9.9#dns.quad9.net" "9.9.9.9#dns.quad9.net"