mass update

This commit is contained in:
Sense T 2023-06-26 06:18:07 +08:00
parent 683a772bc4
commit 8781b2d636
8 changed files with 217 additions and 109 deletions

101
flake.lock Normal file
View File

@ -0,0 +1,101 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1687647567,
"narHash": "sha256-Ua90LZYJO7/7KW/KK/AqijhIekd+wxPwbVKXuBYzJeQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6ca1e16eb3016c94b7ac16699e1d4158bd4e39a4",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1684264534,
"narHash": "sha256-K0zr+ry3FwIo3rN2U/VWAkCJSgBslBisvfRIPwMbuCQ=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "89253fb1518063556edd5e54509c30ac3089d5e6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nixos-cn": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1682818384,
"narHash": "sha256-l8jh9BQj6nfjPDYGyrZkZwX1GaOqBX+pBHU+7fFZU3w=",
"owner": "nixos-cn",
"repo": "flakes",
"rev": "2d475ec68cca251ef6c6c69a9224db5c264c5e5b",
"type": "github"
},
"original": {
"owner": "nixos-cn",
"repo": "flakes",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1687555006,
"narHash": "sha256-GD2Kqb/DXQBRJcHqkM2qFZqbVenyO7Co/80JHRMg2U0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "33223d479ffde3d05ac16c6dff04ae43cc27e577",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.05",
"type": "indirect"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"impermanence": "impermanence",
"nixos-cn": "nixos-cn",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -25,13 +25,13 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
inputs.nixos-cn = { nixos-cn = {
url = "github:nixos-cn/flakes"; url = "github:nixos-cn/flakes";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = {self, nixpkgs, home-manager, nixos-cn,...}: { outputs = {self, nixpkgs, home-manager, nixos-cn, impermanence, ...}: {
nixosConfigurations.gpd = nixpkgs.lib.nixosSystem rec { nixosConfigurations.gpd = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";
@ -54,7 +54,7 @@
home-manager.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 = import ./per-user; home-manager.users = import ./home;
} }
]; ];
}; };

View File

@ -2,7 +2,7 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
wlr.enable = true; wlr.enable = true;
} };
# Enable automatic login for the user. # Enable automatic login for the user.
services = { services = {

View File

@ -1,8 +1,13 @@
{pkgs, ...}: { {pkgs, ...}: {
home = import ./home.nix; imports = [
programs = import ./programs.nix; ./home.nix
services = import ./services.nix; ./programs.nix
systemd.user.services = import ./systemd.nix; ./services.nix
];
systemd.user.services = {
# TODO: Podman
};
i18n.inputMethod.enabled = "fcitx5"; i18n.inputMethod.enabled = "fcitx5";
i18n.inputMethod.fcitx5.addons = with pkgs; [ i18n.inputMethod.fcitx5.addons = with pkgs; [

View File

@ -1,44 +1,46 @@
{pkgs, ...}: { {pkgs, ...}: {
stateVersion = "23.05"; # Static home = {
username = "GPD User"; stateVersion = "23.05"; # Static
homeDirectory = "/home/user"; username = "GPD User";
homeDirectory = "/home/user";
packages = with pkgs; [ packages = with pkgs; [
btop btop
bat bat
thefuck thefuck
ranger ranger
icdiff icdiff
podman podman
jdk17 jdk17
rofi rofi
rofi-rbw rofi-rbw
]; ];
sessionPath = { sessionPath = [
".local/bin" ".local/bin"
"Applications" "Applications"
} ];
shellAliases = { shellAliases = {
cao = "fuck"; cao = "fuck";
top = "btop"; top = "btop";
ls = "ls --color=auto"; ls = "ls --color=auto";
cat = "bat -p --paging=never -u"; cat = "bat -p --paging=never -u";
diff="icdiff"; diff="icdiff";
}; };
file = { file = {
# hyprland # hyprland
".config/hypr/hyprland.conf".source = ./files/hyprland.conf; ".config/hypr/hyprland.conf".source = ./files/hyprland.conf;
# Use flatseal to change permissions. # Use flatseal to change permissions.
".local/share/fonts".source = /run/current-system/sw/share/X11/fonts ".local/share/fonts".source = /run/current-system/sw/share/X11/fonts;
# Fix flatpak fonts # Fix flatpak fonts
".local/share/flatpak/overrides/global".text = '' ".local/share/flatpak/overrides/global".text = ''
[Context] [Context]
filesystems=~/.local/share/fonts:ro;~/.icons; filesystems=~/.local/share/fonts:ro;~/.icons;
''; '';
};
}; };
} }

View File

@ -1,63 +1,65 @@
{pkgs, ...}: { {pkgs, ...}: {
home-manager.enable = true; programs = {
home-manager.enable = true;
vim = { vim = {
enable = true;
defaultEditor = true;
};
zsh = {
enable = true;
enableSyntaxHighlighting = true;
oh-my-zsh = {
enable = true; enable = true;
plugins = [ "sudo" "git" "golang" "thefuck" "kubectl" "emoji" "pip" "npm" "yarn" "vscode" ]; defaultEditor = true;
theme = "agnoster";
};
};
waybar = {
enable = true;
systemd.enable = true;
# see https://github.com/theCode-Breaker/riverwm/blob/main/waybar/river/config-river
# https://blog.cascade.moe/posts/hyprland-configure/
settings = {
mainBar = import ./config/waybar.nix;
}; };
style = import ./config/waybar-style.nix; zsh = {
}; enable = true;
enableSyntaxHighlighting = true;
kitty = { oh-my-zsh = {
enable = true; enable = true;
font = { plugins = [ "sudo" "git" "golang" "thefuck" "kubectl" "emoji" "pip" "npm" "yarn" "vscode" ];
name = "Powerline"; theme = "agnoster";
size = 12; };
}; };
keybindings = { waybar = {
"ctrl+c" = "copy_or_interrupt"; enable = true;
"ctrl+v" = "paste_from_clipboard"; systemd.enable = true;
# see https://github.com/theCode-Breaker/riverwm/blob/main/waybar/river/config-river
# https://blog.cascade.moe/posts/hyprland-configure/
settings = {
mainBar = import ./config/waybar.nix;
};
style = import ./config/waybar-style.nix;
}; };
shellIntegration = { kitty = {
enableZshIntegration = true; enable = true;
enableBashIntegration = true; font = {
name = "Powerline";
size = 12;
};
keybindings = {
"ctrl+c" = "copy_or_interrupt";
"ctrl+v" = "paste_from_clipboard";
};
shellIntegration = {
enableZshIntegration = true;
enableBashIntegration = true;
};
settings = {
background_opacity = 0.8;
};
}; };
settings = { rbw = {
background_opacity = 0.8; enable = true;
}; settings = {
}; base_url = "https://pass.sense-t.eu.org";
email = "sense-t@sense-t.eu.org";
rbw = { lock_timeout = 300;
enable = true; pinentry = "gnome3";
settings = { };
base_url = "https://pass.sense-t.eu.org";
email = "sense-t@sense-t.eu.org";
lock_timeout = 300;
pinentry = "gnome3";
}; };
}; };
} }

View File

@ -1,19 +1,21 @@
{ {
dunst = { services = {
enable = true; dunst = {
settings = { enable = true;
global = { settings = {
width = 300; global = {
height = 300; width = 300;
offset = "30x50"; height = 300;
origin = "top-right"; offset = "30x50";
notification_limit = 10; origin = "top-right";
progress_bar = true; notification_limit = 10;
transparency = 20; progress_bar = true;
corner_radius = 8; transparency = 20;
corner_radius = 8;
};
}; };
}; };
};
network-manager-applet.enable = true; network-manager-applet.enable = true;
};
} }

View File

@ -1,4 +0,0 @@
# Will used for podman
{
}